From c93ffb7702d2d0737a315e9dc1a11c633d67f9f7 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:17:31 -0400 Subject: [PATCH 01/13] v2 bundles api copy --- launch/api_client/__init__.py | 14 +- launch/api_client/api_client.py | 504 +++++----- launch/api_client/apis/__init__.py | 2 +- launch/api_client/apis/path_to_api.py | 50 +- .../v1_model_bundles_clone_with_changes.py | 4 +- .../paths/v1_model_bundles_model_bundle_id.py | 4 +- .../v1_model_endpoints_model_endpoint_id.py | 12 +- .../paths/v1_model_endpoints_schema_json.py | 4 +- .../v2_model_bundles_clone_with_changes.py | 4 +- .../paths/v2_model_bundles_model_bundle_id.py | 4 +- launch/api_client/apis/tag_to_api.py | 4 +- launch/api_client/apis/tags/default_api.py | 93 +- launch/api_client/configuration.py | 213 ++-- launch/api_client/exceptions.py | 11 +- .../model/batch_job_serialization_format.py | 14 +- .../model/batch_job_serialization_format.pyi | 14 +- launch/api_client/model/batch_job_status.py | 22 +- launch/api_client/model/batch_job_status.pyi | 18 +- launch/api_client/model/callback_auth.py | 58 +- launch/api_client/model/callback_auth.pyi | 59 +- .../api_client/model/callback_basic_auth.py | 134 +-- .../api_client/model/callback_basic_auth.pyi | 99 +- launch/api_client/model/callbackm_tls_auth.py | 135 +-- .../api_client/model/callbackm_tls_auth.pyi | 100 +- .../model/clone_model_bundle_v1_request.py | 110 +- .../model/clone_model_bundle_v1_request.pyi | 93 +- .../model/clone_model_bundle_v2_request.py | 110 +- .../model/clone_model_bundle_v2_request.pyi | 93 +- .../model/cloudpickle_artifact_flavor.py | 298 ++---- .../model/cloudpickle_artifact_flavor.pyi | 236 ++--- .../model/create_async_task_v1_response.py | 84 +- .../model/create_async_task_v1_response.pyi | 69 +- .../create_batch_job_resource_requests.py | 380 ++----- .../create_batch_job_resource_requests.pyi | 325 ++---- .../model/create_batch_job_v1_request.py | 211 ++-- .../model/create_batch_job_v1_request.pyi | 177 ++-- .../model/create_batch_job_v1_response.py | 84 +- .../model/create_batch_job_v1_response.pyi | 69 +- .../model/create_model_bundle_v1_request.py | 253 ++--- .../model/create_model_bundle_v1_request.pyi | 195 ++-- .../model/create_model_bundle_v1_response.py | 84 +- .../model/create_model_bundle_v1_response.pyi | 77 +- .../model/create_model_bundle_v2_request.py | 209 +--- .../model/create_model_bundle_v2_request.pyi | 177 +--- .../model/create_model_bundle_v2_response.py | 84 +- .../model/create_model_bundle_v2_response.pyi | 77 +- .../model/create_model_endpoint_v1_request.py | 734 ++++---------- .../create_model_endpoint_v1_request.pyi | 576 ++++------- .../create_model_endpoint_v1_response.py | 88 +- .../create_model_endpoint_v1_response.pyi | 77 +- launch/api_client/model/custom_framework.py | 136 +-- launch/api_client/model/custom_framework.pyi | 111 +- .../delete_model_endpoint_v1_response.py | 84 +- .../delete_model_endpoint_v1_response.pyi | 69 +- .../model/endpoint_predict_v1_request.py | 181 +--- .../model/endpoint_predict_v1_request.pyi | 138 +-- .../model/get_async_task_v1_response.py | 158 +-- .../model/get_async_task_v1_response.pyi | 125 +-- .../model/get_batch_job_v1_response.py | 166 +-- .../model/get_batch_job_v1_response.pyi | 131 +-- .../model/get_model_endpoint_v1_response.py | 518 +++------- .../model/get_model_endpoint_v1_response.pyi | 393 +++----- launch/api_client/model/gpu_type.py | 16 +- launch/api_client/model/gpu_type.pyi | 15 +- .../api_client/model/http_validation_error.py | 101 +- .../model/http_validation_error.pyi | 84 +- .../model/list_model_bundles_v1_response.py | 112 +-- .../model/list_model_bundles_v1_response.pyi | 89 +- .../model/list_model_bundles_v2_response.py | 112 +-- .../model/list_model_bundles_v2_response.pyi | 89 +- .../model/list_model_endpoints_v1_response.py | 115 +-- .../list_model_endpoints_v1_response.pyi | 104 +- .../model/model_bundle_environment_params.py | 164 +-- .../model/model_bundle_environment_params.pyi | 131 +-- .../model/model_bundle_framework_type.py | 18 +- .../model/model_bundle_framework_type.pyi | 17 +- .../api_client/model/model_bundle_order_by.py | 16 +- .../model/model_bundle_order_by.pyi | 16 +- .../model/model_bundle_packaging_type.py | 20 +- .../model/model_bundle_packaging_type.pyi | 19 +- .../model/model_bundle_v1_response.py | 342 ++----- .../model/model_bundle_v1_response.pyi | 259 ++--- .../model/model_bundle_v2_response.py | 295 ++---- .../model/model_bundle_v2_response.pyi | 236 ++--- .../model/model_endpoint_deployment_state.py | 202 ++-- .../model/model_endpoint_deployment_state.pyi | 153 ++- .../model/model_endpoint_order_by.py | 18 +- .../model/model_endpoint_order_by.pyi | 17 +- .../model/model_endpoint_resource_state.py | 375 ++----- .../model/model_endpoint_resource_state.pyi | 319 ++---- .../api_client/model/model_endpoint_status.py | 20 +- .../model/model_endpoint_status.pyi | 17 +- .../api_client/model/model_endpoint_type.py | 14 +- .../api_client/model/model_endpoint_type.pyi | 14 +- launch/api_client/model/pytorch_framework.py | 121 +-- launch/api_client/model/pytorch_framework.pyi | 102 +- launch/api_client/model/request_schema.py | 5 +- launch/api_client/model/request_schema.pyi | 6 +- launch/api_client/model/response_schema.py | 5 +- launch/api_client/model/response_schema.pyi | 6 +- .../api_client/model/runnable_image_flavor.py | 273 ++--- .../model/runnable_image_flavor.pyi | 207 ++-- .../sync_endpoint_predict_v1_response.py | 141 +-- .../sync_endpoint_predict_v1_response.pyi | 116 +-- launch/api_client/model/task_status.py | 20 +- launch/api_client/model/task_status.pyi | 17 +- .../api_client/model/tensorflow_framework.py | 121 +-- .../api_client/model/tensorflow_framework.pyi | 102 +- .../triton_enhanced_runnable_image_flavor.py | 337 +++++++ .../triton_enhanced_runnable_image_flavor.pyi | 325 ++++++ .../model/update_batch_job_v1_request.py | 84 +- .../model/update_batch_job_v1_request.pyi | 69 +- .../model/update_batch_job_v1_response.py | 84 +- .../model/update_batch_job_v1_response.pyi | 69 +- .../model/update_model_endpoint_v1_request.py | 698 ++++--------- .../update_model_endpoint_v1_request.pyi | 559 ++++------- .../update_model_endpoint_v1_response.py | 88 +- .../update_model_endpoint_v1_response.pyi | 77 +- launch/api_client/model/validation_error.py | 230 ++--- launch/api_client/model/validation_error.pyi | 195 +--- .../api_client/model/zip_artifact_flavor.py | 306 ++---- .../api_client/model/zip_artifact_flavor.pyi | 244 ++--- launch/api_client/models/__init__.py | 141 +-- .../api_client/paths/healthcheck/__init__.py | 2 +- launch/api_client/paths/healthcheck/get.py | 85 +- launch/api_client/paths/healthcheck/get.pyi | 83 +- launch/api_client/paths/healthz/__init__.py | 2 +- launch/api_client/paths/healthz/get.py | 85 +- launch/api_client/paths/healthz/get.pyi | 83 +- launch/api_client/paths/readyz/__init__.py | 2 +- launch/api_client/paths/readyz/get.py | 85 +- launch/api_client/paths/readyz/get.pyi | 83 +- .../paths/v1_async_tasks/__init__.py | 2 +- .../api_client/paths/v1_async_tasks/post.py | 163 +-- .../api_client/paths/v1_async_tasks/post.pyi | 162 ++- .../paths/v1_async_tasks_task_id/__init__.py | 2 +- .../paths/v1_async_tasks_task_id/get.py | 121 ++- .../paths/v1_async_tasks_task_id/get.pyi | 119 ++- .../paths/v1_batch_jobs/__init__.py | 2 +- launch/api_client/paths/v1_batch_jobs/post.py | 145 +-- .../api_client/paths/v1_batch_jobs/post.pyi | 142 ++- .../v1_batch_jobs_batch_job_id/__init__.py | 2 +- .../paths/v1_batch_jobs_batch_job_id/get.py | 121 ++- .../paths/v1_batch_jobs_batch_job_id/get.pyi | 115 ++- .../paths/v1_batch_jobs_batch_job_id/put.py | 165 +-- .../paths/v1_batch_jobs_batch_job_id/put.pyi | 164 ++- .../paths/v1_model_bundles/__init__.py | 2 +- .../api_client/paths/v1_model_bundles/get.py | 120 ++- .../api_client/paths/v1_model_bundles/get.pyi | 118 ++- .../api_client/paths/v1_model_bundles/post.py | 145 +-- .../paths/v1_model_bundles/post.pyi | 142 ++- .../__init__.py | 2 +- .../post.py | 145 +-- .../post.pyi | 142 ++- .../paths/v1_model_bundles_latest/__init__.py | 2 +- .../paths/v1_model_bundles_latest/get.py | 119 ++- .../paths/v1_model_bundles_latest/get.pyi | 115 ++- .../__init__.py | 2 +- .../v1_model_bundles_model_bundle_id/get.py | 121 ++- .../v1_model_bundles_model_bundle_id/get.pyi | 117 ++- .../paths/v1_model_endpoints/__init__.py | 2 +- .../paths/v1_model_endpoints/get.py | 122 ++- .../paths/v1_model_endpoints/get.pyi | 116 ++- .../paths/v1_model_endpoints/post.py | 145 +-- .../paths/v1_model_endpoints/post.pyi | 142 ++- .../paths/v1_model_endpoints_api/__init__.py | 2 +- .../paths/v1_model_endpoints_api/get.py | 87 +- .../paths/v1_model_endpoints_api/get.pyi | 83 +- .../__init__.py | 2 +- .../delete.py | 121 ++- .../delete.pyi | 119 ++- .../get.py | 121 ++- .../get.pyi | 119 ++- .../put.py | 165 +-- .../put.pyi | 164 ++- .../__init__.py | 2 +- .../v1_model_endpoints_schema_json/get.py | 87 +- .../v1_model_endpoints_schema_json/get.pyi | 83 +- .../paths/v1_sync_tasks/__init__.py | 2 +- launch/api_client/paths/v1_sync_tasks/post.py | 163 +-- .../api_client/paths/v1_sync_tasks/post.pyi | 162 ++- .../paths/v2_model_bundles/__init__.py | 2 +- .../api_client/paths/v2_model_bundles/get.py | 120 ++- .../api_client/paths/v2_model_bundles/get.pyi | 118 ++- .../api_client/paths/v2_model_bundles/post.py | 145 +-- .../paths/v2_model_bundles/post.pyi | 142 ++- .../__init__.py | 2 +- .../post.py | 145 +-- .../post.pyi | 142 ++- .../paths/v2_model_bundles_latest/__init__.py | 2 +- .../paths/v2_model_bundles_latest/get.py | 119 ++- .../paths/v2_model_bundles_latest/get.pyi | 115 ++- .../__init__.py | 2 +- .../v2_model_bundles_model_bundle_id/get.py | 121 ++- .../v2_model_bundles_model_bundle_id/get.pyi | 117 ++- launch/api_client/rest.py | 146 +-- launch/api_client/schemas.py | 947 +++++++----------- 197 files changed, 10779 insertions(+), 13865 deletions(-) create mode 100644 launch/api_client/model/triton_enhanced_runnable_image_flavor.py create mode 100644 launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi diff --git a/launch/api_client/__init__.py b/launch/api_client/__init__.py index ce19c32b..2e8cb84e 100644 --- a/launch/api_client/__init__.py +++ b/launch/api_client/__init__.py @@ -20,11 +20,9 @@ from launch.api_client.configuration import Configuration # import exceptions -from launch.api_client.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from launch.api_client.exceptions import OpenApiException +from launch.api_client.exceptions import ApiAttributeError +from launch.api_client.exceptions import ApiTypeError +from launch.api_client.exceptions import ApiValueError +from launch.api_client.exceptions import ApiKeyError +from launch.api_client.exceptions import ApiException diff --git a/launch/api_client/api_client.py b/launch/api_client/api_client.py index 1a73582b..8f106a71 100644 --- a/launch/api_client/api_client.py +++ b/launch/api_client/api_client.py @@ -8,39 +8,39 @@ Generated by: https://openapi-generator.tech """ -import atexit -import email +from dataclasses import dataclass +from decimal import Decimal import enum -import io +import email import json import os +import io +import atexit +from multiprocessing.pool import ThreadPool import re import tempfile import typing -from dataclasses import dataclass -from decimal import Decimal -from multiprocessing.pool import ThreadPool -from urllib.parse import quote, urlparse - -import frozendict import typing_extensions import urllib3 from urllib3._collections import HTTPHeaderDict +from urllib.parse import urlparse, quote from urllib3.fields import RequestField as RequestFieldBase +import frozendict + from launch.api_client import rest from launch.api_client.configuration import Configuration from launch.api_client.exceptions import ApiTypeError, ApiValueError from launch.api_client.schemas import ( - BinarySchema, - BoolClass, - FileIO, NoneClass, + BoolClass, Schema, - Unset, + FileIO, + BinarySchema, date, datetime, none_type, + Unset, unset, ) @@ -53,7 +53,7 @@ def __eq__(self, other): class JSONEncoder(json.JSONEncoder): - compact_separators = (",", ":") + compact_separators = (',', ':') def default(self, obj): if isinstance(obj, str): @@ -74,24 +74,24 @@ def default(self, obj): return {key: self.default(val) for key, val in obj.items()} elif isinstance(obj, (list, tuple)): return [self.default(item) for item in obj] - raise ApiValueError("Unable to prepare type {} for serialization".format(obj.__class__.__name__)) + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) class ParameterInType(enum.Enum): - QUERY = "query" - HEADER = "header" - PATH = "path" - COOKIE = "cookie" + QUERY = 'query' + HEADER = 'header' + PATH = 'path' + COOKIE = 'cookie' class ParameterStyle(enum.Enum): - MATRIX = "matrix" - LABEL = "label" - FORM = "form" - SIMPLE = "simple" - SPACE_DELIMITED = "spaceDelimited" - PIPE_DELIMITED = "pipeDelimited" - DEEP_OBJECT = "deepObject" + MATRIX = 'matrix' + LABEL = 'label' + FORM = 'form' + SIMPLE = 'simple' + SPACE_DELIMITED = 'spaceDelimited' + PIPE_DELIMITED = 'pipeDelimited' + DEEP_OBJECT = 'deepObject' class PrefixSeparatorIterator: @@ -101,10 +101,10 @@ def __init__(self, prefix: str, separator: str): self.prefix = prefix self.separator = separator self.first = True - if separator in {".", "|", "%20"}: + if separator in {'.', '|', '%20'}: item_separator = separator else: - item_separator = "," + item_separator = ',' self.item_separator = item_separator def __iter__(self): @@ -146,7 +146,7 @@ def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): elif isinstance(in_data, dict) and not in_data: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return None - raise ApiValueError("Unable to generate a ref6570 item representation of {}".format(in_data)) + raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) @staticmethod def _to_dict(name: str, value: str): @@ -161,12 +161,12 @@ def __ref6570_str_float_int_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool, + named_parameter_expansion: bool ) -> str: item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == "" and prefix_separator_iterator.separator == ";"): + if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = "=" if named_parameter_expansion else "" + value_pair_equals = '=' if named_parameter_expansion else '' return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value @classmethod @@ -178,20 +178,20 @@ def __ref6570_list_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool, + named_parameter_expansion: bool ) -> str: item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] item_values = [v for v in item_values if v is not None] if not item_values: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return "" - value_pair_equals = "=" if named_parameter_expansion else "" + value_pair_equals = '=' if named_parameter_expansion else '' if not explode: return ( - next(prefix_separator_iterator) - + var_name_piece - + value_pair_equals - + prefix_separator_iterator.item_separator.join(item_values) + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) ) # exploded return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( @@ -207,27 +207,27 @@ def __ref6570_dict_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool, + named_parameter_expansion: bool ) -> str: in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} if not in_data_transformed: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return "" - value_pair_equals = "=" if named_parameter_expansion else "" + value_pair_equals = '=' if named_parameter_expansion else '' if not explode: return ( - next(prefix_separator_iterator) - + var_name_piece - + value_pair_equals - + prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join(item_pair) - for item_pair in in_data_transformed.items() + next(prefix_separator_iterator) + + var_name_piece + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join( + item_pair + ) for item_pair in in_data_transformed.items() ) ) # exploded return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + "=" + val for key, val in in_data_transformed.items()] + [key + '=' + val for key, val in in_data_transformed.items()] ) @classmethod @@ -237,13 +237,13 @@ def _ref6570_expansion( in_data: typing.Any, explode: bool, percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, + prefix_separator_iterator: PrefixSeparatorIterator ) -> str: """ Separator is for separate variables like dict with explode true, not for array item separation """ - named_parameter_expansion = prefix_separator_iterator.separator in {"&", ";"} - var_name_piece = variable_name if named_parameter_expansion else "" + named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} + var_name_piece = variable_name if named_parameter_expansion else '' if type(in_data) in {str, float, int}: return cls.__ref6570_str_float_int_expansion( variable_name, @@ -252,7 +252,7 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion, + named_parameter_expansion ) elif isinstance(in_data, none_type): # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 @@ -265,7 +265,7 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion, + named_parameter_expansion ) elif isinstance(in_data, dict): return cls.__ref6570_dict_expansion( @@ -275,10 +275,10 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion, + named_parameter_expansion ) # bool, bytes, etc - raise ApiValueError("Unable to generate a ref6570 representation of {}".format(in_data)) + raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) class StyleFormSerializer(ParameterSerializerBase): @@ -294,34 +294,35 @@ def _serialize_form( name: str, explode: bool, percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None ) -> str: if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator("", "&") + prefix_separator_iterator = PrefixSeparatorIterator('', '&') return self._ref6570_expansion( variable_name=name, in_data=in_data, explode=explode, percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) class StyleSimpleSerializer(ParameterSerializerBase): + def _serialize_simple( self, in_data: typing.Union[None, int, float, str, bool, dict, list], name: str, explode: bool, - percent_encode: bool, + percent_encode: bool ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator("", ",") + prefix_separator_iterator = PrefixSeparatorIterator('', ',') return self._ref6570_expansion( variable_name=name, in_data=in_data, explode=explode, percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) @@ -333,7 +334,6 @@ class JSONDetector: application/json-patch+json application/geo+json """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") @classmethod @@ -369,7 +369,7 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {"Accept", "Content-Type", "Authorization"} + __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} _json_encoder = JSONEncoder() @classmethod @@ -379,7 +379,7 @@ def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_ty in_type_set = cls.__style_to_in_type[style] if in_type not in in_type_set: raise ValueError( - "Invalid style and in_type combination. For style={} only in_type={} are allowed".format( + 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( style, in_type_set ) ) @@ -393,19 +393,19 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): if schema is None and content is None: - raise ValueError("Value missing; Pass in either schema or content") + raise ValueError('Value missing; Pass in either schema or content') if schema and content: - raise ValueError("Too many values provided. Both schema and content were provided. Only one may be input") + raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError("Invalid name, name may not be one of {}".format(self.__disallowed_header_names)) + raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError("Invalid content length, content length must equal 1") + raise ValueError('Invalid content length, content length must equal 1') self.in_type = in_type self.name = name self.required = required @@ -418,7 +418,7 @@ def __init__( def _serialize_json( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False, + eliminate_whitespace: bool = False ) -> str: if eliminate_whitespace: return json.dumps(in_data, separators=self._json_encoder.compact_separators) @@ -426,6 +426,7 @@ def _serialize_json( class PathParameter(ParameterBase, StyleSimpleSerializer): + def __init__( self, name: str, @@ -434,7 +435,7 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( name, @@ -444,32 +445,34 @@ def __init__( explode=explode, allow_reserved=allow_reserved, schema=schema, - content=content, + content=content ) def __serialize_label( - self, in_data: typing.Union[None, int, float, str, bool, dict, list] + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(".", ".") + prefix_separator_iterator = PrefixSeparatorIterator('.', '.') value = self._ref6570_expansion( variable_name=self.name, in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) return self._to_dict(self.name, value) def __serialize_matrix( - self, in_data: typing.Union[None, int, float, str, bool, dict, list] + self, + in_data: typing.Union[None, int, float, str, bool, dict, list] ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(";", ";") + prefix_separator_iterator = PrefixSeparatorIterator(';', ';') value = self._ref6570_expansion( variable_name=self.name, in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) return self._to_dict(self.name, value) @@ -477,26 +480,18 @@ def __serialize_simple( self, in_data: typing.Union[None, int, float, str, bool, dict, list], ) -> typing.Dict[str, str]: - value = self._serialize_simple(in_data=in_data, name=self.name, explode=self.explode, percent_encode=True) + value = self._serialize_simple( + in_data=in_data, + name=self.name, + explode=self.explode, + percent_encode=True + ) return self._to_dict(self.name, value) def serialize( self, in_data: typing.Union[ - Schema, - Decimal, - int, - float, - str, - date, - datetime, - None, - bool, - list, - tuple, - dict, - frozendict.frozendict, - ], + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -524,10 +519,11 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) - raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) class QueryParameter(ParameterBase, StyleFormSerializer): + def __init__( self, name: str, @@ -536,7 +532,7 @@ def __init__( explode: typing.Optional[bool] = None, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode @@ -549,13 +545,13 @@ def __init__( explode=used_explode, allow_reserved=allow_reserved, schema=schema, - content=content, + content=content ) def __serialize_space_delimited( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -564,14 +560,14 @@ def __serialize_space_delimited( in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) return self._to_dict(self.name, value) def __serialize_pipe_delimited( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -580,14 +576,14 @@ def __serialize_pipe_delimited( in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) return self._to_dict(self.name, value) def __serialize_form( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -596,36 +592,23 @@ def __serialize_form( name=self.name, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator, + prefix_separator_iterator=prefix_separator_iterator ) return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator("?", "&") + return PrefixSeparatorIterator('?', '&') elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator("", "%20") + return PrefixSeparatorIterator('', '%20') elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator("", "|") + return PrefixSeparatorIterator('', '|') def serialize( self, in_data: typing.Union[ - Schema, - Decimal, - int, - float, - str, - date, - datetime, - None, - bool, - list, - tuple, - dict, - frozendict.frozendict, - ], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -659,11 +642,15 @@ def serialize( cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict(self.name, next(prefix_separator_iterator) + self.name + "=" + quote(value)) - raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) + return self._to_dict( + self.name, + next(prefix_separator_iterator) + self.name + '=' + quote(value) + ) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) class CookieParameter(ParameterBase, StyleFormSerializer): + def __init__( self, name: str, @@ -672,7 +659,7 @@ def __init__( explode: typing.Optional[bool] = None, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode @@ -685,26 +672,13 @@ def __init__( explode=used_explode, allow_reserved=allow_reserved, schema=schema, - content=content, + content=content ) def serialize( self, in_data: typing.Union[ - Schema, - Decimal, - int, - float, - str, - date, - datetime, - None, - bool, - list, - tuple, - dict, - frozendict.frozendict, - ], + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -723,7 +697,7 @@ def serialize( explode=self.explode, name=self.name, percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator("", "&"), + prefix_separator_iterator=PrefixSeparatorIterator('', '&') ) return self._to_dict(self.name, value) # self.content will be length one @@ -733,7 +707,7 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) - raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) class HeaderParameter(ParameterBase, StyleSimpleSerializer): @@ -745,7 +719,7 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None ): super().__init__( name, @@ -755,7 +729,7 @@ def __init__( explode=explode, allow_reserved=allow_reserved, schema=schema, - content=content, + content=content ) @staticmethod @@ -770,20 +744,7 @@ def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHead def serialize( self, in_data: typing.Union[ - Schema, - Decimal, - int, - float, - str, - date, - datetime, - None, - bool, - list, - tuple, - dict, - frozendict.frozendict, - ], + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -803,7 +764,7 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) - raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) + raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) class Encoding: @@ -832,7 +793,6 @@ class MediaType: The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. """ - schema: typing.Optional[typing.Type[Schema]] = None encoding: typing.Optional[typing.Dict[str, Encoding]] = None @@ -847,7 +807,7 @@ def __init__( self, response: urllib3.HTTPResponse, body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset, + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -875,7 +835,7 @@ def __init__( ): self.headers = headers if content is not None and len(content) == 0: - raise ValueError("Invalid value for content, the content dict must have >= 1 entry") + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') self.content = content self.response_cls = response_cls @@ -916,16 +876,17 @@ def __deserialize_application_octet_stream( a file will be written and returned """ if response.supports_chunked_reads(): - file_name = self.__file_name_from_content_disposition( - response.headers.get("content-disposition") - ) or self.__file_name_from_response_url(response.geturl()) + file_name = ( + self.__file_name_from_content_disposition(response.headers.get('content-disposition')) + or self.__file_name_from_response_url(response.geturl()) + ) if file_name is None: _fd, path = tempfile.mkstemp() else: path = os.path.join(tempfile.gettempdir(), file_name) - with open(path, "wb") as new_file: + with open(path, 'wb') as new_file: chunk_size = 1024 while True: data = response.read(chunk_size) @@ -934,27 +895,27 @@ def __deserialize_application_octet_stream( new_file.write(data) # release_conn is needed for streaming connections only response.release_conn() - new_file = open(path, "rb") + new_file = open(path, 'rb') return new_file else: return response.data @staticmethod def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse, + response: urllib3.HTTPResponse ) -> typing.Dict[str, typing.Any]: msg = email.message_from_bytes(response.data) return { - part.get_param("name", header="Content-Disposition"): part.get_payload(decode=True).decode( - part.get_content_charset() - ) + part.get_param("name", header="Content-Disposition"): part.get_payload( + decode=True + ).decode(part.get_content_charset()) if part.get_content_charset() else part.get_payload() for part in msg.get_payload() } def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader("content-type") + content_type = response.getheader('content-type') deserialized_body = unset streamed = response.supports_chunked_reads() @@ -972,22 +933,31 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati body_schema = self.content[content_type].schema if body_schema is None: # some specs do not define response content media type schemas - return self.response_cls(response=response, headers=deserialized_headers, body=unset) + return self.response_cls( + response=response, + headers=deserialized_headers, + body=unset + ) if self._content_type_is_json(content_type): body_data = self.__deserialize_json(response) - elif content_type == "application/octet-stream": + elif content_type == 'application/octet-stream': body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith("multipart/form-data"): + elif content_type.startswith('multipart/form-data'): body_data = self.__deserialize_multipart_form_data(response) - content_type = "multipart/form-data" + content_type = 'multipart/form-data' else: - raise NotImplementedError("Deserialization of {} has not yet been implemented".format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg(body_data, _configuration=configuration) + raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) + deserialized_body = body_schema.from_openapi_data_oapg( + body_data, _configuration=configuration) elif streamed: response.release_conn() - return self.response_cls(response=response, headers=deserialized_headers, body=deserialized_body) + return self.response_cls( + response=response, + headers=deserialized_headers, + body=deserialized_body + ) class ApiClient: @@ -1020,7 +990,7 @@ def __init__( header_name: typing.Optional[str] = None, header_value: typing.Optional[str] = None, cookie: typing.Optional[str] = None, - pool_threads: int = 1, + pool_threads: int = 1 ): if configuration is None: configuration = Configuration() @@ -1033,7 +1003,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.1.0/python" + self.user_agent = 'OpenAPI-Generator/1.1.0/python' def __enter__(self): return self @@ -1046,13 +1016,13 @@ def close(self): self._pool.close() self._pool.join() self._pool = None - if hasattr(atexit, "unregister"): + if hasattr(atexit, 'unregister'): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. + avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) @@ -1062,11 +1032,11 @@ def pool(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -1083,13 +1053,15 @@ def __call_api( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, host: typing.Optional[str] = None, ) -> urllib3.HTTPResponse: + # header parameters used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: - headers["Cookie"] = self.cookie + headers['Cookie'] = self.cookie # auth setting - self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) + self.update_params_for_auth(used_headers, + auth_settings, resource_path, method, body) # must happen after cookie setting and auth setting in case user is overriding those if headers: @@ -1187,7 +1159,7 @@ def call_api( stream, timeout, host, - ), + ) ) def request( @@ -1202,27 +1174,57 @@ def request( ) -> urllib3.HTTPResponse: """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET(url, stream=stream, timeout=timeout, headers=headers) + return self.rest_client.GET(url, + stream=stream, + timeout=timeout, + headers=headers) elif method == "HEAD": - return self.rest_client.HEAD(url, stream=stream, timeout=timeout, headers=headers) + return self.rest_client.HEAD(url, + stream=stream, + timeout=timeout, + headers=headers) elif method == "OPTIONS": - return self.rest_client.OPTIONS( - url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body - ) + return self.rest_client.OPTIONS(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) elif method == "POST": - return self.rest_client.POST(url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body) + return self.rest_client.POST(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) elif method == "PUT": - return self.rest_client.PUT(url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body) + return self.rest_client.PUT(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) elif method == "PATCH": - return self.rest_client.PATCH( - url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body - ) + return self.rest_client.PATCH(url, + headers=headers, + fields=fields, + stream=stream, + timeout=timeout, + body=body) elif method == "DELETE": - return self.rest_client.DELETE(url, headers=headers, stream=stream, timeout=timeout, body=body) + return self.rest_client.DELETE(url, + headers=headers, + stream=stream, + timeout=timeout, + body=body) else: - raise ApiValueError("http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`.") + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) - def update_params_for_auth(self, headers, auth_settings, resource_path, method, body): + def update_params_for_auth(self, headers, auth_settings, + resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -1239,19 +1241,21 @@ def update_params_for_auth(self, headers, auth_settings, resource_path, method, auth_setting = self.configuration.auth_settings().get(auth) if not auth_setting: continue - if auth_setting["in"] == "cookie": - headers.add("Cookie", auth_setting["value"]) - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers.add(auth_setting["key"], auth_setting["value"]) - elif auth_setting["in"] == "query": - """TODO implement auth in query + if auth_setting['in'] == 'cookie': + headers.add('Cookie', auth_setting['value']) + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers.add(auth_setting['key'], auth_setting['value']) + elif auth_setting['in'] == 'query': + """ TODO implement auth in query need to pass in prefix_separator_iterator and need to output resource_path with query params added """ raise ApiValueError("Auth in query not yet implemented") else: - raise ApiValueError("Authentication token must be in `query` or `header`") + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Api: @@ -1267,9 +1271,7 @@ def __init__(self, api_client: typing.Optional[ApiClient] = None): self.api_client = api_client @staticmethod - def _verify_typed_dict_inputs_oapg( - cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any] - ): + def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): """ Ensures that: - required keys are present @@ -1288,16 +1290,14 @@ def _verify_typed_dict_inputs_oapg( required_keys_with_unset_values.append(required_key) if missing_required_keys: raise ApiTypeError( - "{} missing {} required arguments: {}".format( + '{} missing {} required arguments: {}'.format( cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) + ) + ) if required_keys_with_unset_values: raise ApiValueError( - "{} contains invalid unset values for {} required keys: {}".format( - cls.__name__, - len(required_keys_with_unset_values), - required_keys_with_unset_values, + '{} contains invalid unset values for {} required keys: {}'.format( + cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values ) ) @@ -1308,7 +1308,7 @@ def _verify_typed_dict_inputs_oapg( disallowed_additional_keys.append(key) if disallowed_additional_keys: raise ApiTypeError( - "{} got {} unexpected keyword arguments: {}".format( + '{} got {} unexpected keyword arguments: {}'.format( cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys ) ) @@ -1317,21 +1317,28 @@ def _get_host_oapg( self, operation_id: str, servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None, + host_index: typing.Optional[int] = None ) -> typing.Optional[str]: configuration = self.api_client.configuration try: if host_index is None: - index = configuration.server_operation_index.get(operation_id, configuration.server_index) + index = configuration.server_operation_index.get( + operation_id, configuration.server_index + ) else: index = host_index server_variables = configuration.server_operation_variables.get( operation_id, configuration.server_variables ) - host = configuration.get_host_from_settings(index, variables=server_variables, servers=servers) + host = configuration.get_host_from_settings( + index, variables=server_variables, servers=servers + ) except IndexError: if servers: - raise ApiValueError("Invalid host index. Must be 0 <= index < %s" % len(servers)) + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(servers) + ) host = None return host @@ -1346,7 +1353,6 @@ class RequestBody(StyleFormSerializer, JSONDetector): A request body parameter content: content_type to MediaType Schema info """ - __json_encoder = JSONEncoder() def __init__( @@ -1356,39 +1362,44 @@ def __init__( ): self.required = required if len(content) == 0: - raise ValueError("Invalid value for content, the content dict must have >= 1 entry") + raise ValueError('Invalid value for content, the content dict must have >= 1 entry') self.content = content - def __serialize_json(self, in_data: typing.Any) -> typing.Dict[str, bytes]: + def __serialize_json( + self, + in_data: typing.Any + ) -> typing.Dict[str, bytes]: in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode("utf-8") + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( + "utf-8" + ) return dict(body=json_str) @staticmethod def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: if isinstance(in_data, frozendict.frozendict): - raise ValueError("Unable to serialize type frozendict.frozendict to text/plain") + raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') elif isinstance(in_data, tuple): - raise ValueError("Unable to serialize type tuple to text/plain") + raise ValueError('Unable to serialize type tuple to text/plain') elif isinstance(in_data, NoneClass): - raise ValueError("Unable to serialize type NoneClass to text/plain") + raise ValueError('Unable to serialize type NoneClass to text/plain') elif isinstance(in_data, BoolClass): - raise ValueError("Unable to serialize type BoolClass to text/plain") + raise ValueError('Unable to serialize type BoolClass to text/plain') return dict(body=str(in_data)) def __multipart_json_item(self, key: str, value: Schema) -> RequestField: json_value = self.__json_encoder.default(value) request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type="application/json") + request_field.make_multipart(content_type='application/json') return request_field def __multipart_form_item(self, key: str, value: Schema) -> RequestField: if isinstance(value, str): request_field = RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type="text/plain") + request_field.make_multipart(content_type='text/plain') elif isinstance(value, bytes): request_field = RequestField(name=key, data=value) - request_field.make_multipart(content_type="application/octet-stream") + request_field.make_multipart(content_type='application/octet-stream') elif isinstance(value, FileIO): # TODO use content.encoding to limit allowed content types if they are present request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) @@ -1397,9 +1408,11 @@ def __multipart_form_item(self, key: str, value: Schema) -> RequestField: request_field = self.__multipart_json_item(key=key, value=value) return request_field - def __serialize_multipart_form_data(self, in_data: Schema) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + def __serialize_multipart_form_data( + self, in_data: Schema + ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f"Unable to serialize {in_data} to multipart/form-data because it is not a dict of data") + raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') """ In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy @@ -1439,19 +1452,22 @@ def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing. in_data.close() return result - def __serialize_application_x_www_form_data(self, in_data: typing.Any) -> SerializedRequestBody: + def __serialize_application_x_www_form_data( + self, in_data: typing.Any + ) -> SerializedRequestBody: """ POST submission of form data in body """ if not isinstance(in_data, frozendict.frozendict): raise ValueError( - f"Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data" - ) + f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name="", explode=True, percent_encode=True) + value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) return dict(body=value) - def serialize(self, in_data: typing.Any, content_type: str) -> SerializedRequestBody: + def serialize( + self, in_data: typing.Any, content_type: str + ) -> SerializedRequestBody: """ If a str is returned then the result will be assigned to data when making the request If a tuple is returned then the result will be used as fields input in encode_multipart_formdata @@ -1472,12 +1488,12 @@ def serialize(self, in_data: typing.Any, content_type: str) -> SerializedRequest # and content_type is multipart or application/x-www-form-urlencoded if self._content_type_is_json(content_type): return self.__serialize_json(cast_in_data) - elif content_type == "text/plain": + elif content_type == 'text/plain': return self.__serialize_text_plain(cast_in_data) - elif content_type == "multipart/form-data": + elif content_type == 'multipart/form-data': return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == "application/x-www-form-urlencoded": + elif content_type == 'application/x-www-form-urlencoded': return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == "application/octet-stream": + elif content_type == 'application/octet-stream': return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError("Serialization has not yet been implemented for {}".format(content_type)) + raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file diff --git a/launch/api_client/apis/__init__.py b/launch/api_client/apis/__init__.py index 5ca66b80..7840f772 100644 --- a/launch/api_client/apis/__init__.py +++ b/launch/api_client/apis/__init__.py @@ -1,3 +1,3 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api +# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/launch/api_client/apis/path_to_api.py b/launch/api_client/apis/path_to_api.py index b767e3fe..d76603c4 100644 --- a/launch/api_client/apis/path_to_api.py +++ b/launch/api_client/apis/path_to_api.py @@ -1,51 +1,29 @@ import typing_extensions +from launch.api_client.paths import PathValues from launch.api_client.apis.paths.healthcheck import Healthcheck from launch.api_client.apis.paths.healthz import Healthz from launch.api_client.apis.paths.readyz import Readyz from launch.api_client.apis.paths.v1_async_tasks import V1AsyncTasks -from launch.api_client.apis.paths.v1_async_tasks_task_id import ( - V1AsyncTasksTaskId, -) +from launch.api_client.apis.paths.v1_async_tasks_task_id import V1AsyncTasksTaskId from launch.api_client.apis.paths.v1_batch_jobs import V1BatchJobs -from launch.api_client.apis.paths.v1_batch_jobs_batch_job_id import ( - V1BatchJobsBatchJobId, -) +from launch.api_client.apis.paths.v1_batch_jobs_batch_job_id import V1BatchJobsBatchJobId from launch.api_client.apis.paths.v1_model_bundles import V1ModelBundles -from launch.api_client.apis.paths.v1_model_bundles_clone_with_changes import ( - V1ModelBundlesCloneWithChanges, -) -from launch.api_client.apis.paths.v1_model_bundles_latest import ( - V1ModelBundlesLatest, -) -from launch.api_client.apis.paths.v1_model_bundles_model_bundle_id import ( - V1ModelBundlesModelBundleId, -) +from launch.api_client.apis.paths.v1_model_bundles_clone_with_changes import V1ModelBundlesCloneWithChanges +from launch.api_client.apis.paths.v1_model_bundles_latest import V1ModelBundlesLatest +from launch.api_client.apis.paths.v1_model_bundles_model_bundle_id import V1ModelBundlesModelBundleId from launch.api_client.apis.paths.v1_model_endpoints import V1ModelEndpoints -from launch.api_client.apis.paths.v1_model_endpoints_api import ( - V1ModelEndpointsApi, -) -from launch.api_client.apis.paths.v1_model_endpoints_model_endpoint_id import ( - V1ModelEndpointsModelEndpointId, -) -from launch.api_client.apis.paths.v1_model_endpoints_schema_json import ( - V1ModelEndpointsSchemaJson, -) +from launch.api_client.apis.paths.v1_model_endpoints_api import V1ModelEndpointsApi +from launch.api_client.apis.paths.v1_model_endpoints_schema_json import V1ModelEndpointsSchemaJson +from launch.api_client.apis.paths.v1_model_endpoints_model_endpoint_id import V1ModelEndpointsModelEndpointId from launch.api_client.apis.paths.v1_sync_tasks import V1SyncTasks from launch.api_client.apis.paths.v2_model_bundles import V2ModelBundles -from launch.api_client.apis.paths.v2_model_bundles_clone_with_changes import ( - V2ModelBundlesCloneWithChanges, -) -from launch.api_client.apis.paths.v2_model_bundles_latest import ( - V2ModelBundlesLatest, -) -from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import ( - V2ModelBundlesModelBundleId, -) -from launch.api_client.paths import PathValues +from launch.api_client.apis.paths.v2_model_bundles_clone_with_changes import V2ModelBundlesCloneWithChanges +from launch.api_client.apis.paths.v2_model_bundles_latest import V2ModelBundlesLatest +from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import V2ModelBundlesModelBundleId PathToApi = typing_extensions.TypedDict( - "PathToApi", + 'PathToApi', { PathValues.HEALTHCHECK: Healthcheck, PathValues.HEALTHZ: Healthz, @@ -67,7 +45,7 @@ PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES: V2ModelBundlesCloneWithChanges, PathValues.V2_MODELBUNDLES_LATEST: V2ModelBundlesLatest, PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID: V2ModelBundlesModelBundleId, - }, + } ) path_to_api = PathToApi( diff --git a/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py b/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py index df0644e3..caf9cf08 100644 --- a/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py +++ b/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py @@ -1,6 +1,4 @@ -from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ( - ApiForpost, -) +from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ApiForpost class V1ModelBundlesCloneWithChanges( diff --git a/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py b/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py index 0e646257..c513ff35 100644 --- a/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py +++ b/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py @@ -1,6 +1,4 @@ -from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ( - ApiForget, -) +from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ApiForget class V1ModelBundlesModelBundleId( diff --git a/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py b/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py index 7f4d3e3a..a4bd9dfb 100644 --- a/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py +++ b/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py @@ -1,12 +1,6 @@ -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ( - ApiFordelete, -) -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ( - ApiForget, -) -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( - ApiForput, -) +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ApiForget +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ApiForput +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ApiFordelete class V1ModelEndpointsModelEndpointId( diff --git a/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py b/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py index 7c62f95b..de361413 100644 --- a/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py +++ b/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py @@ -1,6 +1,4 @@ -from launch.api_client.paths.v1_model_endpoints_schema_json.get import ( - ApiForget, -) +from launch.api_client.paths.v1_model_endpoints_schema_json.get import ApiForget class V1ModelEndpointsSchemaJson( diff --git a/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py index 959b2207..c20c7c45 100644 --- a/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py +++ b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py @@ -1,6 +1,4 @@ -from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( - ApiForpost, -) +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ApiForpost class V2ModelBundlesCloneWithChanges( diff --git a/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py index e8ce8945..c00dbcd7 100644 --- a/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py +++ b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py @@ -1,6 +1,4 @@ -from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( - ApiForget, -) +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ApiForget class V2ModelBundlesModelBundleId( diff --git a/launch/api_client/apis/tag_to_api.py b/launch/api_client/apis/tag_to_api.py index 8b3c0d6d..f2a2dfcf 100644 --- a/launch/api_client/apis/tag_to_api.py +++ b/launch/api_client/apis/tag_to_api.py @@ -4,10 +4,10 @@ from launch.api_client.apis.tags.default_api import DefaultApi TagToApi = typing_extensions.TypedDict( - "TagToApi", + 'TagToApi', { TagValues.DEFAULT: DefaultApi, - }, + } ) tag_to_api = TagToApi( diff --git a/launch/api_client/apis/tags/default_api.py b/launch/api_client/apis/tags/default_api.py index bb06ab59..e99f8d9e 100644 --- a/launch/api_client/apis/tags/default_api.py +++ b/launch/api_client/apis/tags/default_api.py @@ -9,78 +9,32 @@ Generated by: https://openapi-generator.tech """ +from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost +from launch.api_client.paths.v1_async_tasks.post import CreateAsyncInferenceTaskV1AsyncTasksPost +from launch.api_client.paths.v1_batch_jobs.post import CreateBatchJobV1BatchJobsPost +from launch.api_client.paths.v1_model_bundles.post import CreateModelBundleV1ModelBundlesPost +from launch.api_client.paths.v2_model_bundles.post import CreateModelBundleV2ModelBundlesPost +from launch.api_client.paths.v1_model_endpoints.post import CreateModelEndpointV1ModelEndpointsPost +from launch.api_client.paths.v1_sync_tasks.post import CreateSyncInferenceTaskV1SyncTasksPost +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete +from launch.api_client.paths.v1_async_tasks_task_id.get import GetAsyncInferenceTaskV1AsyncTasksTaskIdGet +from launch.api_client.paths.v1_batch_jobs_batch_job_id.get import GetBatchJobV1BatchJobsBatchJobIdGet +from launch.api_client.paths.v1_model_bundles_latest.get import GetLatestModelBundleV1ModelBundlesLatestGet +from launch.api_client.paths.v2_model_bundles_latest.get import GetLatestModelBundleV2ModelBundlesLatestGet +from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import GetModelBundleV1ModelBundlesModelBundleIdGet +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import GetModelBundleV2ModelBundlesModelBundleIdGet +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import GetModelEndpointV1ModelEndpointsModelEndpointIdGet +from launch.api_client.paths.v1_model_endpoints_api.get import GetModelEndpointsApiV1ModelEndpointsApiGet +from launch.api_client.paths.v1_model_endpoints_schema_json.get import GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet from launch.api_client.paths.healthcheck.get import HealthcheckHealthcheckGet from launch.api_client.paths.healthz.get import HealthcheckHealthzGet from launch.api_client.paths.readyz.get import HealthcheckReadyzGet -from launch.api_client.paths.v1_async_tasks.post import ( - CreateAsyncInferenceTaskV1AsyncTasksPost, -) -from launch.api_client.paths.v1_async_tasks_task_id.get import ( - GetAsyncInferenceTaskV1AsyncTasksTaskIdGet, -) -from launch.api_client.paths.v1_batch_jobs.post import ( - CreateBatchJobV1BatchJobsPost, -) -from launch.api_client.paths.v1_batch_jobs_batch_job_id.get import ( - GetBatchJobV1BatchJobsBatchJobIdGet, -) -from launch.api_client.paths.v1_batch_jobs_batch_job_id.put import ( - UpdateBatchJobV1BatchJobsBatchJobIdPut, -) -from launch.api_client.paths.v1_model_bundles.get import ( - ListModelBundlesV1ModelBundlesGet, -) -from launch.api_client.paths.v1_model_bundles.post import ( - CreateModelBundleV1ModelBundlesPost, -) -from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ( - CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost, -) -from launch.api_client.paths.v1_model_bundles_latest.get import ( - GetLatestModelBundleV1ModelBundlesLatestGet, -) -from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ( - GetModelBundleV1ModelBundlesModelBundleIdGet, -) -from launch.api_client.paths.v1_model_endpoints.get import ( - ListModelEndpointsV1ModelEndpointsGet, -) -from launch.api_client.paths.v1_model_endpoints.post import ( - CreateModelEndpointV1ModelEndpointsPost, -) -from launch.api_client.paths.v1_model_endpoints_api.get import ( - GetModelEndpointsApiV1ModelEndpointsApiGet, -) -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ( - DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete, -) -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ( - GetModelEndpointV1ModelEndpointsModelEndpointIdGet, -) -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( - UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut, -) -from launch.api_client.paths.v1_model_endpoints_schema_json.get import ( - GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet, -) -from launch.api_client.paths.v1_sync_tasks.post import ( - CreateSyncInferenceTaskV1SyncTasksPost, -) -from launch.api_client.paths.v2_model_bundles.get import ( - ListModelBundlesV2ModelBundlesGet, -) -from launch.api_client.paths.v2_model_bundles.post import ( - CreateModelBundleV2ModelBundlesPost, -) -from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( - CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, -) -from launch.api_client.paths.v2_model_bundles_latest.get import ( - GetLatestModelBundleV2ModelBundlesLatestGet, -) -from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( - GetModelBundleV2ModelBundlesModelBundleIdGet, -) +from launch.api_client.paths.v1_model_bundles.get import ListModelBundlesV1ModelBundlesGet +from launch.api_client.paths.v2_model_bundles.get import ListModelBundlesV2ModelBundlesGet +from launch.api_client.paths.v1_model_endpoints.get import ListModelEndpointsV1ModelEndpointsGet +from launch.api_client.paths.v1_batch_jobs_batch_job_id.put import UpdateBatchJobV1BatchJobsBatchJobIdPut +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut class DefaultApi( @@ -116,5 +70,4 @@ class DefaultApi( Do not edit the class manually. """ - pass diff --git a/launch/api_client/configuration.py b/launch/api_client/configuration.py index 9f3283cc..7ea547f8 100644 --- a/launch/api_client/configuration.py +++ b/launch/api_client/configuration.py @@ -13,95 +13,85 @@ import logging import multiprocessing import sys -from http import client as http_client - import urllib3 +from http import client as http_client from launch.api_client.exceptions import ApiValueError + JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", - "uniqueItems", - "maxProperties", - "minProperties", + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems', + 'uniqueItems', 'maxProperties', 'minProperties', } - class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - :Example: - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - - conf = launch.api_client.Configuration( - username='the-user', - password='the-password', - ) + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + + :Example: + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + +conf = launch.api_client.Configuration( + username='the-user', + password='the-password', +) """ @@ -119,7 +109,8 @@ def __init__( server_operation_index=None, server_operation_variables=None, ): - """Constructor""" + """Constructor + """ self._base_path = "http://localhost" if host is None else host """Default Base url """ @@ -148,7 +139,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("launch.api_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None @@ -196,7 +187,7 @@ def __init__( self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = "" + self.safe_chars_for_path_param = '' """Safe chars for path_param """ self.retries = None @@ -213,7 +204,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): + if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -224,11 +215,12 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == "disabled_client_side_validations": - s = set(filter(None, value.split(","))) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError("Invalid keyword: '{0}''".format(v)) + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s @classmethod @@ -369,7 +361,9 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. @@ -378,11 +372,11 @@ def auth_settings(self): """ auth = {} if self.username is not None and self.password is not None: - auth["HTTPBasic"] = { - "type": "basic", - "in": "header", - "key": "Authorization", - "value": self.get_basic_auth_token(), + auth['HTTPBasic'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() } return auth @@ -391,13 +385,12 @@ def to_debug_report(self): :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" - "SDK Package Version: 1.1.0".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.1.0".\ + format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): """Gets an array of host settings @@ -406,8 +399,8 @@ def get_host_settings(self): """ return [ { - "url": "", - "description": "No description provided", + 'url': "", + 'description': "No description provided", } ] @@ -429,20 +422,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) + "Must be less than {1}".format(index, len(servers))) - url = server["url"] + url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) - if "enum_values" in variable and used_value not in variable["enum_values"]: + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format(variable_name, variables[variable_name], variable["enum_values"]) - ) + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) diff --git a/launch/api_client/exceptions.py b/launch/api_client/exceptions.py index f461e207..46687131 100644 --- a/launch/api_client/exceptions.py +++ b/launch/api_client/exceptions.py @@ -19,8 +19,9 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): - """Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors Args: msg (str): the exception message @@ -123,9 +124,11 @@ def headers(self) -> typing.Optional[HTTPHeaderDict]: def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + error_message += "HTTP response headers: {0}\n".format( + self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) diff --git a/launch/api_client/model/batch_job_serialization_format.py b/launch/api_client/model/batch_job_serialization_format.py index 7bfc3103..5586e157 100644 --- a/launch/api_client/model/batch_job_serialization_format.py +++ b/launch/api_client/model/batch_job_serialization_format.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): +class BatchJobSerializationFormat( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,16 +35,17 @@ class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): An enumeration. """ + class MetaOapg: enum_value_to_name = { "JSON": "JSON", "PICKLE": "PICKLE", } - + @schemas.classproperty def JSON(cls): return cls("JSON") - + @schemas.classproperty def PICKLE(cls): return cls("PICKLE") diff --git a/launch/api_client/model/batch_job_serialization_format.pyi b/launch/api_client/model/batch_job_serialization_format.pyi index 7ebc5bff..e19c5161 100644 --- a/launch/api_client/model/batch_job_serialization_format.pyi +++ b/launch/api_client/model/batch_job_serialization_format.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): + +class BatchJobSerializationFormat( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,10 +34,11 @@ class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): An enumeration. """ - + @schemas.classproperty def JSON(cls): return cls("JSON") + @schemas.classproperty def PICKLE(cls): return cls("PICKLE") diff --git a/launch/api_client/model/batch_job_status.py b/launch/api_client/model/batch_job_status.py index e2e71a79..530ad403 100644 --- a/launch/api_client/model/batch_job_status.py +++ b/launch/api_client/model/batch_job_status.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): +class BatchJobStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +35,7 @@ class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ + class MetaOapg: enum_value_to_name = { "PENDING": "PENDING", @@ -41,27 +45,27 @@ class MetaOapg: "CANCELLED": "CANCELLED", "UNDEFINED": "UNDEFINED", } - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - + @schemas.classproperty def RUNNING(cls): return cls("RUNNING") - + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - + @schemas.classproperty def CANCELLED(cls): return cls("CANCELLED") - + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/batch_job_status.pyi b/launch/api_client/model/batch_job_status.pyi index 925b6634..0d337988 100644 --- a/launch/api_client/model/batch_job_status.pyi +++ b/launch/api_client/model/batch_job_status.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): + +class BatchJobStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,22 +34,27 @@ class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ - + @schemas.classproperty def PENDING(cls): return cls("PENDING") + @schemas.classproperty def RUNNING(cls): return cls("RUNNING") + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") + @schemas.classproperty def CANCELLED(cls): return cls("CANCELLED") + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/callback_auth.py b/launch/api_client/model/callback_auth.py index 493310d9..a3af0a7c 100644 --- a/launch/api_client/model/callback_auth.py +++ b/launch/api_client/model/callback_auth.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -32,18 +32,20 @@ class CallbackAuth( Do not edit the class manually. """ + class MetaOapg: + @staticmethod def discriminator(): return { - "kind": { - "CallbackBasicAuth": CallbackBasicAuth, - "CallbackmTLSAuth": CallbackmTLSAuth, - "basic": CallbackBasicAuth, - "mtls": CallbackmTLSAuth, + 'kind': { + 'CallbackBasicAuth': CallbackBasicAuth, + 'CallbackmTLSAuth': CallbackmTLSAuth, + 'basic': CallbackBasicAuth, + 'mtls': CallbackmTLSAuth, } } - + @classmethod @functools.lru_cache() def one_of(cls): @@ -59,44 +61,13 @@ def one_of(cls): CallbackmTLSAuth, ] + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackAuth': return super().__new__( cls, *_args, @@ -104,6 +75,5 @@ def __new__( **kwargs, ) - from launch.api_client.model.callback_basic_auth import CallbackBasicAuth from launch.api_client.model.callbackm_tls_auth import CallbackmTLSAuth diff --git a/launch/api_client/model/callback_auth.pyi b/launch/api_client/model/callback_auth.pyi index e7193634..584516de 100644 --- a/launch/api_client/model/callback_auth.pyi +++ b/launch/api_client/model/callback_auth.pyi @@ -9,18 +9,20 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 + class CallbackAuth( schemas.ComposedSchema, ): @@ -30,17 +32,20 @@ class CallbackAuth( Do not edit the class manually. """ + class MetaOapg: + @staticmethod def discriminator(): return { - "kind": { - "CallbackBasicAuth": CallbackBasicAuth, - "CallbackmTLSAuth": CallbackmTLSAuth, - "basic": CallbackBasicAuth, - "mtls": CallbackmTLSAuth, + 'kind': { + 'CallbackBasicAuth': CallbackBasicAuth, + 'CallbackmTLSAuth': CallbackmTLSAuth, + 'basic': CallbackBasicAuth, + 'mtls': CallbackmTLSAuth, } } + @classmethod @functools.lru_cache() def one_of(cls): @@ -55,44 +60,14 @@ class CallbackAuth( CallbackBasicAuth, CallbackmTLSAuth, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackAuth': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callback_basic_auth.py b/launch/api_client/model/callback_basic_auth.py index 7e2027d6..1b26f739 100644 --- a/launch/api_client/model/callback_basic_auth.py +++ b/launch/api_client/model/callback_basic_auth.py @@ -9,45 +9,54 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CallbackBasicAuth(schemas.DictSchema): +class CallbackBasicAuth( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "password", "kind", "username", } - + class properties: - class kind(schemas.EnumBase, schemas.StrSchema): + + + class kind( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "basic": "BASIC", } - + @schemas.classproperty def BASIC(cls): return cls("basic") - password = schemas.StrSchema username = schemas.StrSchema __annotations__ = { @@ -55,106 +64,53 @@ def BASIC(cls): "password": password, "username": username, } - + password: MetaOapg.properties.password kind: MetaOapg.properties.kind username: MetaOapg.properties.username - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: - ... - + def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: - ... - + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: - ... - + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "kind", - "password", - "username", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "kind", - "password", - "username", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - password: typing.Union[ - MetaOapg.properties.password, - str, - ], - kind: typing.Union[ - MetaOapg.properties.kind, - str, - ], - username: typing.Union[ - MetaOapg.properties.username, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, ], + kind: typing.Union[MetaOapg.properties.kind, str, ], + username: typing.Union[MetaOapg.properties.username, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackBasicAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackBasicAuth': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callback_basic_auth.pyi b/launch/api_client/model/callback_basic_auth.pyi index 39f43b29..50b20d27 100644 --- a/launch/api_client/model/callback_basic_auth.pyi +++ b/launch/api_client/model/callback_basic_auth.pyi @@ -9,34 +9,45 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CallbackBasicAuth(schemas.DictSchema): + +class CallbackBasicAuth( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "password", "kind", "username", } - + class properties: - class kind(schemas.EnumBase, schemas.StrSchema): + + + class kind( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def BASIC(cls): return cls("basic") @@ -47,87 +58,53 @@ class CallbackBasicAuth(schemas.DictSchema): "password": password, "username": username, } + password: MetaOapg.properties.password kind: MetaOapg.properties.kind username: MetaOapg.properties.username - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "kind", - "password", - "username", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "kind", - "password", - "username", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - password: typing.Union[ - MetaOapg.properties.password, - str, - ], - kind: typing.Union[ - MetaOapg.properties.kind, - str, - ], - username: typing.Union[ - MetaOapg.properties.username, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + password: typing.Union[MetaOapg.properties.password, str, ], + kind: typing.Union[MetaOapg.properties.kind, str, ], + username: typing.Union[MetaOapg.properties.username, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackBasicAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackBasicAuth': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callbackm_tls_auth.py b/launch/api_client/model/callbackm_tls_auth.py index c153d503..1ed275f9 100644 --- a/launch/api_client/model/callbackm_tls_auth.py +++ b/launch/api_client/model/callbackm_tls_auth.py @@ -9,153 +9,108 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CallbackmTLSAuth(schemas.DictSchema): +class CallbackmTLSAuth( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "kind", "cert", "key", } - + class properties: cert = schemas.StrSchema key = schemas.StrSchema - - class kind(schemas.EnumBase, schemas.StrSchema): + + + class kind( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "mtls": "MTLS", } - + @schemas.classproperty def MTLS(cls): return cls("mtls") - __annotations__ = { "cert": cert, "key": key, "kind": kind, } - + kind: MetaOapg.properties.kind cert: MetaOapg.properties.cert key: MetaOapg.properties.key - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: - ... - + def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: - ... - + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: - ... - + def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cert", - "key", - "kind", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cert", - "key", - "kind", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - kind: typing.Union[ - MetaOapg.properties.kind, - str, - ], - cert: typing.Union[ - MetaOapg.properties.cert, - str, - ], - key: typing.Union[ - MetaOapg.properties.key, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + kind: typing.Union[MetaOapg.properties.kind, str, ], + cert: typing.Union[MetaOapg.properties.cert, str, ], + key: typing.Union[MetaOapg.properties.key, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackmTLSAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackmTLSAuth': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callbackm_tls_auth.pyi b/launch/api_client/model/callbackm_tls_auth.pyi index ef8b7dc0..8aeeb00a 100644 --- a/launch/api_client/model/callbackm_tls_auth.pyi +++ b/launch/api_client/model/callbackm_tls_auth.pyi @@ -9,37 +9,47 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CallbackmTLSAuth(schemas.DictSchema): + +class CallbackmTLSAuth( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "kind", "cert", "key", } - + class properties: cert = schemas.StrSchema key = schemas.StrSchema - - class kind(schemas.EnumBase, schemas.StrSchema): + + + class kind( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def MTLS(cls): return cls("mtls") @@ -48,87 +58,53 @@ class CallbackmTLSAuth(schemas.DictSchema): "key": key, "kind": kind, } + kind: MetaOapg.properties.kind cert: MetaOapg.properties.cert key: MetaOapg.properties.key - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cert", - "key", - "kind", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cert", - "key", - "kind", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - kind: typing.Union[ - MetaOapg.properties.kind, - str, - ], - cert: typing.Union[ - MetaOapg.properties.cert, - str, - ], - key: typing.Union[ - MetaOapg.properties.key, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + kind: typing.Union[MetaOapg.properties.kind, str, ], + cert: typing.Union[MetaOapg.properties.cert, str, ], + key: typing.Union[MetaOapg.properties.key, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CallbackmTLSAuth": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CallbackmTLSAuth': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v1_request.py b/launch/api_client/model/clone_model_bundle_v1_request.py index dc711b84..52b9f905 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.py +++ b/launch/api_client/model/clone_model_bundle_v1_request.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CloneModelBundleV1Request(schemas.DictSchema): +class CloneModelBundleV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,11 +34,12 @@ class CloneModelBundleV1Request(schemas.DictSchema): Request object for cloning a Model Bundle from another one. """ + class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -44,95 +47,44 @@ class properties: "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["new_app_config"] - ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - original_model_bundle_id: typing.Union[ - MetaOapg.properties.original_model_bundle_id, - str, - ], - new_app_config: typing.Union[ - MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], + new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloneModelBundleV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloneModelBundleV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v1_request.pyi b/launch/api_client/model/clone_model_bundle_v1_request.pyi index dc37a0dc..6d01d861 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v1_request.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CloneModelBundleV1Request(schemas.DictSchema): + +class CloneModelBundleV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,11 +34,12 @@ class CloneModelBundleV1Request(schemas.DictSchema): Request object for cloning a Model Bundle from another one. """ + class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -42,80 +47,44 @@ class CloneModelBundleV1Request(schemas.DictSchema): "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["new_app_config"] - ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - original_model_bundle_id: typing.Union[ - MetaOapg.properties.original_model_bundle_id, - str, - ], - new_app_config: typing.Union[ - MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], + new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloneModelBundleV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloneModelBundleV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v2_request.py b/launch/api_client/model/clone_model_bundle_v2_request.py index 2a918278..f8741e69 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.py +++ b/launch/api_client/model/clone_model_bundle_v2_request.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CloneModelBundleV2Request(schemas.DictSchema): +class CloneModelBundleV2Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,11 +34,12 @@ class CloneModelBundleV2Request(schemas.DictSchema): Request object for cloning a Model Bundle from another one. """ + class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -44,95 +47,44 @@ class properties: "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["new_app_config"] - ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - original_model_bundle_id: typing.Union[ - MetaOapg.properties.original_model_bundle_id, - str, - ], - new_app_config: typing.Union[ - MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], + new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloneModelBundleV2Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloneModelBundleV2Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v2_request.pyi b/launch/api_client/model/clone_model_bundle_v2_request.pyi index 82891ae5..98cacc1e 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v2_request.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CloneModelBundleV2Request(schemas.DictSchema): + +class CloneModelBundleV2Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,11 +34,12 @@ class CloneModelBundleV2Request(schemas.DictSchema): Request object for cloning a Model Bundle from another one. """ + class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -42,80 +47,44 @@ class CloneModelBundleV2Request(schemas.DictSchema): "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["original_model_bundle_id"] - ) -> MetaOapg.properties.original_model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["new_app_config"] - ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "original_model_bundle_id", - "new_app_config", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - original_model_bundle_id: typing.Union[ - MetaOapg.properties.original_model_bundle_id, - str, - ], - new_app_config: typing.Union[ - MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], + new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloneModelBundleV2Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloneModelBundleV2Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.py b/launch/api_client/model/cloudpickle_artifact_flavor.py index c0d3366d..fe81c51c 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.py +++ b/launch/api_client/model/cloudpickle_artifact_flavor.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CloudpickleArtifactFlavor(schemas.DictSchema): +class CloudpickleArtifactFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. """ + class MetaOapg: required = { "flavor", @@ -41,22 +44,33 @@ class MetaOapg: "location", "load_predict_fn", } - + class properties: - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "cloudpickle_artifact": "CLOUDPICKLE_ARTIFACT", } - + @schemas.classproperty def CLOUDPICKLE_ARTIFACT(cls): return cls("cloudpickle_artifact") - + + class framework( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -72,87 +86,46 @@ def one_of(cls): TensorflowFramework, CustomFramework, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "framework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'framework': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - load_model_fn = schemas.StrSchema load_predict_fn = schemas.StrSchema location = schemas.StrSchema - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema __annotations__ = { "flavor": flavor, @@ -163,182 +136,84 @@ def __getitem__(self, i: int) -> MetaOapg.items: "requirements": requirements, "app_config": app_config, } - + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn: MetaOapg.properties.load_model_fn location: MetaOapg.properties.location load_predict_fn: MetaOapg.properties.load_predict_fn - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: - ... - + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: - ... - + def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: - ... - + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn", - "load_predict_fn", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn", - "load_predict_fn", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - framework: typing.Union[ - MetaOapg.properties.framework, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - load_model_fn: typing.Union[ - MetaOapg.properties.load_model_fn, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - load_predict_fn: typing.Union[ - MetaOapg.properties.load_predict_fn, - str, - ], - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + load_model_fn: typing.Union[MetaOapg.properties.load_model_fn, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + load_predict_fn: typing.Union[MetaOapg.properties.load_predict_fn, str, ], + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloudpickleArtifactFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloudpickleArtifactFlavor': return super().__new__( cls, *_args, @@ -353,7 +228,6 @@ def __new__( **kwargs, ) - from launch.api_client.model.custom_framework import CustomFramework from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.pyi b/launch/api_client/model/cloudpickle_artifact_flavor.pyi index 021e1b61..af55bff9 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.pyi +++ b/launch/api_client/model/cloudpickle_artifact_flavor.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CloudpickleArtifactFlavor(schemas.DictSchema): + +class CloudpickleArtifactFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. """ + class MetaOapg: required = { "flavor", @@ -39,17 +44,27 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): "location", "load_predict_fn", } - + class properties: - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def CLOUDPICKLE_ARTIFACT(cls): return cls("cloudpickle_artifact") - + + class framework( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -65,44 +80,14 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): TensorflowFramework, CustomFramework, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "framework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'framework': return super().__new__( cls, *_args, @@ -112,33 +97,27 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): load_model_fn = schemas.StrSchema load_predict_fn = schemas.StrSchema location = schemas.StrSchema - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -151,151 +130,84 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): "requirements": requirements, "app_config": app_config, } + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn: MetaOapg.properties.load_model_fn location: MetaOapg.properties.location load_predict_fn: MetaOapg.properties.load_predict_fn - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["load_predict_fn"] - ) -> MetaOapg.properties.load_predict_fn: ... + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn", - "load_predict_fn", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["load_predict_fn"] - ) -> MetaOapg.properties.load_predict_fn: ... + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn", - "load_predict_fn", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - framework: typing.Union[ - MetaOapg.properties.framework, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - load_model_fn: typing.Union[ - MetaOapg.properties.load_model_fn, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - load_predict_fn: typing.Union[ - MetaOapg.properties.load_predict_fn, - str, - ], - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + load_model_fn: typing.Union[MetaOapg.properties.load_model_fn, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + load_predict_fn: typing.Union[MetaOapg.properties.load_predict_fn, str, ], + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CloudpickleArtifactFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CloudpickleArtifactFlavor': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_async_task_v1_response.py b/launch/api_client/model/create_async_task_v1_response.py index 83b2baaf..5805b46f 100644 --- a/launch/api_client/model/create_async_task_v1_response.py +++ b/launch/api_client/model/create_async_task_v1_response.py @@ -9,103 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateAsyncTaskV1Response(schemas.DictSchema): +class CreateAsyncTaskV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "task_id", } - + class properties: task_id = schemas.StrSchema __annotations__ = { "task_id": task_id, } - + task_id: MetaOapg.properties.task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + task_id: typing.Union[MetaOapg.properties.task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateAsyncTaskV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateAsyncTaskV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_async_task_v1_response.pyi b/launch/api_client/model/create_async_task_v1_response.pyi index f5577ea5..3e9fcb1b 100644 --- a/launch/api_client/model/create_async_task_v1_response.pyi +++ b/launch/api_client/model/create_async_task_v1_response.pyi @@ -9,90 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateAsyncTaskV1Response(schemas.DictSchema): + +class CreateAsyncTaskV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "task_id", } - + class properties: task_id = schemas.StrSchema __annotations__ = { "task_id": task_id, } + task_id: MetaOapg.properties.task_id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["task_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + task_id: typing.Union[MetaOapg.properties.task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateAsyncTaskV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateAsyncTaskV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_resource_requests.py b/launch/api_client/model/create_batch_job_resource_requests.py index 48c4adb1..c1f62452 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.py +++ b/launch/api_client/model/create_batch_job_resource_requests.py @@ -9,37 +9,45 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateBatchJobResourceRequests(schemas.DictSchema): +class CreateBatchJobResourceRequests( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -55,67 +63,38 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType - gpus = schemas.IntSchema max_workers = schemas.IntSchema - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -131,62 +110,33 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - per_worker = schemas.IntSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -202,52 +152,20 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - __annotations__ = { "cpus": cpus, "gpu_type": gpu_type, @@ -257,206 +175,77 @@ def __new__( "per_worker": per_worker, "storage": storage, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpu_type", - "gpus", - "max_workers", - "memory", - "per_worker", - "storage", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpu_type", - "gpus", - "max_workers", - "memory", - "per_worker", - "storage", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobResourceRequests": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobResourceRequests': return super().__new__( cls, *_args, @@ -471,5 +260,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/create_batch_job_resource_requests.pyi b/launch/api_client/model/create_batch_job_resource_requests.pyi index c3f466a3..38ca0898 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.pyi +++ b/launch/api_client/model/create_batch_job_resource_requests.pyi @@ -9,35 +9,45 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateBatchJobResourceRequests(schemas.DictSchema): + +class CreateBatchJobResourceRequests( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -53,64 +63,38 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType gpus = schemas.IntSchema max_workers = schemas.IntSchema - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -126,44 +110,14 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, @@ -171,15 +125,18 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): **kwargs, ) per_worker = schemas.IntSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -195,44 +152,14 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, @@ -248,171 +175,77 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): "per_worker": per_worker, "storage": storage, } + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpu_type", - "gpus", - "max_workers", - "memory", - "per_worker", - "storage", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpu_type", - "gpus", - "max_workers", - "memory", - "per_worker", - "storage", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobResourceRequests": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobResourceRequests': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_v1_request.py b/launch/api_client/model/create_batch_job_v1_request.py index b819f63e..03f4e079 100644 --- a/launch/api_client/model/create_batch_job_v1_request.py +++ b/launch/api_client/model/create_batch_job_v1_request.py @@ -9,27 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateBatchJobV1Request(schemas.DictSchema): +class CreateBatchJobV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "model_bundle_id", @@ -38,56 +41,47 @@ class MetaOapg: "input_path", "labels", } - + class properties: input_path = schemas.StrSchema - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - model_bundle_id = schemas.StrSchema - + @staticmethod - def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: + def resource_requests() -> typing.Type['CreateBatchJobResourceRequests']: return CreateBatchJobResourceRequests - + @staticmethod - def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: + def serialization_format() -> typing.Type['BatchJobSerializationFormat']: return BatchJobSerializationFormat - __annotations__ = { "input_path": input_path, "labels": labels, @@ -95,131 +89,69 @@ def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: "resource_requests": resource_requests, "serialization_format": serialization_format, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: "CreateBatchJobResourceRequests" - serialization_format: "BatchJobSerializationFormat" + resource_requests: 'CreateBatchJobResourceRequests' + serialization_format: 'BatchJobSerializationFormat' input_path: MetaOapg.properties.input_path labels: MetaOapg.properties.labels - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: - ... - + def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": - ... - + def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": - ... - + def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - resource_requests: "CreateBatchJobResourceRequests", - serialization_format: "BatchJobSerializationFormat", - input_path: typing.Union[ - MetaOapg.properties.input_path, - str, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + resource_requests: 'CreateBatchJobResourceRequests', + serialization_format: 'BatchJobSerializationFormat', + input_path: typing.Union[MetaOapg.properties.input_path, str, ], + labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobV1Request': return super().__new__( cls, *_args, @@ -232,10 +164,5 @@ def __new__( **kwargs, ) - -from launch.api_client.model.batch_job_serialization_format import ( - BatchJobSerializationFormat, -) -from launch.api_client.model.create_batch_job_resource_requests import ( - CreateBatchJobResourceRequests, -) +from launch.api_client.model.batch_job_serialization_format import BatchJobSerializationFormat +from launch.api_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests diff --git a/launch/api_client/model/create_batch_job_v1_request.pyi b/launch/api_client/model/create_batch_job_v1_request.pyi index 6e5f195c..34b6fb0c 100644 --- a/launch/api_client/model/create_batch_job_v1_request.pyi +++ b/launch/api_client/model/create_batch_job_v1_request.pyi @@ -9,25 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateBatchJobV1Request(schemas.DictSchema): + +class CreateBatchJobV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "model_bundle_id", @@ -36,36 +41,32 @@ class CreateBatchJobV1Request(schemas.DictSchema): "input_path", "labels", } - + class properties: input_path = schemas.StrSchema - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, @@ -73,12 +74,13 @@ class CreateBatchJobV1Request(schemas.DictSchema): **kwargs, ) model_bundle_id = schemas.StrSchema - + @staticmethod - def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: + def resource_requests() -> typing.Type['CreateBatchJobResourceRequests']: return CreateBatchJobResourceRequests + @staticmethod - def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: + def serialization_format() -> typing.Type['BatchJobSerializationFormat']: return BatchJobSerializationFormat __annotations__ = { "input_path": input_path, @@ -87,112 +89,69 @@ class CreateBatchJobV1Request(schemas.DictSchema): "resource_requests": resource_requests, "serialization_format": serialization_format, } + model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: "CreateBatchJobResourceRequests" - serialization_format: "BatchJobSerializationFormat" + resource_requests: 'CreateBatchJobResourceRequests' + serialization_format: 'BatchJobSerializationFormat' input_path: MetaOapg.properties.input_path labels: MetaOapg.properties.labels - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": ... + def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": ... + def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_requests"] - ) -> "CreateBatchJobResourceRequests": ... + def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["serialization_format"] - ) -> "BatchJobSerializationFormat": ... + def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "input_path", - "labels", - "model_bundle_id", - "resource_requests", - "serialization_format", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - resource_requests: "CreateBatchJobResourceRequests", - serialization_format: "BatchJobSerializationFormat", - input_path: typing.Union[ - MetaOapg.properties.input_path, - str, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + resource_requests: 'CreateBatchJobResourceRequests', + serialization_format: 'BatchJobSerializationFormat', + input_path: typing.Union[MetaOapg.properties.input_path, str, ], + labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobV1Request': return super().__new__( cls, *_args, @@ -205,9 +164,5 @@ class CreateBatchJobV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.batch_job_serialization_format import ( - BatchJobSerializationFormat, -) -from launch_client.model.create_batch_job_resource_requests import ( - CreateBatchJobResourceRequests, -) +from launch_client.model.batch_job_serialization_format import BatchJobSerializationFormat +from launch_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests diff --git a/launch/api_client/model/create_batch_job_v1_response.py b/launch/api_client/model/create_batch_job_v1_response.py index 9aebd3da..48561f4d 100644 --- a/launch/api_client/model/create_batch_job_v1_response.py +++ b/launch/api_client/model/create_batch_job_v1_response.py @@ -9,103 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateBatchJobV1Response(schemas.DictSchema): +class CreateBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "job_id", } - + class properties: job_id = schemas.StrSchema __annotations__ = { "job_id": job_id, } - + job_id: MetaOapg.properties.job_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - job_id: typing.Union[ - MetaOapg.properties.job_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + job_id: typing.Union[MetaOapg.properties.job_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_v1_response.pyi b/launch/api_client/model/create_batch_job_v1_response.pyi index fe85812f..01425585 100644 --- a/launch/api_client/model/create_batch_job_v1_response.pyi +++ b/launch/api_client/model/create_batch_job_v1_response.pyi @@ -9,90 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateBatchJobV1Response(schemas.DictSchema): + +class CreateBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "job_id", } - + class properties: job_id = schemas.StrSchema __annotations__ = { "job_id": job_id, } + job_id: MetaOapg.properties.job_id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["job_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - job_id: typing.Union[ - MetaOapg.properties.job_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + job_id: typing.Union[MetaOapg.properties.job_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateBatchJobV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v1_request.py b/launch/api_client/model/create_model_bundle_v1_request.py index c5170611..d797e244 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.py +++ b/launch/api_client/model/create_model_bundle_v1_request.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV1Request(schemas.DictSchema): +class CreateModelBundleV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class CreateModelBundleV1Request(schemas.DictSchema): Request object for creating a Model Bundle. """ + class MetaOapg: required = { "requirements", @@ -40,50 +43,41 @@ class MetaOapg: "location", "env_params", } - + class properties: + @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: + def env_params() -> typing.Type['ModelBundleEnvironmentParams']: return ModelBundleEnvironmentParams - location = schemas.StrSchema name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: + def packaging_type() -> typing.Type['ModelBundlePackagingType']: return ModelBundlePackagingType - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema metadata = schemas.DictSchema schema_location = schemas.StrSchema @@ -97,174 +91,90 @@ def __getitem__(self, i: int) -> MetaOapg.items: "metadata": metadata, "schema_location": schema_location, } - + requirements: MetaOapg.properties.requirements - packaging_type: "ModelBundlePackagingType" + packaging_type: 'ModelBundlePackagingType' name: MetaOapg.properties.name location: MetaOapg.properties.location - env_params: "ModelBundleEnvironmentParams" - + env_params: 'ModelBundleEnvironmentParams' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "packaging_type", - "requirements", - "app_config", - "metadata", - "schema_location", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "packaging_type", - "requirements", - "app_config", - "metadata", - "schema_location", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - packaging_type: "ModelBundlePackagingType", - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + packaging_type: 'ModelBundlePackagingType', + name: typing.Union[MetaOapg.properties.name, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + env_params: 'ModelBundleEnvironmentParams', + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV1Request': return super().__new__( cls, *_args, @@ -280,10 +190,5 @@ def __new__( **kwargs, ) - -from launch.api_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch.api_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) +from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams +from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/create_model_bundle_v1_request.pyi b/launch/api_client/model/create_model_bundle_v1_request.pyi index 24f63ed8..c951cd74 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.pyi +++ b/launch/api_client/model/create_model_bundle_v1_request.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelBundleV1Request(schemas.DictSchema): + +class CreateModelBundleV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class CreateModelBundleV1Request(schemas.DictSchema): Request object for creating a Model Bundle. """ + class MetaOapg: required = { "requirements", @@ -38,44 +43,39 @@ class CreateModelBundleV1Request(schemas.DictSchema): "location", "env_params", } - + class properties: + @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: + def env_params() -> typing.Type['ModelBundleEnvironmentParams']: return ModelBundleEnvironmentParams location = schemas.StrSchema name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: + def packaging_type() -> typing.Type['ModelBundlePackagingType']: return ModelBundlePackagingType - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -91,137 +91,90 @@ class CreateModelBundleV1Request(schemas.DictSchema): "metadata": metadata, "schema_location": schema_location, } + requirements: MetaOapg.properties.requirements - packaging_type: "ModelBundlePackagingType" + packaging_type: 'ModelBundlePackagingType' name: MetaOapg.properties.name location: MetaOapg.properties.location - env_params: "ModelBundleEnvironmentParams" - + env_params: 'ModelBundleEnvironmentParams' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "packaging_type", - "requirements", - "app_config", - "metadata", - "schema_location", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "env_params", - "location", - "name", - "packaging_type", - "requirements", - "app_config", - "metadata", - "schema_location", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - packaging_type: "ModelBundlePackagingType", - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + packaging_type: 'ModelBundlePackagingType', + name: typing.Union[MetaOapg.properties.name, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + env_params: 'ModelBundleEnvironmentParams', + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV1Request': return super().__new__( cls, *_args, @@ -237,9 +190,5 @@ class CreateModelBundleV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) +from launch_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams +from launch_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/create_model_bundle_v1_response.py b/launch/api_client/model/create_model_bundle_v1_response.py index 394aaf62..638bd0cb 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.py +++ b/launch/api_client/model/create_model_bundle_v1_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV1Response(schemas.DictSchema): +class CreateModelBundleV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,82 +34,48 @@ class CreateModelBundleV1Response(schemas.DictSchema): Response object for creating a Model Bundle. """ + class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v1_response.pyi b/launch/api_client/model/create_model_bundle_v1_response.pyi index 16fc7788..c7da6274 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.pyi +++ b/launch/api_client/model/create_model_bundle_v1_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelBundleV1Response(schemas.DictSchema): + +class CreateModelBundleV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,75 +34,48 @@ class CreateModelBundleV1Response(schemas.DictSchema): Response object for creating a Model Bundle. """ + class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v2_request.py b/launch/api_client/model/create_model_bundle_v2_request.py index 03ab98af..f74f12cc 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.py +++ b/launch/api_client/model/create_model_bundle_v2_request.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV2Request(schemas.DictSchema): +class CreateModelBundleV2Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,18 +34,24 @@ class CreateModelBundleV2Request(schemas.DictSchema): Request object for creating a Model Bundle. """ + class MetaOapg: required = { "flavor", "name", "schema_location", } - + class properties: + + class flavor( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -58,53 +66,22 @@ def one_of(cls): CloudpickleArtifactFlavor, ZipArtifactFlavor, RunnableImageFlavor, + TritonEnhancedRunnableImageFlavor, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "flavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'flavor': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - name = schemas.StrSchema schema_location = schemas.StrSchema metadata = schemas.DictSchema @@ -114,136 +91,60 @@ def __new__( "schema_location": schema_location, "metadata": metadata, } - + flavor: MetaOapg.properties.flavor name: MetaOapg.properties.name schema_location: MetaOapg.properties.schema_location - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "name", - "schema_location", - "metadata", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "name", - "schema_location", - "metadata", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - schema_location: typing.Union[ - MetaOapg.properties.schema_location, - str, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + name: typing.Union[MetaOapg.properties.name, str, ], + schema_location: typing.Union[MetaOapg.properties.schema_location, str, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV2Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV2Request': return super().__new__( cls, *_args, @@ -255,9 +156,7 @@ def __new__( **kwargs, ) - -from launch.api_client.model.cloudpickle_artifact_flavor import ( - CloudpickleArtifactFlavor, -) +from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_request.pyi b/launch/api_client/model/create_model_bundle_v2_request.pyi index 5bc70625..448d420a 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.pyi +++ b/launch/api_client/model/create_model_bundle_v2_request.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelBundleV2Request(schemas.DictSchema): + +class CreateModelBundleV2Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,18 +34,24 @@ class CreateModelBundleV2Request(schemas.DictSchema): Request object for creating a Model Bundle. """ + class MetaOapg: required = { "flavor", "name", "schema_location", } - + class properties: + + class flavor( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -56,45 +66,16 @@ class CreateModelBundleV2Request(schemas.DictSchema): CloudpickleArtifactFlavor, ZipArtifactFlavor, RunnableImageFlavor, + TritonEnhancedRunnableImageFlavor, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "flavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'flavor': return super().__new__( cls, *_args, @@ -110,117 +91,60 @@ class CreateModelBundleV2Request(schemas.DictSchema): "schema_location": schema_location, "metadata": metadata, } + flavor: MetaOapg.properties.flavor name: MetaOapg.properties.name schema_location: MetaOapg.properties.schema_location - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "name", - "schema_location", - "metadata", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "name", - "schema_location", - "metadata", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - schema_location: typing.Union[ - MetaOapg.properties.schema_location, - str, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + name: typing.Union[MetaOapg.properties.name, str, ], + schema_location: typing.Union[MetaOapg.properties.schema_location, str, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV2Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV2Request': return super().__new__( cls, *_args, @@ -232,8 +156,7 @@ class CreateModelBundleV2Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import ( - CloudpickleArtifactFlavor, -) +from launch_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch_client.model.runnable_image_flavor import RunnableImageFlavor +from launch_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_response.py b/launch/api_client/model/create_model_bundle_v2_response.py index c108a9e0..222029f3 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.py +++ b/launch/api_client/model/create_model_bundle_v2_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV2Response(schemas.DictSchema): +class CreateModelBundleV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,82 +34,48 @@ class CreateModelBundleV2Response(schemas.DictSchema): Response object for creating a Model Bundle. """ + class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV2Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v2_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi index 7126d51c..4b7375c8 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelBundleV2Response(schemas.DictSchema): + +class CreateModelBundleV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,75 +34,48 @@ class CreateModelBundleV2Response(schemas.DictSchema): Response object for creating a Model Bundle. """ + class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundle_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelBundleV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelBundleV2Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_request.py b/launch/api_client/model/create_model_endpoint_v1_request.py index d0b9fd42..b3198236 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.py +++ b/launch/api_client/model/create_model_endpoint_v1_request.py @@ -9,27 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelEndpointV1Request(schemas.DictSchema): +class CreateModelEndpointV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_type", @@ -44,16 +47,20 @@ class MetaOapg: "per_worker", "labels", } - + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -69,108 +76,83 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: + def endpoint_type() -> typing.Type['ModelEndpointType']: return ModelEndpointType - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -186,125 +168,99 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - model_bundle_id = schemas.StrSchema - - class name(schemas.StrSchema): + + + class name( + schemas.StrSchema + ): + + class MetaOapg: max_length = 63 - per_worker = schemas.IntSchema billing_tags = schemas.DictSchema - + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): + + class MetaOapg: - format = "uri" + format = 'uri' max_length = 2083 min_length = 1 - + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType - high_priority = schemas.BoolSchema optimize_costs = schemas.BoolSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - prewarm = schemas.BoolSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -320,52 +276,20 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - __annotations__ = { "cpus": cpus, "endpoint_type": endpoint_type, @@ -388,8 +312,8 @@ def __new__( "prewarm": prewarm, "storage": storage, } - - endpoint_type: "ModelEndpointType" + + endpoint_type: 'ModelEndpointType' metadata: MetaOapg.properties.metadata memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus @@ -400,391 +324,168 @@ def __new__( name: MetaOapg.properties.name per_worker: MetaOapg.properties.per_worker labels: MetaOapg.properties.labels - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: - ... - + def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: - ... - + def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: - ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: - ... - + def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "high_priority", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["high_priority"] - ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "high_priority", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_type: 'ModelEndpointType', + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], + gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], + name: typing.Union[MetaOapg.properties.name, str, ], + per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], + labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], + billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelEndpointV1Request': return super().__new__( cls, *_args, @@ -812,7 +513,6 @@ def __new__( **kwargs, ) - from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.gpu_type import GpuType from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/create_model_endpoint_v1_request.pyi b/launch/api_client/model/create_model_endpoint_v1_request.pyi index 44911627..d1849c99 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_request.pyi @@ -9,25 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelEndpointV1Request(schemas.DictSchema): + +class CreateModelEndpointV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_type", @@ -42,16 +47,20 @@ class CreateModelEndpointV1Request(schemas.DictSchema): "per_worker", "labels", } - + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -67,101 +76,77 @@ class CreateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: + def endpoint_type() -> typing.Type['ModelEndpointType']: return ModelEndpointType - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): pass - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): pass - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -177,44 +162,14 @@ class CreateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, @@ -222,66 +177,73 @@ class CreateModelEndpointV1Request(schemas.DictSchema): **kwargs, ) metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): pass model_bundle_id = schemas.StrSchema - - class name(schemas.StrSchema): + + + class name( + schemas.StrSchema + ): pass per_worker = schemas.IntSchema billing_tags = schemas.DictSchema - + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): pass + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType high_priority = schemas.BoolSchema optimize_costs = schemas.BoolSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) prewarm = schemas.BoolSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -297,44 +259,14 @@ class CreateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, @@ -363,7 +295,8 @@ class CreateModelEndpointV1Request(schemas.DictSchema): "prewarm": prewarm, "storage": storage, } - endpoint_type: "ModelEndpointType" + + endpoint_type: 'ModelEndpointType' metadata: MetaOapg.properties.metadata memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus @@ -374,309 +307,168 @@ class CreateModelEndpointV1Request(schemas.DictSchema): name: MetaOapg.properties.name per_worker: MetaOapg.properties.per_worker labels: MetaOapg.properties.labels - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "high_priority", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["high_priority"] - ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "endpoint_type", - "gpus", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "name", - "per_worker", - "billing_tags", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "high_priority", - "optimize_costs", - "post_inference_hooks", - "prewarm", - "storage", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - model_bundle_id: typing.Union[ - MetaOapg.properties.model_bundle_id, - str, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - labels: typing.Union[ - MetaOapg.properties.labels, - dict, - frozendict.frozendict, - ], - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_type: 'ModelEndpointType', + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], + model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], + gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], + name: typing.Union[MetaOapg.properties.name, str, ], + per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], + labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], + billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelEndpointV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_response.py b/launch/api_client/model/create_model_endpoint_v1_response.py index 1841c16f..6f344894 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.py +++ b/launch/api_client/model/create_model_endpoint_v1_response.py @@ -9,107 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CreateModelEndpointV1Response(schemas.DictSchema): +class CreateModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_response.pyi b/launch/api_client/model/create_model_endpoint_v1_response.pyi index 57887d1e..0b696784 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_response.pyi @@ -9,94 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CreateModelEndpointV1Response(schemas.DictSchema): + +class CreateModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CreateModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CreateModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/custom_framework.py b/launch/api_client/model/custom_framework.py index cf37e753..636fc283 100644 --- a/launch/api_client/model/custom_framework.py +++ b/launch/api_client/model/custom_framework.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class CustomFramework(schemas.DictSchema): +class CustomFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,24 +34,31 @@ class CustomFramework(schemas.DictSchema): This is the entity-layer class for a custom framework specification. """ + class MetaOapg: required = { "image_repository", "framework_type", "image_tag", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "custom_base_image": "CUSTOM_BASE_IMAGE", } - + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") - image_repository = schemas.StrSchema image_tag = schemas.StrSchema __annotations__ = { @@ -57,108 +66,53 @@ def CUSTOM_BASE_IMAGE(cls): "image_repository": image_repository, "image_tag": image_tag, } - + image_repository: MetaOapg.properties.image_repository framework_type: MetaOapg.properties.framework_type image_tag: MetaOapg.properties.image_tag - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: - ... - + def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: - ... - + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "image_repository", - "image_tag", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["image_repository"] - ) -> MetaOapg.properties.image_repository: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "image_repository", - "image_tag", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - image_repository: typing.Union[ - MetaOapg.properties.image_repository, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], - image_tag: typing.Union[ - MetaOapg.properties.image_tag, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + image_repository: typing.Union[MetaOapg.properties.image_repository, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + image_tag: typing.Union[MetaOapg.properties.image_tag, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CustomFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CustomFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/custom_framework.pyi b/launch/api_client/model/custom_framework.pyi index 0ccc9317..5e553b87 100644 --- a/launch/api_client/model/custom_framework.pyi +++ b/launch/api_client/model/custom_framework.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class CustomFramework(schemas.DictSchema): + +class CustomFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,15 +34,22 @@ class CustomFramework(schemas.DictSchema): This is the entity-layer class for a custom framework specification. """ + class MetaOapg: required = { "image_repository", "framework_type", "image_tag", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") @@ -49,93 +60,53 @@ class CustomFramework(schemas.DictSchema): "image_repository": image_repository, "image_tag": image_tag, } + image_repository: MetaOapg.properties.image_repository framework_type: MetaOapg.properties.framework_type image_tag: MetaOapg.properties.image_tag - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["image_repository"] - ) -> MetaOapg.properties.image_repository: ... + def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "image_repository", - "image_tag", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["framework_type"] - ) -> MetaOapg.properties.framework_type: ... + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["image_repository"] - ) -> MetaOapg.properties.image_repository: ... + def get_item_oapg(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "image_repository", - "image_tag", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - image_repository: typing.Union[ - MetaOapg.properties.image_repository, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], - image_tag: typing.Union[ - MetaOapg.properties.image_tag, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + image_repository: typing.Union[MetaOapg.properties.image_repository, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + image_tag: typing.Union[MetaOapg.properties.image_tag, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "CustomFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'CustomFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.py b/launch/api_client/model/delete_model_endpoint_v1_response.py index c6f2aaaf..dea0d23d 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.py +++ b/launch/api_client/model/delete_model_endpoint_v1_response.py @@ -9,103 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class DeleteModelEndpointV1Response(schemas.DictSchema): +class DeleteModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "deleted", } - + class properties: deleted = schemas.BoolSchema __annotations__ = { "deleted": deleted, } - + deleted: MetaOapg.properties.deleted - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: - ... - + def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - deleted: typing.Union[ - MetaOapg.properties.deleted, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + deleted: typing.Union[MetaOapg.properties.deleted, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "DeleteModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'DeleteModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.pyi b/launch/api_client/model/delete_model_endpoint_v1_response.pyi index e5ca73aa..f8cc65ff 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/delete_model_endpoint_v1_response.pyi @@ -9,90 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class DeleteModelEndpointV1Response(schemas.DictSchema): + +class DeleteModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "deleted", } - + class properties: deleted = schemas.BoolSchema __annotations__ = { "deleted": deleted, } + deleted: MetaOapg.properties.deleted - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["deleted",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - deleted: typing.Union[ - MetaOapg.properties.deleted, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + deleted: typing.Union[MetaOapg.properties.deleted, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "DeleteModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'DeleteModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/endpoint_predict_v1_request.py b/launch/api_client/model/endpoint_predict_v1_request.py index 2fcfd632..79f2c87b 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.py +++ b/launch/api_client/model/endpoint_predict_v1_request.py @@ -9,35 +9,38 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class EndpointPredictV1Request(schemas.DictSchema): +class EndpointPredictV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: args = schemas.AnyTypeSchema - + @staticmethod - def callback_auth() -> typing.Type["CallbackAuth"]: + def callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - callback_url = schemas.StrSchema cloudpickle = schemas.StrSchema return_pickled = schemas.BoolSchema @@ -50,157 +53,70 @@ def callback_auth() -> typing.Type["CallbackAuth"]: "return_pickled": return_pickled, "url": url, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: - ... - + def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": - ... - + def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: - ... - + def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: - ... - + def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: - ... - + def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: - ... - + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["args"] - ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_url"] - ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["callback_url"]) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cloudpickle"] - ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cloudpickle"]) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["return_pickled"] - ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["return_pickled"]) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["url"] - ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - args: typing.Union[ - MetaOapg.properties.args, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + args: typing.Union[MetaOapg.properties.args, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "EndpointPredictV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EndpointPredictV1Request': return super().__new__( cls, *_args, @@ -214,5 +130,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.callback_auth import CallbackAuth diff --git a/launch/api_client/model/endpoint_predict_v1_request.pyi b/launch/api_client/model/endpoint_predict_v1_request.pyi index 13dea9cf..018c61dc 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.pyi +++ b/launch/api_client/model/endpoint_predict_v1_request.pyi @@ -9,31 +9,37 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class EndpointPredictV1Request(schemas.DictSchema): + +class EndpointPredictV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: args = schemas.AnyTypeSchema - + @staticmethod - def callback_auth() -> typing.Type["CallbackAuth"]: + def callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth callback_url = schemas.StrSchema cloudpickle = schemas.StrSchema @@ -47,126 +53,70 @@ class EndpointPredictV1Request(schemas.DictSchema): "return_pickled": return_pickled, "url": url, } + @typing.overload def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": ... + def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> 'CallbackAuth': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["args"] - ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["callback_url"] - ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["callback_url"]) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cloudpickle"] - ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["cloudpickle"]) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["return_pickled"] - ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["return_pickled"]) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["url"] - ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "args", - "callback_auth", - "callback_url", - "cloudpickle", - "return_pickled", - "url", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - args: typing.Union[ - MetaOapg.properties.args, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + args: typing.Union[MetaOapg.properties.args, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "EndpointPredictV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'EndpointPredictV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_async_task_v1_response.py b/launch/api_client/model/get_async_task_v1_response.py index 80939dab..101107ad 100644 --- a/launch/api_client/model/get_async_task_v1_response.py +++ b/launch/api_client/model/get_async_task_v1_response.py @@ -9,38 +9,41 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class GetAsyncTaskV1Response(schemas.DictSchema): +class GetAsyncTaskV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "task_id", "status", } - + class properties: + @staticmethod - def status() -> typing.Type["TaskStatus"]: + def status() -> typing.Type['TaskStatus']: return TaskStatus - task_id = schemas.StrSchema result = schemas.AnyTypeSchema traceback = schemas.StrSchema @@ -50,133 +53,59 @@ def status() -> typing.Type["TaskStatus"]: "result": result, "traceback": traceback, } - + task_id: MetaOapg.properties.task_id - status: "TaskStatus" - + status: 'TaskStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: - ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: - ... - + def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + task_id: typing.Union[MetaOapg.properties.task_id, str, ], + status: 'TaskStatus', + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetAsyncTaskV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetAsyncTaskV1Response': return super().__new__( cls, *_args, @@ -188,5 +117,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/get_async_task_v1_response.pyi b/launch/api_client/model/get_async_task_v1_response.pyi index bf4524d5..d560363f 100644 --- a/launch/api_client/model/get_async_task_v1_response.pyi +++ b/launch/api_client/model/get_async_task_v1_response.pyi @@ -9,34 +9,40 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class GetAsyncTaskV1Response(schemas.DictSchema): + +class GetAsyncTaskV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "task_id", "status", } - + class properties: + @staticmethod - def status() -> typing.Type["TaskStatus"]: + def status() -> typing.Type['TaskStatus']: return TaskStatus task_id = schemas.StrSchema result = schemas.AnyTypeSchema @@ -47,110 +53,59 @@ class GetAsyncTaskV1Response(schemas.DictSchema): "result": result, "traceback": traceback, } + task_id: MetaOapg.properties.task_id - status: "TaskStatus" - + status: 'TaskStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "task_id", - "result", - "traceback", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - task_id: typing.Union[ - MetaOapg.properties.task_id, - str, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + task_id: typing.Union[MetaOapg.properties.task_id, str, ], + status: 'TaskStatus', + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetAsyncTaskV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetAsyncTaskV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_batch_job_v1_response.py b/launch/api_client/model/get_batch_job_v1_response.py index e5327ade..d6a779c6 100644 --- a/launch/api_client/model/get_batch_job_v1_response.py +++ b/launch/api_client/model/get_batch_job_v1_response.py @@ -9,40 +9,42 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class GetBatchJobV1Response(schemas.DictSchema): +class GetBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "duration", "status", } - + class properties: duration = schemas.NumberSchema - + @staticmethod - def status() -> typing.Type["BatchJobStatus"]: + def status() -> typing.Type['BatchJobStatus']: return BatchJobStatus - num_tasks_completed = schemas.IntSchema num_tasks_pending = schemas.IntSchema result = schemas.StrSchema @@ -53,137 +55,66 @@ def status() -> typing.Type["BatchJobStatus"]: "num_tasks_pending": num_tasks_pending, "result": result, } - + duration: MetaOapg.properties.duration - status: "BatchJobStatus" - + status: 'BatchJobStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: - ... - + def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": - ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> MetaOapg.properties.num_tasks_completed: - ... - + def __getitem__(self, name: typing_extensions.Literal["num_tasks_completed"]) -> MetaOapg.properties.num_tasks_completed: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> MetaOapg.properties.num_tasks_pending: - ... - + def __getitem__(self, name: typing_extensions.Literal["num_tasks_pending"]) -> MetaOapg.properties.num_tasks_pending: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: - ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_completed"]) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_pending"]) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - duration: typing.Union[ - MetaOapg.properties.duration, - decimal.Decimal, - int, - float, - ], - status: "BatchJobStatus", - num_tasks_completed: typing.Union[ - MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - num_tasks_pending: typing.Union[ - MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + duration: typing.Union[MetaOapg.properties.duration, decimal.Decimal, int, float, ], + status: 'BatchJobStatus', + num_tasks_completed: typing.Union[MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset] = schemas.unset, + num_tasks_pending: typing.Union[MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset] = schemas.unset, result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetBatchJobV1Response': return super().__new__( cls, *_args, @@ -196,5 +127,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.batch_job_status import BatchJobStatus diff --git a/launch/api_client/model/get_batch_job_v1_response.pyi b/launch/api_client/model/get_batch_job_v1_response.pyi index 264bf1cb..b0b58d48 100644 --- a/launch/api_client/model/get_batch_job_v1_response.pyi +++ b/launch/api_client/model/get_batch_job_v1_response.pyi @@ -9,36 +9,41 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class GetBatchJobV1Response(schemas.DictSchema): + +class GetBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "duration", "status", } - + class properties: duration = schemas.NumberSchema - + @staticmethod - def status() -> typing.Type["BatchJobStatus"]: + def status() -> typing.Type['BatchJobStatus']: return BatchJobStatus num_tasks_completed = schemas.IntSchema num_tasks_pending = schemas.IntSchema @@ -50,110 +55,66 @@ class GetBatchJobV1Response(schemas.DictSchema): "num_tasks_pending": num_tasks_pending, "result": result, } + duration: MetaOapg.properties.duration - status: "BatchJobStatus" - + status: 'BatchJobStatus' + @typing.overload def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> MetaOapg.properties.num_tasks_completed: ... + def __getitem__(self, name: typing_extensions.Literal["num_tasks_completed"]) -> MetaOapg.properties.num_tasks_completed: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> MetaOapg.properties.num_tasks_pending: ... + def __getitem__(self, name: typing_extensions.Literal["num_tasks_pending"]) -> MetaOapg.properties.num_tasks_pending: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_completed"] - ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_completed"]) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_tasks_pending"] - ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_pending"]) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "duration", - "status", - "num_tasks_completed", - "num_tasks_pending", - "result", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - duration: typing.Union[ - MetaOapg.properties.duration, - decimal.Decimal, - int, - float, - ], - status: "BatchJobStatus", - num_tasks_completed: typing.Union[ - MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - num_tasks_pending: typing.Union[ - MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + duration: typing.Union[MetaOapg.properties.duration, decimal.Decimal, int, float, ], + status: 'BatchJobStatus', + num_tasks_completed: typing.Union[MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset] = schemas.unset, + num_tasks_pending: typing.Union[MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset] = schemas.unset, result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetBatchJobV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_model_endpoint_v1_response.py b/launch/api_client/model/get_model_endpoint_v1_response.py index 41b4e554..49bcbab2 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.py +++ b/launch/api_client/model/get_model_endpoint_v1_response.py @@ -9,27 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class GetModelEndpointV1Response(schemas.DictSchema): +class GetModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_type", @@ -42,117 +45,102 @@ class MetaOapg: "created_by", "status", } - + class properties: bundle_name = schemas.StrSchema created_at = schemas.DateTimeSchema created_by = schemas.StrSchema destination = schemas.StrSchema - + @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: + def endpoint_type() -> typing.Type['ModelEndpointType']: return ModelEndpointType - id = schemas.StrSchema last_updated_at = schemas.DateTimeSchema name = schemas.StrSchema - + @staticmethod - def status() -> typing.Type["ModelEndpointStatus"]: + def status() -> typing.Type['ModelEndpointStatus']: return ModelEndpointStatus - aws_role = schemas.StrSchema - + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): + + class MetaOapg: - format = "uri" + format = 'uri' max_length = 2083 min_length = 1 - deployment_name = schemas.StrSchema - + @staticmethod - def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: + def deployment_state() -> typing.Type['ModelEndpointDeploymentState']: return ModelEndpointDeploymentState - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - metadata = schemas.DictSchema num_queued_items = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - + @staticmethod - def resource_state() -> typing.Type["ModelEndpointResourceState"]: + def resource_state() -> typing.Type['ModelEndpointResourceState']: return ModelEndpointResourceState - results_s3_bucket = schemas.StrSchema __annotations__ = { "bundle_name": bundle_name, @@ -176,8 +164,8 @@ def resource_state() -> typing.Type["ModelEndpointResourceState"]: "resource_state": resource_state, "results_s3_bucket": results_s3_bucket, } - - endpoint_type: "ModelEndpointType" + + endpoint_type: 'ModelEndpointType' last_updated_at: MetaOapg.properties.last_updated_at destination: MetaOapg.properties.destination name: MetaOapg.properties.name @@ -185,340 +173,169 @@ def resource_state() -> typing.Type["ModelEndpointResourceState"]: bundle_name: MetaOapg.properties.bundle_name id: MetaOapg.properties.id created_by: MetaOapg.properties.created_by - status: "ModelEndpointStatus" - + status: 'ModelEndpointStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: - ... - + def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: - ... - + def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: - ... - + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: - ... - + def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": - ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: - ... - + def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: - ... - + def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": - ... - + def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> 'ModelEndpointDeploymentState': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: - ... - + def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": - ... - + def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> 'ModelEndpointResourceState': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: - ... - + def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_name"] - ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["deployment_name"]) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_state"] - ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["deployment_state"]) -> typing.Union['ModelEndpointDeploymentState', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["num_queued_items"]) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_state"] - ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["resource_state"]) -> typing.Union['ModelEndpointResourceState', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - last_updated_at: typing.Union[ - MetaOapg.properties.last_updated_at, - str, - datetime, - ], - destination: typing.Union[ - MetaOapg.properties.destination, - str, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - bundle_name: typing.Union[ - MetaOapg.properties.bundle_name, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - created_by: typing.Union[ - MetaOapg.properties.created_by, - str, - ], - status: "ModelEndpointStatus", + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_type: 'ModelEndpointType', + last_updated_at: typing.Union[MetaOapg.properties.last_updated_at, str, datetime, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + bundle_name: typing.Union[MetaOapg.properties.bundle_name, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + created_by: typing.Union[MetaOapg.properties.created_by, str, ], + status: 'ModelEndpointStatus', aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, + deployment_state: typing.Union['ModelEndpointDeploymentState', schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - num_queued_items: typing.Union[ - MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + num_queued_items: typing.Union[MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + resource_state: typing.Union['ModelEndpointResourceState', schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetModelEndpointV1Response': return super().__new__( cls, *_args, @@ -546,13 +363,8 @@ def __new__( **kwargs, ) - from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.model_endpoint_deployment_state import ( - ModelEndpointDeploymentState, -) -from launch.api_client.model.model_endpoint_resource_state import ( - ModelEndpointResourceState, -) +from launch.api_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState +from launch.api_client.model.model_endpoint_resource_state import ModelEndpointResourceState from launch.api_client.model.model_endpoint_status import ModelEndpointStatus from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/get_model_endpoint_v1_response.pyi b/launch/api_client/model/get_model_endpoint_v1_response.pyi index 9f1beb10..9daf947d 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/get_model_endpoint_v1_response.pyi @@ -9,25 +9,30 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class GetModelEndpointV1Response(schemas.DictSchema): + +class GetModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_type", @@ -40,63 +45,62 @@ class GetModelEndpointV1Response(schemas.DictSchema): "created_by", "status", } - + class properties: bundle_name = schemas.StrSchema created_at = schemas.DateTimeSchema created_by = schemas.StrSchema destination = schemas.StrSchema - + @staticmethod - def endpoint_type() -> typing.Type["ModelEndpointType"]: + def endpoint_type() -> typing.Type['ModelEndpointType']: return ModelEndpointType id = schemas.StrSchema last_updated_at = schemas.DateTimeSchema name = schemas.StrSchema - + @staticmethod - def status() -> typing.Type["ModelEndpointStatus"]: + def status() -> typing.Type['ModelEndpointStatus']: return ModelEndpointStatus aws_role = schemas.StrSchema - + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): pass deployment_name = schemas.StrSchema - + @staticmethod - def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: + def deployment_state() -> typing.Type['ModelEndpointDeploymentState']: return ModelEndpointDeploymentState - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, @@ -105,37 +109,32 @@ class GetModelEndpointV1Response(schemas.DictSchema): ) metadata = schemas.DictSchema num_queued_items = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + @staticmethod - def resource_state() -> typing.Type["ModelEndpointResourceState"]: + def resource_state() -> typing.Type['ModelEndpointResourceState']: return ModelEndpointResourceState results_s3_bucket = schemas.StrSchema __annotations__ = { @@ -160,7 +159,8 @@ class GetModelEndpointV1Response(schemas.DictSchema): "resource_state": resource_state, "results_s3_bucket": results_s3_bucket, } - endpoint_type: "ModelEndpointType" + + endpoint_type: 'ModelEndpointType' last_updated_at: MetaOapg.properties.last_updated_at destination: MetaOapg.properties.destination name: MetaOapg.properties.name @@ -168,262 +168,169 @@ class GetModelEndpointV1Response(schemas.DictSchema): bundle_name: MetaOapg.properties.bundle_name id: MetaOapg.properties.id created_by: MetaOapg.properties.created_by - status: "ModelEndpointStatus" - + status: 'ModelEndpointStatus' + @typing.overload def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["last_updated_at"] - ) -> MetaOapg.properties.last_updated_at: ... + def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["deployment_name"] - ) -> MetaOapg.properties.deployment_name: ... + def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": ... + def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> 'ModelEndpointDeploymentState': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> MetaOapg.properties.num_queued_items: ... + def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": ... + def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> 'ModelEndpointResourceState': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: ... + def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["last_updated_at"] - ) -> MetaOapg.properties.last_updated_at: ... + def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_name"] - ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["deployment_name"]) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["deployment_state"] - ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["deployment_state"]) -> typing.Union['ModelEndpointDeploymentState', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["num_queued_items"] - ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["num_queued_items"]) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["resource_state"] - ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["resource_state"]) -> typing.Union['ModelEndpointResourceState', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "bundle_name", - "created_at", - "created_by", - "destination", - "endpoint_type", - "id", - "last_updated_at", - "name", - "status", - "aws_role", - "default_callback_auth", - "default_callback_url", - "deployment_name", - "deployment_state", - "labels", - "metadata", - "num_queued_items", - "post_inference_hooks", - "resource_state", - "results_s3_bucket", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_type: "ModelEndpointType", - last_updated_at: typing.Union[ - MetaOapg.properties.last_updated_at, - str, - datetime, - ], - destination: typing.Union[ - MetaOapg.properties.destination, - str, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - bundle_name: typing.Union[ - MetaOapg.properties.bundle_name, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - created_by: typing.Union[ - MetaOapg.properties.created_by, - str, - ], - status: "ModelEndpointStatus", + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_type: 'ModelEndpointType', + last_updated_at: typing.Union[MetaOapg.properties.last_updated_at, str, datetime, ], + destination: typing.Union[MetaOapg.properties.destination, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + bundle_name: typing.Union[MetaOapg.properties.bundle_name, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + created_by: typing.Union[MetaOapg.properties.created_by, str, ], + status: 'ModelEndpointStatus', aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, + deployment_state: typing.Union['ModelEndpointDeploymentState', schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - num_queued_items: typing.Union[ - MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, - resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + num_queued_items: typing.Union[MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + resource_state: typing.Union['ModelEndpointResourceState', schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "GetModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'GetModelEndpointV1Response': return super().__new__( cls, *_args, @@ -452,11 +359,7 @@ class GetModelEndpointV1Response(schemas.DictSchema): ) from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.model_endpoint_deployment_state import ( - ModelEndpointDeploymentState, -) -from launch_client.model.model_endpoint_resource_state import ( - ModelEndpointResourceState, -) +from launch_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState +from launch_client.model.model_endpoint_resource_state import ModelEndpointResourceState from launch_client.model.model_endpoint_status import ModelEndpointStatus from launch_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/gpu_type.py b/launch/api_client/model/gpu_type.py index 3d1ee053..34158fa2 100644 --- a/launch/api_client/model/gpu_type.py +++ b/launch/api_client/model/gpu_type.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class GpuType(schemas.EnumBase, schemas.StrSchema): +class GpuType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,21 +35,22 @@ class GpuType(schemas.EnumBase, schemas.StrSchema): Lists allowed GPU types for Launch. """ + class MetaOapg: enum_value_to_name = { "nvidia-tesla-t4": "TESLAT4", "nvidia-ampere-a10": "AMPEREA10", "nvidia-a100": "A100", } - + @schemas.classproperty def TESLAT4(cls): return cls("nvidia-tesla-t4") - + @schemas.classproperty def AMPEREA10(cls): return cls("nvidia-ampere-a10") - + @schemas.classproperty def A100(cls): return cls("nvidia-a100") diff --git a/launch/api_client/model/gpu_type.pyi b/launch/api_client/model/gpu_type.pyi index f24497d2..2c8853fe 100644 --- a/launch/api_client/model/gpu_type.pyi +++ b/launch/api_client/model/gpu_type.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class GpuType(schemas.EnumBase, schemas.StrSchema): + +class GpuType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,13 +34,15 @@ class GpuType(schemas.EnumBase, schemas.StrSchema): Lists allowed GPU types for Launch. """ - + @schemas.classproperty def TESLAT4(cls): return cls("nvidia-tesla-t4") + @schemas.classproperty def AMPEREA10(cls): return cls("nvidia-ampere-a10") + @schemas.classproperty def A100(cls): return cls("nvidia-a100") diff --git a/launch/api_client/model/http_validation_error.py b/launch/api_client/model/http_validation_error.py index 6206ad17..e19f05b2 100644 --- a/launch/api_client/model/http_validation_error.py +++ b/launch/api_client/model/http_validation_error.py @@ -9,115 +9,91 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class HTTPValidationError(schemas.DictSchema): +class HTTPValidationError( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: - class detail(schemas.ListSchema): + + + class detail( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ValidationError"]: + def items() -> typing.Type['ValidationError']: return ValidationError - + def __new__( cls, - _arg: typing.Union[typing.Tuple["ValidationError"], typing.List["ValidationError"]], + _arg: typing.Union[typing.Tuple['ValidationError'], typing.List['ValidationError']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "detail": + ) -> 'detail': return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> "ValidationError": + + def __getitem__(self, i: int) -> 'ValidationError': return super().__getitem__(i) - __annotations__ = { "detail": detail, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: - ... - + def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["detail",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["detail"] - ) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["detail"]) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["detail",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], detail: typing.Union[MetaOapg.properties.detail, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "HTTPValidationError": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'HTTPValidationError': return super().__new__( cls, *_args, @@ -126,5 +102,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.validation_error import ValidationError diff --git a/launch/api_client/model/http_validation_error.pyi b/launch/api_client/model/http_validation_error.pyi index 3a172fce..fa6a6998 100644 --- a/launch/api_client/model/http_validation_error.pyi +++ b/launch/api_client/model/http_validation_error.pyi @@ -9,99 +9,91 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class HTTPValidationError(schemas.DictSchema): + +class HTTPValidationError( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: - class detail(schemas.ListSchema): + + + class detail( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ValidationError"]: + def items() -> typing.Type['ValidationError']: return ValidationError + def __new__( cls, - _arg: typing.Union[typing.Tuple["ValidationError"], typing.List["ValidationError"]], + _arg: typing.Union[typing.Tuple['ValidationError'], typing.List['ValidationError']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "detail": + ) -> 'detail': return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> "ValidationError": + + def __getitem__(self, i: int) -> 'ValidationError': return super().__getitem__(i) __annotations__ = { "detail": detail, } + @typing.overload def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["detail",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["detail"] - ) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["detail"]) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["detail",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], detail: typing.Union[MetaOapg.properties.detail, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "HTTPValidationError": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'HTTPValidationError': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_bundles_v1_response.py b/launch/api_client/model/list_model_bundles_v1_response.py index 85827680..330b8226 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.py +++ b/launch/api_client/model/list_model_bundles_v1_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ListModelBundlesV1Response(schemas.DictSchema): +class ListModelBundlesV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,102 +34,73 @@ class ListModelBundlesV1Response(schemas.DictSchema): Response object for listing Model Bundles. """ + class MetaOapg: required = { "model_bundles", } - + class properties: - class model_bundles(schemas.ListSchema): + + + class model_bundles( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ModelBundleV1Response"]: + def items() -> typing.Type['ModelBundleV1Response']: return ModelBundleV1Response - + def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleV1Response"], typing.List["ModelBundleV1Response"]], + _arg: typing.Union[typing.Tuple['ModelBundleV1Response'], typing.List['ModelBundleV1Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_bundles": + ) -> 'model_bundles': return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> "ModelBundleV1Response": + + def __getitem__(self, i: int) -> 'ModelBundleV1Response': return super().__getitem__(i) - __annotations__ = { "model_bundles": model_bundles, } - + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundles: typing.Union[ - MetaOapg.properties.model_bundles, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelBundlesV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelBundlesV1Response': return super().__new__( cls, *_args, @@ -136,7 +109,4 @@ def __new__( **kwargs, ) - -from launch.api_client.model.model_bundle_v1_response import ( - ModelBundleV1Response, -) +from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response diff --git a/launch/api_client/model/list_model_bundles_v1_response.pyi b/launch/api_client/model/list_model_bundles_v1_response.pyi index 044323e2..99555d85 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.pyi +++ b/launch/api_client/model/list_model_bundles_v1_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ListModelBundlesV1Response(schemas.DictSchema): + +class ListModelBundlesV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,88 +34,73 @@ class ListModelBundlesV1Response(schemas.DictSchema): Response object for listing Model Bundles. """ + class MetaOapg: required = { "model_bundles", } - + class properties: - class model_bundles(schemas.ListSchema): + + + class model_bundles( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ModelBundleV1Response"]: + def items() -> typing.Type['ModelBundleV1Response']: return ModelBundleV1Response + def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleV1Response"], typing.List["ModelBundleV1Response"]], + _arg: typing.Union[typing.Tuple['ModelBundleV1Response'], typing.List['ModelBundleV1Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_bundles": + ) -> 'model_bundles': return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> "ModelBundleV1Response": + + def __getitem__(self, i: int) -> 'ModelBundleV1Response': return super().__getitem__(i) __annotations__ = { "model_bundles": model_bundles, } + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundles: typing.Union[ - MetaOapg.properties.model_bundles, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelBundlesV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelBundlesV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_bundles_v2_response.py b/launch/api_client/model/list_model_bundles_v2_response.py index 1b92e7e3..20f5feb1 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.py +++ b/launch/api_client/model/list_model_bundles_v2_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ListModelBundlesV2Response(schemas.DictSchema): +class ListModelBundlesV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,102 +34,73 @@ class ListModelBundlesV2Response(schemas.DictSchema): Response object for listing Model Bundles. """ + class MetaOapg: required = { "model_bundles", } - + class properties: - class model_bundles(schemas.ListSchema): + + + class model_bundles( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ModelBundleV2Response"]: + def items() -> typing.Type['ModelBundleV2Response']: return ModelBundleV2Response - + def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], + _arg: typing.Union[typing.Tuple['ModelBundleV2Response'], typing.List['ModelBundleV2Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_bundles": + ) -> 'model_bundles': return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> "ModelBundleV2Response": + + def __getitem__(self, i: int) -> 'ModelBundleV2Response': return super().__getitem__(i) - __annotations__ = { "model_bundles": model_bundles, } - + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundles: typing.Union[ - MetaOapg.properties.model_bundles, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelBundlesV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelBundlesV2Response': return super().__new__( cls, *_args, @@ -136,7 +109,4 @@ def __new__( **kwargs, ) - -from launch.api_client.model.model_bundle_v2_response import ( - ModelBundleV2Response, -) +from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response diff --git a/launch/api_client/model/list_model_bundles_v2_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi index ac37d268..70981b87 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ListModelBundlesV2Response(schemas.DictSchema): + +class ListModelBundlesV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,88 +34,73 @@ class ListModelBundlesV2Response(schemas.DictSchema): Response object for listing Model Bundles. """ + class MetaOapg: required = { "model_bundles", } - + class properties: - class model_bundles(schemas.ListSchema): + + + class model_bundles( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["ModelBundleV2Response"]: + def items() -> typing.Type['ModelBundleV2Response']: return ModelBundleV2Response + def __new__( cls, - _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], + _arg: typing.Union[typing.Tuple['ModelBundleV2Response'], typing.List['ModelBundleV2Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_bundles": + ) -> 'model_bundles': return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> "ModelBundleV2Response": + + def __getitem__(self, i: int) -> 'ModelBundleV2Response': return super().__getitem__(i) __annotations__ = { "model_bundles": model_bundles, } + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_bundles",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_bundles: typing.Union[ - MetaOapg.properties.model_bundles, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelBundlesV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelBundlesV2Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_endpoints_v1_response.py b/launch/api_client/model/list_model_endpoints_v1_response.py index 93efc7f3..4c7007ac 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.py +++ b/launch/api_client/model/list_model_endpoints_v1_response.py @@ -9,126 +9,96 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ListModelEndpointsV1Response(schemas.DictSchema): +class ListModelEndpointsV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "model_endpoints", } - + class properties: - class model_endpoints(schemas.ListSchema): + + + class model_endpoints( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["GetModelEndpointV1Response"]: + def items() -> typing.Type['GetModelEndpointV1Response']: return GetModelEndpointV1Response - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple["GetModelEndpointV1Response"], - typing.List["GetModelEndpointV1Response"], - ], + _arg: typing.Union[typing.Tuple['GetModelEndpointV1Response'], typing.List['GetModelEndpointV1Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_endpoints": + ) -> 'model_endpoints': return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> "GetModelEndpointV1Response": + + def __getitem__(self, i: int) -> 'GetModelEndpointV1Response': return super().__getitem__(i) - __annotations__ = { "model_endpoints": model_endpoints, } - + model_endpoints: MetaOapg.properties.model_endpoints - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_endpoints: typing.Union[ - MetaOapg.properties.model_endpoints, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_endpoints: typing.Union[MetaOapg.properties.model_endpoints, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelEndpointsV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelEndpointsV1Response': return super().__new__( cls, *_args, @@ -137,7 +107,4 @@ def __new__( **kwargs, ) - -from launch.api_client.model.get_model_endpoint_v1_response import ( - GetModelEndpointV1Response, -) +from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response diff --git a/launch/api_client/model/list_model_endpoints_v1_response.pyi b/launch/api_client/model/list_model_endpoints_v1_response.pyi index e5ef6e13..742211e6 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.pyi +++ b/launch/api_client/model/list_model_endpoints_v1_response.pyi @@ -9,114 +9,96 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ListModelEndpointsV1Response(schemas.DictSchema): + +class ListModelEndpointsV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "model_endpoints", } - + class properties: - class model_endpoints(schemas.ListSchema): + + + class model_endpoints( + schemas.ListSchema + ): + + class MetaOapg: + @staticmethod - def items() -> typing.Type["GetModelEndpointV1Response"]: + def items() -> typing.Type['GetModelEndpointV1Response']: return GetModelEndpointV1Response + def __new__( cls, - _arg: typing.Union[ - typing.Tuple["GetModelEndpointV1Response"], - typing.List["GetModelEndpointV1Response"], - ], + _arg: typing.Union[typing.Tuple['GetModelEndpointV1Response'], typing.List['GetModelEndpointV1Response']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_endpoints": + ) -> 'model_endpoints': return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> "GetModelEndpointV1Response": + + def __getitem__(self, i: int) -> 'GetModelEndpointV1Response': return super().__getitem__(i) __annotations__ = { "model_endpoints": model_endpoints, } + model_endpoints: MetaOapg.properties.model_endpoints - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_endpoints"] - ) -> MetaOapg.properties.model_endpoints: ... + def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_endpoints"] - ) -> MetaOapg.properties.model_endpoints: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["model_endpoints",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - model_endpoints: typing.Union[ - MetaOapg.properties.model_endpoints, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + model_endpoints: typing.Union[MetaOapg.properties.model_endpoints, list, tuple, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ListModelEndpointsV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ListModelEndpointsV1Response': return super().__new__( cls, *_args, @@ -125,6 +107,4 @@ class ListModelEndpointsV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.get_model_endpoint_v1_response import ( - GetModelEndpointV1Response, -) +from launch_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response diff --git a/launch/api_client/model/model_bundle_environment_params.py b/launch/api_client/model/model_bundle_environment_params.py index 52633215..037698eb 100644 --- a/launch/api_client/model/model_bundle_environment_params.py +++ b/launch/api_client/model/model_bundle_environment_params.py @@ -9,40 +9,43 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundleEnvironmentParams(schemas.DictSchema): +class ModelBundleEnvironmentParams( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - This is the entity-layer class for the Model Bundle environment parameters. Being an - entity-layer class, it should be a plain data object. + This is the entity-layer class for the Model Bundle environment parameters. Being an +entity-layer class, it should be a plain data object. """ + class MetaOapg: required = { "framework_type", } - + class properties: + @staticmethod - def framework_type() -> typing.Type["ModelBundleFrameworkType"]: + def framework_type() -> typing.Type['ModelBundleFrameworkType']: return ModelBundleFrameworkType - ecr_repo = schemas.StrSchema image_tag = schemas.StrSchema pytorch_image_tag = schemas.StrSchema @@ -54,129 +57,65 @@ def framework_type() -> typing.Type["ModelBundleFrameworkType"]: "pytorch_image_tag": pytorch_image_tag, "tensorflow_version": tensorflow_version, } - - framework_type: "ModelBundleFrameworkType" - + + framework_type: 'ModelBundleFrameworkType' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": - ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: - ... - + def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: - ... - + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: - ... - + def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: - ... - + def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "ecr_repo", - "image_tag", - "pytorch_image_tag", - "tensorflow_version", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["ecr_repo"] - ) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["ecr_repo"]) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["image_tag"] - ) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "ecr_repo", - "image_tag", - "pytorch_image_tag", - "tensorflow_version", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - framework_type: "ModelBundleFrameworkType", + *_args: typing.Union[dict, frozendict.frozendict, ], + framework_type: 'ModelBundleFrameworkType', ecr_repo: typing.Union[MetaOapg.properties.ecr_repo, str, schemas.Unset] = schemas.unset, image_tag: typing.Union[MetaOapg.properties.image_tag, str, schemas.Unset] = schemas.unset, pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, schemas.Unset] = schemas.unset, tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleEnvironmentParams": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleEnvironmentParams': return super().__new__( cls, *_args, @@ -189,7 +128,4 @@ def __new__( **kwargs, ) - -from launch.api_client.model.model_bundle_framework_type import ( - ModelBundleFrameworkType, -) +from launch.api_client.model.model_bundle_framework_type import ModelBundleFrameworkType diff --git a/launch/api_client/model/model_bundle_environment_params.pyi b/launch/api_client/model/model_bundle_environment_params.pyi index 54ace726..34f9c425 100644 --- a/launch/api_client/model/model_bundle_environment_params.pyi +++ b/launch/api_client/model/model_bundle_environment_params.pyi @@ -9,36 +9,42 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundleEnvironmentParams(schemas.DictSchema): + +class ModelBundleEnvironmentParams( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - This is the entity-layer class for the Model Bundle environment parameters. Being an - entity-layer class, it should be a plain data object. + This is the entity-layer class for the Model Bundle environment parameters. Being an +entity-layer class, it should be a plain data object. """ + class MetaOapg: required = { "framework_type", } - + class properties: + @staticmethod - def framework_type() -> typing.Type["ModelBundleFrameworkType"]: + def framework_type() -> typing.Type['ModelBundleFrameworkType']: return ModelBundleFrameworkType ecr_repo = schemas.StrSchema image_tag = schemas.StrSchema @@ -51,102 +57,65 @@ class ModelBundleEnvironmentParams(schemas.DictSchema): "pytorch_image_tag": pytorch_image_tag, "tensorflow_version": tensorflow_version, } - framework_type: "ModelBundleFrameworkType" - + + framework_type: 'ModelBundleFrameworkType' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": ... + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: ... + def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: ... + def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "ecr_repo", - "image_tag", - "pytorch_image_tag", - "tensorflow_version", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": ... + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["ecr_repo"] - ) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["ecr_repo"]) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["image_tag"] - ) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "ecr_repo", - "image_tag", - "pytorch_image_tag", - "tensorflow_version", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - framework_type: "ModelBundleFrameworkType", + *_args: typing.Union[dict, frozendict.frozendict, ], + framework_type: 'ModelBundleFrameworkType', ecr_repo: typing.Union[MetaOapg.properties.ecr_repo, str, schemas.Unset] = schemas.unset, image_tag: typing.Union[MetaOapg.properties.image_tag, str, schemas.Unset] = schemas.unset, pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, schemas.Unset] = schemas.unset, tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleEnvironmentParams": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleEnvironmentParams': return super().__new__( cls, *_args, @@ -159,6 +128,4 @@ class ModelBundleEnvironmentParams(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_framework_type import ( - ModelBundleFrameworkType, -) +from launch_client.model.model_bundle_framework_type import ModelBundleFrameworkType diff --git a/launch/api_client/model/model_bundle_framework_type.py b/launch/api_client/model/model_bundle_framework_type.py index 9acc5305..3a11569b 100644 --- a/launch/api_client/model/model_bundle_framework_type.py +++ b/launch/api_client/model/model_bundle_framework_type.py @@ -9,46 +9,48 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): +class ModelBundleFrameworkType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible machine learning frameworks of Model Bundles. - """ + class MetaOapg: enum_value_to_name = { "pytorch": "PYTORCH", "tensorflow": "TENSORFLOW", "custom_base_image": "CUSTOM_BASE_IMAGE", } - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") - + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") - + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_framework_type.pyi b/launch/api_client/model/model_bundle_framework_type.pyi index 52d4a8fe..bba8559d 100644 --- a/launch/api_client/model/model_bundle_framework_type.pyi +++ b/launch/api_client/model/model_bundle_framework_type.pyi @@ -9,35 +9,40 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): + +class ModelBundleFrameworkType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible machine learning frameworks of Model Bundles. - """ - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_order_by.py b/launch/api_client/model/model_bundle_order_by.py index f4487f3f..fd5679d9 100644 --- a/launch/api_client/model/model_bundle_order_by.py +++ b/launch/api_client/model/model_bundle_order_by.py @@ -9,41 +9,43 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): +class ModelBundleOrderBy( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible orderings of Model Bundles. - """ + class MetaOapg: enum_value_to_name = { "newest": "NEWEST", "oldest": "OLDEST", } - + @schemas.classproperty def NEWEST(cls): return cls("newest") - + @schemas.classproperty def OLDEST(cls): return cls("oldest") diff --git a/launch/api_client/model/model_bundle_order_by.pyi b/launch/api_client/model/model_bundle_order_by.pyi index 8e6fcd69..8183c616 100644 --- a/launch/api_client/model/model_bundle_order_by.pyi +++ b/launch/api_client/model/model_bundle_order_by.pyi @@ -9,32 +9,36 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): + +class ModelBundleOrderBy( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible orderings of Model Bundles. - """ - + @schemas.classproperty def NEWEST(cls): return cls("newest") + @schemas.classproperty def OLDEST(cls): return cls("oldest") diff --git a/launch/api_client/model/model_bundle_packaging_type.py b/launch/api_client/model/model_bundle_packaging_type.py index d839edd9..7f92d164 100644 --- a/launch/api_client/model/model_bundle_packaging_type.py +++ b/launch/api_client/model/model_bundle_packaging_type.py @@ -9,48 +9,50 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): +class ModelBundlePackagingType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. - These values broadly determine how the model endpoint will obtain its code & dependencies. - +These values broadly determine how the model endpoint will obtain its code & dependencies. """ + class MetaOapg: enum_value_to_name = { "cloudpickle": "CLOUDPICKLE", "zip": "ZIP", "lira": "LIRA", } - + @schemas.classproperty def CLOUDPICKLE(cls): return cls("cloudpickle") - + @schemas.classproperty def ZIP(cls): return cls("zip") - + @schemas.classproperty def LIRA(cls): return cls("lira") diff --git a/launch/api_client/model/model_bundle_packaging_type.pyi b/launch/api_client/model/model_bundle_packaging_type.pyi index dea525f3..f2a66978 100644 --- a/launch/api_client/model/model_bundle_packaging_type.pyi +++ b/launch/api_client/model/model_bundle_packaging_type.pyi @@ -9,37 +9,42 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): + +class ModelBundlePackagingType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. - These values broadly determine how the model endpoint will obtain its code & dependencies. - +These values broadly determine how the model endpoint will obtain its code & dependencies. """ - + @schemas.classproperty def CLOUDPICKLE(cls): return cls("cloudpickle") + @schemas.classproperty def ZIP(cls): return cls("zip") + @schemas.classproperty def LIRA(cls): return cls("lira") diff --git a/launch/api_client/model/model_bundle_v1_response.py b/launch/api_client/model/model_bundle_v1_response.py index 90bdef95..d3a56489 100644 --- a/launch/api_client/model/model_bundle_v1_response.py +++ b/launch/api_client/model/model_bundle_v1_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundleV1Response(schemas.DictSchema): +class ModelBundleV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class ModelBundleV1Response(schemas.DictSchema): Response object for a single Model Bundle. """ + class MetaOapg: required = { "metadata", @@ -44,86 +47,67 @@ class MetaOapg: "id", "env_params", } - + class properties: created_at = schemas.DateTimeSchema - + @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: + def env_params() -> typing.Type['ModelBundleEnvironmentParams']: return ModelBundleEnvironmentParams - id = schemas.StrSchema location = schemas.StrSchema metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + + + class model_artifact_ids( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + ) -> 'model_artifact_ids': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: + def packaging_type() -> typing.Type['ModelBundlePackagingType']: return ModelBundlePackagingType - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema schema_location = schemas.StrSchema __annotations__ = { @@ -139,226 +123,115 @@ def __getitem__(self, i: int) -> MetaOapg.items: "app_config": app_config, "schema_location": schema_location, } - + metadata: MetaOapg.properties.metadata requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: "ModelBundlePackagingType" + packaging_type: 'ModelBundlePackagingType' name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: "ModelBundleEnvironmentParams" - + env_params: 'ModelBundleEnvironmentParams' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "env_params", - "id", - "location", - "metadata", - "model_artifact_ids", - "name", - "packaging_type", - "requirements", - "app_config", - "schema_location", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "env_params", - "id", - "location", - "metadata", - "model_artifact_ids", - "name", - "packaging_type", - "requirements", - "app_config", - "schema_location", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - model_artifact_ids: typing.Union[ - MetaOapg.properties.model_artifact_ids, - list, - tuple, - ], - packaging_type: "ModelBundlePackagingType", - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], + packaging_type: 'ModelBundlePackagingType', + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + location: typing.Union[MetaOapg.properties.location, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + env_params: 'ModelBundleEnvironmentParams', + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleV1Response': return super().__new__( cls, *_args, @@ -377,10 +250,5 @@ def __new__( **kwargs, ) - -from launch.api_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch.api_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) +from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams +from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/model_bundle_v1_response.pyi b/launch/api_client/model/model_bundle_v1_response.pyi index 44b97398..8c3f0594 100644 --- a/launch/api_client/model/model_bundle_v1_response.pyi +++ b/launch/api_client/model/model_bundle_v1_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundleV1Response(schemas.DictSchema): + +class ModelBundleV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class ModelBundleV1Response(schemas.DictSchema): Response object for a single Model Bundle. """ + class MetaOapg: required = { "metadata", @@ -42,77 +47,65 @@ class ModelBundleV1Response(schemas.DictSchema): "id", "env_params", } - + class properties: created_at = schemas.DateTimeSchema - + @staticmethod - def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: + def env_params() -> typing.Type['ModelBundleEnvironmentParams']: return ModelBundleEnvironmentParams id = schemas.StrSchema location = schemas.StrSchema metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + + + class model_artifact_ids( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + ) -> 'model_artifact_ids': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type["ModelBundlePackagingType"]: + def packaging_type() -> typing.Type['ModelBundlePackagingType']: return ModelBundlePackagingType - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -130,177 +123,115 @@ class ModelBundleV1Response(schemas.DictSchema): "app_config": app_config, "schema_location": schema_location, } + metadata: MetaOapg.properties.metadata requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: "ModelBundlePackagingType" + packaging_type: 'ModelBundlePackagingType' name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: "ModelBundleEnvironmentParams" - + env_params: 'ModelBundleEnvironmentParams' + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: ... + def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "env_params", - "id", - "location", - "metadata", - "model_artifact_ids", - "name", - "packaging_type", - "requirements", - "app_config", - "schema_location", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "env_params", - "id", - "location", - "metadata", - "model_artifact_ids", - "name", - "packaging_type", - "requirements", - "app_config", - "schema_location", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - model_artifact_ids: typing.Union[ - MetaOapg.properties.model_artifact_ids, - list, - tuple, - ], - packaging_type: "ModelBundlePackagingType", - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], - env_params: "ModelBundleEnvironmentParams", - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], + packaging_type: 'ModelBundlePackagingType', + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + location: typing.Union[MetaOapg.properties.location, str, ], + id: typing.Union[MetaOapg.properties.id, str, ], + env_params: 'ModelBundleEnvironmentParams', + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleV1Response': return super().__new__( cls, *_args, @@ -319,9 +250,5 @@ class ModelBundleV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) +from launch_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams +from launch_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/model_bundle_v2_response.py b/launch/api_client/model/model_bundle_v2_response.py index 676b2d1f..0e28ce6f 100644 --- a/launch/api_client/model/model_bundle_v2_response.py +++ b/launch/api_client/model/model_bundle_v2_response.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelBundleV2Response(schemas.DictSchema): +class ModelBundleV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class ModelBundleV2Response(schemas.DictSchema): Response object for a single Model Bundle. """ + class MetaOapg: required = { "flavor", @@ -41,14 +44,18 @@ class MetaOapg: "created_at", "id", } - + class properties: created_at = schemas.DateTimeSchema - + + class flavor( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -63,87 +70,47 @@ def one_of(cls): CloudpickleArtifactFlavor, ZipArtifactFlavor, RunnableImageFlavor, + TritonEnhancedRunnableImageFlavor, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "flavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'flavor': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - id = schemas.StrSchema metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + + + class model_artifact_ids( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + ) -> 'model_artifact_ids': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - name = schemas.StrSchema schema_location = schemas.StrSchema __annotations__ = { @@ -155,186 +122,84 @@ def __getitem__(self, i: int) -> MetaOapg.items: "name": name, "schema_location": schema_location, } - + flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata model_artifact_ids: MetaOapg.properties.model_artifact_ids name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at id: MetaOapg.properties.id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: - ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "flavor", - "id", - "metadata", - "model_artifact_ids", - "name", - "schema_location", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "flavor", - "id", - "metadata", - "model_artifact_ids", - "name", - "schema_location", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - model_artifact_ids: typing.Union[ - MetaOapg.properties.model_artifact_ids, - list, - tuple, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + id: typing.Union[MetaOapg.properties.id, str, ], schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleV2Response': return super().__new__( cls, *_args, @@ -349,9 +214,7 @@ def __new__( **kwargs, ) - -from launch.api_client.model.cloudpickle_artifact_flavor import ( - CloudpickleArtifactFlavor, -) +from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_bundle_v2_response.pyi b/launch/api_client/model/model_bundle_v2_response.pyi index c9eea0b8..525e26c3 100644 --- a/launch/api_client/model/model_bundle_v2_response.pyi +++ b/launch/api_client/model/model_bundle_v2_response.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelBundleV2Response(schemas.DictSchema): + +class ModelBundleV2Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class ModelBundleV2Response(schemas.DictSchema): Response object for a single Model Bundle. """ + class MetaOapg: required = { "flavor", @@ -39,14 +44,18 @@ class ModelBundleV2Response(schemas.DictSchema): "created_at", "id", } - + class properties: created_at = schemas.DateTimeSchema - + + class flavor( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -61,45 +70,16 @@ class ModelBundleV2Response(schemas.DictSchema): CloudpickleArtifactFlavor, ZipArtifactFlavor, RunnableImageFlavor, + TritonEnhancedRunnableImageFlavor, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "flavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'flavor': return super().__new__( cls, *_args, @@ -108,33 +88,27 @@ class ModelBundleV2Response(schemas.DictSchema): ) id = schemas.StrSchema metadata = schemas.DictSchema - - class model_artifact_ids(schemas.ListSchema): + + + class model_artifact_ids( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "model_artifact_ids": + ) -> 'model_artifact_ids': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) name = schemas.StrSchema @@ -148,153 +122,84 @@ class ModelBundleV2Response(schemas.DictSchema): "name": name, "schema_location": schema_location, } + flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata model_artifact_ids: MetaOapg.properties.model_artifact_ids name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at id: MetaOapg.properties.id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: ... + def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["schema_location"] - ) -> MetaOapg.properties.schema_location: ... + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "flavor", - "id", - "metadata", - "model_artifact_ids", - "name", - "schema_location", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_artifact_ids"] - ) -> MetaOapg.properties.model_artifact_ids: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["schema_location"] - ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "created_at", - "flavor", - "id", - "metadata", - "model_artifact_ids", - "name", - "schema_location", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - metadata: typing.Union[ - MetaOapg.properties.metadata, - dict, - frozendict.frozendict, - ], - model_artifact_ids: typing.Union[ - MetaOapg.properties.model_artifact_ids, - list, - tuple, - ], - name: typing.Union[ - MetaOapg.properties.name, - str, - ], - created_at: typing.Union[ - MetaOapg.properties.created_at, - str, - datetime, - ], - id: typing.Union[ - MetaOapg.properties.id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], + model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], + name: typing.Union[MetaOapg.properties.name, str, ], + created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], + id: typing.Union[MetaOapg.properties.id, str, ], schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelBundleV2Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelBundleV2Response': return super().__new__( cls, *_args, @@ -309,8 +214,7 @@ class ModelBundleV2Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import ( - CloudpickleArtifactFlavor, -) +from launch_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch_client.model.runnable_image_flavor import RunnableImageFlavor +from launch_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_endpoint_deployment_state.py b/launch/api_client/model/model_endpoint_deployment_state.py index c0a13dff..d613d10d 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.py +++ b/launch/api_client/model/model_endpoint_deployment_state.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelEndpointDeploymentState(schemas.DictSchema): +class ModelEndpointDeploymentState( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,32 +34,52 @@ class ModelEndpointDeploymentState(schemas.DictSchema): This is the entity-layer class for the deployment settings related to a Model Endpoint. """ + class MetaOapg: required = { "max_workers", "min_workers", "per_worker", } - + class properties: - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - per_worker = schemas.IntSchema - - class available_workers(schemas.IntSchema): + + + class available_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - - class unavailable_workers(schemas.IntSchema): + + + class unavailable_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - __annotations__ = { "max_workers": max_workers, "min_workers": min_workers, @@ -65,143 +87,67 @@ class MetaOapg: "available_workers": available_workers, "unavailable_workers": unavailable_workers, } - + max_workers: MetaOapg.properties.max_workers min_workers: MetaOapg.properties.min_workers per_worker: MetaOapg.properties.per_worker - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["available_workers"] - ) -> MetaOapg.properties.available_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["available_workers"]) -> MetaOapg.properties.available_workers: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["unavailable_workers"] - ) -> MetaOapg.properties.unavailable_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["unavailable_workers"]) -> MetaOapg.properties.unavailable_workers: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "max_workers", - "min_workers", - "per_worker", - "available_workers", - "unavailable_workers", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["available_workers"] - ) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["available_workers"]) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["unavailable_workers"] - ) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["unavailable_workers"]) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "max_workers", - "min_workers", - "per_worker", - "available_workers", - "unavailable_workers", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - available_workers: typing.Union[ - MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - unavailable_workers: typing.Union[ - MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], + min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], + per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], + available_workers: typing.Union[MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, + unavailable_workers: typing.Union[MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelEndpointDeploymentState": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelEndpointDeploymentState': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_deployment_state.pyi b/launch/api_client/model/model_endpoint_deployment_state.pyi index ff9c7ac0..65d9de9d 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.pyi +++ b/launch/api_client/model/model_endpoint_deployment_state.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelEndpointDeploymentState(schemas.DictSchema): + +class ModelEndpointDeploymentState( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,25 +34,39 @@ class ModelEndpointDeploymentState(schemas.DictSchema): This is the entity-layer class for the deployment settings related to a Model Endpoint. """ + class MetaOapg: required = { "max_workers", "min_workers", "per_worker", } - + class properties: - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): pass - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): pass per_worker = schemas.IntSchema - - class available_workers(schemas.IntSchema): + + + class available_workers( + schemas.IntSchema + ): pass - - class unavailable_workers(schemas.IntSchema): + + + class unavailable_workers( + schemas.IntSchema + ): pass __annotations__ = { "max_workers": max_workers, @@ -57,116 +75,67 @@ class ModelEndpointDeploymentState(schemas.DictSchema): "available_workers": available_workers, "unavailable_workers": unavailable_workers, } + max_workers: MetaOapg.properties.max_workers min_workers: MetaOapg.properties.min_workers per_worker: MetaOapg.properties.per_worker - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["available_workers"] - ) -> MetaOapg.properties.available_workers: ... + def __getitem__(self, name: typing_extensions.Literal["available_workers"]) -> MetaOapg.properties.available_workers: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["unavailable_workers"] - ) -> MetaOapg.properties.unavailable_workers: ... + def __getitem__(self, name: typing_extensions.Literal["unavailable_workers"]) -> MetaOapg.properties.unavailable_workers: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "max_workers", - "min_workers", - "per_worker", - "available_workers", - "unavailable_workers", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["available_workers"] - ) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["available_workers"]) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["unavailable_workers"] - ) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["unavailable_workers"]) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "max_workers", - "min_workers", - "per_worker", - "available_workers", - "unavailable_workers", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - max_workers: typing.Union[ - MetaOapg.properties.max_workers, - decimal.Decimal, - int, - ], - min_workers: typing.Union[ - MetaOapg.properties.min_workers, - decimal.Decimal, - int, - ], - per_worker: typing.Union[ - MetaOapg.properties.per_worker, - decimal.Decimal, - int, - ], - available_workers: typing.Union[ - MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, - unavailable_workers: typing.Union[ - MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], + min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], + per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], + available_workers: typing.Union[MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, + unavailable_workers: typing.Union[MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelEndpointDeploymentState": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelEndpointDeploymentState': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_order_by.py b/launch/api_client/model/model_endpoint_order_by.py index bd4c6e0a..85a5d7e0 100644 --- a/launch/api_client/model/model_endpoint_order_by.py +++ b/launch/api_client/model/model_endpoint_order_by.py @@ -9,46 +9,48 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): +class ModelEndpointOrderBy( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible orderings of Model Bundles. - """ + class MetaOapg: enum_value_to_name = { "newest": "NEWEST", "oldest": "OLDEST", "alphabetical": "ALPHABETICAL", } - + @schemas.classproperty def NEWEST(cls): return cls("newest") - + @schemas.classproperty def OLDEST(cls): return cls("oldest") - + @schemas.classproperty def ALPHABETICAL(cls): return cls("alphabetical") diff --git a/launch/api_client/model/model_endpoint_order_by.pyi b/launch/api_client/model/model_endpoint_order_by.pyi index 3f3d362f..891a380d 100644 --- a/launch/api_client/model/model_endpoint_order_by.pyi +++ b/launch/api_client/model/model_endpoint_order_by.pyi @@ -9,35 +9,40 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): + +class ModelEndpointOrderBy( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - The canonical list of possible orderings of Model Bundles. - """ - + @schemas.classproperty def NEWEST(cls): return cls("newest") + @schemas.classproperty def OLDEST(cls): return cls("oldest") + @schemas.classproperty def ALPHABETICAL(cls): return cls("alphabetical") diff --git a/launch/api_client/model/model_endpoint_resource_state.py b/launch/api_client/model/model_endpoint_resource_state.py index f6ed43ff..e232a176 100644 --- a/launch/api_client/model/model_endpoint_resource_state.py +++ b/launch/api_client/model/model_endpoint_resource_state.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelEndpointResourceState(schemas.DictSchema): +class ModelEndpointResourceState( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,22 +34,27 @@ class ModelEndpointResourceState(schemas.DictSchema): This is the entity-layer class for the resource settings per worker of a Model Endpoint. """ + class MetaOapg: required = { "memory", "cpus", "gpus", } - + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -63,64 +70,41 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -136,66 +120,37 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType - optimize_costs = schemas.BoolSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -211,52 +166,20 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - __annotations__ = { "cpus": cpus, "gpus": gpus, @@ -265,193 +188,74 @@ def __new__( "optimize_costs": optimize_costs, "storage": storage, } - + memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus gpus: MetaOapg.properties.gpus - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: - ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpus", - "memory", - "gpu_type", - "optimize_costs", - "storage", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpus", - "memory", - "gpu_type", - "optimize_costs", - "storage", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelEndpointResourceState": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelEndpointResourceState': return super().__new__( cls, *_args, @@ -465,5 +269,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/model_endpoint_resource_state.pyi b/launch/api_client/model/model_endpoint_resource_state.pyi index 01d11482..d114992c 100644 --- a/launch/api_client/model/model_endpoint_resource_state.pyi +++ b/launch/api_client/model/model_endpoint_resource_state.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelEndpointResourceState(schemas.DictSchema): + +class ModelEndpointResourceState( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,22 +34,27 @@ class ModelEndpointResourceState(schemas.DictSchema): This is the entity-layer class for the resource settings per worker of a Model Endpoint. """ + class MetaOapg: required = { "memory", "cpus", "gpus", } - + class properties: + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -61,62 +70,38 @@ class ModelEndpointResourceState(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): pass - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -132,63 +117,37 @@ class ModelEndpointResourceState(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType optimize_costs = schemas.BoolSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -204,44 +163,14 @@ class ModelEndpointResourceState(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, @@ -256,162 +185,74 @@ class ModelEndpointResourceState(schemas.DictSchema): "optimize_costs": optimize_costs, "storage": storage, } + memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus gpus: MetaOapg.properties.gpus - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpus", - "memory", - "gpu_type", - "optimize_costs", - "storage", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "cpus", - "gpus", - "memory", - "gpu_type", - "optimize_costs", - "storage", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - gpus: typing.Union[ - MetaOapg.properties.gpus, - decimal.Decimal, - int, - ], - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ModelEndpointResourceState": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ModelEndpointResourceState': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_status.py b/launch/api_client/model/model_endpoint_status.py index 8703e65a..c1ceaf1b 100644 --- a/launch/api_client/model/model_endpoint_status.py +++ b/launch/api_client/model/model_endpoint_status.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): +class ModelEndpointStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +35,7 @@ class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ + class MetaOapg: enum_value_to_name = { "READY": "READY", @@ -40,23 +44,23 @@ class MetaOapg: "UPDATE_FAILED": "UPDATE_FAILED", "DELETE_IN_PROGRESS": "DELETE_IN_PROGRESS", } - + @schemas.classproperty def READY(cls): return cls("READY") - + @schemas.classproperty def UPDATE_PENDING(cls): return cls("UPDATE_PENDING") - + @schemas.classproperty def UPDATE_IN_PROGRESS(cls): return cls("UPDATE_IN_PROGRESS") - + @schemas.classproperty def UPDATE_FAILED(cls): return cls("UPDATE_FAILED") - + @schemas.classproperty def DELETE_IN_PROGRESS(cls): return cls("DELETE_IN_PROGRESS") diff --git a/launch/api_client/model/model_endpoint_status.pyi b/launch/api_client/model/model_endpoint_status.pyi index 8f1377bd..2c69f8c7 100644 --- a/launch/api_client/model/model_endpoint_status.pyi +++ b/launch/api_client/model/model_endpoint_status.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): + +class ModelEndpointStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,19 +34,23 @@ class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ - + @schemas.classproperty def READY(cls): return cls("READY") + @schemas.classproperty def UPDATE_PENDING(cls): return cls("UPDATE_PENDING") + @schemas.classproperty def UPDATE_IN_PROGRESS(cls): return cls("UPDATE_IN_PROGRESS") + @schemas.classproperty def UPDATE_FAILED(cls): return cls("UPDATE_FAILED") + @schemas.classproperty def DELETE_IN_PROGRESS(cls): return cls("DELETE_IN_PROGRESS") diff --git a/launch/api_client/model/model_endpoint_type.py b/launch/api_client/model/model_endpoint_type.py index 57c909ed..5c5037b8 100644 --- a/launch/api_client/model/model_endpoint_type.py +++ b/launch/api_client/model/model_endpoint_type.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): +class ModelEndpointType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,16 +35,17 @@ class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): An enumeration. """ + class MetaOapg: enum_value_to_name = { "async": "ASYNC", "sync": "SYNC", } - + @schemas.classproperty def ASYNC(cls): return cls("async") - + @schemas.classproperty def SYNC(cls): return cls("sync") diff --git a/launch/api_client/model/model_endpoint_type.pyi b/launch/api_client/model/model_endpoint_type.pyi index 7a9bef5b..15fd296f 100644 --- a/launch/api_client/model/model_endpoint_type.pyi +++ b/launch/api_client/model/model_endpoint_type.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): + +class ModelEndpointType( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,10 +34,11 @@ class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): An enumeration. """ - + @schemas.classproperty def ASYNC(cls): return cls("async") + @schemas.classproperty def SYNC(cls): return cls("sync") diff --git a/launch/api_client/model/pytorch_framework.py b/launch/api_client/model/pytorch_framework.py index 08ccf102..4d544b62 100644 --- a/launch/api_client/model/pytorch_framework.py +++ b/launch/api_client/model/pytorch_framework.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class PytorchFramework(schemas.DictSchema): +class PytorchFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,117 +34,74 @@ class PytorchFramework(schemas.DictSchema): This is the entity-layer class for a Pytorch framework specification. """ + class MetaOapg: required = { "pytorch_image_tag", "framework_type", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "pytorch": "PYTORCH", } - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") - pytorch_image_tag = schemas.StrSchema __annotations__ = { "framework_type": framework_type, "pytorch_image_tag": pytorch_image_tag, } - + pytorch_image_tag: MetaOapg.properties.pytorch_image_tag framework_type: MetaOapg.properties.framework_type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: - ... - + def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "pytorch_image_tag", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "pytorch_image_tag", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - pytorch_image_tag: typing.Union[ - MetaOapg.properties.pytorch_image_tag, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "PytorchFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'PytorchFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/pytorch_framework.pyi b/launch/api_client/model/pytorch_framework.pyi index 422a2256..558fe85a 100644 --- a/launch/api_client/model/pytorch_framework.pyi +++ b/launch/api_client/model/pytorch_framework.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class PytorchFramework(schemas.DictSchema): + +class PytorchFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,14 +34,21 @@ class PytorchFramework(schemas.DictSchema): This is the entity-layer class for a Pytorch framework specification. """ + class MetaOapg: required = { "pytorch_image_tag", "framework_type", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") @@ -46,82 +57,45 @@ class PytorchFramework(schemas.DictSchema): "framework_type": framework_type, "pytorch_image_tag": pytorch_image_tag, } + pytorch_image_tag: MetaOapg.properties.pytorch_image_tag framework_type: MetaOapg.properties.framework_type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: ... + def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "pytorch_image_tag", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["framework_type"] - ) -> MetaOapg.properties.framework_type: ... + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["pytorch_image_tag"] - ) -> MetaOapg.properties.pytorch_image_tag: ... + def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "pytorch_image_tag", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - pytorch_image_tag: typing.Union[ - MetaOapg.properties.pytorch_image_tag, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "PytorchFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'PytorchFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/request_schema.py b/launch/api_client/model/request_schema.py index 48c12333..3546ebfd 100644 --- a/launch/api_client/model/request_schema.py +++ b/launch/api_client/model/request_schema.py @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 - RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/request_schema.pyi b/launch/api_client/model/request_schema.pyi index 031787ad..113fed8a 100644 --- a/launch/api_client/model/request_schema.pyi +++ b/launch/api_client/model/request_schema.pyi @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 +from launch_client import schemas # noqa: F401 RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.py b/launch/api_client/model/response_schema.py index ac2a8608..816504b4 100644 --- a/launch/api_client/model/response_schema.py +++ b/launch/api_client/model/response_schema.py @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 - ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.pyi b/launch/api_client/model/response_schema.pyi index 800305f1..b31db7e3 100644 --- a/launch/api_client/model/response_schema.pyi +++ b/launch/api_client/model/response_schema.pyi @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 +from launch_client import schemas # noqa: F401 ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/runnable_image_flavor.py b/launch/api_client/model/runnable_image_flavor.py index 36105148..edb4fba0 100644 --- a/launch/api_client/model/runnable_image_flavor.py +++ b/launch/api_client/model/runnable_image_flavor.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class RunnableImageFlavor(schemas.DictSchema): +class RunnableImageFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class RunnableImageFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a runnable image. """ + class MetaOapg: required = { "flavor", @@ -40,98 +43,95 @@ class MetaOapg: "repository", "command", } - + class properties: - class command(schemas.ListSchema): + + + class command( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "command": + ) -> 'command': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "runnable_image": "RUNNABLE_IMAGE", } - + @schemas.classproperty def RUNNABLE_IMAGE(cls): return cls("runnable_image") - - class protocol(schemas.EnumBase, schemas.StrSchema): + + + class protocol( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "http": "HTTP", } - + @schemas.classproperty def HTTP(cls): return cls("http") - repository = schemas.StrSchema tag = schemas.StrSchema - - class env(schemas.DictSchema): + + + class env( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "env": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'env': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + readiness_initial_delay_seconds = schemas.IntSchema __annotations__ = { "command": command, "flavor": flavor, @@ -139,151 +139,85 @@ def __new__( "repository": repository, "tag": tag, "env": env, + "readiness_initial_delay_seconds": readiness_initial_delay_seconds, } - + flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag repository: MetaOapg.properties.repository command: MetaOapg.properties.command - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: - ... - + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: - ... - + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: - ... - + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: - ... - + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: - ... - + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "command", - "flavor", - "protocol", - "repository", - "tag", - "env", - ], - str, - ], - ): + def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["env"] - ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "command", - "flavor", - "protocol", - "repository", - "tag", - "env", - ], - str, - ], - ): + def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - protocol: typing.Union[ - MetaOapg.properties.protocol, - str, - ], - tag: typing.Union[ - MetaOapg.properties.tag, - str, - ], - repository: typing.Union[ - MetaOapg.properties.repository, - str, - ], - command: typing.Union[ - MetaOapg.properties.command, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + protocol: typing.Union[MetaOapg.properties.protocol, str, ], + tag: typing.Union[MetaOapg.properties.tag, str, ], + repository: typing.Union[MetaOapg.properties.repository, str, ], + command: typing.Union[MetaOapg.properties.command, list, tuple, ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "RunnableImageFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'RunnableImageFlavor': return super().__new__( cls, *_args, @@ -293,6 +227,7 @@ def __new__( repository=repository, command=command, env=env, + readiness_initial_delay_seconds=readiness_initial_delay_seconds, _configuration=_configuration, **kwargs, ) diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi index 2004c939..d0255e34 100644 --- a/launch/api_client/model/runnable_image_flavor.pyi +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class RunnableImageFlavor(schemas.DictSchema): + +class RunnableImageFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class RunnableImageFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a runnable image. """ + class MetaOapg: required = { "flavor", @@ -38,81 +43,83 @@ class RunnableImageFlavor(schemas.DictSchema): "repository", "command", } - + class properties: - class command(schemas.ListSchema): + + + class command( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "command": + ) -> 'command': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def RUNNABLE_IMAGE(cls): return cls("runnable_image") - - class protocol(schemas.EnumBase, schemas.StrSchema): + + + class protocol( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def HTTP(cls): return cls("http") repository = schemas.StrSchema tag = schemas.StrSchema - - class env(schemas.DictSchema): + + + class env( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "env": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'env': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + readiness_initial_delay_seconds = schemas.IntSchema __annotations__ = { "command": command, "flavor": flavor, @@ -120,120 +127,85 @@ class RunnableImageFlavor(schemas.DictSchema): "repository": repository, "tag": tag, "env": env, + "readiness_initial_delay_seconds": readiness_initial_delay_seconds, } + flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag repository: MetaOapg.properties.repository command: MetaOapg.properties.command - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "command", - "flavor", - "protocol", - "repository", - "tag", - "env", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["env"] - ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "command", - "flavor", - "protocol", - "repository", - "tag", - "env", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - protocol: typing.Union[ - MetaOapg.properties.protocol, - str, - ], - tag: typing.Union[ - MetaOapg.properties.tag, - str, - ], - repository: typing.Union[ - MetaOapg.properties.repository, - str, - ], - command: typing.Union[ - MetaOapg.properties.command, - list, - tuple, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + protocol: typing.Union[MetaOapg.properties.protocol, str, ], + tag: typing.Union[MetaOapg.properties.tag, str, ], + repository: typing.Union[MetaOapg.properties.repository, str, ], + command: typing.Union[MetaOapg.properties.command, list, tuple, ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "RunnableImageFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'RunnableImageFlavor': return super().__new__( cls, *_args, @@ -243,6 +215,7 @@ class RunnableImageFlavor(schemas.DictSchema): repository=repository, command=command, env=env, + readiness_initial_delay_seconds=readiness_initial_delay_seconds, _configuration=_configuration, **kwargs, ) diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.py b/launch/api_client/model/sync_endpoint_predict_v1_response.py index e3753b5e..08311f09 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.py +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.py @@ -9,37 +9,40 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class SyncEndpointPredictV1Response(schemas.DictSchema): +class SyncEndpointPredictV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "status", } - + class properties: + @staticmethod - def status() -> typing.Type["TaskStatus"]: + def status() -> typing.Type['TaskStatus']: return TaskStatus - result = schemas.AnyTypeSchema traceback = schemas.StrSchema __annotations__ = { @@ -47,118 +50,51 @@ def status() -> typing.Type["TaskStatus"]: "result": result, "traceback": traceback, } - - status: "TaskStatus" - + + status: 'TaskStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: - ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: - ... - + def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "result", - "traceback", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": - ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "result", - "traceback", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + status: 'TaskStatus', + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "SyncEndpointPredictV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'SyncEndpointPredictV1Response': return super().__new__( cls, *_args, @@ -169,5 +105,4 @@ def __new__( **kwargs, ) - from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi index 49ae96fa..063e0357 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi @@ -9,33 +9,39 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class SyncEndpointPredictV1Response(schemas.DictSchema): + +class SyncEndpointPredictV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "status", } - + class properties: + @staticmethod - def status() -> typing.Type["TaskStatus"]: + def status() -> typing.Type['TaskStatus']: return TaskStatus result = schemas.AnyTypeSchema traceback = schemas.StrSchema @@ -44,99 +50,51 @@ class SyncEndpointPredictV1Response(schemas.DictSchema): "result": result, "traceback": traceback, } - status: "TaskStatus" - + + status: 'TaskStatus' + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... + def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "result", - "traceback", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["result"] - ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["traceback"] - ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "status", - "result", - "traceback", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - status: "TaskStatus", - result: typing.Union[ - MetaOapg.properties.result, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + status: 'TaskStatus', + result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "SyncEndpointPredictV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'SyncEndpointPredictV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/task_status.py b/launch/api_client/model/task_status.py index 9693fad1..d162efff 100644 --- a/launch/api_client/model/task_status.py +++ b/launch/api_client/model/task_status.py @@ -9,21 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class TaskStatus(schemas.EnumBase, schemas.StrSchema): +class TaskStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +35,7 @@ class TaskStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ + class MetaOapg: enum_value_to_name = { "PENDING": "PENDING", @@ -40,23 +44,23 @@ class MetaOapg: "FAILURE": "FAILURE", "UNDEFINED": "UNDEFINED", } - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - + @schemas.classproperty def STARTED(cls): return cls("STARTED") - + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/task_status.pyi b/launch/api_client/model/task_status.pyi index d81b166f..1a313148 100644 --- a/launch/api_client/model/task_status.pyi +++ b/launch/api_client/model/task_status.pyi @@ -9,19 +9,24 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class TaskStatus(schemas.EnumBase, schemas.StrSchema): + +class TaskStatus( + schemas.EnumBase, + schemas.StrSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -29,19 +34,23 @@ class TaskStatus(schemas.EnumBase, schemas.StrSchema): An enumeration. """ - + @schemas.classproperty def PENDING(cls): return cls("PENDING") + @schemas.classproperty def STARTED(cls): return cls("STARTED") + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/tensorflow_framework.py b/launch/api_client/model/tensorflow_framework.py index f7a0d24a..46fc28a7 100644 --- a/launch/api_client/model/tensorflow_framework.py +++ b/launch/api_client/model/tensorflow_framework.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class TensorflowFramework(schemas.DictSchema): +class TensorflowFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,117 +34,74 @@ class TensorflowFramework(schemas.DictSchema): This is the entity-layer class for a Tensorflow framework specification. """ + class MetaOapg: required = { "tensorflow_version", "framework_type", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "tensorflow": "TENSORFLOW", } - + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") - tensorflow_version = schemas.StrSchema __annotations__ = { "framework_type": framework_type, "tensorflow_version": tensorflow_version, } - + tensorflow_version: MetaOapg.properties.tensorflow_version framework_type: MetaOapg.properties.framework_type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: - ... - + def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "tensorflow_version", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "tensorflow_version", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - tensorflow_version: typing.Union[ - MetaOapg.properties.tensorflow_version, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "TensorflowFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TensorflowFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/tensorflow_framework.pyi b/launch/api_client/model/tensorflow_framework.pyi index 9cf421c8..3799b7a5 100644 --- a/launch/api_client/model/tensorflow_framework.pyi +++ b/launch/api_client/model/tensorflow_framework.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class TensorflowFramework(schemas.DictSchema): + +class TensorflowFramework( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,14 +34,21 @@ class TensorflowFramework(schemas.DictSchema): This is the entity-layer class for a Tensorflow framework specification. """ + class MetaOapg: required = { "tensorflow_version", "framework_type", } - + class properties: - class framework_type(schemas.EnumBase, schemas.StrSchema): + + + class framework_type( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") @@ -46,82 +57,45 @@ class TensorflowFramework(schemas.DictSchema): "framework_type": framework_type, "tensorflow_version": tensorflow_version, } + tensorflow_version: MetaOapg.properties.tensorflow_version framework_type: MetaOapg.properties.framework_type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: ... + def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "tensorflow_version", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["framework_type"] - ) -> MetaOapg.properties.framework_type: ... + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["tensorflow_version"] - ) -> MetaOapg.properties.tensorflow_version: ... + def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "framework_type", - "tensorflow_version", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - tensorflow_version: typing.Union[ - MetaOapg.properties.tensorflow_version, - str, - ], - framework_type: typing.Union[ - MetaOapg.properties.framework_type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, ], + framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "TensorflowFramework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TensorflowFramework': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py new file mode 100644 index 00000000..5cc5d766 --- /dev/null +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py @@ -0,0 +1,337 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from launch.api_client import schemas # noqa: F401 + + +class TritonEnhancedRunnableImageFlavor( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + For deployments that require tritonserver running in a container. + """ + + + class MetaOapg: + required = { + "flavor", + "protocol", + "tag", + "repository", + "triton_commit_tag", + "triton_model_repository", + "command", + "triton_num_cpu", + } + + class properties: + + + class command( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'command': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "triton_enhanced_runnable_image": "TRITON_ENHANCED_RUNNABLE_IMAGE", + } + + @schemas.classproperty + def TRITON_ENHANCED_RUNNABLE_IMAGE(cls): + return cls("triton_enhanced_runnable_image") + + + class protocol( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "http": "HTTP", + } + + @schemas.classproperty + def HTTP(cls): + return cls("http") + repository = schemas.StrSchema + tag = schemas.StrSchema + triton_commit_tag = schemas.StrSchema + triton_model_repository = schemas.StrSchema + triton_num_cpu = schemas.NumberSchema + + + class env( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'env': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + readiness_initial_delay_seconds = schemas.IntSchema + triton_memory = schemas.StrSchema + + + class triton_model_replicas( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'triton_model_replicas': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + triton_readiness_initial_delay_seconds = schemas.IntSchema + triton_storage = schemas.StrSchema + __annotations__ = { + "command": command, + "flavor": flavor, + "protocol": protocol, + "repository": repository, + "tag": tag, + "triton_commit_tag": triton_commit_tag, + "triton_model_repository": triton_model_repository, + "triton_num_cpu": triton_num_cpu, + "env": env, + "readiness_initial_delay_seconds": readiness_initial_delay_seconds, + "triton_memory": triton_memory, + "triton_model_replicas": triton_model_replicas, + "triton_readiness_initial_delay_seconds": triton_readiness_initial_delay_seconds, + "triton_storage": triton_storage, + } + + flavor: MetaOapg.properties.flavor + protocol: MetaOapg.properties.protocol + tag: MetaOapg.properties.tag + repository: MetaOapg.properties.repository + triton_commit_tag: MetaOapg.properties.triton_commit_tag + triton_model_repository: MetaOapg.properties.triton_model_repository + command: MetaOapg.properties.command + triton_num_cpu: MetaOapg.properties.triton_num_cpu + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_memory"]) -> MetaOapg.properties.triton_memory: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_model_replicas"]) -> MetaOapg.properties.triton_model_replicas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_storage"]) -> MetaOapg.properties.triton_storage: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_memory"]) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_model_replicas"]) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_storage"]) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + protocol: typing.Union[MetaOapg.properties.protocol, str, ], + tag: typing.Union[MetaOapg.properties.tag, str, ], + repository: typing.Union[MetaOapg.properties.repository, str, ], + triton_commit_tag: typing.Union[MetaOapg.properties.triton_commit_tag, str, ], + triton_model_repository: typing.Union[MetaOapg.properties.triton_model_repository, str, ], + command: typing.Union[MetaOapg.properties.command, list, tuple, ], + triton_num_cpu: typing.Union[MetaOapg.properties.triton_num_cpu, decimal.Decimal, int, float, ], + env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_memory: typing.Union[MetaOapg.properties.triton_memory, str, schemas.Unset] = schemas.unset, + triton_model_replicas: typing.Union[MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + triton_readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_storage: typing.Union[MetaOapg.properties.triton_storage, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TritonEnhancedRunnableImageFlavor': + return super().__new__( + cls, + *_args, + flavor=flavor, + protocol=protocol, + tag=tag, + repository=repository, + triton_commit_tag=triton_commit_tag, + triton_model_repository=triton_model_repository, + command=command, + triton_num_cpu=triton_num_cpu, + env=env, + readiness_initial_delay_seconds=readiness_initial_delay_seconds, + triton_memory=triton_memory, + triton_model_replicas=triton_model_replicas, + triton_readiness_initial_delay_seconds=triton_readiness_initial_delay_seconds, + triton_storage=triton_storage, + _configuration=_configuration, + **kwargs, + ) diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi new file mode 100644 index 00000000..f258dbaf --- /dev/null +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + launch + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from launch_client import schemas # noqa: F401 + + +class TritonEnhancedRunnableImageFlavor( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + For deployments that require tritonserver running in a container. + """ + + + class MetaOapg: + required = { + "flavor", + "protocol", + "tag", + "repository", + "triton_commit_tag", + "triton_model_repository", + "command", + "triton_num_cpu", + } + + class properties: + + + class command( + schemas.ListSchema + ): + + + class MetaOapg: + items = schemas.StrSchema + + def __new__( + cls, + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'command': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> MetaOapg.items: + return super().__getitem__(i) + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def TRITON_ENHANCED_RUNNABLE_IMAGE(cls): + return cls("triton_enhanced_runnable_image") + + + class protocol( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def HTTP(cls): + return cls("http") + repository = schemas.StrSchema + tag = schemas.StrSchema + triton_commit_tag = schemas.StrSchema + triton_model_repository = schemas.StrSchema + triton_num_cpu = schemas.NumberSchema + + + class env( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'env': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + readiness_initial_delay_seconds = schemas.IntSchema + triton_memory = schemas.StrSchema + + + class triton_model_replicas( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.StrSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'triton_model_replicas': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + triton_readiness_initial_delay_seconds = schemas.IntSchema + triton_storage = schemas.StrSchema + __annotations__ = { + "command": command, + "flavor": flavor, + "protocol": protocol, + "repository": repository, + "tag": tag, + "triton_commit_tag": triton_commit_tag, + "triton_model_repository": triton_model_repository, + "triton_num_cpu": triton_num_cpu, + "env": env, + "readiness_initial_delay_seconds": readiness_initial_delay_seconds, + "triton_memory": triton_memory, + "triton_model_replicas": triton_model_replicas, + "triton_readiness_initial_delay_seconds": triton_readiness_initial_delay_seconds, + "triton_storage": triton_storage, + } + + flavor: MetaOapg.properties.flavor + protocol: MetaOapg.properties.protocol + tag: MetaOapg.properties.tag + repository: MetaOapg.properties.repository + triton_commit_tag: MetaOapg.properties.triton_commit_tag + triton_model_repository: MetaOapg.properties.triton_model_repository + command: MetaOapg.properties.command + triton_num_cpu: MetaOapg.properties.triton_num_cpu + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_memory"]) -> MetaOapg.properties.triton_memory: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_model_replicas"]) -> MetaOapg.properties.triton_model_replicas: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["triton_storage"]) -> MetaOapg.properties.triton_storage: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_memory"]) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_model_replicas"]) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["triton_storage"]) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + protocol: typing.Union[MetaOapg.properties.protocol, str, ], + tag: typing.Union[MetaOapg.properties.tag, str, ], + repository: typing.Union[MetaOapg.properties.repository, str, ], + triton_commit_tag: typing.Union[MetaOapg.properties.triton_commit_tag, str, ], + triton_model_repository: typing.Union[MetaOapg.properties.triton_model_repository, str, ], + command: typing.Union[MetaOapg.properties.command, list, tuple, ], + triton_num_cpu: typing.Union[MetaOapg.properties.triton_num_cpu, decimal.Decimal, int, float, ], + env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_memory: typing.Union[MetaOapg.properties.triton_memory, str, schemas.Unset] = schemas.unset, + triton_model_replicas: typing.Union[MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + triton_readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_storage: typing.Union[MetaOapg.properties.triton_storage, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'TritonEnhancedRunnableImageFlavor': + return super().__new__( + cls, + *_args, + flavor=flavor, + protocol=protocol, + tag=tag, + repository=repository, + triton_commit_tag=triton_commit_tag, + triton_model_repository=triton_model_repository, + command=command, + triton_num_cpu=triton_num_cpu, + env=env, + readiness_initial_delay_seconds=readiness_initial_delay_seconds, + triton_memory=triton_memory, + triton_model_replicas=triton_model_replicas, + triton_readiness_initial_delay_seconds=triton_readiness_initial_delay_seconds, + triton_storage=triton_storage, + _configuration=_configuration, + **kwargs, + ) diff --git a/launch/api_client/model/update_batch_job_v1_request.py b/launch/api_client/model/update_batch_job_v1_request.py index 3e1de5a1..abf9b3a1 100644 --- a/launch/api_client/model/update_batch_job_v1_request.py +++ b/launch/api_client/model/update_batch_job_v1_request.py @@ -9,103 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class UpdateBatchJobV1Request(schemas.DictSchema): +class UpdateBatchJobV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "cancel", } - + class properties: cancel = schemas.BoolSchema __annotations__ = { "cancel": cancel, } - + cancel: MetaOapg.properties.cancel - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: - ... - + def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cancel: typing.Union[ - MetaOapg.properties.cancel, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + cancel: typing.Union[MetaOapg.properties.cancel, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateBatchJobV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_request.pyi b/launch/api_client/model/update_batch_job_v1_request.pyi index a86ddc67..96a62273 100644 --- a/launch/api_client/model/update_batch_job_v1_request.pyi +++ b/launch/api_client/model/update_batch_job_v1_request.pyi @@ -9,90 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class UpdateBatchJobV1Request(schemas.DictSchema): + +class UpdateBatchJobV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "cancel", } - + class properties: cancel = schemas.BoolSchema __annotations__ = { "cancel": cancel, } + cancel: MetaOapg.properties.cancel - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["cancel",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - cancel: typing.Union[ - MetaOapg.properties.cancel, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + cancel: typing.Union[MetaOapg.properties.cancel, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateBatchJobV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_response.py b/launch/api_client/model/update_batch_job_v1_response.py index 00236e84..4f702046 100644 --- a/launch/api_client/model/update_batch_job_v1_response.py +++ b/launch/api_client/model/update_batch_job_v1_response.py @@ -9,103 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class UpdateBatchJobV1Response(schemas.DictSchema): +class UpdateBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "success", } - + class properties: success = schemas.BoolSchema __annotations__ = { "success": success, } - + success: MetaOapg.properties.success - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: - ... - + def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["success", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["success", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - success: typing.Union[ - MetaOapg.properties.success, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + success: typing.Union[MetaOapg.properties.success, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateBatchJobV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_response.pyi b/launch/api_client/model/update_batch_job_v1_response.pyi index 25a2b4b7..ff8a3d63 100644 --- a/launch/api_client/model/update_batch_job_v1_response.pyi +++ b/launch/api_client/model/update_batch_job_v1_response.pyi @@ -9,90 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class UpdateBatchJobV1Response(schemas.DictSchema): + +class UpdateBatchJobV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "success", } - + class properties: success = schemas.BoolSchema __annotations__ = { "success": success, } + success: MetaOapg.properties.success - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["success", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["success",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["success", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - success: typing.Union[ - MetaOapg.properties.success, - bool, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + success: typing.Union[MetaOapg.properties.success, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateBatchJobV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateBatchJobV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_request.py b/launch/api_client/model/update_model_endpoint_v1_request.py index eea59db8..769f2fe7 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.py +++ b/launch/api_client/model/update_model_endpoint_v1_request.py @@ -9,40 +9,47 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class UpdateModelEndpointV1Request(schemas.DictSchema): +class UpdateModelEndpointV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: aws_role = schemas.StrSchema billing_tags = schemas.DictSchema - + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -58,120 +65,99 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): + + class MetaOapg: - format = "uri" + format = 'uri' max_length = 2083 min_length = 1 - + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - high_priority = schemas.BoolSchema - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -187,104 +173,70 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): + + class MetaOapg: inclusive_minimum = 0 - model_bundle_id = schemas.StrSchema optimize_costs = schemas.BoolSchema per_worker = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - prewarm = schemas.BoolSchema results_s3_bucket = schemas.StrSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -300,52 +252,20 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - __annotations__ = { "aws_role": aws_role, "billing_tags": billing_tags, @@ -368,389 +288,168 @@ def __new__( "results_s3_bucket": results_s3_bucket, "storage": storage, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: - ... - + def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: - ... - + def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: - ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": - ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: - ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: - ... - + def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: - ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: - ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: - ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: - ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: - ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: - ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: - ... - + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: - ... - + def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: - ... - + def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: - ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "high_priority", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["high_priority"] - ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["min_workers"] - ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "high_priority", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateModelEndpointV1Request': return super().__new__( cls, *_args, @@ -778,6 +477,5 @@ def __new__( **kwargs, ) - from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/update_model_endpoint_v1_request.pyi b/launch/api_client/model/update_model_endpoint_v1_request.pyi index f3d5cbe4..9aadf01d 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_request.pyi @@ -9,38 +9,47 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class UpdateModelEndpointV1Request(schemas.DictSchema): + +class UpdateModelEndpointV1Request( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: + class properties: aws_role = schemas.StrSchema billing_tags = schemas.DictSchema - + + class cpus( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -56,108 +65,88 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "cpus": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'cpus': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + @staticmethod - def default_callback_auth() -> typing.Type["CallbackAuth"]: + def default_callback_auth() -> typing.Type['CallbackAuth']: return CallbackAuth - - class default_callback_url(schemas.StrSchema): + + + class default_callback_url( + schemas.StrSchema + ): pass + @staticmethod - def gpu_type() -> typing.Type["GpuType"]: + def gpu_type() -> typing.Type['GpuType']: return GpuType - - class gpus(schemas.IntSchema): + + + class gpus( + schemas.IntSchema + ): pass high_priority = schemas.BoolSchema - - class labels(schemas.DictSchema): + + + class labels( + schemas.DictSchema + ): + + class MetaOapg: additional_properties = schemas.StrSchema - def __getitem__( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg( - self, - name: typing.Union[str,], - ) -> MetaOapg.additional_properties: + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - MetaOapg.additional_properties, - str, - ], - ) -> "labels": + **kwargs: typing.Union[MetaOapg.additional_properties, str, ], + ) -> 'labels': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - class max_workers(schemas.IntSchema): + + + class max_workers( + schemas.IntSchema + ): pass - + + class memory( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -173,44 +162,14 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "memory": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'memory': return super().__new__( cls, *_args, @@ -218,52 +177,52 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): **kwargs, ) metadata = schemas.DictSchema - - class min_workers(schemas.IntSchema): + + + class min_workers( + schemas.IntSchema + ): pass model_bundle_id = schemas.StrSchema optimize_costs = schemas.BoolSchema per_worker = schemas.IntSchema - - class post_inference_hooks(schemas.ListSchema): + + + class post_inference_hooks( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "post_inference_hooks": + ) -> 'post_inference_hooks': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) prewarm = schemas.BoolSchema results_s3_bucket = schemas.StrSchema - + + class storage( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -279,44 +238,14 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): cls.any_of_1, cls.any_of_2, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "storage": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'storage': return super().__new__( cls, *_args, @@ -345,304 +274,168 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): "results_s3_bucket": results_s3_bucket, "storage": storage, } + @typing.overload def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> MetaOapg.properties.default_callback_url: ... + def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> MetaOapg.properties.model_bundle_id: ... + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> MetaOapg.properties.post_inference_hooks: ... + def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> MetaOapg.properties.results_s3_bucket: ... + def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "high_priority", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["aws_role"] - ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["billing_tags"] - ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["cpus"] - ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_auth"] - ) -> typing.Union["CallbackAuth", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["default_callback_url"] - ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["gpus"] - ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["high_priority"] - ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["labels"] - ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["max_workers"] - ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["memory"] - ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["metadata"] - ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["min_workers"] - ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["model_bundle_id"] - ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["optimize_costs"] - ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["per_worker"] - ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["post_inference_hooks"] - ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["prewarm"] - ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["results_s3_bucket"] - ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["storage"] - ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "aws_role", - "billing_tags", - "cpus", - "default_callback_auth", - "default_callback_url", - "gpu_type", - "gpus", - "high_priority", - "labels", - "max_workers", - "memory", - "metadata", - "min_workers", - "model_bundle_id", - "optimize_costs", - "per_worker", - "post_inference_hooks", - "prewarm", - "results_s3_bucket", - "storage", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[ - MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, - cpus: typing.Union[ - MetaOapg.properties.cpus, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[ - MetaOapg.properties.default_callback_url, str, schemas.Unset - ] = schemas.unset, - gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, + billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[ - MetaOapg.properties.memory, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, - metadata: typing.Union[ - MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[ - MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset - ] = schemas.unset, + post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[ - MetaOapg.properties.storage, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - schemas.Unset, - ] = schemas.unset, + storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointV1Request": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateModelEndpointV1Request': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_response.py b/launch/api_client/model/update_model_endpoint_v1_response.py index e65d917f..7aeff47a 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.py +++ b/launch/api_client/model/update_model_endpoint_v1_response.py @@ -9,107 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class UpdateModelEndpointV1Response(schemas.DictSchema): +class UpdateModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: - ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_response.pyi b/launch/api_client/model/update_model_endpoint_v1_response.pyi index cc0ef32b..87aa1609 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_response.pyi @@ -9,94 +9,71 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class UpdateModelEndpointV1Response(schemas.DictSchema): + +class UpdateModelEndpointV1Response( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["endpoint_creation_task_id"] - ) -> MetaOapg.properties.endpoint_creation_task_id: ... + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal["endpoint_creation_task_id",], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - endpoint_creation_task_id: typing.Union[ - MetaOapg.properties.endpoint_creation_task_id, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "UpdateModelEndpointV1Response": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'UpdateModelEndpointV1Response': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/validation_error.py b/launch/api_client/model/validation_error.py index 8cc3cf6a..42a25b83 100644 --- a/launch/api_client/model/validation_error.py +++ b/launch/api_client/model/validation_error.py @@ -9,44 +9,57 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ValidationError(schemas.DictSchema): +class ValidationError( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "msg", "loc", "type", } - + class properties: - class loc(schemas.ListSchema): + + + class loc( + schemas.ListSchema + ): + + class MetaOapg: + + class items( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -61,109 +74,34 @@ def any_of(cls): cls.any_of_0, cls.any_of_1, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "items": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "loc": + ) -> 'loc': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - msg = schemas.StrSchema type = schemas.StrSchema __annotations__ = { @@ -171,107 +109,53 @@ def __getitem__(self, i: int) -> MetaOapg.items: "msg": msg, "type": type, } - + msg: MetaOapg.properties.msg loc: MetaOapg.properties.loc type: MetaOapg.properties.type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: - ... - + def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: - ... - + def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: - ... - + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "loc", - "msg", - "type", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "loc", - "msg", - "type", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - msg: typing.Union[ - MetaOapg.properties.msg, - str, - ], - loc: typing.Union[ - MetaOapg.properties.loc, - list, - tuple, - ], - type: typing.Union[ - MetaOapg.properties.type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + msg: typing.Union[MetaOapg.properties.msg, str, ], + loc: typing.Union[MetaOapg.properties.loc, list, tuple, ], + type: typing.Union[MetaOapg.properties.type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ValidationError": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ValidationError': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/validation_error.pyi b/launch/api_client/model/validation_error.pyi index 865e67c4..c6a35dac 100644 --- a/launch/api_client/model/validation_error.pyi +++ b/launch/api_client/model/validation_error.pyi @@ -9,42 +9,57 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ValidationError(schemas.DictSchema): + +class ValidationError( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ + class MetaOapg: required = { "msg", "loc", "type", } - + class properties: - class loc(schemas.ListSchema): + + + class loc( + schemas.ListSchema + ): + + class MetaOapg: + + class items( schemas.ComposedSchema, ): + + class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -59,103 +74,32 @@ class ValidationError(schemas.DictSchema): cls.any_of_0, cls.any_of_1, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "items": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'items': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "loc": + ) -> 'loc': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) msg = schemas.StrSchema @@ -165,88 +109,53 @@ class ValidationError(schemas.DictSchema): "msg": msg, "type": type, } + msg: MetaOapg.properties.msg loc: MetaOapg.properties.loc type: MetaOapg.properties.type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "loc", - "msg", - "type", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "loc", - "msg", - "type", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - msg: typing.Union[ - MetaOapg.properties.msg, - str, - ], - loc: typing.Union[ - MetaOapg.properties.loc, - list, - tuple, - ], - type: typing.Union[ - MetaOapg.properties.type, - str, - ], + *_args: typing.Union[dict, frozendict.frozendict, ], + msg: typing.Union[MetaOapg.properties.msg, str, ], + loc: typing.Union[MetaOapg.properties.loc, list, tuple, ], + type: typing.Union[MetaOapg.properties.type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ValidationError": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ValidationError': return super().__new__( cls, *_args, diff --git a/launch/api_client/model/zip_artifact_flavor.py b/launch/api_client/model/zip_artifact_flavor.py index 79286ebc..ea49f1ee 100644 --- a/launch/api_client/model/zip_artifact_flavor.py +++ b/launch/api_client/model/zip_artifact_flavor.py @@ -9,21 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 -class ZipArtifactFlavor(schemas.DictSchema): +class ZipArtifactFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,6 +34,7 @@ class ZipArtifactFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a zip artifact. """ + class MetaOapg: required = { "flavor", @@ -41,22 +44,33 @@ class MetaOapg: "location", "load_predict_fn_module_path", } - + class properties: - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + + class MetaOapg: enum_value_to_name = { "zip_artifact": "ZIP_ARTIFACT", } - + @schemas.classproperty def ZIP_ARTIFACT(cls): return cls("zip_artifact") - + + class framework( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -72,87 +86,46 @@ def one_of(cls): TensorflowFramework, CustomFramework, ] - + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "framework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'framework': return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - load_model_fn_module_path = schemas.StrSchema load_predict_fn_module_path = schemas.StrSchema location = schemas.StrSchema - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - app_config = schemas.DictSchema __annotations__ = { "flavor": flavor, @@ -163,190 +136,84 @@ def __getitem__(self, i: int) -> MetaOapg.items: "requirements": requirements, "app_config": app_config, } - + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path location: MetaOapg.properties.location load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: - ... - + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["load_model_fn_module_path"] - ) -> MetaOapg.properties.load_model_fn_module_path: - ... - + def __getitem__(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["load_predict_fn_module_path"] - ) -> MetaOapg.properties.load_predict_fn_module_path: - ... - + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: - ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: - ... - - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn_module_path", - "load_predict_fn_module_path", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - + + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["load_model_fn_module_path"] - ) -> MetaOapg.properties.load_model_fn_module_path: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["load_predict_fn_module_path"] - ) -> MetaOapg.properties.load_predict_fn_module_path: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: - ... - + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: - ... - - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn_module_path", - "load_predict_fn_module_path", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): return super().get_item_oapg(name) + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - framework: typing.Union[ - MetaOapg.properties.framework, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - load_model_fn_module_path: typing.Union[ - MetaOapg.properties.load_model_fn_module_path, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - load_predict_fn_module_path: typing.Union[ - MetaOapg.properties.load_predict_fn_module_path, - str, - ], - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + load_model_fn_module_path: typing.Union[MetaOapg.properties.load_model_fn_module_path, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + load_predict_fn_module_path: typing.Union[MetaOapg.properties.load_predict_fn_module_path, str, ], + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ZipArtifactFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ZipArtifactFlavor': return super().__new__( cls, *_args, @@ -361,7 +228,6 @@ def __new__( **kwargs, ) - from launch.api_client.model.custom_framework import CustomFramework from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/zip_artifact_flavor.pyi b/launch/api_client/model/zip_artifact_flavor.pyi index ac4b9816..a018845c 100644 --- a/launch/api_client/model/zip_artifact_flavor.pyi +++ b/launch/api_client/model/zip_artifact_flavor.pyi @@ -9,19 +9,23 @@ Generated by: https://openapi-generator.tech """ +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 + from launch_client import schemas # noqa: F401 -class ZipArtifactFlavor(schemas.DictSchema): + +class ZipArtifactFlavor( + schemas.DictSchema +): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -30,6 +34,7 @@ class ZipArtifactFlavor(schemas.DictSchema): This is the entity-layer class for the Model Bundle flavor of a zip artifact. """ + class MetaOapg: required = { "flavor", @@ -39,17 +44,27 @@ class ZipArtifactFlavor(schemas.DictSchema): "location", "load_predict_fn_module_path", } - + class properties: - class flavor(schemas.EnumBase, schemas.StrSchema): + + + class flavor( + schemas.EnumBase, + schemas.StrSchema + ): + @schemas.classproperty def ZIP_ARTIFACT(cls): return cls("zip_artifact") - + + class framework( schemas.ComposedSchema, ): + + class MetaOapg: + @classmethod @functools.lru_cache() def one_of(cls): @@ -65,44 +80,14 @@ class ZipArtifactFlavor(schemas.DictSchema): TensorflowFramework, CustomFramework, ] + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "framework": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'framework': return super().__new__( cls, *_args, @@ -112,33 +97,27 @@ class ZipArtifactFlavor(schemas.DictSchema): load_model_fn_module_path = schemas.StrSchema load_predict_fn_module_path = schemas.StrSchema location = schemas.StrSchema - - class requirements(schemas.ListSchema): + + + class requirements( + schemas.ListSchema + ): + + class MetaOapg: items = schemas.StrSchema + def __new__( cls, - _arg: typing.Union[ - typing.Tuple[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - typing.List[ - typing.Union[ - MetaOapg.items, - str, - ] - ], - ], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> "requirements": + ) -> 'requirements': return super().__new__( cls, _arg, _configuration=_configuration, ) + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -151,155 +130,84 @@ class ZipArtifactFlavor(schemas.DictSchema): "requirements": requirements, "app_config": app_config, } + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path location: MetaOapg.properties.location load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["load_model_fn_module_path"] - ) -> MetaOapg.properties.load_model_fn_module_path: ... + def __getitem__(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload - def __getitem__( - self, name: typing_extensions.Literal["load_predict_fn_module_path"] - ) -> MetaOapg.properties.load_predict_fn_module_path: ... + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn_module_path", - "load_predict_fn_module_path", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): # dict_instance[name] accessor return super().__getitem__(name) + + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["load_model_fn_module_path"] - ) -> MetaOapg.properties.load_model_fn_module_path: ... + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["load_predict_fn_module_path"] - ) -> MetaOapg.properties.load_predict_fn_module_path: ... + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... + @typing.overload - def get_item_oapg( - self, name: typing_extensions.Literal["app_config"] - ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg( - self, - name: typing.Union[ - typing_extensions.Literal[ - "flavor", - "framework", - "load_model_fn_module_path", - "load_predict_fn_module_path", - "location", - "requirements", - "app_config", - ], - str, - ], - ): + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): return super().get_item_oapg(name) + + def __new__( cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - ], - flavor: typing.Union[ - MetaOapg.properties.flavor, - str, - ], - requirements: typing.Union[ - MetaOapg.properties.requirements, - list, - tuple, - ], - framework: typing.Union[ - MetaOapg.properties.framework, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - bool, - None, - list, - tuple, - bytes, - io.FileIO, - io.BufferedReader, - ], - load_model_fn_module_path: typing.Union[ - MetaOapg.properties.load_model_fn_module_path, - str, - ], - location: typing.Union[ - MetaOapg.properties.location, - str, - ], - load_predict_fn_module_path: typing.Union[ - MetaOapg.properties.load_predict_fn_module_path, - str, - ], - app_config: typing.Union[ - MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset - ] = schemas.unset, + *_args: typing.Union[dict, frozendict.frozendict, ], + flavor: typing.Union[MetaOapg.properties.flavor, str, ], + requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], + framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + load_model_fn_module_path: typing.Union[MetaOapg.properties.load_model_fn_module_path, str, ], + location: typing.Union[MetaOapg.properties.location, str, ], + load_predict_fn_module_path: typing.Union[MetaOapg.properties.load_predict_fn_module_path, str, ], + app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[ - schemas.AnyTypeSchema, - dict, - frozendict.frozendict, - str, - date, - datetime, - uuid.UUID, - int, - float, - decimal.Decimal, - None, - list, - tuple, - bytes, - ], - ) -> "ZipArtifactFlavor": + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ZipArtifactFlavor': return super().__new__( cls, *_args, diff --git a/launch/api_client/models/__init__.py b/launch/api_client/models/__init__.py index c53bd498..6ea1b83e 100644 --- a/launch/api_client/models/__init__.py +++ b/launch/api_client/models/__init__.py @@ -11,126 +11,57 @@ # import sys # sys.setrecursionlimit(n) -from launch.api_client.model.batch_job_serialization_format import ( - BatchJobSerializationFormat, -) +from launch.api_client.model.batch_job_serialization_format import BatchJobSerializationFormat from launch.api_client.model.batch_job_status import BatchJobStatus from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.callback_basic_auth import CallbackBasicAuth from launch.api_client.model.callbackm_tls_auth import CallbackmTLSAuth -from launch.api_client.model.clone_model_bundle_v1_request import ( - CloneModelBundleV1Request, -) -from launch.api_client.model.clone_model_bundle_v2_request import ( - CloneModelBundleV2Request, -) -from launch.api_client.model.cloudpickle_artifact_flavor import ( - CloudpickleArtifactFlavor, -) -from launch.api_client.model.create_async_task_v1_response import ( - CreateAsyncTaskV1Response, -) -from launch.api_client.model.create_batch_job_resource_requests import ( - CreateBatchJobResourceRequests, -) -from launch.api_client.model.create_batch_job_v1_request import ( - CreateBatchJobV1Request, -) -from launch.api_client.model.create_batch_job_v1_response import ( - CreateBatchJobV1Response, -) -from launch.api_client.model.create_model_bundle_v1_request import ( - CreateModelBundleV1Request, -) -from launch.api_client.model.create_model_bundle_v1_response import ( - CreateModelBundleV1Response, -) -from launch.api_client.model.create_model_bundle_v2_request import ( - CreateModelBundleV2Request, -) -from launch.api_client.model.create_model_bundle_v2_response import ( - CreateModelBundleV2Response, -) -from launch.api_client.model.create_model_endpoint_v1_request import ( - CreateModelEndpointV1Request, -) -from launch.api_client.model.create_model_endpoint_v1_response import ( - CreateModelEndpointV1Response, -) +from launch.api_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request +from launch.api_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request +from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor +from launch.api_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response +from launch.api_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests +from launch.api_client.model.create_batch_job_v1_request import CreateBatchJobV1Request +from launch.api_client.model.create_batch_job_v1_response import CreateBatchJobV1Response +from launch.api_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request +from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response +from launch.api_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request +from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response +from launch.api_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request +from launch.api_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response from launch.api_client.model.custom_framework import CustomFramework -from launch.api_client.model.delete_model_endpoint_v1_response import ( - DeleteModelEndpointV1Response, -) -from launch.api_client.model.endpoint_predict_v1_request import ( - EndpointPredictV1Request, -) -from launch.api_client.model.get_async_task_v1_response import ( - GetAsyncTaskV1Response, -) -from launch.api_client.model.get_batch_job_v1_response import ( - GetBatchJobV1Response, -) -from launch.api_client.model.get_model_endpoint_v1_response import ( - GetModelEndpointV1Response, -) +from launch.api_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response +from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request +from launch.api_client.model.get_async_task_v1_response import GetAsyncTaskV1Response +from launch.api_client.model.get_batch_job_v1_response import GetBatchJobV1Response +from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response from launch.api_client.model.gpu_type import GpuType from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.list_model_bundles_v1_response import ( - ListModelBundlesV1Response, -) -from launch.api_client.model.list_model_bundles_v2_response import ( - ListModelBundlesV2Response, -) -from launch.api_client.model.list_model_endpoints_v1_response import ( - ListModelEndpointsV1Response, -) -from launch.api_client.model.model_bundle_environment_params import ( - ModelBundleEnvironmentParams, -) -from launch.api_client.model.model_bundle_framework_type import ( - ModelBundleFrameworkType, -) +from launch.api_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response +from launch.api_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response +from launch.api_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response +from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams +from launch.api_client.model.model_bundle_framework_type import ModelBundleFrameworkType from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch.api_client.model.model_bundle_packaging_type import ( - ModelBundlePackagingType, -) -from launch.api_client.model.model_bundle_v1_response import ( - ModelBundleV1Response, -) -from launch.api_client.model.model_bundle_v2_response import ( - ModelBundleV2Response, -) -from launch.api_client.model.model_endpoint_deployment_state import ( - ModelEndpointDeploymentState, -) -from launch.api_client.model.model_endpoint_order_by import ( - ModelEndpointOrderBy, -) -from launch.api_client.model.model_endpoint_resource_state import ( - ModelEndpointResourceState, -) +from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType +from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch.api_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState +from launch.api_client.model.model_endpoint_order_by import ModelEndpointOrderBy +from launch.api_client.model.model_endpoint_resource_state import ModelEndpointResourceState from launch.api_client.model.model_endpoint_status import ModelEndpointStatus from launch.api_client.model.model_endpoint_type import ModelEndpointType from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.request_schema import RequestSchema from launch.api_client.model.response_schema import ResponseSchema from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor -from launch.api_client.model.sync_endpoint_predict_v1_response import ( - SyncEndpointPredictV1Response, -) +from launch.api_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response from launch.api_client.model.task_status import TaskStatus from launch.api_client.model.tensorflow_framework import TensorflowFramework -from launch.api_client.model.update_batch_job_v1_request import ( - UpdateBatchJobV1Request, -) -from launch.api_client.model.update_batch_job_v1_response import ( - UpdateBatchJobV1Response, -) -from launch.api_client.model.update_model_endpoint_v1_request import ( - UpdateModelEndpointV1Request, -) -from launch.api_client.model.update_model_endpoint_v1_response import ( - UpdateModelEndpointV1Response, -) +from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor +from launch.api_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request +from launch.api_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response +from launch.api_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request +from launch.api_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response from launch.api_client.model.validation_error import ValidationError from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/paths/healthcheck/__init__.py b/launch/api_client/paths/healthcheck/__init__.py index ae6dcb46..b0eea9c5 100644 --- a/launch/api_client/paths/healthcheck/__init__.py +++ b/launch/api_client/paths/healthcheck/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.HEALTHCHECK +path = PathValues.HEALTHCHECK \ No newline at end of file diff --git a/launch/api_client/paths/healthcheck/get.py b/launch/api_client/paths/healthcheck/get.py index 4cbeec4b..287d610d 100644 --- a/launch/api_client/paths/healthcheck/get.py +++ b/launch/api_client/paths/healthcheck/get.py @@ -6,22 +6,24 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions from . import path @@ -31,20 +33,25 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, + '200': _response_for_200, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -55,8 +62,9 @@ def _healthcheck_healthcheck_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _healthcheck_healthcheck_get_oapg( @@ -65,8 +73,7 @@ def _healthcheck_healthcheck_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _healthcheck_healthcheck_get_oapg( @@ -75,8 +82,10 @@ def _healthcheck_healthcheck_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _healthcheck_healthcheck_get_oapg( self, @@ -97,11 +106,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -117,7 +126,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -132,8 +145,9 @@ def healthcheck_healthcheck_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def healthcheck_healthcheck_get( @@ -142,8 +156,7 @@ def healthcheck_healthcheck_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def healthcheck_healthcheck_get( @@ -152,8 +165,10 @@ def healthcheck_healthcheck_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def healthcheck_healthcheck_get( self, @@ -166,7 +181,7 @@ def healthcheck_healthcheck_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -180,8 +195,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -190,8 +206,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -200,8 +215,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -214,5 +231,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/healthcheck/get.pyi b/launch/api_client/paths/healthcheck/get.pyi index 519a05dc..152c27b6 100644 --- a/launch/api_client/paths/healthcheck/get.pyi +++ b/launch/api_client/paths/healthcheck/get.pyi @@ -6,37 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -46,7 +57,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _healthcheck_healthcheck_get_oapg( self, @@ -55,6 +69,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _healthcheck_healthcheck_get_oapg( self, @@ -62,7 +77,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _healthcheck_healthcheck_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -82,11 +101,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -102,10 +121,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class HealthcheckHealthcheckGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -116,7 +140,10 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def healthcheck_healthcheck_get( self, @@ -125,6 +152,7 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def healthcheck_healthcheck_get( self, @@ -132,7 +160,11 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def healthcheck_healthcheck_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -144,9 +176,10 @@ class HealthcheckHealthcheckGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -157,7 +190,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -166,6 +202,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -173,7 +210,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -185,5 +226,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/healthz/__init__.py b/launch/api_client/paths/healthz/__init__.py index 3253e712..b4e79532 100644 --- a/launch/api_client/paths/healthz/__init__.py +++ b/launch/api_client/paths/healthz/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.HEALTHZ +path = PathValues.HEALTHZ \ No newline at end of file diff --git a/launch/api_client/paths/healthz/get.py b/launch/api_client/paths/healthz/get.py index c71e242f..e8aabd4b 100644 --- a/launch/api_client/paths/healthz/get.py +++ b/launch/api_client/paths/healthz/get.py @@ -6,22 +6,24 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions from . import path @@ -31,20 +33,25 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, + '200': _response_for_200, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -55,8 +62,9 @@ def _healthcheck_healthz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _healthcheck_healthz_get_oapg( @@ -65,8 +73,7 @@ def _healthcheck_healthz_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _healthcheck_healthz_get_oapg( @@ -75,8 +82,10 @@ def _healthcheck_healthz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _healthcheck_healthz_get_oapg( self, @@ -97,11 +106,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -117,7 +126,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -132,8 +145,9 @@ def healthcheck_healthz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def healthcheck_healthz_get( @@ -142,8 +156,7 @@ def healthcheck_healthz_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def healthcheck_healthz_get( @@ -152,8 +165,10 @@ def healthcheck_healthz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def healthcheck_healthz_get( self, @@ -166,7 +181,7 @@ def healthcheck_healthz_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -180,8 +195,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -190,8 +206,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -200,8 +215,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -214,5 +231,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/healthz/get.pyi b/launch/api_client/paths/healthz/get.pyi index e80889c1..21f0bdfe 100644 --- a/launch/api_client/paths/healthz/get.pyi +++ b/launch/api_client/paths/healthz/get.pyi @@ -6,37 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -46,7 +57,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _healthcheck_healthz_get_oapg( self, @@ -55,6 +69,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _healthcheck_healthz_get_oapg( self, @@ -62,7 +77,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _healthcheck_healthz_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -82,11 +101,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -102,10 +121,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class HealthcheckHealthzGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -116,7 +140,10 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def healthcheck_healthz_get( self, @@ -125,6 +152,7 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def healthcheck_healthz_get( self, @@ -132,7 +160,11 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def healthcheck_healthz_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -144,9 +176,10 @@ class HealthcheckHealthzGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -157,7 +190,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -166,6 +202,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -173,7 +210,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -185,5 +226,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/readyz/__init__.py b/launch/api_client/paths/readyz/__init__.py index 9b49ccf0..4b5a5af4 100644 --- a/launch/api_client/paths/readyz/__init__.py +++ b/launch/api_client/paths/readyz/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.READYZ +path = PathValues.READYZ \ No newline at end of file diff --git a/launch/api_client/paths/readyz/get.py b/launch/api_client/paths/readyz/get.py index c016a017..ef5201be 100644 --- a/launch/api_client/paths/readyz/get.py +++ b/launch/api_client/paths/readyz/get.py @@ -6,22 +6,24 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions from . import path @@ -31,20 +33,25 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, + '200': _response_for_200, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -55,8 +62,9 @@ def _healthcheck_readyz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _healthcheck_readyz_get_oapg( @@ -65,8 +73,7 @@ def _healthcheck_readyz_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _healthcheck_readyz_get_oapg( @@ -75,8 +82,10 @@ def _healthcheck_readyz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _healthcheck_readyz_get_oapg( self, @@ -97,11 +106,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -117,7 +126,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -132,8 +145,9 @@ def healthcheck_readyz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def healthcheck_readyz_get( @@ -142,8 +156,7 @@ def healthcheck_readyz_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def healthcheck_readyz_get( @@ -152,8 +165,10 @@ def healthcheck_readyz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def healthcheck_readyz_get( self, @@ -166,7 +181,7 @@ def healthcheck_readyz_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -180,8 +195,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -190,8 +206,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -200,8 +215,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -214,5 +231,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/readyz/get.pyi b/launch/api_client/paths/readyz/get.pyi index 7ef0ef1c..5f8d2904 100644 --- a/launch/api_client/paths/readyz/get.pyi +++ b/launch/api_client/paths/readyz/get.pyi @@ -6,37 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -46,7 +57,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _healthcheck_readyz_get_oapg( self, @@ -55,6 +69,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _healthcheck_readyz_get_oapg( self, @@ -62,7 +77,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _healthcheck_readyz_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -82,11 +101,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, stream=stream, timeout=timeout, @@ -102,10 +121,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class HealthcheckReadyzGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -116,7 +140,10 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def healthcheck_readyz_get( self, @@ -125,6 +152,7 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def healthcheck_readyz_get( self, @@ -132,7 +160,11 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def healthcheck_readyz_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -144,9 +176,10 @@ class HealthcheckReadyzGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -157,7 +190,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -166,6 +202,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -173,7 +210,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -185,5 +226,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_async_tasks/__init__.py b/launch/api_client/paths/v1_async_tasks/__init__.py index aafe0cc4..72df600f 100644 --- a/launch/api_client/paths/v1_async_tasks/__init__.py +++ b/launch/api_client/paths/v1_async_tasks/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_ASYNCTASKS +path = PathValues.V1_ASYNCTASKS \ No newline at end of file diff --git a/launch/api_client/paths/v1_async_tasks/post.py b/launch/api_client/paths/v1_async_tasks/post.py index 19d68ae1..f795a6a0 100644 --- a/launch/api_client/paths/v1_async_tasks/post.py +++ b/launch/api_client/paths/v1_async_tasks/post.py @@ -6,44 +6,45 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.create_async_task_v1_response import ( - CreateAsyncTaskV1Response, -) -from launch.api_client.model.endpoint_predict_v1_request import ( - EndpointPredictV1Request, -) + +from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response from . import path # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -63,12 +64,13 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateAsyncTaskV1Response @@ -76,14 +78,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -92,21 +97,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -120,8 +130,9 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( @@ -133,8 +144,10 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( @@ -146,8 +159,7 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( @@ -159,13 +171,15 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_async_inference_task_v1_async_tasks_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -182,7 +196,9 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_endpoint_id,): + for parameter in ( + request_query_model_endpoint_id, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -196,23 +212,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -231,7 +246,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -249,8 +268,9 @@ def create_async_inference_task_v1_async_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_async_inference_task_v1_async_tasks_post( @@ -262,8 +282,10 @@ def create_async_inference_task_v1_async_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_async_inference_task_v1_async_tasks_post( @@ -275,8 +297,7 @@ def create_async_inference_task_v1_async_tasks_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_async_inference_task_v1_async_tasks_post( @@ -288,13 +309,15 @@ def create_async_inference_task_v1_async_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_async_inference_task_v1_async_tasks_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,7 +331,7 @@ def create_async_inference_task_v1_async_tasks_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -325,8 +348,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -338,8 +362,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -351,8 +377,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -364,13 +389,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -384,5 +411,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_async_tasks/post.pyi b/launch/api_client/paths/v1_async_tasks/post.pyi index 3e863a0d..f9c2ffc0 100644 --- a/launch/api_client/paths/v1_async_tasks/post.pyi +++ b/launch/api_client/paths/v1_async_tasks/post.pyi @@ -6,45 +6,49 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_async_task_v1_response import ( - CreateAsyncTaskV1Response, -) -from launch_client.model.endpoint_predict_v1_request import ( - EndpointPredictV1Request, -) + +from launch_client.model.endpoint_predict_v1_request import EndpointPredictV1Request from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_endpoint_id = api_client.QueryParameter( name="model_endpoint_id", style=api_client.ParameterStyle.FORM, @@ -55,41 +59,56 @@ request_query_model_endpoint_id = api_client.QueryParameter( # body param SchemaForRequestBodyApplicationJson = EndpointPredictV1Request + request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateAsyncTaskV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -102,7 +121,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, @@ -113,7 +135,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, @@ -125,6 +151,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, @@ -135,11 +162,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_async_inference_task_v1_async_tasks_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -156,7 +187,9 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_endpoint_id,): + for parameter in ( + request_query_model_endpoint_id, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,23 +203,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -205,10 +237,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -222,7 +259,10 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_async_inference_task_v1_async_tasks_post( self, @@ -233,7 +273,11 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_async_inference_task_v1_async_tasks_post( self, @@ -245,6 +289,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_async_inference_task_v1_async_tasks_post( self, @@ -255,11 +300,15 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_async_inference_task_v1_async_tasks_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +322,10 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -289,7 +339,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -300,7 +353,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -312,6 +369,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -322,11 +380,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -340,5 +402,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_async_tasks_task_id/__init__.py b/launch/api_client/paths/v1_async_tasks_task_id/__init__.py index 21c8a0fc..ef09b1e6 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/__init__.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_ASYNCTASKS_TASK_ID +path = PathValues.V1_ASYNCTASKS_TASK_ID \ No newline at end of file diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.py b/launch/api_client/paths/v1_async_tasks_task_id/get.py index 7bb49fa2..5d4dca8e 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.py @@ -6,41 +6,44 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.get_async_task_v1_response import ( - GetAsyncTaskV1Response, -) + from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.get_async_task_v1_response import GetAsyncTaskV1Response from . import path # Path params TaskIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'task_id': typing.Union[TaskIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "task_id": typing.Union[ - TaskIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = GetAsyncTaskV1Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( @@ -115,8 +127,7 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( @@ -126,8 +137,10 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_task_id,): + for parameter in ( + request_path_task_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def get_async_inference_task_v1_async_tasks_task_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( @@ -209,8 +229,7 @@ def get_async_inference_task_v1_async_tasks_task_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( @@ -220,8 +239,10 @@ def get_async_inference_task_v1_async_tasks_task_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -236,7 +257,7 @@ def get_async_inference_task_v1_async_tasks_task_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -262,8 +284,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -273,8 +294,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -289,5 +312,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi index c730023f..3e667842 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi @@ -6,42 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.get_async_task_v1_response import ( - GetAsyncTaskV1Response, -) + from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.get_async_task_v1_response import GetAsyncTaskV1Response # Path params TaskIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'task_id': typing.Union[TaskIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "task_id": typing.Union[ - TaskIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_task_id = api_client.PathParameter( name="task_id", style=api_client.ParameterStyle.SIMPLE, @@ -50,33 +56,46 @@ request_path_task_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetAsyncTaskV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -87,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -97,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -105,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -124,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_task_id,): + for parameter in ( + request_path_task_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -132,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -159,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -174,7 +208,10 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -184,6 +221,7 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -192,7 +230,11 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_async_inference_task_v1_async_tasks_task_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -206,9 +248,10 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -220,7 +263,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -230,6 +276,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -238,7 +285,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -252,5 +303,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs/__init__.py b/launch/api_client/paths/v1_batch_jobs/__init__.py index 3d5cef58..65e727af 100644 --- a/launch/api_client/paths/v1_batch_jobs/__init__.py +++ b/launch/api_client/paths/v1_batch_jobs/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_BATCHJOBS +path = PathValues.V1_BATCHJOBS \ No newline at end of file diff --git a/launch/api_client/paths/v1_batch_jobs/post.py b/launch/api_client/paths/v1_batch_jobs/post.py index f8769488..75a0574e 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.py +++ b/launch/api_client/paths/v1_batch_jobs/post.py @@ -6,28 +6,27 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.create_batch_job_v1_request import ( - CreateBatchJobV1Request, -) -from launch.api_client.model.create_batch_job_v1_response import ( - CreateBatchJobV1Response, -) + +from launch.api_client.model.create_batch_job_v1_response import CreateBatchJobV1Response +from launch.api_client.model.create_batch_job_v1_request import CreateBatchJobV1Request from launch.api_client.model.http_validation_error import HTTPValidationError from . import path @@ -38,12 +37,13 @@ request_body_create_batch_job_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateBatchJobV1Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _create_batch_job_v1_batch_jobs_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( @@ -106,8 +115,10 @@ def _create_batch_job_v1_batch_jobs_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( @@ -118,8 +129,7 @@ def _create_batch_job_v1_batch_jobs_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( @@ -130,13 +140,15 @@ def _create_batch_job_v1_batch_jobs_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_batch_job_v1_batch_jobs_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_batch_job_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def create_batch_job_v1_batch_jobs_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_batch_job_v1_batch_jobs_post( @@ -218,8 +234,10 @@ def create_batch_job_v1_batch_jobs_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_batch_job_v1_batch_jobs_post( @@ -230,8 +248,7 @@ def create_batch_job_v1_batch_jobs_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_batch_job_v1_batch_jobs_post( @@ -242,13 +259,15 @@ def create_batch_job_v1_batch_jobs_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_batch_job_v1_batch_jobs_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def create_batch_job_v1_batch_jobs_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs/post.pyi b/launch/api_client/paths/v1_batch_jobs/post.pyi index 0f199580..7b84b5b8 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.pyi +++ b/launch/api_client/paths/v1_batch_jobs/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_batch_job_v1_request import ( - CreateBatchJobV1Request, -) -from launch_client.model.create_batch_job_v1_response import ( - CreateBatchJobV1Response, -) + +from launch_client.model.create_batch_job_v1_response import CreateBatchJobV1Response +from launch_client.model.create_batch_job_v1_request import CreateBatchJobV1Request from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateBatchJobV1Request + request_body_create_batch_job_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateBatchJobV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_batch_job_v1_batch_jobs_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_batch_job_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateBatchJobV1BatchJobsPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_batch_job_v1_batch_jobs_post( self, @@ -191,7 +225,11 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_batch_job_v1_batch_jobs_post( self, @@ -202,6 +240,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_batch_job_v1_batch_jobs_post( self, @@ -211,11 +250,15 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_batch_job_v1_batch_jobs_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py index 3fa32eda..0acdf21c 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_BATCHJOBS_BATCH_JOB_ID +path = PathValues.V1_BATCHJOBS_BATCH_JOB_ID \ No newline at end of file diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py index f8a0cc74..d4b52f6f 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py @@ -6,25 +6,26 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.get_batch_job_v1_response import ( - GetBatchJobV1Response, -) + +from launch.api_client.model.get_batch_job_v1_response import GetBatchJobV1Response from launch.api_client.model.http_validation_error import HTTPValidationError from . import path @@ -32,15 +33,17 @@ # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "batch_job_id": typing.Union[ - BatchJobIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = GetBatchJobV1Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( @@ -115,8 +127,7 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( @@ -126,8 +137,10 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_batch_job_id,): + for parameter in ( + request_path_batch_job_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( @@ -209,8 +229,7 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( @@ -220,8 +239,10 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -236,7 +257,7 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -262,8 +284,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -273,8 +294,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -289,5 +312,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi index 2c9aba69..23da620e 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi @@ -6,40 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions + from launch_client.model.get_batch_job_v1_response import GetBatchJobV1Response from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "batch_job_id": typing.Union[ - BatchJobIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_batch_job_id = api_client.PathParameter( name="batch_job_id", style=api_client.ParameterStyle.SIMPLE, @@ -48,33 +56,46 @@ request_path_batch_job_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetBatchJobV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -85,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -95,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -103,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -122,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_batch_job_id,): + for parameter in ( + request_path_batch_job_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -130,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -157,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -172,7 +208,10 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -182,6 +221,7 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -190,7 +230,11 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_batch_job_v1_batch_jobs_batch_job_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -204,9 +248,10 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -218,7 +263,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -228,6 +276,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -236,7 +285,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -250,5 +303,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py index fdd87da6..f0cc38b4 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py @@ -6,44 +6,45 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.update_batch_job_v1_request import ( - UpdateBatchJobV1Request, -) -from launch.api_client.model.update_batch_job_v1_response import ( - UpdateBatchJobV1Response, -) +from launch.api_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response +from launch.api_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request from . import path # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "batch_job_id": typing.Union[ - BatchJobIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -62,12 +63,13 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): request_body_update_batch_job_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = UpdateBatchJobV1Response @@ -75,14 +77,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -91,21 +96,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -119,8 +129,9 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @@ -132,8 +143,10 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @@ -145,8 +158,7 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @@ -158,13 +170,15 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -181,7 +195,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_batch_job_id,): + for parameter in ( + request_path_batch_job_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -189,29 +205,28 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_update_batch_job_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="put".upper(), + method='put'.upper(), headers=_headers, fields=_fields, body=_body, @@ -230,7 +245,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -248,8 +267,9 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( @@ -261,8 +281,10 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( @@ -274,8 +296,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( @@ -287,13 +308,15 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def update_batch_job_v1_batch_jobs_batch_job_id_put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -307,7 +330,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -324,8 +347,9 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def put( @@ -337,8 +361,10 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def put( @@ -350,8 +376,7 @@ def put( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def put( @@ -363,13 +388,15 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -383,5 +410,7 @@ def put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi index 65a06365..cf381c97 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi @@ -6,45 +6,49 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions + from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_batch_job_v1_request import ( - UpdateBatchJobV1Request, -) -from launch_client.model.update_batch_job_v1_response import ( - UpdateBatchJobV1Response, -) -from urllib3._collections import HTTPHeaderDict +from launch_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response +from launch_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "batch_job_id": typing.Union[ - BatchJobIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_batch_job_id = api_client.PathParameter( name="batch_job_id", style=api_client.ParameterStyle.SIMPLE, @@ -54,41 +58,56 @@ request_path_batch_job_id = api_client.PathParameter( # body param SchemaForRequestBodyApplicationJson = UpdateBatchJobV1Request + request_body_update_batch_job_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = UpdateBatchJobV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -101,7 +120,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, @@ -112,7 +134,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, @@ -124,6 +150,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, @@ -134,11 +161,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -155,7 +186,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_batch_job_id,): + for parameter in ( + request_path_batch_job_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -163,29 +196,28 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_update_batch_job_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="put".upper(), + method='put'.upper(), headers=_headers, fields=_fields, body=_body, @@ -204,10 +236,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -221,7 +258,10 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, @@ -232,7 +272,11 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, @@ -244,6 +288,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, @@ -254,11 +299,15 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def update_batch_job_v1_batch_jobs_batch_job_id_put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -272,9 +321,10 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -288,7 +338,10 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def put( self, @@ -299,7 +352,11 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def put( self, @@ -311,6 +368,7 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def put( self, @@ -321,11 +379,15 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -339,5 +401,7 @@ class ApiForput(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles/__init__.py b/launch/api_client/paths/v1_model_bundles/__init__.py index 46bf5ae2..02168487 100644 --- a/launch/api_client/paths/v1_model_bundles/__init__.py +++ b/launch/api_client/paths/v1_model_bundles/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES +path = PathValues.V1_MODELBUNDLES \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_bundles/get.py b/launch/api_client/paths/v1_model_bundles/get.py index 4ed7d60d..dfeb1cdb 100644 --- a/launch/api_client/paths/v1_model_bundles/get.py +++ b/launch/api_client/paths/v1_model_bundles/get.py @@ -6,44 +6,46 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.list_model_bundles_v1_response import ( - ListModelBundlesV1Response, -) + from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy +from launch.api_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response +from launch.api_client.model.http_validation_error import HTTPValidationError from . import path # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'model_name': typing.Union[ModelNameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) @@ -64,7 +66,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV1Response @@ -72,14 +74,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -88,21 +93,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -114,8 +124,9 @@ def _list_model_bundles_v1_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( @@ -125,8 +136,7 @@ def _list_model_bundles_v1_model_bundles_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( @@ -136,8 +146,10 @@ def _list_model_bundles_v1_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -174,11 +186,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -195,7 +207,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -211,8 +227,9 @@ def list_model_bundles_v1_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def list_model_bundles_v1_model_bundles_get( @@ -222,8 +239,7 @@ def list_model_bundles_v1_model_bundles_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def list_model_bundles_v1_model_bundles_get( @@ -233,8 +249,10 @@ def list_model_bundles_v1_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def list_model_bundles_v1_model_bundles_get( self, @@ -249,7 +267,7 @@ def list_model_bundles_v1_model_bundles_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -264,8 +282,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -275,8 +294,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -286,8 +304,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -302,5 +322,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles/get.pyi b/launch/api_client/paths/v1_model_bundles/get.pyi index 2d2cf510..b912a1ef 100644 --- a/launch/api_client/paths/v1_model_bundles/get.pyi +++ b/launch/api_client/paths/v1_model_bundles/get.pyi @@ -6,46 +6,51 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_bundles_v1_response import ( - ListModelBundlesV1Response, -) + from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from urllib3._collections import HTTPHeaderDict +from launch_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response +from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'model_name': typing.Union[ModelNameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -60,33 +65,46 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -97,7 +115,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -107,6 +128,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -115,7 +137,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _list_model_bundles_v1_model_bundles_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -151,11 +177,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -172,10 +198,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class ListModelBundlesV1ModelBundlesGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -187,7 +218,10 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def list_model_bundles_v1_model_bundles_get( self, @@ -197,6 +231,7 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def list_model_bundles_v1_model_bundles_get( self, @@ -205,7 +240,11 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def list_model_bundles_v1_model_bundles_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -219,9 +258,10 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -233,7 +273,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -243,6 +286,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -251,7 +295,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -265,5 +313,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles/post.py b/launch/api_client/paths/v1_model_bundles/post.py index c850d079..69f5290e 100644 --- a/launch/api_client/paths/v1_model_bundles/post.py +++ b/launch/api_client/paths/v1_model_bundles/post.py @@ -6,29 +6,28 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.create_model_bundle_v1_request import ( - CreateModelBundleV1Request, -) -from launch.api_client.model.create_model_bundle_v1_response import ( - CreateModelBundleV1Response, -) + +from launch.api_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response from . import path @@ -38,12 +37,13 @@ request_body_create_model_bundle_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _create_model_bundle_v1_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( @@ -106,8 +115,10 @@ def _create_model_bundle_v1_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( @@ -118,8 +129,7 @@ def _create_model_bundle_v1_model_bundles_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( @@ -130,13 +140,15 @@ def _create_model_bundle_v1_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_model_bundle_v1_model_bundles_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_bundle_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def create_model_bundle_v1_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_model_bundle_v1_model_bundles_post( @@ -218,8 +234,10 @@ def create_model_bundle_v1_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_bundle_v1_model_bundles_post( @@ -230,8 +248,7 @@ def create_model_bundle_v1_model_bundles_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_model_bundle_v1_model_bundles_post( @@ -242,13 +259,15 @@ def create_model_bundle_v1_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_model_bundle_v1_model_bundles_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def create_model_bundle_v1_model_bundles_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles/post.pyi b/launch/api_client/paths/v1_model_bundles/post.pyi index 780b6144..552173d6 100644 --- a/launch/api_client/paths/v1_model_bundles/post.pyi +++ b/launch/api_client/paths/v1_model_bundles/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_bundle_v1_request import ( - CreateModelBundleV1Request, -) -from launch_client.model.create_model_bundle_v1_response import ( - CreateModelBundleV1Response, -) + +from launch_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV1Request + request_body_create_model_bundle_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_model_bundle_v1_model_bundles_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_bundle_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateModelBundleV1ModelBundlesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_bundle_v1_model_bundles_post( self, @@ -191,7 +225,11 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_model_bundle_v1_model_bundles_post( self, @@ -202,6 +240,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_model_bundle_v1_model_bundles_post( self, @@ -211,11 +250,15 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_model_bundle_v1_model_bundles_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py index 35511bd5..b5c960ff 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_CLONEWITHCHANGES +path = PathValues.V1_MODELBUNDLES_CLONEWITHCHANGES \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py index d6665999..ce1d294b 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py @@ -6,29 +6,28 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.clone_model_bundle_v1_request import ( - CloneModelBundleV1Request, -) -from launch.api_client.model.create_model_bundle_v1_response import ( - CreateModelBundleV1Response, -) + from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response +from launch.api_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request from . import path @@ -38,12 +37,13 @@ request_body_clone_model_bundle_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( @@ -106,8 +115,10 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( @@ -118,8 +129,7 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( @@ -130,13 +140,15 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_clone_model_bundle_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @@ -218,8 +234,10 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @@ -230,8 +248,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @@ -242,13 +259,15 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi index 550e5780..4a15bd23 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.clone_model_bundle_v1_request import ( - CloneModelBundleV1Request, -) -from launch_client.model.create_model_bundle_v1_response import ( - CreateModelBundleV1Response, -) + from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response +from launch_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV1Request + request_body_clone_model_bundle_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_clone_model_bundle_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, @@ -191,7 +225,11 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, @@ -202,6 +240,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, @@ -211,11 +250,15 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_latest/__init__.py b/launch/api_client/paths/v1_model_bundles_latest/__init__.py index b5e54b32..e8834ca7 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_latest/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_LATEST +path = PathValues.V1_MODELBUNDLES_LATEST \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.py b/launch/api_client/paths/v1_model_bundles_latest/get.py index e4397a5a..1cde5141 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.py +++ b/launch/api_client/paths/v1_model_bundles_latest/get.py @@ -6,41 +6,44 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.model_bundle_v1_response import ( - ModelBundleV1Response, -) from . import path # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_name': typing.Union[ModelNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -55,7 +58,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @@ -63,14 +66,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,21 +85,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -105,8 +116,9 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( @@ -116,8 +128,7 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( @@ -127,8 +138,10 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -148,7 +161,9 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_name,): + for parameter in ( + request_query_model_name, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -162,11 +177,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -183,7 +198,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -199,8 +218,9 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( @@ -210,8 +230,7 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( @@ -221,8 +240,10 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -237,7 +258,7 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -252,8 +273,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -263,8 +285,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -274,8 +295,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -290,5 +313,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.pyi b/launch/api_client/paths/v1_model_bundles_latest/get.pyi index bacb33b7..6bd40f45 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_latest/get.pyi @@ -6,40 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError + from launch_client.model.model_bundle_v1_response import ModelBundleV1Response -from urllib3._collections import HTTPHeaderDict +from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_name': typing.Union[ModelNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -49,33 +57,46 @@ request_query_model_name = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -86,7 +107,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -96,6 +120,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -104,7 +129,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -123,7 +152,9 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_name,): + for parameter in ( + request_query_model_name, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -137,11 +168,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -158,10 +189,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -173,7 +209,10 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -183,6 +222,7 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -191,7 +231,11 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_latest_model_bundle_v1_model_bundles_latest_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -205,9 +249,10 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -219,7 +264,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -229,6 +277,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -237,7 +286,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -251,5 +304,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py index d3532d3a..aeafa82e 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_MODEL_BUNDLE_ID +path = PathValues.V1_MODELBUNDLES_MODEL_BUNDLE_ID \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py index f79165c8..638fe89d 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py @@ -6,41 +6,44 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.model_bundle_v1_response import ( - ModelBundleV1Response, -) from . import path # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_bundle_id": typing.Union[ - ModelBundleIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( @@ -115,8 +127,7 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( @@ -126,8 +137,10 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_model_bundle_id,): + for parameter in ( + request_path_model_bundle_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( @@ -209,8 +229,7 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( @@ -220,8 +239,10 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -236,7 +257,7 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -262,8 +284,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -273,8 +294,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -289,5 +312,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi index 4af810ea..6053dffd 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi @@ -6,40 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError + from launch_client.model.model_bundle_v1_response import ModelBundleV1Response -from urllib3._collections import HTTPHeaderDict +from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_bundle_id": typing.Union[ - ModelBundleIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_model_bundle_id = api_client.PathParameter( name="model_bundle_id", style=api_client.ParameterStyle.SIMPLE, @@ -48,33 +56,46 @@ request_path_model_bundle_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -85,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -95,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -103,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -122,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_model_bundle_id,): + for parameter in ( + request_path_model_bundle_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -130,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -157,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -172,7 +208,10 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -182,6 +221,7 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -190,7 +230,11 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -204,9 +248,10 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -218,7 +263,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -228,6 +276,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -236,7 +285,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -250,5 +303,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints/__init__.py b/launch/api_client/paths/v1_model_endpoints/__init__.py index f58f6045..63a2873d 100644 --- a/launch/api_client/paths/v1_model_endpoints/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTS +path = PathValues.V1_MODELENDPOINTS \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_endpoints/get.py b/launch/api_client/paths/v1_model_endpoints/get.py index e572a293..d61dd75c 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.py +++ b/launch/api_client/paths/v1_model_endpoints/get.py @@ -6,46 +6,46 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.list_model_endpoints_v1_response import ( - ListModelEndpointsV1Response, -) -from launch.api_client.model.model_endpoint_order_by import ( - ModelEndpointOrderBy, -) +from launch.api_client.model.model_endpoint_order_by import ModelEndpointOrderBy from . import path # Query params NameSchema = schemas.StrSchema OrderBySchema = ModelEndpointOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "name": typing.Union[ - NameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'name': typing.Union[NameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) @@ -66,7 +66,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ListModelEndpointsV1Response @@ -74,14 +74,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -90,21 +93,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -116,8 +124,9 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( @@ -127,8 +136,7 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( @@ -138,8 +146,10 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -176,11 +186,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,7 +207,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -213,8 +227,9 @@ def list_model_endpoints_v1_model_endpoints_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def list_model_endpoints_v1_model_endpoints_get( @@ -224,8 +239,7 @@ def list_model_endpoints_v1_model_endpoints_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def list_model_endpoints_v1_model_endpoints_get( @@ -235,8 +249,10 @@ def list_model_endpoints_v1_model_endpoints_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def list_model_endpoints_v1_model_endpoints_get( self, @@ -251,7 +267,7 @@ def list_model_endpoints_v1_model_endpoints_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -266,8 +282,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -277,8 +294,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -288,8 +304,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -304,5 +322,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints/get.pyi b/launch/api_client/paths/v1_model_endpoints/get.pyi index fea7a870..ba836ff4 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints/get.pyi @@ -6,46 +6,51 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions + +from launch_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_endpoints_v1_response import ( - ListModelEndpointsV1Response, -) from launch_client.model.model_endpoint_order_by import ModelEndpointOrderBy -from urllib3._collections import HTTPHeaderDict # Query params NameSchema = schemas.StrSchema OrderBySchema = ModelEndpointOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "name": typing.Union[ - NameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'name': typing.Union[NameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_name = api_client.QueryParameter( name="name", style=api_client.ParameterStyle.FORM, @@ -60,33 +65,46 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelEndpointsV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -97,7 +115,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -107,6 +128,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -115,7 +137,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _list_model_endpoints_v1_model_endpoints_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -151,11 +177,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -172,10 +198,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class ListModelEndpointsV1ModelEndpointsGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -187,7 +218,10 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def list_model_endpoints_v1_model_endpoints_get( self, @@ -197,6 +231,7 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def list_model_endpoints_v1_model_endpoints_get( self, @@ -205,7 +240,11 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def list_model_endpoints_v1_model_endpoints_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -219,9 +258,10 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -233,7 +273,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -243,6 +286,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -251,7 +295,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -265,5 +313,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints/post.py b/launch/api_client/paths/v1_model_endpoints/post.py index 99b4a96e..6daab4f2 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.py +++ b/launch/api_client/paths/v1_model_endpoints/post.py @@ -6,28 +6,27 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.create_model_endpoint_v1_request import ( - CreateModelEndpointV1Request, -) -from launch.api_client.model.create_model_endpoint_v1_response import ( - CreateModelEndpointV1Response, -) + +from launch.api_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response +from launch.api_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request from launch.api_client.model.http_validation_error import HTTPValidationError from . import path @@ -38,12 +37,13 @@ request_body_create_model_endpoint_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateModelEndpointV1Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( @@ -106,8 +115,10 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( @@ -118,8 +129,7 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( @@ -130,13 +140,15 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_model_endpoint_v1_model_endpoints_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_endpoint_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def create_model_endpoint_v1_model_endpoints_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( @@ -218,8 +234,10 @@ def create_model_endpoint_v1_model_endpoints_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_endpoint_v1_model_endpoints_post( @@ -230,8 +248,7 @@ def create_model_endpoint_v1_model_endpoints_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( @@ -242,13 +259,15 @@ def create_model_endpoint_v1_model_endpoints_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_model_endpoint_v1_model_endpoints_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def create_model_endpoint_v1_model_endpoints_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints/post.pyi b/launch/api_client/paths/v1_model_endpoints/post.pyi index 2af825d6..ede948a4 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.pyi +++ b/launch/api_client/paths/v1_model_endpoints/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_endpoint_v1_request import ( - CreateModelEndpointV1Request, -) -from launch_client.model.create_model_endpoint_v1_response import ( - CreateModelEndpointV1Response, -) + +from launch_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response +from launch_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateModelEndpointV1Request + request_body_create_model_endpoint_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelEndpointV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_model_endpoint_v1_model_endpoints_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_endpoint_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateModelEndpointV1ModelEndpointsPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, @@ -191,7 +225,11 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, @@ -202,6 +240,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, @@ -211,11 +250,15 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_model_endpoint_v1_model_endpoints_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_api/__init__.py b/launch/api_client/paths/v1_model_endpoints_api/__init__.py index c4f1910d..69585e08 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_api/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTSAPI +path = PathValues.V1_MODELENDPOINTSAPI \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.py b/launch/api_client/paths/v1_model_endpoints_api/get.py index d46a8f06..b6d33bc2 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.py +++ b/launch/api_client/paths/v1_model_endpoints_api/get.py @@ -6,27 +6,29 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions from . import path _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @@ -34,20 +36,25 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, + '200': _response_for_200, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -58,8 +65,9 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( @@ -68,8 +76,7 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( @@ -78,8 +85,10 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -100,11 +109,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -121,7 +130,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -136,8 +149,9 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( @@ -146,8 +160,7 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( @@ -156,8 +169,10 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -170,7 +185,7 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -184,8 +199,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -194,8 +210,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -204,8 +219,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -218,5 +235,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.pyi b/launch/api_client/paths/v1_model_endpoints_api/get.pyi index a95a6348..c2bd2937 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_api/get.pyi @@ -6,37 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -46,7 +57,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -55,6 +69,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -62,7 +77,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -82,11 +101,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -103,10 +122,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -117,7 +141,10 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -126,6 +153,7 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -133,7 +161,11 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_model_endpoints_api_v1_model_endpoints_api_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -145,9 +177,10 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -158,7 +191,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -167,6 +203,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -174,7 +211,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -186,5 +227,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py index fb6cdf7c..e382b4ff 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID +path = PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py index 3add1108..4968608b 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py @@ -6,25 +6,26 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.delete_model_endpoint_v1_response import ( - DeleteModelEndpointV1Response, -) + +from launch.api_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response from launch.api_client.model.http_validation_error import HTTPValidationError from . import path @@ -32,15 +33,17 @@ # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = DeleteModelEndpointV1Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( @@ -115,8 +127,7 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( @@ -126,8 +137,10 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="delete".upper(), + method='delete'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( @@ -209,8 +229,7 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( @@ -220,8 +239,10 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -236,7 +257,7 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def delete( @@ -262,8 +284,7 @@ def delete( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def delete( @@ -273,8 +294,10 @@ def delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def delete( self, @@ -289,5 +312,7 @@ def delete( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi index 07bbc190..70c4cda2 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi @@ -6,42 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.delete_model_endpoint_v1_response import ( - DeleteModelEndpointV1Response, -) + +from launch_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -50,33 +56,46 @@ request_path_model_endpoint_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = DeleteModelEndpointV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -87,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -97,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -105,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -124,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -132,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="delete".upper(), + method='delete'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -159,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -174,7 +208,10 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -184,6 +221,7 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -192,7 +230,11 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -206,9 +248,10 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -220,7 +263,10 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def delete( self, @@ -230,6 +276,7 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def delete( self, @@ -238,7 +285,11 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def delete( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -252,5 +303,7 @@ class ApiFordelete(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py index daa30f01..94382ce9 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py @@ -6,25 +6,26 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.get_model_endpoint_v1_response import ( - GetModelEndpointV1Response, -) + +from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response from launch.api_client.model.http_validation_error import HTTPValidationError from . import path @@ -32,15 +33,17 @@ # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = GetModelEndpointV1Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( @@ -115,8 +127,7 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( @@ -126,8 +137,10 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( @@ -209,8 +229,7 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( @@ -220,8 +239,10 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -236,7 +257,7 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -262,8 +284,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -273,8 +294,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -289,5 +312,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi index 1c74f794..1538b496 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi @@ -6,42 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.get_model_endpoint_v1_response import ( - GetModelEndpointV1Response, -) + +from launch_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -50,33 +56,46 @@ request_path_model_endpoint_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetModelEndpointV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -87,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -97,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -105,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -124,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -132,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -159,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -174,7 +208,10 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -184,6 +221,7 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -192,7 +230,11 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -206,9 +248,10 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -220,7 +263,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -230,6 +276,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -238,7 +285,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -252,5 +303,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py index 6c1e4cf4..3d96a934 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py @@ -6,44 +6,45 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.update_model_endpoint_v1_request import ( - UpdateModelEndpointV1Request, -) -from launch.api_client.model.update_model_endpoint_v1_response import ( - UpdateModelEndpointV1Response, -) +from launch.api_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request from . import path # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -62,12 +63,13 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): request_body_update_model_endpoint_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = UpdateModelEndpointV1Response @@ -75,14 +77,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -91,21 +96,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -119,8 +129,9 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @@ -132,8 +143,10 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @@ -145,8 +158,7 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @@ -158,13 +170,15 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -181,7 +195,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -189,29 +205,28 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_update_model_endpoint_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="put".upper(), + method='put'.upper(), headers=_headers, fields=_fields, body=_body, @@ -230,7 +245,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -248,8 +267,9 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @@ -261,8 +281,10 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @@ -274,8 +296,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @@ -287,13 +308,15 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -307,7 +330,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -324,8 +347,9 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def put( @@ -337,8 +361,10 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def put( @@ -350,8 +376,7 @@ def put( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def put( @@ -363,13 +388,15 @@ def put( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -383,5 +410,7 @@ def put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi index 60495b21..0012df0a 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi @@ -6,45 +6,49 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions + +from launch_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_model_endpoint_v1_request import ( - UpdateModelEndpointV1Request, -) -from launch_client.model.update_model_endpoint_v1_response import ( - UpdateModelEndpointV1Response, -) -from urllib3._collections import HTTPHeaderDict +from launch_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -54,41 +58,56 @@ request_path_model_endpoint_id = api_client.PathParameter( # body param SchemaForRequestBodyApplicationJson = UpdateModelEndpointV1Request + request_body_update_model_endpoint_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = UpdateModelEndpointV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -101,7 +120,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, @@ -112,7 +134,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, @@ -124,6 +150,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, @@ -134,11 +161,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -155,7 +186,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_model_endpoint_id,): + for parameter in ( + request_path_model_endpoint_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -163,29 +196,28 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_update_model_endpoint_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="put".upper(), + method='put'.upper(), headers=_headers, fields=_fields, body=_body, @@ -204,10 +236,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -221,7 +258,10 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, @@ -232,7 +272,11 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, @@ -244,6 +288,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, @@ -254,11 +299,15 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -272,9 +321,10 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -288,7 +338,10 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def put( self, @@ -299,7 +352,11 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def put( self, @@ -311,6 +368,7 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def put( self, @@ -321,11 +379,15 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -339,5 +401,7 @@ class ApiForput(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py b/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py index 4dd4f68d..bbefa10f 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTSSCHEMA_JSON +path = PathValues.V1_MODELENDPOINTSSCHEMA_JSON \ No newline at end of file diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py index 2cba49a7..8c24a455 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py @@ -6,27 +6,29 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions from . import path _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @@ -34,20 +36,25 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, + '200': _response_for_200, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -58,8 +65,9 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( @@ -68,8 +76,7 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( @@ -78,8 +85,10 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -100,11 +109,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -121,7 +130,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -136,8 +149,9 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( @@ -146,8 +160,7 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( @@ -156,8 +169,10 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -170,7 +185,7 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -184,8 +199,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -194,8 +210,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -204,8 +219,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -218,5 +235,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi index 25adcc5f..780a5c95 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi @@ -6,37 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -46,7 +57,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -55,6 +69,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -62,7 +77,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -82,11 +101,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -103,10 +122,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -117,7 +141,10 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -126,6 +153,7 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -133,7 +161,11 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -145,9 +177,10 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -158,7 +191,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -167,6 +203,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -174,7 +211,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -186,5 +227,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_sync_tasks/__init__.py b/launch/api_client/paths/v1_sync_tasks/__init__.py index e05b06c3..0ad403fe 100644 --- a/launch/api_client/paths/v1_sync_tasks/__init__.py +++ b/launch/api_client/paths/v1_sync_tasks/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_SYNCTASKS +path = PathValues.V1_SYNCTASKS \ No newline at end of file diff --git a/launch/api_client/paths/v1_sync_tasks/post.py b/launch/api_client/paths/v1_sync_tasks/post.py index 50fbe602..590fc5b5 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.py +++ b/launch/api_client/paths/v1_sync_tasks/post.py @@ -6,44 +6,45 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.endpoint_predict_v1_request import ( - EndpointPredictV1Request, -) + +from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.sync_endpoint_predict_v1_response import ( - SyncEndpointPredictV1Response, -) +from launch.api_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response from . import path # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -63,12 +64,13 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = SyncEndpointPredictV1Response @@ -76,14 +78,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -92,21 +97,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -120,8 +130,9 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( @@ -133,8 +144,10 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( @@ -146,8 +159,7 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( @@ -159,13 +171,15 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -182,7 +196,9 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_endpoint_id,): + for parameter in ( + request_query_model_endpoint_id, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -196,23 +212,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -231,7 +246,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -249,8 +268,9 @@ def create_sync_inference_task_v1_sync_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( @@ -262,8 +282,10 @@ def create_sync_inference_task_v1_sync_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_sync_inference_task_v1_sync_tasks_post( @@ -275,8 +297,7 @@ def create_sync_inference_task_v1_sync_tasks_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( @@ -288,13 +309,15 @@ def create_sync_inference_task_v1_sync_tasks_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_sync_inference_task_v1_sync_tasks_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,7 +331,7 @@ def create_sync_inference_task_v1_sync_tasks_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -325,8 +348,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -338,8 +362,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -351,8 +377,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -364,13 +389,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -384,5 +411,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v1_sync_tasks/post.pyi b/launch/api_client/paths/v1_sync_tasks/post.pyi index b1e97f28..1802b388 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.pyi +++ b/launch/api_client/paths/v1_sync_tasks/post.pyi @@ -6,45 +6,49 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.endpoint_predict_v1_request import ( - EndpointPredictV1Request, -) + +from launch_client.model.endpoint_predict_v1_request import EndpointPredictV1Request from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.sync_endpoint_predict_v1_response import ( - SyncEndpointPredictV1Response, -) -from urllib3._collections import HTTPHeaderDict +from launch_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_endpoint_id": typing.Union[ - ModelEndpointIdSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_endpoint_id = api_client.QueryParameter( name="model_endpoint_id", style=api_client.ParameterStyle.FORM, @@ -55,41 +59,56 @@ request_query_model_endpoint_id = api_client.QueryParameter( # body param SchemaForRequestBodyApplicationJson = EndpointPredictV1Request + request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = SyncEndpointPredictV1Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -102,7 +121,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, @@ -113,7 +135,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, @@ -125,6 +151,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, @@ -135,11 +162,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -156,7 +187,9 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_endpoint_id,): + for parameter in ( + request_query_model_endpoint_id, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,23 +203,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -205,10 +237,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -222,7 +259,10 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, @@ -233,7 +273,11 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, @@ -245,6 +289,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, @@ -255,11 +300,15 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_sync_inference_task_v1_sync_tasks_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +322,10 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -289,7 +339,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -300,7 +353,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -312,6 +369,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -322,11 +380,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -340,5 +402,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles/__init__.py b/launch/api_client/paths/v2_model_bundles/__init__.py index 4de08029..a34ff03c 100644 --- a/launch/api_client/paths/v2_model_bundles/__init__.py +++ b/launch/api_client/paths/v2_model_bundles/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES +path = PathValues.V2_MODELBUNDLES \ No newline at end of file diff --git a/launch/api_client/paths/v2_model_bundles/get.py b/launch/api_client/paths/v2_model_bundles/get.py index e9608072..90a8227e 100644 --- a/launch/api_client/paths/v2_model_bundles/get.py +++ b/launch/api_client/paths/v2_model_bundles/get.py @@ -6,44 +6,46 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.list_model_bundles_v2_response import ( - ListModelBundlesV2Response, -) + from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy +from launch.api_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response +from launch.api_client.model.http_validation_error import HTTPValidationError from . import path # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'model_name': typing.Union[ModelNameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) @@ -64,7 +66,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response @@ -72,14 +74,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -88,21 +93,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -114,8 +124,9 @@ def _list_model_bundles_v2_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( @@ -125,8 +136,7 @@ def _list_model_bundles_v2_model_bundles_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( @@ -136,8 +146,10 @@ def _list_model_bundles_v2_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -174,11 +186,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -195,7 +207,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -211,8 +227,9 @@ def list_model_bundles_v2_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def list_model_bundles_v2_model_bundles_get( @@ -222,8 +239,7 @@ def list_model_bundles_v2_model_bundles_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def list_model_bundles_v2_model_bundles_get( @@ -233,8 +249,10 @@ def list_model_bundles_v2_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def list_model_bundles_v2_model_bundles_get( self, @@ -249,7 +267,7 @@ def list_model_bundles_v2_model_bundles_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -264,8 +282,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -275,8 +294,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -286,8 +304,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -302,5 +322,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi index 662b5c99..b1c05840 100644 --- a/launch/api_client/paths/v2_model_bundles/get.pyi +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -6,46 +6,51 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_bundles_v2_response import ( - ListModelBundlesV2Response, -) + from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from urllib3._collections import HTTPHeaderDict +from launch_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response +from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) RequestOptionalQueryParams = typing_extensions.TypedDict( - "RequestOptionalQueryParams", + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], - "order_by": typing.Union[OrderBySchema,], + 'model_name': typing.Union[ModelNameSchema, str, ], + 'order_by': typing.Union[OrderBySchema, ], }, - total=False, + total=False ) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -60,33 +65,46 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -97,7 +115,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -107,6 +128,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -115,7 +137,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _list_model_bundles_v2_model_bundles_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -151,11 +177,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -172,10 +198,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class ListModelBundlesV2ModelBundlesGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -187,7 +218,10 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def list_model_bundles_v2_model_bundles_get( self, @@ -197,6 +231,7 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def list_model_bundles_v2_model_bundles_get( self, @@ -205,7 +240,11 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def list_model_bundles_v2_model_bundles_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -219,9 +258,10 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -233,7 +273,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -243,6 +286,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -251,7 +295,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -265,5 +313,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles/post.py b/launch/api_client/paths/v2_model_bundles/post.py index 75a2ecd2..6e6b6062 100644 --- a/launch/api_client/paths/v2_model_bundles/post.py +++ b/launch/api_client/paths/v2_model_bundles/post.py @@ -6,29 +6,28 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.create_model_bundle_v2_request import ( - CreateModelBundleV2Request, -) -from launch.api_client.model.create_model_bundle_v2_response import ( - CreateModelBundleV2Response, -) + from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request +from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response from . import path @@ -38,12 +37,13 @@ request_body_create_model_bundle_v2_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _create_model_bundle_v2_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( @@ -106,8 +115,10 @@ def _create_model_bundle_v2_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( @@ -118,8 +129,7 @@ def _create_model_bundle_v2_model_bundles_post_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( @@ -130,13 +140,15 @@ def _create_model_bundle_v2_model_bundles_post_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _create_model_bundle_v2_model_bundles_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def create_model_bundle_v2_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def create_model_bundle_v2_model_bundles_post( @@ -218,8 +234,10 @@ def create_model_bundle_v2_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_bundle_v2_model_bundles_post( @@ -230,8 +248,7 @@ def create_model_bundle_v2_model_bundles_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def create_model_bundle_v2_model_bundles_post( @@ -242,13 +259,15 @@ def create_model_bundle_v2_model_bundles_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def create_model_bundle_v2_model_bundles_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def create_model_bundle_v2_model_bundles_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi index d0eaf62f..bf69503f 100644 --- a/launch/api_client/paths/v2_model_bundles/post.pyi +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_bundle_v2_request import ( - CreateModelBundleV2Request, -) -from launch_client.model.create_model_bundle_v2_response import ( - CreateModelBundleV2Response, -) + from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request +from launch_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request + request_body_create_model_bundle_v2_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _create_model_bundle_v2_model_bundles_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CreateModelBundleV2ModelBundlesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def create_model_bundle_v2_model_bundles_post( self, @@ -191,7 +225,11 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def create_model_bundle_v2_model_bundles_post( self, @@ -202,6 +240,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def create_model_bundle_v2_model_bundles_post( self, @@ -211,11 +250,15 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def create_model_bundle_v2_model_bundles_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py index 1a69800e..ac407cd6 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES +path = PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES \ No newline at end of file diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py index 59c29b33..71b1844a 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py @@ -6,29 +6,28 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions -from launch.api_client.model.clone_model_bundle_v2_request import ( - CloneModelBundleV2Request, -) -from launch.api_client.model.create_model_bundle_v2_response import ( - CreateModelBundleV2Response, -) + from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response +from launch.api_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request from . import path @@ -38,12 +37,13 @@ request_body_clone_model_bundle_v2_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @@ -51,14 +51,17 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -67,21 +70,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -94,8 +102,9 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( @@ -106,8 +115,10 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( @@ -118,8 +129,7 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( @@ -130,13 +140,15 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -154,23 +166,22 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -189,7 +200,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -206,8 +221,9 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @@ -218,8 +234,10 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @@ -230,8 +248,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @@ -242,13 +259,15 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -260,7 +279,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -276,8 +295,9 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def post( @@ -288,8 +308,10 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( @@ -300,8 +322,7 @@ def post( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def post( @@ -312,13 +333,15 @@ def post( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -330,5 +353,7 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi index 498ec820..ebd1d600 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -6,67 +6,82 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.clone_model_bundle_v2_request import ( - CloneModelBundleV2Request, -) -from launch_client.model.create_model_bundle_v2_response import ( - CreateModelBundleV2Response, -) + from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response +from launch_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request + request_body_clone_model_bundle_v2_request = api_client.RequestBody( content={ - "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -78,7 +93,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, @@ -88,7 +106,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, @@ -99,6 +121,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, @@ -108,11 +131,15 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -130,23 +157,22 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - "The required body parameter has an invalid value of: unset. Set a valid value instead" - ) + 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) - _headers.add("Content-Type", content_type) - if "fields" in serialized_data: - _fields = serialized_data["fields"] - elif "body" in serialized_data: - _body = serialized_data["body"] + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method="post".upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -165,10 +191,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -181,7 +212,10 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, @@ -191,7 +225,11 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, @@ -202,6 +240,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, @@ -211,11 +250,15 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -227,9 +270,10 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -242,7 +286,10 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def post( self, @@ -252,7 +299,11 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload def post( self, @@ -263,6 +314,7 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def post( self, @@ -272,11 +324,15 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = "application/json", + content_type: str = 'application/json', accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -288,5 +344,7 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_latest/__init__.py b/launch/api_client/paths/v2_model_bundles_latest/__init__.py index b8ce06cc..190c18d6 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_latest/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_LATEST +path = PathValues.V2_MODELBUNDLES_LATEST \ No newline at end of file diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.py b/launch/api_client/paths/v2_model_bundles_latest/get.py index bcb75db6..8c4bb2fb 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.py +++ b/launch/api_client/paths/v2_model_bundles_latest/get.py @@ -6,41 +6,44 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.model_bundle_v2_response import ( - ModelBundleV2Response, -) from . import path # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_name': typing.Union[ModelNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -55,7 +58,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @@ -63,14 +66,17 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,21 +85,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -105,8 +116,9 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( @@ -116,8 +128,7 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( @@ -127,8 +138,10 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -148,7 +161,9 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_name,): + for parameter in ( + request_query_model_name, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -162,11 +177,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -183,7 +198,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -199,8 +218,9 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( @@ -210,8 +230,7 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( @@ -221,8 +240,10 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -237,7 +258,7 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -252,8 +273,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -263,8 +285,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -274,8 +295,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -290,5 +313,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi index edd6dda8..b4e22922 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -6,40 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError + from launch_client.model.model_bundle_v2_response import ModelBundleV2Response -from urllib3._collections import HTTPHeaderDict +from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - "RequestRequiredQueryParams", + 'RequestRequiredQueryParams', + { + 'model_name': typing.Union[ModelNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', { - "model_name": typing.Union[ - ModelNameSchema, - str, - ], }, + total=False ) -RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) + class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass + request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -49,33 +57,46 @@ request_query_model_name = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -86,7 +107,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -96,6 +120,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -104,7 +129,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -123,7 +152,9 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in (request_query_model_name,): + for parameter in ( + request_query_model_name, + ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -137,11 +168,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -158,10 +189,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -173,7 +209,10 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -183,6 +222,7 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -191,7 +231,11 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_latest_model_bundle_v2_model_bundles_latest_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -205,9 +249,10 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -219,7 +264,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -229,6 +277,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -237,7 +286,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -251,5 +304,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py index df3c2a79..783f2147 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID +path = PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID \ No newline at end of file diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py index 729ad8c1..a2d50a0b 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py @@ -6,41 +6,44 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 -from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 -from launch.api_client import api_client, exceptions + +from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.model_bundle_v2_response import ( - ModelBundleV2Response, -) from . import path # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_bundle_id": typing.Union[ - ModelBundleIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -54,7 +57,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - "HTTPBasic", + 'HTTPBasic', ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @@ -62,14 +65,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -78,21 +84,26 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - "200": _response_for_200, - "422": _response_for_422, + '200': _response_for_200, + '422': _response_for_422, } -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -104,8 +115,9 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( @@ -115,8 +127,7 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( @@ -126,8 +137,10 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -147,7 +160,9 @@ class instances used_path = path.value _path_params = {} - for parameter in (request_path_model_bundle_id,): + for parameter in ( + request_path_model_bundle_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -155,17 +170,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -182,7 +197,11 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -198,8 +217,9 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( @@ -209,8 +229,7 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( @@ -220,8 +239,10 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -236,7 +257,7 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) @@ -251,8 +272,9 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... @typing.overload def get( @@ -262,8 +284,7 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: - ... + ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload def get( @@ -273,8 +294,10 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: - ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... def get( self, @@ -289,5 +312,7 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi index fedb2333..088a3fff 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -6,40 +6,48 @@ Generated by: https://openapi-generator.tech """ +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from launch_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 +import typing_extensions # noqa: F401 import uuid # noqa: F401 -from dataclasses import dataclass -from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 -import typing_extensions # noqa: F401 -import urllib3 + from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError + from launch_client.model.model_bundle_v2_response import ModelBundleV2Response -from urllib3._collections import HTTPHeaderDict +from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - "RequestRequiredPathParams", + 'RequestRequiredPathParams', + { + 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', { - "model_bundle_id": typing.Union[ - ModelBundleIdSchema, - str, - ], }, + total=False ) -RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) + class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass + request_path_model_bundle_id = api_client.PathParameter( name="model_bundle_id", style=api_client.ParameterStyle.SIMPLE, @@ -48,33 +56,46 @@ request_path_model_bundle_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response + @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError + @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] + body: typing.Union[ + SchemaFor422ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset + _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), + 'application/json': api_client.MediaType( + schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ("application/json",) +_all_accept_content_types = ( + 'application/json', +) + class BaseApi(api_client.Api): @typing.overload @@ -85,7 +106,10 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -95,6 +119,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -103,7 +128,11 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -122,7 +151,9 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in (request_path_model_bundle_id,): + for parameter in ( + request_path_model_bundle_id, + ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -130,17 +161,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace("{%s}" % k, v) + used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add("Accept", accept_content_type) + _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method="get".upper(), + method='get'.upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -157,10 +188,15 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response + class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -172,7 +208,10 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -182,6 +221,7 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -190,7 +230,11 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -204,9 +248,10 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -218,7 +263,10 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ApiResponseFor200,]: ... + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + @typing.overload def get( self, @@ -228,6 +276,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... + @typing.overload def get( self, @@ -236,7 +285,11 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -250,5 +303,7 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization, + skip_deserialization=skip_deserialization ) + + diff --git a/launch/api_client/rest.py b/launch/api_client/rest.py index 58896e8a..89aa1230 100644 --- a/launch/api_client/rest.py +++ b/launch/api_client/rest.py @@ -11,8 +11,8 @@ import logging import ssl -import typing from urllib.parse import urlencode +import typing import certifi import urllib3 @@ -20,10 +20,12 @@ from launch.api_client.exceptions import ApiException, ApiValueError + logger = logging.getLogger(__name__) class RESTClientObject(object): + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -46,13 +48,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args["assert_hostname"] = configuration.assert_hostname # noqa: E501 + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries + addition_pool_args['retries'] = configuration.retries if configuration.socket_options is not None: - addition_pool_args["socket_options"] = configuration.socket_options + addition_pool_args['socket_options'] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -71,7 +73,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, - **addition_pool_args, + **addition_pool_args ) else: self.pool_manager = urllib3.PoolManager( @@ -81,7 +83,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): ca_certs=ca_certs, cert_file=configuration.cert_file, key_file=configuration.key_file, - **addition_pool_args, + **addition_pool_args ) def request( @@ -112,10 +114,13 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] if fields and body: - raise ApiValueError("body parameter cannot be used with fields parameter.") + raise ApiValueError( + "body parameter cannot be used with fields parameter." + ) fields = fields or {} headers = headers or {} @@ -123,54 +128,53 @@ def request( if timeout: if isinstance(timeout, (int, float)): # noqa: E501,F821 timeout = urllib3.Timeout(total=timeout) - elif isinstance(timeout, tuple) and len(timeout) == 2: + elif (isinstance(timeout, tuple) and + len(timeout) == 2): timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - if "Content-Type" not in headers and body is None: - r = self.pool_manager.request( - method, url, preload_content=not stream, timeout=timeout, headers=headers - ) - elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if 'Content-Type' not in headers and body is None: r = self.pool_manager.request( method, url, + preload_content=not stream, + timeout=timeout, + headers=headers + ) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, body=body, fields=fields, encode_multipart=False, preload_content=not stream, timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "multipart/form-data": + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers["Content-Type"] + del headers['Content-Type'] r = self.pool_manager.request( - method, - url, + method, url, fields=fields, encode_multipart=True, preload_content=not stream, timeout=timeout, - headers=headers, - ) + headers=headers) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( - method, - url, + method, url, body=request_body, preload_content=not stream, timeout=timeout, - headers=headers, - ) + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -179,7 +183,10 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, preload_content=not stream, timeout=timeout, headers=headers) + r = self.pool_manager.request(method, url, + preload_content=not stream, + timeout=timeout, + headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) @@ -190,31 +197,58 @@ def request( return r - def GET(self, url, headers=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, headers=headers, stream=stream, timeout=timeout, fields=fields) - - def HEAD(self, url, headers=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, headers=headers, stream=stream, timeout=timeout, fields=fields) - - def OPTIONS(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request( - "OPTIONS", - url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, - fields=fields, - ) - - def DELETE(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) - - def POST(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) - - def PUT(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) - - def PATCH(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) + def GET(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def HEAD(self, url, headers=None, stream=False, + timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, + headers=headers, + stream=stream, + timeout=timeout, + fields=fields) + + def OPTIONS(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def DELETE(self, url, headers=None, body=None, + stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def POST(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PUT(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) + + def PATCH(self, url, headers=None, + body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, + headers=headers, + stream=stream, + timeout=timeout, + body=body, fields=fields) diff --git a/launch/api_client/schemas.py b/launch/api_client/schemas.py index d9910ede..a8c70520 100644 --- a/launch/api_client/schemas.py +++ b/launch/api_client/schemas.py @@ -9,21 +9,26 @@ Generated by: https://openapi-generator.tech """ -import decimal +from collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 import functools +import decimal import io import re import types import typing import uuid -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 +from dateutil.parser.isoparser import isoparser, _takes_ascii import frozendict -from dateutil.parser.isoparser import _takes_ascii, isoparser -from launch.api_client.configuration import Configuration -from launch.api_client.exceptions import ApiTypeError, ApiValueError +from launch.api_client.exceptions import ( + ApiTypeError, + ApiValueError, +) +from launch.api_client.configuration import ( + Configuration, +) class Unset(object): @@ -31,10 +36,8 @@ class Unset(object): An instance of this class is set as the default value for object type(dict) properties that are optional When a property has an unset value, that property will not be assigned in the dict """ - pass - unset = Unset() none_type = type(None) @@ -50,12 +53,12 @@ class FileIO(io.FileIO): def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): if isinstance(_arg, (io.FileIO, io.BufferedReader)): if _arg.closed: - raise ApiValueError("Invalid file state; file is closed and must be open") + raise ApiValueError('Invalid file state; file is closed and must be open') _arg.close() inst = super(FileIO, cls).__new__(cls, _arg.name) super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError("FileIO must be passed _arg which contains the open file") + raise ApiValueError('FileIO must be passed _arg which contains the open file') def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -79,16 +82,13 @@ class ValidationMetadata(frozendict.frozendict): """ A class storing metadata that is needed to validate OpenApi Schema payloads """ - def __new__( cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(["args[0]"]), + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), from_server: bool = False, configuration: typing.Optional[Configuration] = None, seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type] - ] = frozendict.frozendict(), + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() ): """ Args: @@ -115,7 +115,7 @@ def __new__( from_server=from_server, configuration=configuration, seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas, + validated_path_to_schemas=validated_path_to_schemas ) def validation_ran_earlier(self, cls: type) -> bool: @@ -129,25 +129,23 @@ def validation_ran_earlier(self, cls: type) -> bool: @property def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get("path_to_item") + return self.get('path_to_item') @property def from_server(self) -> bool: - return self.get("from_server") + return self.get('from_server') @property def configuration(self) -> typing.Optional[Configuration]: - return self.get("configuration") + return self.get('configuration') @property def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get("seen_classes") + return self.get('seen_classes') @property - def validated_path_to_schemas( - self, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get("validated_path_to_schemas") + def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: + return self.get('validated_path_to_schemas') def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): @@ -157,7 +155,7 @@ def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_t for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): if len(path_to_item) < len(current_path_to_item): continue - path_begins_with_current_path = path_to_item[: len(current_path_to_item)] == current_path_to_item + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item if path_begins_with_current_path: other_path_to_schemas[path_to_item] = schemas update(path_to_schemas, other_path_to_schemas) @@ -168,7 +166,6 @@ class Singleton: Enums and singletons are the same The same instance is returned for a given key of (cls, _arg) """ - _instances = {} def __new__(cls, _arg: typing.Any, **kwargs): @@ -192,15 +189,16 @@ def __new__(cls, _arg: typing.Any, **kwargs): def __repr__(self): if isinstance(self, NoneClass): - return f"<{self.__class__.__name__}: None>" + return f'<{self.__class__.__name__}: None>' elif isinstance(self, BoolClass): if bool(self): - return f"<{self.__class__.__name__}: True>" - return f"<{self.__class__.__name__}: False>" - return f"<{self.__class__.__name__}: {super().__repr__()}>" + return f'<{self.__class__.__name__}: True>' + return f'<{self.__class__.__name__}: False>' + return f'<{self.__class__.__name__}: {super().__repr__()}>' class classproperty: + def __init__(self, fget): self.fget = fget @@ -231,7 +229,7 @@ def __bool__(self) -> bool: for key, instance in self._instances.items(): if self is instance: return bool(key[1]) - raise ValueError("Unable to find the boolean value of this instance") + raise ValueError('Unable to find the boolean value of this instance') class MetaOapgTyped: @@ -241,39 +239,30 @@ class MetaOapgTyped: inclusive_minimum: typing.Union[int, float] max_items: int min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type["Schema"]]] + discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] + class properties: # to hold object properties pass - additional_properties: typing.Optional[typing.Type["Schema"]] + additional_properties: typing.Optional[typing.Type['Schema']] max_properties: int min_properties: int - all_of: typing.List[typing.Type["Schema"]] - one_of: typing.List[typing.Type["Schema"]] - any_of: typing.List[typing.Type["Schema"]] - not_schema: typing.Type["Schema"] + all_of: typing.List[typing.Type['Schema']] + one_of: typing.List[typing.Type['Schema']] + any_of: typing.List[typing.Type['Schema']] + not_schema: typing.Type['Schema'] max_length: int min_length: int - items: typing.Type["Schema"] + items: typing.Type['Schema'] class Schema: """ the base class of all swagger/openapi schemas/models """ - - __inheritable_primitive_types_set = { - decimal.Decimal, - str, - tuple, - frozendict.frozendict, - FileIO, - bytes, - BoolClass, - NoneClass, - } + __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} _types: typing.Set[typing.Type] MetaOapg = MetaOapgTyped @@ -288,9 +277,7 @@ def __get_valid_classes_phrase(input_classes): return "is one of [{0}]".format(", ".join(all_class_names)) @staticmethod - def _get_class_oapg( - item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type["Schema"]] - ) -> typing.Type["Schema"]: + def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: if isinstance(item_cls, types.FunctionType): # referenced schema return item_cls() @@ -300,7 +287,9 @@ def _get_class_oapg( return item_cls @classmethod - def __type_error_message(cls, var_value=None, var_name=None, valid_classes=None, key_type=None): + def __type_error_message( + cls, var_value=None, var_name=None, valid_classes=None, key_type=None + ): """ Keyword Args: var_value (any): the variable which has the type_error @@ -343,10 +332,7 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ]: + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: """ Schema _validate_oapg All keyword validation except for type checking was done in calling stack frames @@ -375,9 +361,7 @@ def _validate_oapg( @staticmethod def _process_schema_classes_oapg( - schema_classes: typing.Set[ - typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple] - ] + schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] ): """ Processes and mutates schema_classes @@ -397,8 +381,10 @@ def _process_schema_classes_oapg( @classmethod def __get_new_cls( - cls, arg, validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]]: + cls, + arg, + validation_metadata: ValidationMetadata + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: """ Make a new dynamic class and return an instance of that class We are making an instance of cls, but instead of making cls @@ -437,7 +423,8 @@ def __get_new_cls( 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo """ cls._process_schema_classes_oapg(schema_classes) - enum_schema = any(issubclass(this_cls, EnumBase) for this_cls in schema_classes) + enum_schema = any( + issubclass(this_cls, EnumBase) for this_cls in schema_classes) inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) chosen_schema_classes = schema_classes - inheritable_primitive_type suffix = tuple(inheritable_primitive_type) @@ -445,7 +432,7 @@ def __get_new_cls( suffix = (Singleton,) + suffix used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name="DynamicSchema", bases=used_classes) + mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) path_to_schemas[path] = mfg_cls return path_to_schemas @@ -455,7 +442,7 @@ def _get_new_instance_without_conversion_oapg( cls, arg: typing.Any, path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] ): # We have a Dynamic class and we are making an instance of it if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): @@ -484,16 +471,16 @@ def from_openapi_data_oapg( decimal.Decimal, bool, None, - "Schema", + 'Schema', dict, frozendict.frozendict, tuple, list, io.FileIO, io.BufferedReader, - bytes, + bytes ], - _configuration: typing.Optional[Configuration], + _configuration: typing.Optional[Configuration] ): """ Schema from_openapi_data_oapg @@ -502,14 +489,13 @@ def from_openapi_data_oapg( validated_path_to_schemas = {} arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) validation_metadata = ValidationMetadata( - from_server=from_server, - configuration=_configuration, - validated_path_to_schemas=validated_path_to_schemas, - ) + from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) path_to_schemas = cls.__get_new_cls(arg, validation_metadata) new_cls = path_to_schemas[validation_metadata.path_to_item] new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, validation_metadata.path_to_item, path_to_schemas + arg, + validation_metadata.path_to_item, + path_to_schemas ) return new_inst @@ -526,41 +512,7 @@ def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__( - cls, - *_args: typing.Union[ - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - date, - datetime, - bool, - None, - "Schema", - ], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - date, - datetime, - bool, - None, - "Schema", - Unset, - ], - ): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ @@ -575,59 +527,35 @@ def __new__( """ __kwargs = cls.__remove_unsets(kwargs) if not _args and not __kwargs: - raise TypeError("No input given. args or kwargs must be given.") + raise TypeError( + 'No input given. args or kwargs must be given.' + ) if not __kwargs and _args and not isinstance(_args[0], dict): __arg = _args[0] else: __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} - __arg = cast_to_allowed_types(__arg, __from_server, __validated_path_to_schemas) + __arg = cast_to_allowed_types( + __arg, __from_server, __validated_path_to_schemas) __validation_metadata = ValidationMetadata( - configuration=_configuration, - from_server=__from_server, - validated_path_to_schemas=__validated_path_to_schemas, - ) + configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) __new_cls = __path_to_schemas[__validation_metadata.path_to_item] return __new_cls._get_new_instance_without_conversion_oapg( - __arg, __validation_metadata.path_to_item, __path_to_schemas + __arg, + __validation_metadata.path_to_item, + __path_to_schemas ) def __init__( self, *_args: typing.Union[ - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - date, - datetime, - bool, - None, - "Schema", - ], + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - date, - datetime, - bool, - None, - "Schema", - Unset, - ], + dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset + ] ): """ this is needed to fix 'Unexpected argument' warning in pycharm @@ -637,7 +565,6 @@ def __init__( """ pass - """ import itertools data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') @@ -667,411 +594,272 @@ def __init__( BoolMixin = BoolClass BytesMixin = bytes FileMixin = FileIO - # qty 2 class BinaryMixin(bytes, FileIO): pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): pass - class NoneTupleMixin(NoneClass, tuple): pass - class NoneStrMixin(NoneClass, str): pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): pass - class NoneBoolMixin(NoneClass, BoolClass): pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): pass - class FrozenDictStrMixin(frozendict.frozendict, str): pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): pass - class TupleStrMixin(tuple, str): pass - class TupleDecimalMixin(tuple, decimal.Decimal): pass - class TupleBoolMixin(tuple, BoolClass): pass - class StrDecimalMixin(str, decimal.Decimal): pass - class StrBoolMixin(str, BoolClass): pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): pass - # qty 3 class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): pass - class NoneTupleStrMixin(NoneClass, tuple, str): pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): pass - class TupleStrBoolMixin(tuple, str, BoolClass): pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): pass - # qty 4 class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): pass - # qty 5 class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin( - NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass - ): + class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin( - NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes - ): + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): pass - else: # qty 1 class NoneMixin: _types = {NoneClass} - class FrozenDictMixin: _types = {frozendict.frozendict} - class TupleMixin: _types = {tuple} - class StrMixin: _types = {str} - class DecimalMixin: _types = {decimal.Decimal} - class BoolMixin: _types = {BoolClass} - class BytesMixin: _types = {bytes} - class FileMixin: _types = {FileIO} - # qty 2 class BinaryMixin: _types = {bytes, FileIO} - class NoneFrozenDictMixin: _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: _types = {NoneClass, tuple} - class NoneStrMixin: _types = {NoneClass, str} - class NoneDecimalMixin: _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: _types = {tuple, str} - class TupleDecimalMixin: _types = {tuple, decimal.Decimal} - class TupleBoolMixin: _types = {tuple, BoolClass} - class StrDecimalMixin: _types = {str, decimal.Decimal} - class StrBoolMixin: _types = {str, BoolClass} - class DecimalBoolMixin: _types = {decimal.Decimal, BoolClass} - # qty 3 class NoneFrozenDictTupleMixin: _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: _types = {str, decimal.Decimal, BoolClass} - # qty 4 class NoneFrozenDictTupleStrMixin: _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 class NoneFrozenDictTupleStrDecimalMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 class NoneFrozenDictTupleStrDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = { - NoneClass, - frozendict.frozendict, - tuple, - str, - decimal.Decimal, - BoolClass, - FileIO, - bytes, - } + _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} class ValidatorBase: @@ -1088,11 +876,9 @@ def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return ( - configuration is None - or not hasattr(configuration, "_disabled_client_side_validations") - or schema_keyword not in configuration._disabled_client_side_validations - ) + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) @staticmethod def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): @@ -1113,10 +899,7 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ]: + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: """ EnumBase _validate_oapg Validates that arg is in the enum's allowed values @@ -1124,11 +907,7 @@ def _validate_oapg( try: cls.MetaOapg.enum_value_to_name[arg] except KeyError: - raise ApiValueError( - "Invalid value {} passed in to {}, allowed_values={}".format( - arg, cls, cls.MetaOapg.enum_value_to_name.keys() - ) - ) + raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) return super()._validate_oapg(arg, validation_metadata=validation_metadata) @@ -1172,69 +951,68 @@ def as_str_oapg(self) -> str: @property def as_date_oapg(self) -> date: - raise Exception("not implemented") + raise Exception('not implemented') @property def as_datetime_oapg(self) -> datetime: - raise Exception("not implemented") + raise Exception('not implemented') @property def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception("not implemented") + raise Exception('not implemented') @property def as_uuid_oapg(self) -> uuid.UUID: - raise Exception("not implemented") + raise Exception('not implemented') @classmethod - def __check_str_validations(cls, arg: str, validation_metadata: ValidationMetadata): - if not hasattr(cls, "MetaOapg"): + def __check_str_validations( + cls, + arg: str, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): return - if ( - cls._is_json_validation_enabled_oapg("maxLength", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "max_length") - and len(arg) > cls.MetaOapg.max_length - ): + if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_length') and + len(arg) > cls.MetaOapg.max_length): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("minLength", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "min_length") - and len(arg) < cls.MetaOapg.min_length - ): + if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_length') and + len(arg) < cls.MetaOapg.min_length): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if cls._is_json_validation_enabled_oapg("pattern", validation_metadata.configuration) and hasattr( - cls.MetaOapg, "regex" - ): + if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'regex')): for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get("flags", 0) - if not re.search(regex_dict["pattern"], arg, flags=flags): + flags = regex_dict.get('flags', 0) + if not re.search(regex_dict['pattern'], arg, flags=flags): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", - constraint_value=regex_dict["pattern"], + constraint_value=regex_dict['pattern'], path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags), + additional_txt=" with flags=`{}`".format(flags) ) cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", - constraint_value=regex_dict["pattern"], - path_to_item=validation_metadata.path_to_item, + constraint_value=regex_dict['pattern'], + path_to_item=validation_metadata.path_to_item ) @classmethod @@ -1242,10 +1020,7 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ]: + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: """ StrBase _validate_oapg Validates that validations pass @@ -1286,21 +1061,22 @@ def _validate_oapg( class CustomIsoparser(isoparser): + @_takes_ascii def parse_isodatetime(self, dt_str): components, pos = self._parse_isodate(dt_str) if len(dt_str) > pos: - if self._sep is None or dt_str[pos : pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1 :]) + if self._sep is None or dt_str[pos:pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1:]) else: - raise ValueError("String contains unknown ISO components") + raise ValueError('String contains unknown ISO components') if len(components) > 3 and components[3] == 24: components[3] = 0 return datetime(*components) + timedelta(days=1) if len(components) <= 3: - raise ValueError("Value is not a datetime") + raise ValueError('Value is not a datetime') return datetime(*components) @@ -1309,10 +1085,10 @@ def parse_isodate(self, datestr): components, pos = self._parse_isodate(datestr) if len(datestr) > pos: - raise ValueError("String contains invalid time components") + raise ValueError('String contains invalid time components') if len(components) > 3: - raise ValueError("String contains invalid time components") + raise ValueError('String contains invalid time components') return date(*components) @@ -1438,7 +1214,7 @@ def as_int_oapg(self) -> int: if self.as_tuple().exponent < 0: # this could be represented as an integer but should be represented as a float # because that's what it was serialized from - raise ApiValueError(f"{self} is not an integer") + raise ApiValueError(f'{self} is not an integer') self._as_int = int(self) return self._as_int @@ -1448,85 +1224,79 @@ def as_float_oapg(self) -> float: return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f"{self} is not a float") + raise ApiValueError(f'{self} is not a float') self._as_float = float(self) return self._as_float @classmethod - def __check_numeric_validations(cls, arg, validation_metadata: ValidationMetadata): - if not hasattr(cls, "MetaOapg"): + def __check_numeric_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): return - if cls._is_json_validation_enabled_oapg("multipleOf", validation_metadata.configuration) and hasattr( - cls.MetaOapg, "multiple_of" - ): + if cls._is_json_validation_enabled_oapg('multipleOf', + validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): multiple_of_value = cls.MetaOapg.multiple_of - if not (float(arg) / multiple_of_value).is_integer(): + if (not (float(arg) / multiple_of_value).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) - for validation_key in { - "exclusive_maximum", - "inclusive_maximum", - "exclusive_minimum", - "inclusive_minimum", + hasattr(cls.MetaOapg, validation_key) for validation_key in { + 'exclusive_maximum', + 'inclusive_maximum', + 'exclusive_minimum', + 'inclusive_minimum', } ) if not checking_max_or_min_values: return - if ( - cls._is_json_validation_enabled_oapg("exclusiveMaximum", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "exclusive_maximum") - and arg >= cls.MetaOapg.exclusive_maximum - ): + if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_maximum') and + arg >= cls.MetaOapg.exclusive_maximum): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("maximum", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "inclusive_maximum") - and arg > cls.MetaOapg.inclusive_maximum - ): + if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_maximum') and + arg > cls.MetaOapg.inclusive_maximum): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("exclusiveMinimum", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "exclusive_minimum") - and arg <= cls.MetaOapg.exclusive_minimum - ): + if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'exclusive_minimum') and + arg <= cls.MetaOapg.exclusive_minimum): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("minimum", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "inclusive_minimum") - and arg < cls.MetaOapg.inclusive_minimum - ): + if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'inclusive_minimum') and + arg < cls.MetaOapg.inclusive_minimum): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) @classmethod @@ -1534,10 +1304,7 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ]: + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: """ NumberBase _validate_oapg Validates that validations pass @@ -1567,64 +1334,59 @@ def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): # if we have definitions for an items schema, use it # otherwise accept anything - item_cls = getattr(cls.MetaOapg, "items", UnsetAnyTypeSchema) + item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) item_cls = cls._get_class_oapg(item_cls) path_to_schemas = {} for i, value in enumerate(list_items): item_validation_metadata = ValidationMetadata( from_server=validation_metadata.from_server, configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item + (i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas, + path_to_item=validation_metadata.path_to_item+(i,), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if item_validation_metadata.validation_ran_earlier(item_cls): add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue - other_path_to_schemas = item_cls._validate_oapg(value, validation_metadata=item_validation_metadata) + other_path_to_schemas = item_cls._validate_oapg( + value, validation_metadata=item_validation_metadata) update(path_to_schemas, other_path_to_schemas) return path_to_schemas @classmethod - def __check_tuple_validations(cls, arg, validation_metadata: ValidationMetadata): - if not hasattr(cls, "MetaOapg"): + def __check_tuple_validations( + cls, arg, + validation_metadata: ValidationMetadata): + if not hasattr(cls, 'MetaOapg'): return - if ( - cls._is_json_validation_enabled_oapg("maxItems", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "max_items") - and len(arg) > cls.MetaOapg.max_items - ): + if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_items') and + len(arg) > cls.MetaOapg.max_items): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("minItems", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "min_items") - and len(arg) < cls.MetaOapg.min_items - ): + if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_items') and + len(arg) < cls.MetaOapg.min_items): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("uniqueItems", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "unique_items") - and cls.MetaOapg.unique_items - and arg - ): + if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): unique_items = set(arg) if len(arg) > len(unique_items): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value="unique_items==True", - path_to_item=validation_metadata.path_to_item, + constraint_value='unique_items==True', + path_to_item=validation_metadata.path_to_item ) @classmethod @@ -1658,7 +1420,7 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1666,20 +1428,24 @@ def _validate_oapg( @classmethod def _get_items_oapg( - cls: "Schema", + cls: 'Schema', arg: typing.List[typing.Any], path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] ): - """ + ''' ListBase _get_items_oapg - """ + ''' cast_items = [] for i, value in enumerate(arg): item_path_to_item = path_to_item + (i,) item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg(value, item_path_to_item, path_to_schemas) + new_value = item_cls._get_new_instance_without_conversion_oapg( + value, + item_path_to_item, + path_to_schemas + ) cast_items.append(new_value) return cast_items @@ -1689,16 +1455,12 @@ class Discriminable: MetaOapg: MetaOapgTyped @classmethod - def _ensure_discriminator_value_present_oapg( - cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args - ): + def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): if not args or args and disc_property_name not in args[0]: # The input data does not contain the discriminator property raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format( - disc_property_name, validation_metadata.path_to_item - ) + "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) ) @classmethod @@ -1706,7 +1468,7 @@ def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_valu """ Used in schemas with discriminators """ - if not hasattr(cls.MetaOapg, "discriminator"): + if not hasattr(cls.MetaOapg, 'discriminator'): return None disc = cls.MetaOapg.discriminator() if disc_property_name not in disc: @@ -1714,38 +1476,38 @@ def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_valu discriminated_cls = disc[disc_property_name].get(disc_payload_value) if discriminated_cls is not None: return discriminated_cls - if not hasattr(cls, "MetaOapg"): + if not hasattr(cls, 'MetaOapg'): return None elif not ( - hasattr(cls.MetaOapg, "all_of") or hasattr(cls.MetaOapg, "one_of") or hasattr(cls.MetaOapg, "any_of") + hasattr(cls.MetaOapg, 'all_of') or + hasattr(cls.MetaOapg, 'one_of') or + hasattr(cls.MetaOapg, 'any_of') ): return None # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, "all_of"): + if hasattr(cls.MetaOapg, 'all_of'): for allof_cls in cls.MetaOapg.all_of(): discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value - ) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) if discriminated_cls is not None: return discriminated_cls - if hasattr(cls.MetaOapg, "one_of"): + if hasattr(cls.MetaOapg, 'one_of'): for oneof_cls in cls.MetaOapg.one_of(): discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value - ) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) if discriminated_cls is not None: return discriminated_cls - if hasattr(cls.MetaOapg, "any_of"): + if hasattr(cls.MetaOapg, 'any_of'): for anyof_cls in cls.MetaOapg.any_of(): discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value - ) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) if discriminated_cls is not None: return discriminated_cls return None class DictBase(Discriminable, ValidatorBase): + @classmethod def __validate_arg_presence(cls, arg): """ @@ -1768,10 +1530,10 @@ def __validate_arg_presence(cls, arg): """ seen_required_properties = set() invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, "required", set()) - additional_properties = getattr(cls.MetaOapg, "additional_properties", UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, "properties", {}) - property_annotations = getattr(properties, "__annotations__", {}) + required_property_names = getattr(cls.MetaOapg, 'required', set()) + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) for property_name in arg: if property_name in required_property_names: seen_required_properties.add(property_name) @@ -1789,7 +1551,7 @@ def __validate_arg_presence(cls, arg): cls.__name__, len(missing_required_arguments), "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments, + missing_required_arguments ) ) if invalid_arguments: @@ -1799,7 +1561,7 @@ def __validate_arg_presence(cls, arg): cls.__name__, len(invalid_arguments), "s" if len(invalid_arguments) > 1 else "", - invalid_arguments, + invalid_arguments ) ) @@ -1818,11 +1580,11 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): ApiTypeError - for missing required arguments, or for invalid properties """ path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, "additional_properties", UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, "properties", {}) - property_annotations = getattr(properties, "__annotations__", {}) + additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, 'properties', {}) + property_annotations = getattr(properties, '__annotations__', {}) for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item + (property_name,) + path_to_item = validation_metadata.path_to_item+(property_name,) if property_name in property_annotations: schema = property_annotations[property_name] elif additional_properties is not NotAnyTypeSchema: @@ -1836,17 +1598,15 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): continue schema = additional_properties else: - raise ApiTypeError( - "Unable to find schema for value={} in class={} at path_to_item={}".format( - value, cls, validation_metadata.path_to_item + (property_name,) - ) - ) + raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( + value, cls, validation_metadata.path_to_item+(property_name,) + )) schema = cls._get_class_oapg(schema) arg_validation_metadata = ValidationMetadata( from_server=validation_metadata.from_server, configuration=validation_metadata.configuration, path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if arg_validation_metadata.validation_ran_earlier(schema): add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) @@ -1856,31 +1616,31 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): return path_to_schemas @classmethod - def __check_dict_validations(cls, arg, validation_metadata: ValidationMetadata): - if not hasattr(cls, "MetaOapg"): + def __check_dict_validations( + cls, + arg, + validation_metadata: ValidationMetadata + ): + if not hasattr(cls, 'MetaOapg'): return - if ( - cls._is_json_validation_enabled_oapg("maxProperties", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "max_properties") - and len(arg) > cls.MetaOapg.max_properties - ): + if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'max_properties') and + len(arg) > cls.MetaOapg.max_properties): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) - if ( - cls._is_json_validation_enabled_oapg("minProperties", validation_metadata.configuration) - and hasattr(cls.MetaOapg, "min_properties") - and len(arg) < cls.MetaOapg.min_properties - ): + if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and + hasattr(cls.MetaOapg, 'min_properties') and + len(arg) < cls.MetaOapg.min_properties): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item, + path_to_item=validation_metadata.path_to_item ) @classmethod @@ -1920,15 +1680,14 @@ def _validate_oapg( disc_prop_name = list(discriminator.keys())[0] cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] - ) + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) if discriminated_cls is None: raise ApiValueError( "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( cls.__name__, disc_prop_name, list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,), + validation_metadata.path_to_item + (disc_prop_name,) ) ) updated_vm = ValidationMetadata( @@ -1936,7 +1695,7 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if updated_vm.validation_ran_earlier(discriminated_cls): add_deeper_validated_schemas(updated_vm, _path_to_schemas) @@ -1950,7 +1709,7 @@ def _get_properties_oapg( cls, arg: typing.Dict[str, typing.Any], path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] ): """ DictBase _get_properties_oapg, this is how properties are set @@ -1962,7 +1721,9 @@ def _get_properties_oapg( property_path_to_item = path_to_item + (property_name_js,) property_cls = path_to_schemas[property_path_to_item] new_value = property_cls._get_new_instance_without_conversion_oapg( - value, property_path_to_item, path_to_schemas + value, + property_path_to_item, + path_to_schemas ) dict_items[property_name_js] = new_value @@ -1970,7 +1731,7 @@ def _get_properties_oapg( def __setattr__(self, name: str, value: typing.Any): if not isinstance(self, FileIO): - raise AttributeError("property setting not supported on immutable instances") + raise AttributeError('property setting not supported on immutable instances') def __getattr__(self, name: str): """ @@ -1997,7 +1758,7 @@ def __getitem__(self, name: str): return super().__getattr__(name) return super().__getitem__(name) - def get_item_oapg(self, name: str) -> typing.Union["AnyTypeSchema", Unset]: + def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: # dict_instance[name] accessor if not isinstance(self, frozendict.frozendict): raise NotImplementedError() @@ -2008,30 +1769,10 @@ def get_item_oapg(self, name: str) -> typing.Union["AnyTypeSchema", Unset]: def cast_to_allowed_types( - arg: typing.Union[ - str, - date, - datetime, - uuid.UUID, - decimal.Decimal, - int, - float, - None, - dict, - frozendict.frozendict, - list, - tuple, - bytes, - Schema, - io.FileIO, - io.BufferedReader, - ], + arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], from_server: bool, - validated_path_to_schemas: typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(["args[0]"]), + validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), ) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: """ Casts the input payload arg into the allowed types @@ -2063,18 +1804,11 @@ def cast_to_allowed_types( schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes - type_error = ApiTypeError( - f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}" - ) + type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") if isinstance(arg, str): return str(arg) elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict( - { - key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) - for key, val in arg.items() - } - ) + return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) elif isinstance(arg, (bool, BoolClass)): """ this check must come before isinstance(arg, (int, float)) @@ -2090,15 +1824,10 @@ def cast_to_allowed_types( if decimal_from_float.as_integer_ratio()[1] == 1: # 9.0 -> Decimal('9.0') # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float) + ".0") + return decimal.Decimal(str(decimal_from_float)+'.0') return decimal_from_float elif isinstance(arg, (tuple, list)): - return tuple( - [ - cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) - for i, item in enumerate(arg) - ] - ) + return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) elif isinstance(arg, (none_type, NoneClass)): return NoneClass.NONE elif isinstance(arg, (date, datetime)): @@ -2115,10 +1844,11 @@ def cast_to_allowed_types( return bytes(arg) elif isinstance(arg, (io.FileIO, io.BufferedReader)): return FileIO(arg) - raise ValueError("Invalid type passed in got input={} type={}".format(arg, type(arg))) + raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) class ComposedBase(Discriminable): + @classmethod def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): path_to_schemas = defaultdict(set) @@ -2168,7 +1898,12 @@ def __get_oneof_class( return path_to_schemas @classmethod - def __get_anyof_classes(cls, arg, discriminated_cls, validation_metadata: ValidationMetadata): + def __get_anyof_classes( + cls, + arg, + discriminated_cls, + validation_metadata: ValidationMetadata + ): anyof_classes = [] path_to_schemas = defaultdict(set) for anyof_cls in cls.MetaOapg.any_of(): @@ -2197,10 +1932,7 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[ - typing.Tuple[typing.Union[str, int], ...], - typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], - ]: + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: """ ComposedBase _validate_oapg We return dynamic classes of different bases depending upon the inputs @@ -2224,12 +1956,12 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas, + validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) # process composed schema discriminator = None - if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "discriminator"): + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): @@ -2237,8 +1969,7 @@ def _validate_oapg( cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) # get discriminated_cls by looking at the dict in the current class discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name] - ) + disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) if discriminated_cls is None: raise ApiValueError( "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( @@ -2246,25 +1977,29 @@ def _validate_oapg( cls.__name__, disc_property_name, list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,), + updated_vm.path_to_item + (disc_property_name,) ) ) - if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "all_of"): + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "one_of"): + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): other_path_to_schemas = cls.__get_oneof_class( - arg, discriminated_cls=discriminated_cls, validation_metadata=updated_vm + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "any_of"): + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): other_path_to_schemas = cls.__get_anyof_classes( - arg, discriminated_cls=discriminated_cls, validation_metadata=updated_vm + arg, + discriminated_cls=discriminated_cls, + validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) not_cls = None - if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "not_schema"): + if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): not_cls = cls.MetaOapg.not_schema not_cls = cls._get_class_oapg(not_cls) if not_cls: @@ -2303,33 +2038,37 @@ class ComposedSchema( BoolBase, NoneBase, Schema, - NoneFrozenDictTupleStrDecimalBoolMixin, + NoneFrozenDictTupleStrDecimalBoolMixin ): @classmethod def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): if not args: if not kwargs: - raise ApiTypeError("{} is missing required input data in args or kwargs".format(cls.__name__)) - args = (kwargs,) + raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) + args = (kwargs, ) return super().from_openapi_data_oapg(args[0], _configuration=_configuration) -class ListSchema(ListBase, Schema, TupleMixin): +class ListSchema( + ListBase, + Schema, + TupleMixin +): + @classmethod - def from_openapi_data_oapg( - cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None - ): + def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__( - cls, - _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], - **kwargs: Configuration, - ): + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class NoneSchema(NoneBase, Schema, NoneMixin): +class NoneSchema( + NoneBase, + Schema, + NoneMixin +): + @classmethod def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2338,16 +2077,18 @@ def __new__(cls, _arg: None, **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class NumberSchema(NumberBase, Schema, DecimalMixin): +class NumberSchema( + NumberBase, + Schema, + DecimalMixin +): """ This is used for type: number with no format Both integers AND floats are accepted """ @classmethod - def from_openapi_data_oapg( - cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None - ): + def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): @@ -2366,6 +2107,7 @@ def as_int_oapg(self) -> int: @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): if isinstance(arg, decimal.Decimal): + denominator = arg.as_integer_ratio()[-1] if denominator != 1: raise ApiValueError( @@ -2387,6 +2129,7 @@ def _validate_oapg( class IntSchema(IntBase, NumberSchema): + @classmethod def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2420,7 +2163,10 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Int32Schema(Int32Base, IntSchema): +class Int32Schema( + Int32Base, + IntSchema +): pass @@ -2449,13 +2195,16 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Int64Schema(Int64Base, IntSchema): +class Int64Schema( + Int64Base, + IntSchema +): pass class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e38) + __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) + __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): @@ -2478,15 +2227,19 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Float32Schema(Float32Base, NumberSchema): +class Float32Schema( + Float32Base, + NumberSchema +): + @classmethod def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157e308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157e308) + __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) + __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): @@ -2508,15 +2261,22 @@ def _validate_oapg( cls.__validate_format(arg, validation_metadata=validation_metadata) return super()._validate_oapg(arg, validation_metadata=validation_metadata) +class Float64Schema( + Float64Base, + NumberSchema +): -class Float64Schema(Float64Base, NumberSchema): @classmethod def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): # todo check format return super().from_openapi_data_oapg(arg, _configuration=_configuration) -class StrSchema(StrBase, Schema, StrMixin): +class StrSchema( + StrBase, + Schema, + StrMixin +): """ date + datetime string types must inherit from this class That is because one can validate a str payload as both: @@ -2525,7 +2285,7 @@ class StrSchema(StrBase, Schema, StrMixin): """ @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> "StrSchema": + def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super().from_openapi_data_oapg(arg, _configuration=_configuration) def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): @@ -2533,21 +2293,25 @@ def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: C class UUIDSchema(UUIDBase, StrSchema): + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): + def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads @@ -2560,16 +2324,21 @@ def __new__(cls, _arg: str, **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class BytesSchema(Schema, BytesMixin): +class BytesSchema( + Schema, + BytesMixin +): """ this class will subclass bytes and is immutable """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): return super(Schema, cls).__new__(cls, _arg) -class FileSchema(Schema, FileMixin): +class FileSchema( + Schema, + FileMixin +): """ This class is NOT immutable Dynamic classes are built using it for example when AnyType allows in binary data @@ -2595,7 +2364,12 @@ class BinaryBase: pass -class BinarySchema(ComposedBase, BinaryBase, Schema, BinaryMixin): +class BinarySchema( + ComposedBase, + BinaryBase, + Schema, + BinaryMixin +): class MetaOapg: @staticmethod def one_of(): @@ -2608,7 +2382,12 @@ def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwar return super().__new__(cls, _arg) -class BoolSchema(BoolBase, Schema, BoolMixin): +class BoolSchema( + BoolBase, + Schema, + BoolMixin +): + @classmethod def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2625,7 +2404,7 @@ class AnyTypeSchema( BoolBase, NoneBase, Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin, + NoneFrozenDictTupleStrDecimalBoolFileBytesMixin ): # Python representation of a schema defined as true or {} pass @@ -2652,7 +2431,7 @@ def __new__( cls, *_args, _configuration: typing.Optional[Configuration] = None, - ) -> "NotAnyTypeSchema": + ) -> 'NotAnyTypeSchema': return super().__new__( cls, *_args, @@ -2660,54 +2439,26 @@ def __new__( ) -class DictSchema(DictBase, Schema, FrozenDictMixin): +class DictSchema( + DictBase, + Schema, + FrozenDictMixin +): @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Dict[str, typing.Any], - _configuration: typing.Optional[Configuration] = None, - ): + def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict], - **kwargs: typing.Union[ - dict, - frozendict.frozendict, - list, - tuple, - decimal.Decimal, - float, - int, - str, - date, - datetime, - bool, - None, - bytes, - Schema, - Unset, - ValidationMetadata, - ], - ): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): return super().__new__(cls, *_args, **kwargs) -schema_type_classes = { - NoneSchema, - DictSchema, - ListSchema, - NumberSchema, - StrSchema, - BoolSchema, - AnyTypeSchema, -} +schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} @functools.lru_cache() def get_new_class( - class_name: str, bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] + class_name: str, + bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] ) -> typing.Type[Schema]: """ Returns a new class that is made with the subclass bases @@ -2721,4 +2472,4 @@ def get_new_class( def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file From a2f34717bced8bf6e679597cedab1c8f4f4bc608 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:19:01 -0400 Subject: [PATCH 02/13] Formated with black --- launch/api_client/api_client.py | 429 ++++----- launch/api_client/apis/__init__.py | 2 +- launch/api_client/apis/path_to_api.py | 4 +- launch/api_client/apis/tag_to_api.py | 4 +- launch/api_client/apis/tags/default_api.py | 25 +- launch/api_client/configuration.py | 209 ++-- launch/api_client/exceptions.py | 11 +- .../model/batch_job_serialization_format.py | 10 +- .../model/batch_job_serialization_format.pyi | 9 +- launch/api_client/model/batch_job_status.py | 18 +- launch/api_client/model/batch_job_status.pyi | 13 +- launch/api_client/model/callback_auth.py | 54 +- launch/api_client/model/callback_auth.pyi | 54 +- .../api_client/model/callback_basic_auth.py | 130 ++- .../api_client/model/callback_basic_auth.pyi | 94 +- launch/api_client/model/callbackm_tls_auth.py | 131 ++- .../api_client/model/callbackm_tls_auth.pyi | 95 +- .../model/clone_model_bundle_v1_request.py | 106 +- .../model/clone_model_bundle_v1_request.pyi | 88 +- .../model/clone_model_bundle_v2_request.py | 106 +- .../model/clone_model_bundle_v2_request.pyi | 88 +- .../model/cloudpickle_artifact_flavor.py | 294 ++++-- .../model/cloudpickle_artifact_flavor.pyi | 231 +++-- .../model/create_async_task_v1_response.py | 84 +- .../model/create_async_task_v1_response.pyi | 68 +- .../create_batch_job_resource_requests.py | 376 ++++++-- .../create_batch_job_resource_requests.pyi | 320 ++++-- .../model/create_batch_job_v1_request.py | 203 ++-- .../model/create_batch_job_v1_request.pyi | 168 ++-- .../model/create_batch_job_v1_response.py | 84 +- .../model/create_batch_job_v1_response.pyi | 68 +- .../model/create_model_bundle_v1_request.py | 241 +++-- .../model/create_model_bundle_v1_request.pyi | 182 ++-- .../model/create_model_bundle_v1_response.py | 84 +- .../model/create_model_bundle_v1_response.pyi | 76 +- .../model/create_model_bundle_v2_request.py | 199 +++- .../model/create_model_bundle_v2_request.pyi | 166 +++- .../model/create_model_bundle_v2_response.py | 84 +- .../model/create_model_bundle_v2_response.pyi | 76 +- .../model/create_model_endpoint_v1_request.py | 734 +++++++++----- .../create_model_endpoint_v1_request.pyi | 575 +++++++---- .../create_model_endpoint_v1_response.py | 88 +- .../create_model_endpoint_v1_response.pyi | 76 +- launch/api_client/model/custom_framework.py | 132 ++- launch/api_client/model/custom_framework.pyi | 106 +- .../delete_model_endpoint_v1_response.py | 84 +- .../delete_model_endpoint_v1_response.pyi | 68 +- .../model/endpoint_predict_v1_request.py | 177 +++- .../model/endpoint_predict_v1_request.pyi | 133 ++- .../model/get_async_task_v1_response.py | 154 ++- .../model/get_async_task_v1_response.pyi | 120 ++- .../model/get_batch_job_v1_response.py | 162 +++- .../model/get_batch_job_v1_response.pyi | 126 ++- .../model/get_model_endpoint_v1_response.py | 510 ++++++---- .../model/get_model_endpoint_v1_response.pyi | 384 +++++--- launch/api_client/model/gpu_type.py | 12 +- launch/api_client/model/gpu_type.pyi | 10 +- .../api_client/model/http_validation_error.py | 101 +- .../model/http_validation_error.pyi | 83 +- .../model/list_model_bundles_v1_response.py | 108 ++- .../model/list_model_bundles_v1_response.pyi | 88 +- .../model/list_model_bundles_v2_response.py | 108 ++- .../model/list_model_bundles_v2_response.pyi | 88 +- .../model/list_model_endpoints_v1_response.py | 110 ++- .../list_model_endpoints_v1_response.pyi | 98 +- .../model/model_bundle_environment_params.py | 156 ++- .../model/model_bundle_environment_params.pyi | 122 ++- .../model/model_bundle_framework_type.py | 12 +- .../model/model_bundle_framework_type.pyi | 10 +- .../api_client/model/model_bundle_order_by.py | 10 +- .../model/model_bundle_order_by.pyi | 9 +- .../model/model_bundle_packaging_type.py | 20 +- .../model/model_bundle_packaging_type.pyi | 18 +- .../model/model_bundle_v1_response.py | 330 +++++-- .../model/model_bundle_v1_response.pyi | 246 +++-- .../model/model_bundle_v2_response.py | 285 ++++-- .../model/model_bundle_v2_response.pyi | 225 +++-- .../model/model_endpoint_deployment_state.py | 198 ++-- .../model/model_endpoint_deployment_state.pyi | 148 +-- .../model/model_endpoint_order_by.py | 12 +- .../model/model_endpoint_order_by.pyi | 10 +- .../model/model_endpoint_resource_state.py | 371 +++++-- .../model/model_endpoint_resource_state.pyi | 314 ++++-- .../api_client/model/model_endpoint_status.py | 16 +- .../model/model_endpoint_status.pyi | 12 +- .../api_client/model/model_endpoint_type.py | 10 +- .../api_client/model/model_endpoint_type.pyi | 9 +- launch/api_client/model/pytorch_framework.py | 117 ++- launch/api_client/model/pytorch_framework.pyi | 97 +- launch/api_client/model/request_schema.py | 1 + launch/api_client/model/request_schema.pyi | 1 + launch/api_client/model/response_schema.py | 1 + launch/api_client/model/response_schema.pyi | 1 + .../api_client/model/runnable_image_flavor.py | 283 ++++-- .../model/runnable_image_flavor.pyi | 212 ++-- .../sync_endpoint_predict_v1_response.py | 137 ++- .../sync_endpoint_predict_v1_response.pyi | 111 ++- launch/api_client/model/task_status.py | 16 +- launch/api_client/model/task_status.pyi | 12 +- .../api_client/model/tensorflow_framework.py | 117 ++- .../api_client/model/tensorflow_framework.pyi | 97 +- .../triton_enhanced_runnable_image_flavor.py | 454 ++++++--- .../triton_enhanced_runnable_image_flavor.pyi | 347 ++++--- .../model/update_batch_job_v1_request.py | 84 +- .../model/update_batch_job_v1_request.pyi | 68 +- .../model/update_batch_job_v1_response.py | 84 +- .../model/update_batch_job_v1_response.pyi | 68 +- .../model/update_model_endpoint_v1_request.py | 698 ++++++++++---- .../update_model_endpoint_v1_request.pyi | 558 +++++++---- .../update_model_endpoint_v1_response.py | 88 +- .../update_model_endpoint_v1_response.pyi | 76 +- launch/api_client/model/validation_error.py | 226 +++-- launch/api_client/model/validation_error.pyi | 190 +++- .../api_client/model/zip_artifact_flavor.py | 302 ++++-- .../api_client/model/zip_artifact_flavor.pyi | 239 +++-- .../api_client/paths/healthcheck/__init__.py | 2 +- launch/api_client/paths/healthcheck/get.py | 67 +- launch/api_client/paths/healthcheck/get.pyi | 64 +- launch/api_client/paths/healthz/__init__.py | 2 +- launch/api_client/paths/healthz/get.py | 67 +- launch/api_client/paths/healthz/get.pyi | 64 +- launch/api_client/paths/readyz/__init__.py | 2 +- launch/api_client/paths/readyz/get.py | 67 +- launch/api_client/paths/readyz/get.pyi | 64 +- .../paths/v1_async_tasks/__init__.py | 2 +- .../api_client/paths/v1_async_tasks/post.py | 192 ++-- .../api_client/paths/v1_async_tasks/post.pyi | 190 ++-- .../paths/v1_async_tasks_task_id/__init__.py | 2 +- .../paths/v1_async_tasks_task_id/get.py | 94 +- .../paths/v1_async_tasks_task_id/get.pyi | 91 +- .../paths/v1_batch_jobs/__init__.py | 2 +- launch/api_client/paths/v1_batch_jobs/post.py | 174 ++-- .../api_client/paths/v1_batch_jobs/post.pyi | 170 ++-- .../v1_batch_jobs_batch_job_id/__init__.py | 2 +- .../paths/v1_batch_jobs_batch_job_id/get.py | 94 +- .../paths/v1_batch_jobs_batch_job_id/get.pyi | 91 +- .../paths/v1_batch_jobs_batch_job_id/put.py | 194 ++-- .../paths/v1_batch_jobs_batch_job_id/put.pyi | 192 ++-- .../paths/v1_model_bundles/__init__.py | 2 +- .../api_client/paths/v1_model_bundles/get.py | 93 +- .../api_client/paths/v1_model_bundles/get.pyi | 90 +- .../api_client/paths/v1_model_bundles/post.py | 174 ++-- .../paths/v1_model_bundles/post.pyi | 170 ++-- .../__init__.py | 2 +- .../post.py | 174 ++-- .../post.pyi | 170 ++-- .../paths/v1_model_bundles_latest/__init__.py | 2 +- .../paths/v1_model_bundles_latest/get.py | 92 +- .../paths/v1_model_bundles_latest/get.pyi | 89 +- .../__init__.py | 2 +- .../v1_model_bundles_model_bundle_id/get.py | 94 +- .../v1_model_bundles_model_bundle_id/get.pyi | 91 +- .../paths/v1_model_endpoints/__init__.py | 2 +- .../paths/v1_model_endpoints/get.py | 93 +- .../paths/v1_model_endpoints/get.pyi | 90 +- .../paths/v1_model_endpoints/post.py | 174 ++-- .../paths/v1_model_endpoints/post.pyi | 170 ++-- .../paths/v1_model_endpoints_api/__init__.py | 2 +- .../paths/v1_model_endpoints_api/get.py | 69 +- .../paths/v1_model_endpoints_api/get.pyi | 64 +- .../__init__.py | 2 +- .../delete.py | 94 +- .../delete.pyi | 91 +- .../get.py | 94 +- .../get.pyi | 91 +- .../put.py | 194 ++-- .../put.pyi | 192 ++-- .../__init__.py | 2 +- .../v1_model_endpoints_schema_json/get.py | 69 +- .../v1_model_endpoints_schema_json/get.pyi | 64 +- .../paths/v1_sync_tasks/__init__.py | 2 +- launch/api_client/paths/v1_sync_tasks/post.py | 192 ++-- .../api_client/paths/v1_sync_tasks/post.pyi | 190 ++-- .../paths/v2_model_bundles/__init__.py | 2 +- .../api_client/paths/v2_model_bundles/get.py | 93 +- .../api_client/paths/v2_model_bundles/get.pyi | 90 +- .../api_client/paths/v2_model_bundles/post.py | 174 ++-- .../paths/v2_model_bundles/post.pyi | 170 ++-- .../__init__.py | 2 +- .../post.py | 174 ++-- .../post.pyi | 170 ++-- .../paths/v2_model_bundles_latest/__init__.py | 2 +- .../paths/v2_model_bundles_latest/get.py | 92 +- .../paths/v2_model_bundles_latest/get.pyi | 89 +- .../__init__.py | 2 +- .../v2_model_bundles_model_bundle_id/get.py | 94 +- .../v2_model_bundles_model_bundle_id/get.pyi | 91 +- launch/api_client/rest.py | 136 +-- launch/api_client/schemas.py | 907 +++++++++++------- 189 files changed, 14252 insertions(+), 9458 deletions(-) diff --git a/launch/api_client/api_client.py b/launch/api_client/api_client.py index 8f106a71..978cf69d 100644 --- a/launch/api_client/api_client.py +++ b/launch/api_client/api_client.py @@ -53,7 +53,7 @@ def __eq__(self, other): class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') + compact_separators = (",", ":") def default(self, obj): if isinstance(obj, str): @@ -74,24 +74,24 @@ def default(self, obj): return {key: self.default(val) for key, val in obj.items()} elif isinstance(obj, (list, tuple)): return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + raise ApiValueError("Unable to prepare type {} for serialization".format(obj.__class__.__name__)) class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' + QUERY = "query" + HEADER = "header" + PATH = "path" + COOKIE = "cookie" class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' + MATRIX = "matrix" + LABEL = "label" + FORM = "form" + SIMPLE = "simple" + SPACE_DELIMITED = "spaceDelimited" + PIPE_DELIMITED = "pipeDelimited" + DEEP_OBJECT = "deepObject" class PrefixSeparatorIterator: @@ -101,10 +101,10 @@ def __init__(self, prefix: str, separator: str): self.prefix = prefix self.separator = separator self.first = True - if separator in {'.', '|', '%20'}: + if separator in {".", "|", "%20"}: item_separator = separator else: - item_separator = ',' + item_separator = "," self.item_separator = item_separator def __iter__(self): @@ -146,7 +146,7 @@ def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): elif isinstance(in_data, dict) and not in_data: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) + raise ApiValueError("Unable to generate a ref6570 item representation of {}".format(in_data)) @staticmethod def _to_dict(name: str, value: str): @@ -161,12 +161,12 @@ def __ref6570_str_float_int_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool + named_parameter_expansion: bool, ) -> str: item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): + if item_value is None or (item_value == "" and prefix_separator_iterator.separator == ";"): return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' + value_pair_equals = "=" if named_parameter_expansion else "" return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value @classmethod @@ -178,20 +178,20 @@ def __ref6570_list_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool + named_parameter_expansion: bool, ) -> str: item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] item_values = [v for v in item_values if v is not None] if not item_values: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return "" - value_pair_equals = '=' if named_parameter_expansion else '' + value_pair_equals = "=" if named_parameter_expansion else "" if not explode: return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join(item_values) ) # exploded return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( @@ -207,27 +207,27 @@ def __ref6570_dict_expansion( percent_encode: bool, prefix_separator_iterator: PrefixSeparatorIterator, var_name_piece: str, - named_parameter_expansion: bool + named_parameter_expansion: bool, ) -> str: in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} if not in_data_transformed: # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 return "" - value_pair_equals = '=' if named_parameter_expansion else '' + value_pair_equals = "=" if named_parameter_expansion else "" if not explode: return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() + next(prefix_separator_iterator) + + var_name_piece + + value_pair_equals + + prefix_separator_iterator.item_separator.join( + prefix_separator_iterator.item_separator.join(item_pair) + for item_pair in in_data_transformed.items() ) ) # exploded return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] + [key + "=" + val for key, val in in_data_transformed.items()] ) @classmethod @@ -237,13 +237,13 @@ def _ref6570_expansion( in_data: typing.Any, explode: bool, percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator + prefix_separator_iterator: PrefixSeparatorIterator, ) -> str: """ Separator is for separate variables like dict with explode true, not for array item separation """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' + named_parameter_expansion = prefix_separator_iterator.separator in {"&", ";"} + var_name_piece = variable_name if named_parameter_expansion else "" if type(in_data) in {str, float, int}: return cls.__ref6570_str_float_int_expansion( variable_name, @@ -252,7 +252,7 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion + named_parameter_expansion, ) elif isinstance(in_data, none_type): # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 @@ -265,7 +265,7 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion + named_parameter_expansion, ) elif isinstance(in_data, dict): return cls.__ref6570_dict_expansion( @@ -275,10 +275,10 @@ def _ref6570_expansion( percent_encode, prefix_separator_iterator, var_name_piece, - named_parameter_expansion + named_parameter_expansion, ) # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) + raise ApiValueError("Unable to generate a ref6570 representation of {}".format(in_data)) class StyleFormSerializer(ParameterSerializerBase): @@ -294,35 +294,34 @@ def _serialize_form( name: str, explode: bool, percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, ) -> str: if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') + prefix_separator_iterator = PrefixSeparatorIterator("", "&") return self._ref6570_expansion( variable_name=name, in_data=in_data, explode=explode, percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) class StyleSimpleSerializer(ParameterSerializerBase): - def _serialize_simple( self, in_data: typing.Union[None, int, float, str, bool, dict, list], name: str, explode: bool, - percent_encode: bool + percent_encode: bool, ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') + prefix_separator_iterator = PrefixSeparatorIterator("", ",") return self._ref6570_expansion( variable_name=name, in_data=in_data, explode=explode, percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) @@ -334,6 +333,7 @@ class JSONDetector: application/json-patch+json application/geo+json """ + __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") @classmethod @@ -369,7 +369,7 @@ class ParameterBase(JSONDetector): ParameterInType.HEADER: ParameterStyle.SIMPLE, ParameterInType.COOKIE: ParameterStyle.FORM, } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} + __disallowed_header_names = {"Accept", "Content-Type", "Authorization"} _json_encoder = JSONEncoder() @classmethod @@ -379,7 +379,7 @@ def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_ty in_type_set = cls.__style_to_in_type[style] if in_type not in in_type_set: raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( + "Invalid style and in_type combination. For style={} only in_type={} are allowed".format( style, in_type_set ) ) @@ -393,19 +393,19 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, ): if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') + raise ValueError("Value missing; Pass in either schema or content") if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') + raise ValueError("Too many values provided. Both schema and content were provided. Only one may be input") if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) + raise ValueError("Invalid name, name may not be one of {}".format(self.__disallowed_header_names)) self.__verify_style_to_in_type(style, in_type) if content is None and style is None: style = self.__in_type_to_default_style[in_type] if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') + raise ValueError("Invalid content length, content length must equal 1") self.in_type = in_type self.name = name self.required = required @@ -416,9 +416,7 @@ def __init__( self.content = content def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False + self, in_data: typing.Union[None, int, float, str, bool, dict, list], eliminate_whitespace: bool = False ) -> str: if eliminate_whitespace: return json.dumps(in_data, separators=self._json_encoder.compact_separators) @@ -426,7 +424,6 @@ def _serialize_json( class PathParameter(ParameterBase, StyleSimpleSerializer): - def __init__( self, name: str, @@ -435,7 +432,7 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, ): super().__init__( name, @@ -445,34 +442,32 @@ def __init__( explode=explode, allow_reserved=allow_reserved, schema=schema, - content=content + content=content, ) def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + self, in_data: typing.Union[None, int, float, str, bool, dict, list] ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') + prefix_separator_iterator = PrefixSeparatorIterator(".", ".") value = self._ref6570_expansion( variable_name=self.name, in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) return self._to_dict(self.name, value) def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] + self, in_data: typing.Union[None, int, float, str, bool, dict, list] ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') + prefix_separator_iterator = PrefixSeparatorIterator(";", ";") value = self._ref6570_expansion( variable_name=self.name, in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) return self._to_dict(self.name, value) @@ -480,18 +475,14 @@ def __serialize_simple( self, in_data: typing.Union[None, int, float, str, bool, dict, list], ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) + value = self._serialize_simple(in_data=in_data, name=self.name, explode=self.explode, percent_encode=True) return self._to_dict(self.name, value) def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict + ], ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -519,11 +510,10 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) class QueryParameter(ParameterBase, StyleFormSerializer): - def __init__( self, name: str, @@ -532,7 +522,7 @@ def __init__( explode: typing.Optional[bool] = None, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, ): used_style = ParameterStyle.FORM if style is None else style used_explode = self._get_default_explode(used_style) if explode is None else explode @@ -545,13 +535,13 @@ def __init__( explode=used_explode, allow_reserved=allow_reserved, schema=schema, - content=content + content=content, ) def __serialize_space_delimited( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -560,14 +550,14 @@ def __serialize_space_delimited( in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) return self._to_dict(self.name, value) def __serialize_pipe_delimited( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -576,14 +566,14 @@ def __serialize_pipe_delimited( in_data=in_data, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) return self._to_dict(self.name, value) def __serialize_form( self, in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator], ) -> typing.Dict[str, str]: if prefix_separator_iterator is None: prefix_separator_iterator = self.get_prefix_separator_iterator() @@ -592,23 +582,24 @@ def __serialize_form( name=self.name, explode=self.explode, percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator + prefix_separator_iterator=prefix_separator_iterator, ) return self._to_dict(self.name, value) def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') + return PrefixSeparatorIterator("?", "&") elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') + return PrefixSeparatorIterator("", "%20") elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') + return PrefixSeparatorIterator("", "|") def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict + ], + prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None, ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -642,15 +633,11 @@ def serialize( cast_in_data = self._json_encoder.default(cast_in_data) if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + return self._to_dict(self.name, next(prefix_separator_iterator) + self.name + "=" + quote(value)) + raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) class CookieParameter(ParameterBase, StyleFormSerializer): - def __init__( self, name: str, @@ -659,7 +646,7 @@ def __init__( explode: typing.Optional[bool] = None, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, ): used_style = ParameterStyle.FORM if style is None and content is None and schema else style used_explode = self._get_default_explode(used_style) if explode is None else explode @@ -672,13 +659,14 @@ def __init__( explode=used_explode, allow_reserved=allow_reserved, schema=schema, - content=content + content=content, ) def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict + ], ) -> typing.Dict[str, str]: if self.schema: cast_in_data = self.schema(in_data) @@ -697,7 +685,7 @@ def serialize( explode=self.explode, name=self.name, percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') + prefix_separator_iterator=PrefixSeparatorIterator("", "&"), ) return self._to_dict(self.name, value) # self.content will be length one @@ -707,7 +695,7 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) class HeaderParameter(ParameterBase, StyleSimpleSerializer): @@ -719,7 +707,7 @@ def __init__( explode: bool = False, allow_reserved: typing.Optional[bool] = None, schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None + content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None, ): super().__init__( name, @@ -729,7 +717,7 @@ def __init__( explode=explode, allow_reserved=allow_reserved, schema=schema, - content=content + content=content, ) @staticmethod @@ -744,7 +732,8 @@ def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHead def serialize( self, in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] + Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict + ], ) -> HTTPHeaderDict: if self.schema: cast_in_data = self.schema(in_data) @@ -764,7 +753,7 @@ def serialize( if self._content_type_is_json(content_type): value = self._serialize_json(cast_in_data) return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) + raise NotImplementedError("Serialization of {} has not yet been implemented".format(content_type)) class Encoding: @@ -793,6 +782,7 @@ class MediaType: The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. """ + schema: typing.Optional[typing.Type[Schema]] = None encoding: typing.Optional[typing.Dict[str, Encoding]] = None @@ -807,7 +797,7 @@ def __init__( self, response: urllib3.HTTPResponse, body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset + headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset, ): """ pycharm needs this to prevent 'Unexpected argument' warnings @@ -835,7 +825,7 @@ def __init__( ): self.headers = headers if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + raise ValueError("Invalid value for content, the content dict must have >= 1 entry") self.content = content self.response_cls = response_cls @@ -876,17 +866,16 @@ def __deserialize_application_octet_stream( a file will be written and returned """ if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) + file_name = self.__file_name_from_content_disposition( + response.headers.get("content-disposition") + ) or self.__file_name_from_response_url(response.geturl()) if file_name is None: _fd, path = tempfile.mkstemp() else: path = os.path.join(tempfile.gettempdir(), file_name) - with open(path, 'wb') as new_file: + with open(path, "wb") as new_file: chunk_size = 1024 while True: data = response.read(chunk_size) @@ -895,27 +884,25 @@ def __deserialize_application_octet_stream( new_file.write(data) # release_conn is needed for streaming connections only response.release_conn() - new_file = open(path, 'rb') + new_file = open(path, "rb") return new_file else: return response.data @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: + def __deserialize_multipart_form_data(response: urllib3.HTTPResponse) -> typing.Dict[str, typing.Any]: msg = email.message_from_bytes(response.data) return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) + part.get_param("name", header="Content-Disposition"): part.get_payload(decode=True).decode( + part.get_content_charset() + ) if part.get_content_charset() else part.get_payload() for part in msg.get_payload() } def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') + content_type = response.getheader("content-type") deserialized_body = unset streamed = response.supports_chunked_reads() @@ -933,31 +920,22 @@ def deserialize(self, response: urllib3.HTTPResponse, configuration: Configurati body_schema = self.content[content_type].schema if body_schema is None: # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) + return self.response_cls(response=response, headers=deserialized_headers, body=unset) if self._content_type_is_json(content_type): body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': + elif content_type == "application/octet-stream": body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): + elif content_type.startswith("multipart/form-data"): body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' + content_type = "multipart/form-data" else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) + raise NotImplementedError("Deserialization of {} has not yet been implemented".format(content_type)) + deserialized_body = body_schema.from_openapi_data_oapg(body_data, _configuration=configuration) elif streamed: response.release_conn() - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) + return self.response_cls(response=response, headers=deserialized_headers, body=deserialized_body) class ApiClient: @@ -990,7 +968,7 @@ def __init__( header_name: typing.Optional[str] = None, header_value: typing.Optional[str] = None, cookie: typing.Optional[str] = None, - pool_threads: int = 1 + pool_threads: int = 1, ): if configuration is None: configuration = Configuration() @@ -1003,7 +981,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.1.0/python' + self.user_agent = "OpenAPI-Generator/1.1.0/python" def __enter__(self): return self @@ -1016,13 +994,13 @@ def close(self): self._pool.close() self._pool.join() self._pool = None - if hasattr(atexit, 'unregister'): + if hasattr(atexit, "unregister"): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. + avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) @@ -1032,11 +1010,11 @@ def pool(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -1057,11 +1035,10 @@ def __call_api( # header parameters used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: - headers['Cookie'] = self.cookie + headers["Cookie"] = self.cookie # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) + self.update_params_for_auth(used_headers, auth_settings, resource_path, method, body) # must happen after cookie setting and auth setting in case user is overriding those if headers: @@ -1159,7 +1136,7 @@ def call_api( stream, timeout, host, - ) + ), ) def request( @@ -1174,57 +1151,27 @@ def request( ) -> urllib3.HTTPResponse: """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET(url, - stream=stream, - timeout=timeout, - headers=headers) + return self.rest_client.GET(url, stream=stream, timeout=timeout, headers=headers) elif method == "HEAD": - return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, - headers=headers) + return self.rest_client.HEAD(url, stream=stream, timeout=timeout, headers=headers) elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) + return self.rest_client.OPTIONS( + url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body + ) elif method == "POST": - return self.rest_client.POST(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) + return self.rest_client.POST(url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body) elif method == "PUT": - return self.rest_client.PUT(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) + return self.rest_client.PUT(url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body) elif method == "PATCH": - return self.rest_client.PATCH(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) + return self.rest_client.PATCH( + url, headers=headers, fields=fields, stream=stream, timeout=timeout, body=body + ) elif method == "DELETE": - return self.rest_client.DELETE(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) + return self.rest_client.DELETE(url, headers=headers, stream=stream, timeout=timeout, body=body) else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) + raise ApiValueError("http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`.") - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): + def update_params_for_auth(self, headers, auth_settings, resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -1241,21 +1188,19 @@ def update_params_for_auth(self, headers, auth_settings, auth_setting = self.configuration.auth_settings().get(auth) if not auth_setting: continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query + if auth_setting["in"] == "cookie": + headers.add("Cookie", auth_setting["value"]) + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers.add(auth_setting["key"], auth_setting["value"]) + elif auth_setting["in"] == "query": + """TODO implement auth in query need to pass in prefix_separator_iterator and need to output resource_path with query params added """ raise ApiValueError("Auth in query not yet implemented") else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") class Api: @@ -1271,7 +1216,9 @@ def __init__(self, api_client: typing.Optional[ApiClient] = None): self.api_client = api_client @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): + def _verify_typed_dict_inputs_oapg( + cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any] + ): """ Ensures that: - required keys are present @@ -1290,13 +1237,13 @@ def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict] required_keys_with_unset_values.append(required_key) if missing_required_keys: raise ApiTypeError( - '{} missing {} required arguments: {}'.format( + "{} missing {} required arguments: {}".format( cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) + ) + ) if required_keys_with_unset_values: raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( + "{} contains invalid unset values for {} required keys: {}".format( cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values ) ) @@ -1308,7 +1255,7 @@ def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict] disallowed_additional_keys.append(key) if disallowed_additional_keys: raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( + "{} got {} unexpected keyword arguments: {}".format( cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys ) ) @@ -1317,28 +1264,21 @@ def _get_host_oapg( self, operation_id: str, servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None + host_index: typing.Optional[int] = None, ) -> typing.Optional[str]: configuration = self.api_client.configuration try: if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) + index = configuration.server_operation_index.get(operation_id, configuration.server_index) else: index = host_index server_variables = configuration.server_operation_variables.get( operation_id, configuration.server_variables ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers - ) + host = configuration.get_host_from_settings(index, variables=server_variables, servers=servers) except IndexError: if servers: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(servers) - ) + raise ApiValueError("Invalid host index. Must be 0 <= index < %s" % len(servers)) host = None return host @@ -1353,6 +1293,7 @@ class RequestBody(StyleFormSerializer, JSONDetector): A request body parameter content: content_type to MediaType Schema info """ + __json_encoder = JSONEncoder() def __init__( @@ -1362,44 +1303,39 @@ def __init__( ): self.required = required if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') + raise ValueError("Invalid value for content, the content dict must have >= 1 entry") self.content = content - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: + def __serialize_json(self, in_data: typing.Any) -> typing.Dict[str, bytes]: in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) + json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode("utf-8") return dict(body=json_str) @staticmethod def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') + raise ValueError("Unable to serialize type frozendict.frozendict to text/plain") elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') + raise ValueError("Unable to serialize type tuple to text/plain") elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') + raise ValueError("Unable to serialize type NoneClass to text/plain") elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') + raise ValueError("Unable to serialize type BoolClass to text/plain") return dict(body=str(in_data)) def __multipart_json_item(self, key: str, value: Schema) -> RequestField: json_value = self.__json_encoder.default(value) request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') + request_field.make_multipart(content_type="application/json") return request_field def __multipart_form_item(self, key: str, value: Schema) -> RequestField: if isinstance(value, str): request_field = RequestField(name=key, data=str(value)) - request_field.make_multipart(content_type='text/plain') + request_field.make_multipart(content_type="text/plain") elif isinstance(value, bytes): request_field = RequestField(name=key, data=value) - request_field.make_multipart(content_type='application/octet-stream') + request_field.make_multipart(content_type="application/octet-stream") elif isinstance(value, FileIO): # TODO use content.encoding to limit allowed content types if they are present request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) @@ -1408,11 +1344,9 @@ def __multipart_form_item(self, key: str, value: Schema) -> RequestField: request_field = self.__multipart_json_item(key=key, value=value) return request_field - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: + def __serialize_multipart_form_data(self, in_data: Schema) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') + raise ValueError(f"Unable to serialize {in_data} to multipart/form-data because it is not a dict of data") """ In a multipart/form-data request body, each schema property, or each element of a schema array property, takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy @@ -1452,22 +1386,19 @@ def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing. in_data.close() return result - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: + def __serialize_application_x_www_form_data(self, in_data: typing.Any) -> SerializedRequestBody: """ POST submission of form data in body """ if not isinstance(in_data, frozendict.frozendict): raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') + f"Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data" + ) cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) + value = self._serialize_form(cast_in_data, name="", explode=True, percent_encode=True) return dict(body=value) - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: + def serialize(self, in_data: typing.Any, content_type: str) -> SerializedRequestBody: """ If a str is returned then the result will be assigned to data when making the request If a tuple is returned then the result will be used as fields input in encode_multipart_formdata @@ -1488,12 +1419,12 @@ def serialize( # and content_type is multipart or application/x-www-form-urlencoded if self._content_type_is_json(content_type): return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': + elif content_type == "text/plain": return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': + elif content_type == "multipart/form-data": return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': + elif content_type == "application/x-www-form-urlencoded": return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': + elif content_type == "application/octet-stream": return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file + raise NotImplementedError("Serialization has not yet been implemented for {}".format(content_type)) diff --git a/launch/api_client/apis/__init__.py b/launch/api_client/apis/__init__.py index 7840f772..5ca66b80 100644 --- a/launch/api_client/apis/__init__.py +++ b/launch/api_client/apis/__init__.py @@ -1,3 +1,3 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file +# tags, paths, or path_to_api, or tag_to_api diff --git a/launch/api_client/apis/path_to_api.py b/launch/api_client/apis/path_to_api.py index d76603c4..362a5406 100644 --- a/launch/api_client/apis/path_to_api.py +++ b/launch/api_client/apis/path_to_api.py @@ -23,7 +23,7 @@ from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import V2ModelBundlesModelBundleId PathToApi = typing_extensions.TypedDict( - 'PathToApi', + "PathToApi", { PathValues.HEALTHCHECK: Healthcheck, PathValues.HEALTHZ: Healthz, @@ -45,7 +45,7 @@ PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES: V2ModelBundlesCloneWithChanges, PathValues.V2_MODELBUNDLES_LATEST: V2ModelBundlesLatest, PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID: V2ModelBundlesModelBundleId, - } + }, ) path_to_api = PathToApi( diff --git a/launch/api_client/apis/tag_to_api.py b/launch/api_client/apis/tag_to_api.py index f2a2dfcf..8b3c0d6d 100644 --- a/launch/api_client/apis/tag_to_api.py +++ b/launch/api_client/apis/tag_to_api.py @@ -4,10 +4,10 @@ from launch.api_client.apis.tags.default_api import DefaultApi TagToApi = typing_extensions.TypedDict( - 'TagToApi', + "TagToApi", { TagValues.DEFAULT: DefaultApi, - } + }, ) tag_to_api = TagToApi( diff --git a/launch/api_client/apis/tags/default_api.py b/launch/api_client/apis/tags/default_api.py index e99f8d9e..a913e9a5 100644 --- a/launch/api_client/apis/tags/default_api.py +++ b/launch/api_client/apis/tags/default_api.py @@ -9,24 +9,34 @@ Generated by: https://openapi-generator.tech """ -from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost -from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost +from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ( + CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost, +) +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( + CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, +) from launch.api_client.paths.v1_async_tasks.post import CreateAsyncInferenceTaskV1AsyncTasksPost from launch.api_client.paths.v1_batch_jobs.post import CreateBatchJobV1BatchJobsPost from launch.api_client.paths.v1_model_bundles.post import CreateModelBundleV1ModelBundlesPost from launch.api_client.paths.v2_model_bundles.post import CreateModelBundleV2ModelBundlesPost from launch.api_client.paths.v1_model_endpoints.post import CreateModelEndpointV1ModelEndpointsPost from launch.api_client.paths.v1_sync_tasks.post import CreateSyncInferenceTaskV1SyncTasksPost -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ( + DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete, +) from launch.api_client.paths.v1_async_tasks_task_id.get import GetAsyncInferenceTaskV1AsyncTasksTaskIdGet from launch.api_client.paths.v1_batch_jobs_batch_job_id.get import GetBatchJobV1BatchJobsBatchJobIdGet from launch.api_client.paths.v1_model_bundles_latest.get import GetLatestModelBundleV1ModelBundlesLatestGet from launch.api_client.paths.v2_model_bundles_latest.get import GetLatestModelBundleV2ModelBundlesLatestGet from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import GetModelBundleV1ModelBundlesModelBundleIdGet from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import GetModelBundleV2ModelBundlesModelBundleIdGet -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import GetModelEndpointV1ModelEndpointsModelEndpointIdGet +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ( + GetModelEndpointV1ModelEndpointsModelEndpointIdGet, +) from launch.api_client.paths.v1_model_endpoints_api.get import GetModelEndpointsApiV1ModelEndpointsApiGet -from launch.api_client.paths.v1_model_endpoints_schema_json.get import GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet +from launch.api_client.paths.v1_model_endpoints_schema_json.get import ( + GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet, +) from launch.api_client.paths.healthcheck.get import HealthcheckHealthcheckGet from launch.api_client.paths.healthz.get import HealthcheckHealthzGet from launch.api_client.paths.readyz.get import HealthcheckReadyzGet @@ -34,7 +44,9 @@ from launch.api_client.paths.v2_model_bundles.get import ListModelBundlesV2ModelBundlesGet from launch.api_client.paths.v1_model_endpoints.get import ListModelEndpointsV1ModelEndpointsGet from launch.api_client.paths.v1_batch_jobs_batch_job_id.put import UpdateBatchJobV1BatchJobsBatchJobIdPut -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( + UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut, +) class DefaultApi( @@ -70,4 +82,5 @@ class DefaultApi( Do not edit the class manually. """ + pass diff --git a/launch/api_client/configuration.py b/launch/api_client/configuration.py index 7ea547f8..35554316 100644 --- a/launch/api_client/configuration.py +++ b/launch/api_client/configuration.py @@ -20,78 +20,88 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", + "uniqueItems", + "maxProperties", + "minProperties", } + class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - :Example: - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - -conf = launch.api_client.Configuration( - username='the-user', - password='the-password', -) + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + + :Example: + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + + conf = launch.api_client.Configuration( + username='the-user', + password='the-password', + ) """ @@ -109,8 +119,7 @@ def __init__( server_operation_index=None, server_operation_variables=None, ): - """Constructor - """ + """Constructor""" self._base_path = "http://localhost" if host is None else host """Default Base url """ @@ -139,7 +148,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("launch.api_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -187,7 +196,7 @@ def __init__( self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = None @@ -204,7 +213,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -215,12 +224,11 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) + if name == "disabled_client_side_validations": + s = set(filter(None, value.split(","))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) + raise ApiValueError("Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s @classmethod @@ -361,9 +369,7 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") def auth_settings(self): """Gets Auth Settings dict for api client. @@ -372,11 +378,11 @@ def auth_settings(self): """ auth = {} if self.username is not None and self.password is not None: - auth['HTTPBasic'] = { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() + auth["HTTPBasic"] = { + "type": "basic", + "in": "header", + "key": "Authorization", + "value": self.get_basic_auth_token(), } return auth @@ -385,12 +391,13 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.1.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 1.0.0\n" + "SDK Package Version: 1.1.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self): """Gets an array of host settings @@ -399,8 +406,8 @@ def get_host_settings(self): """ return [ { - 'url': "", - 'description': "No description provided", + "url": "", + "description": "No description provided", } ] @@ -422,22 +429,20 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + "{1}. Must be {2}.".format(variable_name, variables[variable_name], variable["enum_values"]) + ) url = url.replace("{" + variable_name + "}", used_value) diff --git a/launch/api_client/exceptions.py b/launch/api_client/exceptions.py index 46687131..f461e207 100644 --- a/launch/api_client/exceptions.py +++ b/launch/api_client/exceptions.py @@ -19,9 +19,8 @@ class OpenApiException(Exception): class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -124,11 +123,9 @@ def headers(self) -> typing.Optional[HTTPHeaderDict]: def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) diff --git a/launch/api_client/model/batch_job_serialization_format.py b/launch/api_client/model/batch_job_serialization_format.py index 5586e157..64095984 100644 --- a/launch/api_client/model/batch_job_serialization_format.py +++ b/launch/api_client/model/batch_job_serialization_format.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class BatchJobSerializationFormat( - schemas.EnumBase, - schemas.StrSchema -): +class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,17 +32,16 @@ class BatchJobSerializationFormat( An enumeration. """ - class MetaOapg: enum_value_to_name = { "JSON": "JSON", "PICKLE": "PICKLE", } - + @schemas.classproperty def JSON(cls): return cls("JSON") - + @schemas.classproperty def PICKLE(cls): return cls("PICKLE") diff --git a/launch/api_client/model/batch_job_serialization_format.pyi b/launch/api_client/model/batch_job_serialization_format.pyi index e19c5161..306f694f 100644 --- a/launch/api_client/model/batch_job_serialization_format.pyi +++ b/launch/api_client/model/batch_job_serialization_format.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class BatchJobSerializationFormat( - schemas.EnumBase, - schemas.StrSchema -): +class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,11 +30,10 @@ class BatchJobSerializationFormat( An enumeration. """ - + @schemas.classproperty def JSON(cls): return cls("JSON") - @schemas.classproperty def PICKLE(cls): return cls("PICKLE") diff --git a/launch/api_client/model/batch_job_status.py b/launch/api_client/model/batch_job_status.py index 530ad403..b6c5f1c1 100644 --- a/launch/api_client/model/batch_job_status.py +++ b/launch/api_client/model/batch_job_status.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class BatchJobStatus( - schemas.EnumBase, - schemas.StrSchema -): +class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +32,6 @@ class BatchJobStatus( An enumeration. """ - class MetaOapg: enum_value_to_name = { "PENDING": "PENDING", @@ -45,27 +41,27 @@ class MetaOapg: "CANCELLED": "CANCELLED", "UNDEFINED": "UNDEFINED", } - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - + @schemas.classproperty def RUNNING(cls): return cls("RUNNING") - + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - + @schemas.classproperty def CANCELLED(cls): return cls("CANCELLED") - + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/batch_job_status.pyi b/launch/api_client/model/batch_job_status.pyi index 0d337988..92e00149 100644 --- a/launch/api_client/model/batch_job_status.pyi +++ b/launch/api_client/model/batch_job_status.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class BatchJobStatus( - schemas.EnumBase, - schemas.StrSchema -): +class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,27 +30,22 @@ class BatchJobStatus( An enumeration. """ - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - @schemas.classproperty def RUNNING(cls): return cls("RUNNING") - @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - @schemas.classproperty def CANCELLED(cls): return cls("CANCELLED") - @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/callback_auth.py b/launch/api_client/model/callback_auth.py index a3af0a7c..9c0a040b 100644 --- a/launch/api_client/model/callback_auth.py +++ b/launch/api_client/model/callback_auth.py @@ -32,20 +32,18 @@ class CallbackAuth( Do not edit the class manually. """ - class MetaOapg: - @staticmethod def discriminator(): return { - 'kind': { - 'CallbackBasicAuth': CallbackBasicAuth, - 'CallbackmTLSAuth': CallbackmTLSAuth, - 'basic': CallbackBasicAuth, - 'mtls': CallbackmTLSAuth, + "kind": { + "CallbackBasicAuth": CallbackBasicAuth, + "CallbackmTLSAuth": CallbackmTLSAuth, + "basic": CallbackBasicAuth, + "mtls": CallbackmTLSAuth, } } - + @classmethod @functools.lru_cache() def one_of(cls): @@ -61,13 +59,44 @@ def one_of(cls): CallbackmTLSAuth, ] - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackAuth": return super().__new__( cls, *_args, @@ -75,5 +104,6 @@ def __new__( **kwargs, ) + from launch.api_client.model.callback_basic_auth import CallbackBasicAuth from launch.api_client.model.callbackm_tls_auth import CallbackmTLSAuth diff --git a/launch/api_client/model/callback_auth.pyi b/launch/api_client/model/callback_auth.pyi index 584516de..78418a72 100644 --- a/launch/api_client/model/callback_auth.pyi +++ b/launch/api_client/model/callback_auth.pyi @@ -22,7 +22,6 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - class CallbackAuth( schemas.ComposedSchema, ): @@ -32,20 +31,17 @@ class CallbackAuth( Do not edit the class manually. """ - class MetaOapg: - @staticmethod def discriminator(): return { - 'kind': { - 'CallbackBasicAuth': CallbackBasicAuth, - 'CallbackmTLSAuth': CallbackmTLSAuth, - 'basic': CallbackBasicAuth, - 'mtls': CallbackmTLSAuth, + "kind": { + "CallbackBasicAuth": CallbackBasicAuth, + "CallbackmTLSAuth": CallbackmTLSAuth, + "basic": CallbackBasicAuth, + "mtls": CallbackmTLSAuth, } } - @classmethod @functools.lru_cache() def one_of(cls): @@ -60,14 +56,44 @@ class CallbackAuth( CallbackBasicAuth, CallbackmTLSAuth, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackAuth": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callback_basic_auth.py b/launch/api_client/model/callback_basic_auth.py index 1b26f739..41648753 100644 --- a/launch/api_client/model/callback_basic_auth.py +++ b/launch/api_client/model/callback_basic_auth.py @@ -23,40 +23,31 @@ from launch.api_client import schemas # noqa: F401 -class CallbackBasicAuth( - schemas.DictSchema -): +class CallbackBasicAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "password", "kind", "username", } - + class properties: - - - class kind( - schemas.EnumBase, - schemas.StrSchema - ): - - + class kind(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "basic": "BASIC", } - + @schemas.classproperty def BASIC(cls): return cls("basic") + password = schemas.StrSchema username = schemas.StrSchema __annotations__ = { @@ -64,53 +55,106 @@ def BASIC(cls): "password": password, "username": username, } - + password: MetaOapg.properties.password kind: MetaOapg.properties.kind username: MetaOapg.properties.username - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - + def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - + def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - + def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "kind", + "password", + "username", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - + def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - + def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - + def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "kind", + "password", + "username", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, ], - kind: typing.Union[MetaOapg.properties.kind, str, ], - username: typing.Union[MetaOapg.properties.username, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + password: typing.Union[ + MetaOapg.properties.password, + str, + ], + kind: typing.Union[ + MetaOapg.properties.kind, + str, + ], + username: typing.Union[ + MetaOapg.properties.username, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackBasicAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackBasicAuth": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callback_basic_auth.pyi b/launch/api_client/model/callback_basic_auth.pyi index 50b20d27..3420fd8f 100644 --- a/launch/api_client/model/callback_basic_auth.pyi +++ b/launch/api_client/model/callback_basic_auth.pyi @@ -22,32 +22,22 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CallbackBasicAuth( - schemas.DictSchema -): +class CallbackBasicAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "password", "kind", "username", } - + class properties: - - - class kind( - schemas.EnumBase, - schemas.StrSchema - ): - + class kind(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def BASIC(cls): return cls("basic") @@ -58,53 +48,87 @@ class CallbackBasicAuth( "password": password, "username": username, } - password: MetaOapg.properties.password kind: MetaOapg.properties.kind username: MetaOapg.properties.username - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "kind", + "password", + "username", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["kind", "password", "username", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "kind", + "password", + "username", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - password: typing.Union[MetaOapg.properties.password, str, ], - kind: typing.Union[MetaOapg.properties.kind, str, ], - username: typing.Union[MetaOapg.properties.username, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + password: typing.Union[ + MetaOapg.properties.password, + str, + ], + kind: typing.Union[ + MetaOapg.properties.kind, + str, + ], + username: typing.Union[ + MetaOapg.properties.username, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackBasicAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackBasicAuth": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callbackm_tls_auth.py b/launch/api_client/model/callbackm_tls_auth.py index 1ed275f9..fcef6e85 100644 --- a/launch/api_client/model/callbackm_tls_auth.py +++ b/launch/api_client/model/callbackm_tls_auth.py @@ -23,94 +23,139 @@ from launch.api_client import schemas # noqa: F401 -class CallbackmTLSAuth( - schemas.DictSchema -): +class CallbackmTLSAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "kind", "cert", "key", } - + class properties: cert = schemas.StrSchema key = schemas.StrSchema - - - class kind( - schemas.EnumBase, - schemas.StrSchema - ): - - + + class kind(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "mtls": "MTLS", } - + @schemas.classproperty def MTLS(cls): return cls("mtls") + __annotations__ = { "cert": cert, "key": key, "kind": kind, } - + kind: MetaOapg.properties.kind cert: MetaOapg.properties.cert key: MetaOapg.properties.key - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... - + def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - + def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cert", + "key", + "kind", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... - + def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - + def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cert", + "key", + "kind", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - kind: typing.Union[MetaOapg.properties.kind, str, ], - cert: typing.Union[MetaOapg.properties.cert, str, ], - key: typing.Union[MetaOapg.properties.key, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + kind: typing.Union[ + MetaOapg.properties.kind, + str, + ], + cert: typing.Union[ + MetaOapg.properties.cert, + str, + ], + key: typing.Union[ + MetaOapg.properties.key, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackmTLSAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackmTLSAuth": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/callbackm_tls_auth.pyi b/launch/api_client/model/callbackm_tls_auth.pyi index 8aeeb00a..c665b838 100644 --- a/launch/api_client/model/callbackm_tls_auth.pyi +++ b/launch/api_client/model/callbackm_tls_auth.pyi @@ -22,34 +22,25 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CallbackmTLSAuth( - schemas.DictSchema -): +class CallbackmTLSAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "kind", "cert", "key", } - + class properties: cert = schemas.StrSchema key = schemas.StrSchema - - - class kind( - schemas.EnumBase, - schemas.StrSchema - ): - + + class kind(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def MTLS(cls): return cls("mtls") @@ -58,53 +49,87 @@ class CallbackmTLSAuth( "key": key, "kind": kind, } - kind: MetaOapg.properties.kind cert: MetaOapg.properties.cert key: MetaOapg.properties.key - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cert", + "key", + "kind", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cert"]) -> MetaOapg.properties.cert: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["kind"]) -> MetaOapg.properties.kind: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cert", "key", "kind", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cert", + "key", + "kind", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - kind: typing.Union[MetaOapg.properties.kind, str, ], - cert: typing.Union[MetaOapg.properties.cert, str, ], - key: typing.Union[MetaOapg.properties.key, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + kind: typing.Union[ + MetaOapg.properties.kind, + str, + ], + cert: typing.Union[ + MetaOapg.properties.cert, + str, + ], + key: typing.Union[ + MetaOapg.properties.key, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CallbackmTLSAuth': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CallbackmTLSAuth": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v1_request.py b/launch/api_client/model/clone_model_bundle_v1_request.py index 52b9f905..2af569ad 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.py +++ b/launch/api_client/model/clone_model_bundle_v1_request.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CloneModelBundleV1Request( - schemas.DictSchema -): +class CloneModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,12 +32,11 @@ class CloneModelBundleV1Request( Request object for cloning a Model Bundle from another one. """ - class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -47,44 +44,95 @@ class properties: "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["new_app_config"] + ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], - new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + original_model_bundle_id: typing.Union[ + MetaOapg.properties.original_model_bundle_id, + str, + ], + new_app_config: typing.Union[ + MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloneModelBundleV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloneModelBundleV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v1_request.pyi b/launch/api_client/model/clone_model_bundle_v1_request.pyi index 6d01d861..d8afa0ae 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v1_request.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CloneModelBundleV1Request( - schemas.DictSchema -): +class CloneModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,12 +31,11 @@ class CloneModelBundleV1Request( Request object for cloning a Model Bundle from another one. """ - class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -47,44 +43,80 @@ class CloneModelBundleV1Request( "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["new_app_config"] + ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], - new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + original_model_bundle_id: typing.Union[ + MetaOapg.properties.original_model_bundle_id, + str, + ], + new_app_config: typing.Union[ + MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloneModelBundleV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloneModelBundleV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v2_request.py b/launch/api_client/model/clone_model_bundle_v2_request.py index f8741e69..1d05cb35 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.py +++ b/launch/api_client/model/clone_model_bundle_v2_request.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CloneModelBundleV2Request( - schemas.DictSchema -): +class CloneModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,12 +32,11 @@ class CloneModelBundleV2Request( Request object for cloning a Model Bundle from another one. """ - class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -47,44 +44,95 @@ class properties: "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - + original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["new_app_config"] + ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], - new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + original_model_bundle_id: typing.Union[ + MetaOapg.properties.original_model_bundle_id, + str, + ], + new_app_config: typing.Union[ + MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloneModelBundleV2Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloneModelBundleV2Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/clone_model_bundle_v2_request.pyi b/launch/api_client/model/clone_model_bundle_v2_request.pyi index 98cacc1e..6dfa17d0 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v2_request.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CloneModelBundleV2Request( - schemas.DictSchema -): +class CloneModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,12 +31,11 @@ class CloneModelBundleV2Request( Request object for cloning a Model Bundle from another one. """ - class MetaOapg: required = { "original_model_bundle_id", } - + class properties: original_model_bundle_id = schemas.StrSchema new_app_config = schemas.DictSchema @@ -47,44 +43,80 @@ class CloneModelBundleV2Request( "original_model_bundle_id": original_model_bundle_id, "new_app_config": new_app_config, } - original_model_bundle_id: MetaOapg.properties.original_model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["new_app_config"]) -> MetaOapg.properties.new_app_config: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["original_model_bundle_id"]) -> MetaOapg.properties.original_model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["original_model_bundle_id"] + ) -> MetaOapg.properties.original_model_bundle_id: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["new_app_config"]) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["new_app_config"] + ) -> typing.Union[MetaOapg.properties.new_app_config, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["original_model_bundle_id", "new_app_config", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "original_model_bundle_id", + "new_app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - original_model_bundle_id: typing.Union[MetaOapg.properties.original_model_bundle_id, str, ], - new_app_config: typing.Union[MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + original_model_bundle_id: typing.Union[ + MetaOapg.properties.original_model_bundle_id, + str, + ], + new_app_config: typing.Union[ + MetaOapg.properties.new_app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloneModelBundleV2Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloneModelBundleV2Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.py b/launch/api_client/model/cloudpickle_artifact_flavor.py index fe81c51c..4560ce08 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.py +++ b/launch/api_client/model/cloudpickle_artifact_flavor.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CloudpickleArtifactFlavor( - schemas.DictSchema -): +class CloudpickleArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class CloudpickleArtifactFlavor( This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. """ - class MetaOapg: required = { "flavor", @@ -44,33 +41,22 @@ class MetaOapg: "location", "load_predict_fn", } - + class properties: - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - - + class flavor(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "cloudpickle_artifact": "CLOUDPICKLE_ARTIFACT", } - + @schemas.classproperty def CLOUDPICKLE_ARTIFACT(cls): return cls("cloudpickle_artifact") - - + class framework( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -86,46 +72,87 @@ def one_of(cls): TensorflowFramework, CustomFramework, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'framework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + load_model_fn = schemas.StrSchema load_predict_fn = schemas.StrSchema location = schemas.StrSchema - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + app_config = schemas.DictSchema __annotations__ = { "flavor": flavor, @@ -136,84 +163,182 @@ def __getitem__(self, i: int) -> MetaOapg.items: "requirements": requirements, "app_config": app_config, } - + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn: MetaOapg.properties.load_model_fn location: MetaOapg.properties.location load_predict_fn: MetaOapg.properties.load_predict_fn - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... - + def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... - + def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... - + def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - load_model_fn: typing.Union[MetaOapg.properties.load_model_fn, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - load_predict_fn: typing.Union[MetaOapg.properties.load_predict_fn, str, ], - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn: typing.Union[ + MetaOapg.properties.load_model_fn, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn: typing.Union[ + MetaOapg.properties.load_predict_fn, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloudpickleArtifactFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloudpickleArtifactFlavor": return super().__new__( cls, *_args, @@ -228,6 +353,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.custom_framework import CustomFramework from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.pyi b/launch/api_client/model/cloudpickle_artifact_flavor.pyi index af55bff9..755b3e49 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.pyi +++ b/launch/api_client/model/cloudpickle_artifact_flavor.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CloudpickleArtifactFlavor( - schemas.DictSchema -): +class CloudpickleArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class CloudpickleArtifactFlavor( This is the entity-layer class for the Model Bundle flavor of a cloudpickle artifact. """ - class MetaOapg: required = { "flavor", @@ -44,27 +40,17 @@ class CloudpickleArtifactFlavor( "location", "load_predict_fn", } - + class properties: - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - + class flavor(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def CLOUDPICKLE_ARTIFACT(cls): return cls("cloudpickle_artifact") - - + class framework( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -80,14 +66,44 @@ class CloudpickleArtifactFlavor( TensorflowFramework, CustomFramework, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'framework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": return super().__new__( cls, *_args, @@ -97,27 +113,33 @@ class CloudpickleArtifactFlavor( load_model_fn = schemas.StrSchema load_predict_fn = schemas.StrSchema location = schemas.StrSchema - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -130,84 +152,151 @@ class CloudpickleArtifactFlavor( "requirements": requirements, "app_config": app_config, } - flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn: MetaOapg.properties.load_model_fn location: MetaOapg.properties.location load_predict_fn: MetaOapg.properties.load_predict_fn - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... - + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn"] + ) -> MetaOapg.properties.load_predict_fn: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn"]) -> MetaOapg.properties.load_model_fn: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn"]) -> MetaOapg.properties.load_predict_fn: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn"] + ) -> MetaOapg.properties.load_predict_fn: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn", "load_predict_fn", "location", "requirements", "app_config", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn", + "load_predict_fn", + "location", + "requirements", + "app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - load_model_fn: typing.Union[MetaOapg.properties.load_model_fn, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - load_predict_fn: typing.Union[MetaOapg.properties.load_predict_fn, str, ], - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn: typing.Union[ + MetaOapg.properties.load_model_fn, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn: typing.Union[ + MetaOapg.properties.load_predict_fn, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CloudpickleArtifactFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CloudpickleArtifactFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_async_task_v1_response.py b/launch/api_client/model/create_async_task_v1_response.py index 5805b46f..7296ebf9 100644 --- a/launch/api_client/model/create_async_task_v1_response.py +++ b/launch/api_client/model/create_async_task_v1_response.py @@ -23,57 +23,93 @@ from launch.api_client import schemas # noqa: F401 -class CreateAsyncTaskV1Response( - schemas.DictSchema -): +class CreateAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "task_id", } - + class properties: task_id = schemas.StrSchema __annotations__ = { "task_id": task_id, } - + task_id: MetaOapg.properties.task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - + def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - task_id: typing.Union[MetaOapg.properties.task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + task_id: typing.Union[ + MetaOapg.properties.task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateAsyncTaskV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateAsyncTaskV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_async_task_v1_response.pyi b/launch/api_client/model/create_async_task_v1_response.pyi index 3e9fcb1b..5d962032 100644 --- a/launch/api_client/model/create_async_task_v1_response.pyi +++ b/launch/api_client/model/create_async_task_v1_response.pyi @@ -22,58 +22,82 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateAsyncTaskV1Response( - schemas.DictSchema -): +class CreateAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "task_id", } - + class properties: task_id = schemas.StrSchema __annotations__ = { "task_id": task_id, } - task_id: MetaOapg.properties.task_id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["task_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - task_id: typing.Union[MetaOapg.properties.task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + task_id: typing.Union[ + MetaOapg.properties.task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateAsyncTaskV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateAsyncTaskV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_resource_requests.py b/launch/api_client/model/create_batch_job_resource_requests.py index c1f62452..f37f8a06 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.py +++ b/launch/api_client/model/create_batch_job_resource_requests.py @@ -23,31 +23,23 @@ from launch.api_client import schemas # noqa: F401 -class CreateBatchJobResourceRequests( - schemas.DictSchema -): +class CreateBatchJobResourceRequests(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -63,38 +55,67 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType + gpus = schemas.IntSchema max_workers = schemas.IntSchema - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -110,33 +131,62 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + per_worker = schemas.IntSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -152,20 +202,52 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + __annotations__ = { "cpus": cpus, "gpu_type": gpu_type, @@ -175,77 +257,206 @@ def __new__( "per_worker": per_worker, "storage": storage, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpu_type", + "gpus", + "max_workers", + "memory", + "per_worker", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cpus"] + ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["gpus"] + ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["max_workers"] + ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["memory"] + ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["per_worker"] + ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpu_type", + "gpus", + "max_workers", + "memory", + "per_worker", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobResourceRequests': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobResourceRequests": return super().__new__( cls, *_args, @@ -260,4 +471,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/create_batch_job_resource_requests.pyi b/launch/api_client/model/create_batch_job_resource_requests.pyi index 38ca0898..fcbe8e04 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.pyi +++ b/launch/api_client/model/create_batch_job_resource_requests.pyi @@ -22,32 +22,23 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateBatchJobResourceRequests( - schemas.DictSchema -): +class CreateBatchJobResourceRequests(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -63,38 +54,64 @@ class CreateBatchJobResourceRequests( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType gpus = schemas.IntSchema max_workers = schemas.IntSchema - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -110,14 +127,44 @@ class CreateBatchJobResourceRequests( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, @@ -125,18 +172,15 @@ class CreateBatchJobResourceRequests( **kwargs, ) per_worker = schemas.IntSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -152,14 +196,44 @@ class CreateBatchJobResourceRequests( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, @@ -175,77 +249,171 @@ class CreateBatchJobResourceRequests( "per_worker": per_worker, "storage": storage, } - @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpu_type", + "gpus", + "max_workers", + "memory", + "per_worker", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cpus"] + ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["gpus"] + ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["max_workers"] + ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["memory"] + ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["per_worker"] + ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpu_type", "gpus", "max_workers", "memory", "per_worker", "storage", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpu_type", + "gpus", + "max_workers", + "memory", + "per_worker", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobResourceRequests': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobResourceRequests": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_v1_request.py b/launch/api_client/model/create_batch_job_v1_request.py index 03f4e079..665a8ace 100644 --- a/launch/api_client/model/create_batch_job_v1_request.py +++ b/launch/api_client/model/create_batch_job_v1_request.py @@ -23,16 +23,13 @@ from launch.api_client import schemas # noqa: F401 -class CreateBatchJobV1Request( - schemas.DictSchema -): +class CreateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "model_bundle_id", @@ -41,47 +38,60 @@ class MetaOapg: "input_path", "labels", } - + class properties: input_path = schemas.StrSchema - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + model_bundle_id = schemas.StrSchema - + @staticmethod - def resource_requests() -> typing.Type['CreateBatchJobResourceRequests']: + def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: return CreateBatchJobResourceRequests - + @staticmethod - def serialization_format() -> typing.Type['BatchJobSerializationFormat']: + def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: return BatchJobSerializationFormat + __annotations__ = { "input_path": input_path, "labels": labels, @@ -89,69 +99,131 @@ def serialization_format() -> typing.Type['BatchJobSerializationFormat']: "resource_requests": resource_requests, "serialization_format": serialization_format, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: 'CreateBatchJobResourceRequests' - serialization_format: 'BatchJobSerializationFormat' + resource_requests: "CreateBatchJobResourceRequests" + serialization_format: "BatchJobSerializationFormat" input_path: MetaOapg.properties.input_path labels: MetaOapg.properties.labels - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - + def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... - + def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... - + def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "input_path", + "labels", + "model_bundle_id", + "resource_requests", + "serialization_format", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - + def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... - + def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... - + def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "input_path", + "labels", + "model_bundle_id", + "resource_requests", + "serialization_format", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], - resource_requests: 'CreateBatchJobResourceRequests', - serialization_format: 'BatchJobSerializationFormat', - input_path: typing.Union[MetaOapg.properties.input_path, str, ], - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], + resource_requests: "CreateBatchJobResourceRequests", + serialization_format: "BatchJobSerializationFormat", + input_path: typing.Union[ + MetaOapg.properties.input_path, + str, + ], + labels: typing.Union[ + MetaOapg.properties.labels, + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobV1Request": return super().__new__( cls, *_args, @@ -164,5 +236,6 @@ def __new__( **kwargs, ) + from launch.api_client.model.batch_job_serialization_format import BatchJobSerializationFormat from launch.api_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests diff --git a/launch/api_client/model/create_batch_job_v1_request.pyi b/launch/api_client/model/create_batch_job_v1_request.pyi index 34b6fb0c..ef6b3534 100644 --- a/launch/api_client/model/create_batch_job_v1_request.pyi +++ b/launch/api_client/model/create_batch_job_v1_request.pyi @@ -22,17 +22,13 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateBatchJobV1Request( - schemas.DictSchema -): +class CreateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "model_bundle_id", @@ -41,32 +37,40 @@ class CreateBatchJobV1Request( "input_path", "labels", } - + class properties: input_path = schemas.StrSchema - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, @@ -74,13 +78,12 @@ class CreateBatchJobV1Request( **kwargs, ) model_bundle_id = schemas.StrSchema - + @staticmethod - def resource_requests() -> typing.Type['CreateBatchJobResourceRequests']: + def resource_requests() -> typing.Type["CreateBatchJobResourceRequests"]: return CreateBatchJobResourceRequests - @staticmethod - def serialization_format() -> typing.Type['BatchJobSerializationFormat']: + def serialization_format() -> typing.Type["BatchJobSerializationFormat"]: return BatchJobSerializationFormat __annotations__ = { "input_path": input_path, @@ -89,69 +92,112 @@ class CreateBatchJobV1Request( "resource_requests": resource_requests, "serialization_format": serialization_format, } - model_bundle_id: MetaOapg.properties.model_bundle_id - resource_requests: 'CreateBatchJobResourceRequests' - serialization_format: 'BatchJobSerializationFormat' + resource_requests: "CreateBatchJobResourceRequests" + serialization_format: "BatchJobSerializationFormat" input_path: MetaOapg.properties.input_path labels: MetaOapg.properties.labels - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... - + def __getitem__(self, name: typing_extensions.Literal["resource_requests"]) -> "CreateBatchJobResourceRequests": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... - + def __getitem__(self, name: typing_extensions.Literal["serialization_format"]) -> "BatchJobSerializationFormat": ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "input_path", + "labels", + "model_bundle_id", + "resource_requests", + "serialization_format", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["input_path"]) -> MetaOapg.properties.input_path: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_requests"]) -> 'CreateBatchJobResourceRequests': ... - + def get_item_oapg( + self, name: typing_extensions.Literal["resource_requests"] + ) -> "CreateBatchJobResourceRequests": ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["serialization_format"]) -> 'BatchJobSerializationFormat': ... - + def get_item_oapg( + self, name: typing_extensions.Literal["serialization_format"] + ) -> "BatchJobSerializationFormat": ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["input_path", "labels", "model_bundle_id", "resource_requests", "serialization_format", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "input_path", + "labels", + "model_bundle_id", + "resource_requests", + "serialization_format", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], - resource_requests: 'CreateBatchJobResourceRequests', - serialization_format: 'BatchJobSerializationFormat', - input_path: typing.Union[MetaOapg.properties.input_path, str, ], - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], + resource_requests: "CreateBatchJobResourceRequests", + serialization_format: "BatchJobSerializationFormat", + input_path: typing.Union[ + MetaOapg.properties.input_path, + str, + ], + labels: typing.Union[ + MetaOapg.properties.labels, + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_v1_response.py b/launch/api_client/model/create_batch_job_v1_response.py index 48561f4d..c7f7a2c3 100644 --- a/launch/api_client/model/create_batch_job_v1_response.py +++ b/launch/api_client/model/create_batch_job_v1_response.py @@ -23,57 +23,93 @@ from launch.api_client import schemas # noqa: F401 -class CreateBatchJobV1Response( - schemas.DictSchema -): +class CreateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "job_id", } - + class properties: job_id = schemas.StrSchema __annotations__ = { "job_id": job_id, } - + job_id: MetaOapg.properties.job_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - + def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "job_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "job_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - job_id: typing.Union[MetaOapg.properties.job_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + job_id: typing.Union[ + MetaOapg.properties.job_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_batch_job_v1_response.pyi b/launch/api_client/model/create_batch_job_v1_response.pyi index 01425585..3069477a 100644 --- a/launch/api_client/model/create_batch_job_v1_response.pyi +++ b/launch/api_client/model/create_batch_job_v1_response.pyi @@ -22,58 +22,82 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateBatchJobV1Response( - schemas.DictSchema -): +class CreateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "job_id", } - + class properties: job_id = schemas.StrSchema __annotations__ = { "job_id": job_id, } - job_id: MetaOapg.properties.job_id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "job_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["job_id"]) -> MetaOapg.properties.job_id: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["job_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "job_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - job_id: typing.Union[MetaOapg.properties.job_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + job_id: typing.Union[ + MetaOapg.properties.job_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateBatchJobV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v1_request.py b/launch/api_client/model/create_model_bundle_v1_request.py index d797e244..04e452ed 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.py +++ b/launch/api_client/model/create_model_bundle_v1_request.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV1Request( - schemas.DictSchema -): +class CreateModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class CreateModelBundleV1Request( Request object for creating a Model Bundle. """ - class MetaOapg: required = { "requirements", @@ -43,41 +40,50 @@ class MetaOapg: "location", "env_params", } - + class properties: - @staticmethod - def env_params() -> typing.Type['ModelBundleEnvironmentParams']: + def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: return ModelBundleEnvironmentParams + location = schemas.StrSchema name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type['ModelBundlePackagingType']: + def packaging_type() -> typing.Type["ModelBundlePackagingType"]: return ModelBundlePackagingType - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + app_config = schemas.DictSchema metadata = schemas.DictSchema schema_location = schemas.StrSchema @@ -91,90 +97,174 @@ def __getitem__(self, i: int) -> MetaOapg.items: "metadata": metadata, "schema_location": schema_location, } - + requirements: MetaOapg.properties.requirements - packaging_type: 'ModelBundlePackagingType' + packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name location: MetaOapg.properties.location - env_params: 'ModelBundleEnvironmentParams' - + env_params: "ModelBundleEnvironmentParams" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "env_params", + "location", + "name", + "packaging_type", + "requirements", + "app_config", + "metadata", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "env_params", + "location", + "name", + "packaging_type", + "requirements", + "app_config", + "metadata", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - packaging_type: 'ModelBundlePackagingType', - name: typing.Union[MetaOapg.properties.name, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - env_params: 'ModelBundleEnvironmentParams', - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + packaging_type: "ModelBundlePackagingType", + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + env_params: "ModelBundleEnvironmentParams", + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV1Request": return super().__new__( cls, *_args, @@ -190,5 +280,6 @@ def __new__( **kwargs, ) + from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/create_model_bundle_v1_request.pyi b/launch/api_client/model/create_model_bundle_v1_request.pyi index c951cd74..2cc59c5b 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.pyi +++ b/launch/api_client/model/create_model_bundle_v1_request.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelBundleV1Request( - schemas.DictSchema -): +class CreateModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class CreateModelBundleV1Request( Request object for creating a Model Bundle. """ - class MetaOapg: required = { "requirements", @@ -43,39 +39,44 @@ class CreateModelBundleV1Request( "location", "env_params", } - + class properties: - @staticmethod - def env_params() -> typing.Type['ModelBundleEnvironmentParams']: + def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: return ModelBundleEnvironmentParams location = schemas.StrSchema name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type['ModelBundlePackagingType']: + def packaging_type() -> typing.Type["ModelBundlePackagingType"]: return ModelBundlePackagingType - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -91,90 +92,137 @@ class CreateModelBundleV1Request( "metadata": metadata, "schema_location": schema_location, } - requirements: MetaOapg.properties.requirements - packaging_type: 'ModelBundlePackagingType' + packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name location: MetaOapg.properties.location - env_params: 'ModelBundleEnvironmentParams' - + env_params: "ModelBundleEnvironmentParams" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "env_params", + "location", + "name", + "packaging_type", + "requirements", + "app_config", + "metadata", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["env_params", "location", "name", "packaging_type", "requirements", "app_config", "metadata", "schema_location", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "env_params", + "location", + "name", + "packaging_type", + "requirements", + "app_config", + "metadata", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - packaging_type: 'ModelBundlePackagingType', - name: typing.Union[MetaOapg.properties.name, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - env_params: 'ModelBundleEnvironmentParams', - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + packaging_type: "ModelBundlePackagingType", + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + env_params: "ModelBundleEnvironmentParams", + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v1_response.py b/launch/api_client/model/create_model_bundle_v1_response.py index 638bd0cb..ef4907b2 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.py +++ b/launch/api_client/model/create_model_bundle_v1_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV1Response( - schemas.DictSchema -): +class CreateModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,48 +32,86 @@ class CreateModelBundleV1Response( Response object for creating a Model Bundle. """ - class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v1_response.pyi b/launch/api_client/model/create_model_bundle_v1_response.pyi index c7da6274..17d7c269 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.pyi +++ b/launch/api_client/model/create_model_bundle_v1_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelBundleV1Response( - schemas.DictSchema -): +class CreateModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,48 +31,79 @@ class CreateModelBundleV1Response( Response object for creating a Model Bundle. """ - class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v2_request.py b/launch/api_client/model/create_model_bundle_v2_request.py index f74f12cc..ca63ac72 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.py +++ b/launch/api_client/model/create_model_bundle_v2_request.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV2Request( - schemas.DictSchema -): +class CreateModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,24 +32,18 @@ class CreateModelBundleV2Request( Request object for creating a Model Bundle. """ - class MetaOapg: required = { "flavor", "name", "schema_location", } - + class properties: - - class flavor( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -68,20 +60,52 @@ def one_of(cls): RunnableImageFlavor, TritonEnhancedRunnableImageFlavor, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'flavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + name = schemas.StrSchema schema_location = schemas.StrSchema metadata = schemas.DictSchema @@ -91,60 +115,136 @@ def __new__( "schema_location": schema_location, "metadata": metadata, } - + flavor: MetaOapg.properties.flavor name: MetaOapg.properties.name schema_location: MetaOapg.properties.schema_location - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, str, ], - schema_location: typing.Union[MetaOapg.properties.schema_location, str, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + schema_location: typing.Union[ + MetaOapg.properties.schema_location, + str, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV2Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Request": return super().__new__( cls, *_args, @@ -156,6 +256,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_request.pyi b/launch/api_client/model/create_model_bundle_v2_request.pyi index 448d420a..a816c10e 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.pyi +++ b/launch/api_client/model/create_model_bundle_v2_request.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelBundleV2Request( - schemas.DictSchema -): +class CreateModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,24 +31,18 @@ class CreateModelBundleV2Request( Request object for creating a Model Bundle. """ - class MetaOapg: required = { "flavor", "name", "schema_location", } - + class properties: - - class flavor( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -68,14 +59,44 @@ class CreateModelBundleV2Request( RunnableImageFlavor, TritonEnhancedRunnableImageFlavor, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'flavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, *_args, @@ -91,60 +112,117 @@ class CreateModelBundleV2Request( "schema_location": schema_location, "metadata": metadata, } - flavor: MetaOapg.properties.flavor name: MetaOapg.properties.name schema_location: MetaOapg.properties.schema_location - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "name", "schema_location", "metadata", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "name", + "schema_location", + "metadata", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, str, ], - schema_location: typing.Union[MetaOapg.properties.schema_location, str, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + schema_location: typing.Union[ + MetaOapg.properties.schema_location, + str, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV2Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v2_response.py b/launch/api_client/model/create_model_bundle_v2_response.py index 222029f3..925c87a5 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.py +++ b/launch/api_client/model/create_model_bundle_v2_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelBundleV2Response( - schemas.DictSchema -): +class CreateModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,48 +32,86 @@ class CreateModelBundleV2Response( Response object for creating a Model Bundle. """ - class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - + model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_bundle_v2_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi index 4b7375c8..8023555d 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelBundleV2Response( - schemas.DictSchema -): +class CreateModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,48 +31,79 @@ class CreateModelBundleV2Response( Response object for creating a Model Bundle. """ - class MetaOapg: required = { "model_bundle_id", } - + class properties: model_bundle_id = schemas.StrSchema __annotations__ = { "model_bundle_id": model_bundle_id, } - model_bundle_id: MetaOapg.properties.model_bundle_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundle_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundle_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelBundleV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelBundleV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_request.py b/launch/api_client/model/create_model_endpoint_v1_request.py index b3198236..e23b77cc 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.py +++ b/launch/api_client/model/create_model_endpoint_v1_request.py @@ -23,16 +23,13 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelEndpointV1Request( - schemas.DictSchema -): +class CreateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_type", @@ -47,20 +44,16 @@ class MetaOapg: "per_worker", "labels", } - + class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -76,83 +69,112 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def endpoint_type() -> typing.Type['ModelEndpointType']: + def endpoint_type() -> typing.Type["ModelEndpointType"]: return ModelEndpointType - - - class gpus( - schemas.IntSchema - ): - - + + class gpus(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class max_workers( - schemas.IntSchema - ): - - + + class max_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -168,99 +190,125 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + metadata = schemas.DictSchema - - - class min_workers( - schemas.IntSchema - ): - - + + class min_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 + model_bundle_id = schemas.StrSchema - - - class name( - schemas.StrSchema - ): - - + + class name(schemas.StrSchema): class MetaOapg: max_length = 63 + per_worker = schemas.IntSchema billing_tags = schemas.DictSchema - + @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): - - + + class default_callback_url(schemas.StrSchema): class MetaOapg: - format = 'uri' + format = "uri" max_length = 2083 min_length = 1 - + @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType + high_priority = schemas.BoolSchema optimize_costs = schemas.BoolSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + prewarm = schemas.BoolSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -276,20 +324,52 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + __annotations__ = { "cpus": cpus, "endpoint_type": endpoint_type, @@ -312,8 +392,8 @@ def __new__( "prewarm": prewarm, "storage": storage, } - - endpoint_type: 'ModelEndpointType' + + endpoint_type: "ModelEndpointType" metadata: MetaOapg.properties.metadata memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus @@ -324,168 +404,391 @@ def __new__( name: MetaOapg.properties.name per_worker: MetaOapg.properties.per_worker labels: MetaOapg.properties.labels - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - + def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... - + def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - + def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "endpoint_type", + "gpus", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "name", + "per_worker", + "billing_tags", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "high_priority", + "optimize_costs", + "post_inference_hooks", + "prewarm", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["billing_tags"] + ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["high_priority"] + ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["prewarm"] + ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "endpoint_type", + "gpus", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "name", + "per_worker", + "billing_tags", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "high_priority", + "optimize_costs", + "post_inference_hooks", + "prewarm", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_type: 'ModelEndpointType', - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], - name: typing.Union[MetaOapg.properties.name, str, ], - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], - billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_type: "ModelEndpointType", + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + max_workers: typing.Union[ + MetaOapg.properties.max_workers, + decimal.Decimal, + int, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], + min_workers: typing.Union[ + MetaOapg.properties.min_workers, + decimal.Decimal, + int, + ], + gpus: typing.Union[ + MetaOapg.properties.gpus, + decimal.Decimal, + int, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + per_worker: typing.Union[ + MetaOapg.properties.per_worker, + decimal.Decimal, + int, + ], + labels: typing.Union[ + MetaOapg.properties.labels, + dict, + frozendict.frozendict, + ], + billing_tags: typing.Union[ + MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelEndpointV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelEndpointV1Request": return super().__new__( cls, *_args, @@ -513,6 +816,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.gpu_type import GpuType from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/create_model_endpoint_v1_request.pyi b/launch/api_client/model/create_model_endpoint_v1_request.pyi index d1849c99..b912f530 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_request.pyi @@ -22,17 +22,13 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelEndpointV1Request( - schemas.DictSchema -): +class CreateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_type", @@ -47,20 +43,16 @@ class CreateModelEndpointV1Request( "per_worker", "labels", } - + class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -76,77 +68,105 @@ class CreateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - @staticmethod - def endpoint_type() -> typing.Type['ModelEndpointType']: + def endpoint_type() -> typing.Type["ModelEndpointType"]: return ModelEndpointType - - - class gpus( - schemas.IntSchema - ): + + class gpus(schemas.IntSchema): pass - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class max_workers( - schemas.IntSchema - ): + + class max_workers(schemas.IntSchema): pass - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -162,14 +182,44 @@ class CreateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, @@ -177,73 +227,66 @@ class CreateModelEndpointV1Request( **kwargs, ) metadata = schemas.DictSchema - - - class min_workers( - schemas.IntSchema - ): + + class min_workers(schemas.IntSchema): pass model_bundle_id = schemas.StrSchema - - - class name( - schemas.StrSchema - ): + + class name(schemas.StrSchema): pass per_worker = schemas.IntSchema billing_tags = schemas.DictSchema - + @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): + + class default_callback_url(schemas.StrSchema): pass - @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType high_priority = schemas.BoolSchema optimize_costs = schemas.BoolSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) prewarm = schemas.BoolSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -259,14 +302,44 @@ class CreateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, @@ -295,8 +368,7 @@ class CreateModelEndpointV1Request( "prewarm": prewarm, "storage": storage, } - - endpoint_type: 'ModelEndpointType' + endpoint_type: "ModelEndpointType" metadata: MetaOapg.properties.metadata memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus @@ -307,168 +379,309 @@ class CreateModelEndpointV1Request( name: MetaOapg.properties.name per_worker: MetaOapg.properties.per_worker labels: MetaOapg.properties.labels - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "endpoint_type", + "gpus", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "name", + "per_worker", + "billing_tags", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "high_priority", + "optimize_costs", + "post_inference_hooks", + "prewarm", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["billing_tags"] + ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["high_priority"] + ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["prewarm"] + ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "endpoint_type", "gpus", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "name", "per_worker", "billing_tags", "default_callback_auth", "default_callback_url", "gpu_type", "high_priority", "optimize_costs", "post_inference_hooks", "prewarm", "storage", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "endpoint_type", + "gpus", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "name", + "per_worker", + "billing_tags", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "high_priority", + "optimize_costs", + "post_inference_hooks", + "prewarm", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_type: 'ModelEndpointType', - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], - model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, ], - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], - name: typing.Union[MetaOapg.properties.name, str, ], - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], - labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, ], - billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_type: "ModelEndpointType", + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + max_workers: typing.Union[ + MetaOapg.properties.max_workers, + decimal.Decimal, + int, + ], + model_bundle_id: typing.Union[ + MetaOapg.properties.model_bundle_id, + str, + ], + min_workers: typing.Union[ + MetaOapg.properties.min_workers, + decimal.Decimal, + int, + ], + gpus: typing.Union[ + MetaOapg.properties.gpus, + decimal.Decimal, + int, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + per_worker: typing.Union[ + MetaOapg.properties.per_worker, + decimal.Decimal, + int, + ], + labels: typing.Union[ + MetaOapg.properties.labels, + dict, + frozendict.frozendict, + ], + billing_tags: typing.Union[ + MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelEndpointV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelEndpointV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_response.py b/launch/api_client/model/create_model_endpoint_v1_response.py index 6f344894..c0dcf6e3 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.py +++ b/launch/api_client/model/create_model_endpoint_v1_response.py @@ -23,57 +23,97 @@ from launch.api_client import schemas # noqa: F401 -class CreateModelEndpointV1Response( - schemas.DictSchema -): +class CreateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_creation_task_id: typing.Union[ + MetaOapg.properties.endpoint_creation_task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/create_model_endpoint_v1_response.pyi b/launch/api_client/model/create_model_endpoint_v1_response.pyi index 0b696784..7103f2ec 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_response.pyi @@ -22,58 +22,86 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CreateModelEndpointV1Response( - schemas.DictSchema -): +class CreateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_creation_task_id: typing.Union[ + MetaOapg.properties.endpoint_creation_task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CreateModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CreateModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/custom_framework.py b/launch/api_client/model/custom_framework.py index 636fc283..bfa6d6b3 100644 --- a/launch/api_client/model/custom_framework.py +++ b/launch/api_client/model/custom_framework.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class CustomFramework( - schemas.DictSchema -): +class CustomFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,31 +32,24 @@ class CustomFramework( This is the entity-layer class for a custom framework specification. """ - class MetaOapg: required = { "image_repository", "framework_type", "image_tag", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - - + class framework_type(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "custom_base_image": "CUSTOM_BASE_IMAGE", } - + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") + image_repository = schemas.StrSchema image_tag = schemas.StrSchema __annotations__ = { @@ -66,53 +57,108 @@ def CUSTOM_BASE_IMAGE(cls): "image_repository": image_repository, "image_tag": image_tag, } - + image_repository: MetaOapg.properties.image_repository framework_type: MetaOapg.properties.framework_type image_tag: MetaOapg.properties.image_tag - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... - + def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "image_repository", + "image_tag", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - + def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "image_repository", + "image_tag", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - image_repository: typing.Union[MetaOapg.properties.image_repository, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], - image_tag: typing.Union[MetaOapg.properties.image_tag, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + image_repository: typing.Union[ + MetaOapg.properties.image_repository, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], + image_tag: typing.Union[ + MetaOapg.properties.image_tag, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CustomFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CustomFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/custom_framework.pyi b/launch/api_client/model/custom_framework.pyi index 5e553b87..407cb319 100644 --- a/launch/api_client/model/custom_framework.pyi +++ b/launch/api_client/model/custom_framework.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class CustomFramework( - schemas.DictSchema -): +class CustomFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,22 +31,15 @@ class CustomFramework( This is the entity-layer class for a custom framework specification. """ - class MetaOapg: required = { "image_repository", "framework_type", "image_tag", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - + class framework_type(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") @@ -60,53 +50,93 @@ class CustomFramework( "image_repository": image_repository, "image_tag": image_tag, } - image_repository: MetaOapg.properties.image_repository framework_type: MetaOapg.properties.framework_type image_tag: MetaOapg.properties.image_tag - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... - + def __getitem__( + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "image_repository", + "image_tag", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_repository"]) -> MetaOapg.properties.image_repository: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["image_repository"] + ) -> MetaOapg.properties.image_repository: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "image_repository", "image_tag", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "image_repository", + "image_tag", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - image_repository: typing.Union[MetaOapg.properties.image_repository, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], - image_tag: typing.Union[MetaOapg.properties.image_tag, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + image_repository: typing.Union[ + MetaOapg.properties.image_repository, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], + image_tag: typing.Union[ + MetaOapg.properties.image_tag, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CustomFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "CustomFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.py b/launch/api_client/model/delete_model_endpoint_v1_response.py index dea0d23d..abd2d346 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.py +++ b/launch/api_client/model/delete_model_endpoint_v1_response.py @@ -23,57 +23,93 @@ from launch.api_client import schemas # noqa: F401 -class DeleteModelEndpointV1Response( - schemas.DictSchema -): +class DeleteModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "deleted", } - + class properties: deleted = schemas.BoolSchema __annotations__ = { "deleted": deleted, } - + deleted: MetaOapg.properties.deleted - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - + def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "deleted", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - + def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "deleted", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - deleted: typing.Union[MetaOapg.properties.deleted, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + deleted: typing.Union[ + MetaOapg.properties.deleted, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DeleteModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "DeleteModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.pyi b/launch/api_client/model/delete_model_endpoint_v1_response.pyi index f8cc65ff..f6895b96 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/delete_model_endpoint_v1_response.pyi @@ -22,58 +22,82 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class DeleteModelEndpointV1Response( - schemas.DictSchema -): +class DeleteModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "deleted", } - + class properties: deleted = schemas.BoolSchema __annotations__ = { "deleted": deleted, } - deleted: MetaOapg.properties.deleted - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "deleted", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["deleted"]) -> MetaOapg.properties.deleted: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["deleted", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "deleted", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - deleted: typing.Union[MetaOapg.properties.deleted, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + deleted: typing.Union[ + MetaOapg.properties.deleted, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DeleteModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "DeleteModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/endpoint_predict_v1_request.py b/launch/api_client/model/endpoint_predict_v1_request.py index 79f2c87b..28a7b332 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.py +++ b/launch/api_client/model/endpoint_predict_v1_request.py @@ -23,24 +23,21 @@ from launch.api_client import schemas # noqa: F401 -class EndpointPredictV1Request( - schemas.DictSchema -): +class EndpointPredictV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: args = schemas.AnyTypeSchema - + @staticmethod - def callback_auth() -> typing.Type['CallbackAuth']: + def callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth + callback_url = schemas.StrSchema cloudpickle = schemas.StrSchema return_pickled = schemas.BoolSchema @@ -53,70 +50,157 @@ def callback_auth() -> typing.Type['CallbackAuth']: "return_pickled": return_pickled, "url": url, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - + def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: ... - + def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: ... - + def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: ... - + def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - + def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "args", + "callback_auth", + "callback_url", + "cloudpickle", + "return_pickled", + "url", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["args"] + ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback_url"]) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["callback_url"] + ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cloudpickle"]) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cloudpickle"] + ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return_pickled"]) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["return_pickled"] + ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["url"] + ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "args", + "callback_auth", + "callback_url", + "cloudpickle", + "return_pickled", + "url", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - args: typing.Union[MetaOapg.properties.args, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + args: typing.Union[ + MetaOapg.properties.args, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EndpointPredictV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "EndpointPredictV1Request": return super().__new__( cls, *_args, @@ -130,4 +214,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.callback_auth import CallbackAuth diff --git a/launch/api_client/model/endpoint_predict_v1_request.pyi b/launch/api_client/model/endpoint_predict_v1_request.pyi index 018c61dc..defbd0d4 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.pyi +++ b/launch/api_client/model/endpoint_predict_v1_request.pyi @@ -22,24 +22,19 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class EndpointPredictV1Request( - schemas.DictSchema -): +class EndpointPredictV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: args = schemas.AnyTypeSchema - + @staticmethod - def callback_auth() -> typing.Type['CallbackAuth']: + def callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth callback_url = schemas.StrSchema cloudpickle = schemas.StrSchema @@ -53,70 +48,126 @@ class EndpointPredictV1Request( "return_pickled": return_pickled, "url": url, } - @typing.overload def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["callback_auth"]) -> "CallbackAuth": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["callback_url"]) -> MetaOapg.properties.callback_url: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["cloudpickle"]) -> MetaOapg.properties.cloudpickle: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["return_pickled"]) -> MetaOapg.properties.return_pickled: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["url"]) -> MetaOapg.properties.url: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "args", + "callback_auth", + "callback_url", + "cloudpickle", + "return_pickled", + "url", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["args"] + ) -> typing.Union[MetaOapg.properties.args, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback_url"]) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["callback_url"] + ) -> typing.Union[MetaOapg.properties.callback_url, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cloudpickle"]) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cloudpickle"] + ) -> typing.Union[MetaOapg.properties.cloudpickle, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return_pickled"]) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["return_pickled"] + ) -> typing.Union[MetaOapg.properties.return_pickled, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["url"]) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["url"] + ) -> typing.Union[MetaOapg.properties.url, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["args", "callback_auth", "callback_url", "cloudpickle", "return_pickled", "url", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "args", + "callback_auth", + "callback_url", + "cloudpickle", + "return_pickled", + "url", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - args: typing.Union[MetaOapg.properties.args, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + args: typing.Union[ + MetaOapg.properties.args, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, callback_url: typing.Union[MetaOapg.properties.callback_url, str, schemas.Unset] = schemas.unset, cloudpickle: typing.Union[MetaOapg.properties.cloudpickle, str, schemas.Unset] = schemas.unset, return_pickled: typing.Union[MetaOapg.properties.return_pickled, bool, schemas.Unset] = schemas.unset, url: typing.Union[MetaOapg.properties.url, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EndpointPredictV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "EndpointPredictV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_async_task_v1_response.py b/launch/api_client/model/get_async_task_v1_response.py index 101107ad..f3340657 100644 --- a/launch/api_client/model/get_async_task_v1_response.py +++ b/launch/api_client/model/get_async_task_v1_response.py @@ -23,27 +23,24 @@ from launch.api_client import schemas # noqa: F401 -class GetAsyncTaskV1Response( - schemas.DictSchema -): +class GetAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "task_id", "status", } - + class properties: - @staticmethod - def status() -> typing.Type['TaskStatus']: + def status() -> typing.Type["TaskStatus"]: return TaskStatus + task_id = schemas.StrSchema result = schemas.AnyTypeSchema traceback = schemas.StrSchema @@ -53,59 +50,133 @@ def status() -> typing.Type['TaskStatus']: "result": result, "traceback": traceback, } - + task_id: MetaOapg.properties.task_id - status: 'TaskStatus' - + status: "TaskStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - + def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... - + def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "task_id", + "result", + "traceback", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["traceback"] + ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "task_id", + "result", + "traceback", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - task_id: typing.Union[MetaOapg.properties.task_id, str, ], - status: 'TaskStatus', - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + task_id: typing.Union[ + MetaOapg.properties.task_id, + str, + ], + status: "TaskStatus", + result: typing.Union[ + MetaOapg.properties.result, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetAsyncTaskV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetAsyncTaskV1Response": return super().__new__( cls, *_args, @@ -117,4 +188,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/get_async_task_v1_response.pyi b/launch/api_client/model/get_async_task_v1_response.pyi index d560363f..b7c6e8c4 100644 --- a/launch/api_client/model/get_async_task_v1_response.pyi +++ b/launch/api_client/model/get_async_task_v1_response.pyi @@ -22,27 +22,22 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class GetAsyncTaskV1Response( - schemas.DictSchema -): +class GetAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "task_id", "status", } - + class properties: - @staticmethod - def status() -> typing.Type['TaskStatus']: + def status() -> typing.Type["TaskStatus"]: return TaskStatus task_id = schemas.StrSchema result = schemas.AnyTypeSchema @@ -53,59 +48,110 @@ class GetAsyncTaskV1Response( "result": result, "traceback": traceback, } - task_id: MetaOapg.properties.task_id - status: 'TaskStatus' - + status: "TaskStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "task_id", + "result", + "traceback", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["task_id"]) -> MetaOapg.properties.task_id: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["traceback"] + ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "task_id", "result", "traceback", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "task_id", + "result", + "traceback", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - task_id: typing.Union[MetaOapg.properties.task_id, str, ], - status: 'TaskStatus', - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + task_id: typing.Union[ + MetaOapg.properties.task_id, + str, + ], + status: "TaskStatus", + result: typing.Union[ + MetaOapg.properties.result, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetAsyncTaskV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetAsyncTaskV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_batch_job_v1_response.py b/launch/api_client/model/get_batch_job_v1_response.py index d6a779c6..f51b1a60 100644 --- a/launch/api_client/model/get_batch_job_v1_response.py +++ b/launch/api_client/model/get_batch_job_v1_response.py @@ -23,28 +23,26 @@ from launch.api_client import schemas # noqa: F401 -class GetBatchJobV1Response( - schemas.DictSchema -): +class GetBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "duration", "status", } - + class properties: duration = schemas.NumberSchema - + @staticmethod - def status() -> typing.Type['BatchJobStatus']: + def status() -> typing.Type["BatchJobStatus"]: return BatchJobStatus + num_tasks_completed = schemas.IntSchema num_tasks_pending = schemas.IntSchema result = schemas.StrSchema @@ -55,66 +53,137 @@ def status() -> typing.Type['BatchJobStatus']: "num_tasks_pending": num_tasks_pending, "result": result, } - + duration: MetaOapg.properties.duration - status: 'BatchJobStatus' - + status: "BatchJobStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - + def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_tasks_completed"]) -> MetaOapg.properties.num_tasks_completed: ... - + def __getitem__( + self, name: typing_extensions.Literal["num_tasks_completed"] + ) -> MetaOapg.properties.num_tasks_completed: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_tasks_pending"]) -> MetaOapg.properties.num_tasks_pending: ... - + def __getitem__( + self, name: typing_extensions.Literal["num_tasks_pending"] + ) -> MetaOapg.properties.num_tasks_pending: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "duration", + "status", + "num_tasks_completed", + "num_tasks_pending", + "result", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - + def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_completed"]) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_tasks_completed"] + ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_pending"]) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_tasks_pending"] + ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "duration", + "status", + "num_tasks_completed", + "num_tasks_pending", + "result", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - duration: typing.Union[MetaOapg.properties.duration, decimal.Decimal, int, float, ], - status: 'BatchJobStatus', - num_tasks_completed: typing.Union[MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - num_tasks_pending: typing.Union[MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + duration: typing.Union[ + MetaOapg.properties.duration, + decimal.Decimal, + int, + float, + ], + status: "BatchJobStatus", + num_tasks_completed: typing.Union[ + MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + num_tasks_pending: typing.Union[ + MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetBatchJobV1Response": return super().__new__( cls, *_args, @@ -127,4 +196,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.batch_job_status import BatchJobStatus diff --git a/launch/api_client/model/get_batch_job_v1_response.pyi b/launch/api_client/model/get_batch_job_v1_response.pyi index b0b58d48..5ad4a9b0 100644 --- a/launch/api_client/model/get_batch_job_v1_response.pyi +++ b/launch/api_client/model/get_batch_job_v1_response.pyi @@ -22,28 +22,24 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class GetBatchJobV1Response( - schemas.DictSchema -): +class GetBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "duration", "status", } - + class properties: duration = schemas.NumberSchema - + @staticmethod - def status() -> typing.Type['BatchJobStatus']: + def status() -> typing.Type["BatchJobStatus"]: return BatchJobStatus num_tasks_completed = schemas.IntSchema num_tasks_pending = schemas.IntSchema @@ -55,66 +51,110 @@ class GetBatchJobV1Response( "num_tasks_pending": num_tasks_pending, "result": result, } - duration: MetaOapg.properties.duration - status: 'BatchJobStatus' - + status: "BatchJobStatus" + @typing.overload def __getitem__(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_tasks_completed"]) -> MetaOapg.properties.num_tasks_completed: ... - + def __getitem__( + self, name: typing_extensions.Literal["num_tasks_completed"] + ) -> MetaOapg.properties.num_tasks_completed: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_tasks_pending"]) -> MetaOapg.properties.num_tasks_pending: ... - + def __getitem__( + self, name: typing_extensions.Literal["num_tasks_pending"] + ) -> MetaOapg.properties.num_tasks_pending: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "duration", + "status", + "num_tasks_completed", + "num_tasks_pending", + "result", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["duration"]) -> MetaOapg.properties.duration: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'BatchJobStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "BatchJobStatus": ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_completed"]) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_tasks_completed"] + ) -> typing.Union[MetaOapg.properties.num_tasks_completed, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_tasks_pending"]) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_tasks_pending"] + ) -> typing.Union[MetaOapg.properties.num_tasks_pending, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["duration", "status", "num_tasks_completed", "num_tasks_pending", "result", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "duration", + "status", + "num_tasks_completed", + "num_tasks_pending", + "result", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - duration: typing.Union[MetaOapg.properties.duration, decimal.Decimal, int, float, ], - status: 'BatchJobStatus', - num_tasks_completed: typing.Union[MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset] = schemas.unset, - num_tasks_pending: typing.Union[MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + duration: typing.Union[ + MetaOapg.properties.duration, + decimal.Decimal, + int, + float, + ], + status: "BatchJobStatus", + num_tasks_completed: typing.Union[ + MetaOapg.properties.num_tasks_completed, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + num_tasks_pending: typing.Union[ + MetaOapg.properties.num_tasks_pending, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, result: typing.Union[MetaOapg.properties.result, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetBatchJobV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/get_model_endpoint_v1_response.py b/launch/api_client/model/get_model_endpoint_v1_response.py index 49bcbab2..1b2868cc 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.py +++ b/launch/api_client/model/get_model_endpoint_v1_response.py @@ -23,16 +23,13 @@ from launch.api_client import schemas # noqa: F401 -class GetModelEndpointV1Response( - schemas.DictSchema -): +class GetModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_type", @@ -45,102 +42,121 @@ class MetaOapg: "created_by", "status", } - + class properties: bundle_name = schemas.StrSchema created_at = schemas.DateTimeSchema created_by = schemas.StrSchema destination = schemas.StrSchema - + @staticmethod - def endpoint_type() -> typing.Type['ModelEndpointType']: + def endpoint_type() -> typing.Type["ModelEndpointType"]: return ModelEndpointType + id = schemas.StrSchema last_updated_at = schemas.DateTimeSchema name = schemas.StrSchema - + @staticmethod - def status() -> typing.Type['ModelEndpointStatus']: + def status() -> typing.Type["ModelEndpointStatus"]: return ModelEndpointStatus + aws_role = schemas.StrSchema - + @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): - - + + class default_callback_url(schemas.StrSchema): class MetaOapg: - format = 'uri' + format = "uri" max_length = 2083 min_length = 1 + deployment_name = schemas.StrSchema - + @staticmethod - def deployment_state() -> typing.Type['ModelEndpointDeploymentState']: + def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: return ModelEndpointDeploymentState - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + metadata = schemas.DictSchema num_queued_items = schemas.IntSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - + @staticmethod - def resource_state() -> typing.Type['ModelEndpointResourceState']: + def resource_state() -> typing.Type["ModelEndpointResourceState"]: return ModelEndpointResourceState + results_s3_bucket = schemas.StrSchema __annotations__ = { "bundle_name": bundle_name, @@ -164,8 +180,8 @@ def resource_state() -> typing.Type['ModelEndpointResourceState']: "resource_state": resource_state, "results_s3_bucket": results_s3_bucket, } - - endpoint_type: 'ModelEndpointType' + + endpoint_type: "ModelEndpointType" last_updated_at: MetaOapg.properties.last_updated_at destination: MetaOapg.properties.destination name: MetaOapg.properties.name @@ -173,169 +189,340 @@ def resource_state() -> typing.Type['ModelEndpointResourceState']: bundle_name: MetaOapg.properties.bundle_name id: MetaOapg.properties.id created_by: MetaOapg.properties.created_by - status: 'ModelEndpointStatus' - + status: "ModelEndpointStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - + def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - + def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - + def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... - + def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - + def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: ... - + def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> 'ModelEndpointDeploymentState': ... - + def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: ... - + def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> 'ModelEndpointResourceState': ... - + def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... - + def __getitem__( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> MetaOapg.properties.results_s3_bucket: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "bundle_name", + "created_at", + "created_by", + "destination", + "endpoint_type", + "id", + "last_updated_at", + "name", + "status", + "aws_role", + "default_callback_auth", + "default_callback_url", + "deployment_name", + "deployment_state", + "labels", + "metadata", + "num_queued_items", + "post_inference_hooks", + "resource_state", + "results_s3_bucket", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - + def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... - + def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["aws_role"] + ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deployment_name"]) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["deployment_name"] + ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deployment_state"]) -> typing.Union['ModelEndpointDeploymentState', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["deployment_state"] + ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["labels"] + ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_queued_items"]) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_queued_items"] + ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_state"]) -> typing.Union['ModelEndpointResourceState', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["resource_state"] + ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "bundle_name", + "created_at", + "created_by", + "destination", + "endpoint_type", + "id", + "last_updated_at", + "name", + "status", + "aws_role", + "default_callback_auth", + "default_callback_url", + "deployment_name", + "deployment_state", + "labels", + "metadata", + "num_queued_items", + "post_inference_hooks", + "resource_state", + "results_s3_bucket", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_type: 'ModelEndpointType', - last_updated_at: typing.Union[MetaOapg.properties.last_updated_at, str, datetime, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - bundle_name: typing.Union[MetaOapg.properties.bundle_name, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - created_by: typing.Union[MetaOapg.properties.created_by, str, ], - status: 'ModelEndpointStatus', + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_type: "ModelEndpointType", + last_updated_at: typing.Union[ + MetaOapg.properties.last_updated_at, + str, + datetime, + ], + destination: typing.Union[ + MetaOapg.properties.destination, + str, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + bundle_name: typing.Union[ + MetaOapg.properties.bundle_name, + str, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], + created_by: typing.Union[ + MetaOapg.properties.created_by, + str, + ], + status: "ModelEndpointStatus", aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union['ModelEndpointDeploymentState', schemas.Unset] = schemas.unset, + deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - num_queued_items: typing.Union[MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, - resource_state: typing.Union['ModelEndpointResourceState', schemas.Unset] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + num_queued_items: typing.Union[ + MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, + resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetModelEndpointV1Response": return super().__new__( cls, *_args, @@ -363,6 +550,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState from launch.api_client.model.model_endpoint_resource_state import ModelEndpointResourceState diff --git a/launch/api_client/model/get_model_endpoint_v1_response.pyi b/launch/api_client/model/get_model_endpoint_v1_response.pyi index 9daf947d..2cc70911 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/get_model_endpoint_v1_response.pyi @@ -22,17 +22,13 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class GetModelEndpointV1Response( - schemas.DictSchema -): +class GetModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_type", @@ -45,62 +41,67 @@ class GetModelEndpointV1Response( "created_by", "status", } - + class properties: bundle_name = schemas.StrSchema created_at = schemas.DateTimeSchema created_by = schemas.StrSchema destination = schemas.StrSchema - + @staticmethod - def endpoint_type() -> typing.Type['ModelEndpointType']: + def endpoint_type() -> typing.Type["ModelEndpointType"]: return ModelEndpointType id = schemas.StrSchema last_updated_at = schemas.DateTimeSchema name = schemas.StrSchema - + @staticmethod - def status() -> typing.Type['ModelEndpointStatus']: + def status() -> typing.Type["ModelEndpointStatus"]: return ModelEndpointStatus aws_role = schemas.StrSchema - + @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): + + class default_callback_url(schemas.StrSchema): pass deployment_name = schemas.StrSchema - + @staticmethod - def deployment_state() -> typing.Type['ModelEndpointDeploymentState']: + def deployment_state() -> typing.Type["ModelEndpointDeploymentState"]: return ModelEndpointDeploymentState - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, @@ -109,32 +110,37 @@ class GetModelEndpointV1Response( ) metadata = schemas.DictSchema num_queued_items = schemas.IntSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - @staticmethod - def resource_state() -> typing.Type['ModelEndpointResourceState']: + def resource_state() -> typing.Type["ModelEndpointResourceState"]: return ModelEndpointResourceState results_s3_bucket = schemas.StrSchema __annotations__ = { @@ -159,8 +165,7 @@ class GetModelEndpointV1Response( "resource_state": resource_state, "results_s3_bucket": results_s3_bucket, } - - endpoint_type: 'ModelEndpointType' + endpoint_type: "ModelEndpointType" last_updated_at: MetaOapg.properties.last_updated_at destination: MetaOapg.properties.destination name: MetaOapg.properties.name @@ -168,169 +173,262 @@ class GetModelEndpointV1Response( bundle_name: MetaOapg.properties.bundle_name id: MetaOapg.properties.id created_by: MetaOapg.properties.created_by - status: 'ModelEndpointStatus' - + status: "ModelEndpointStatus" + @typing.overload def __getitem__(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def __getitem__(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... - + def __getitem__( + self, name: typing_extensions.Literal["last_updated_at"] + ) -> MetaOapg.properties.last_updated_at: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_name"]) -> MetaOapg.properties.deployment_name: ... - + def __getitem__( + self, name: typing_extensions.Literal["deployment_name"] + ) -> MetaOapg.properties.deployment_name: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> 'ModelEndpointDeploymentState': ... - + def __getitem__(self, name: typing_extensions.Literal["deployment_state"]) -> "ModelEndpointDeploymentState": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["num_queued_items"]) -> MetaOapg.properties.num_queued_items: ... - + def __getitem__( + self, name: typing_extensions.Literal["num_queued_items"] + ) -> MetaOapg.properties.num_queued_items: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> 'ModelEndpointResourceState': ... - + def __getitem__(self, name: typing_extensions.Literal["resource_state"]) -> "ModelEndpointResourceState": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... - + def __getitem__( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> MetaOapg.properties.results_s3_bucket: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "bundle_name", + "created_at", + "created_by", + "destination", + "endpoint_type", + "id", + "last_updated_at", + "name", + "status", + "aws_role", + "default_callback_auth", + "default_callback_url", + "deployment_name", + "deployment_state", + "labels", + "metadata", + "num_queued_items", + "post_inference_hooks", + "resource_state", + "results_s3_bucket", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["bundle_name"]) -> MetaOapg.properties.bundle_name: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_by"]) -> MetaOapg.properties.created_by: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> MetaOapg.properties.destination: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> 'ModelEndpointType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["endpoint_type"]) -> "ModelEndpointType": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["last_updated_at"]) -> MetaOapg.properties.last_updated_at: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["last_updated_at"] + ) -> MetaOapg.properties.last_updated_at: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ModelEndpointStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "ModelEndpointStatus": ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["aws_role"] + ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deployment_name"]) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["deployment_name"] + ) -> typing.Union[MetaOapg.properties.deployment_name, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deployment_state"]) -> typing.Union['ModelEndpointDeploymentState', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["deployment_state"] + ) -> typing.Union["ModelEndpointDeploymentState", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["labels"] + ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["num_queued_items"]) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["num_queued_items"] + ) -> typing.Union[MetaOapg.properties.num_queued_items, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["resource_state"]) -> typing.Union['ModelEndpointResourceState', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["resource_state"] + ) -> typing.Union["ModelEndpointResourceState", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bundle_name", "created_at", "created_by", "destination", "endpoint_type", "id", "last_updated_at", "name", "status", "aws_role", "default_callback_auth", "default_callback_url", "deployment_name", "deployment_state", "labels", "metadata", "num_queued_items", "post_inference_hooks", "resource_state", "results_s3_bucket", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "bundle_name", + "created_at", + "created_by", + "destination", + "endpoint_type", + "id", + "last_updated_at", + "name", + "status", + "aws_role", + "default_callback_auth", + "default_callback_url", + "deployment_name", + "deployment_state", + "labels", + "metadata", + "num_queued_items", + "post_inference_hooks", + "resource_state", + "results_s3_bucket", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_type: 'ModelEndpointType', - last_updated_at: typing.Union[MetaOapg.properties.last_updated_at, str, datetime, ], - destination: typing.Union[MetaOapg.properties.destination, str, ], - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - bundle_name: typing.Union[MetaOapg.properties.bundle_name, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - created_by: typing.Union[MetaOapg.properties.created_by, str, ], - status: 'ModelEndpointStatus', + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_type: "ModelEndpointType", + last_updated_at: typing.Union[ + MetaOapg.properties.last_updated_at, + str, + datetime, + ], + destination: typing.Union[ + MetaOapg.properties.destination, + str, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + bundle_name: typing.Union[ + MetaOapg.properties.bundle_name, + str, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], + created_by: typing.Union[ + MetaOapg.properties.created_by, + str, + ], + status: "ModelEndpointStatus", aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, deployment_name: typing.Union[MetaOapg.properties.deployment_name, str, schemas.Unset] = schemas.unset, - deployment_state: typing.Union['ModelEndpointDeploymentState', schemas.Unset] = schemas.unset, + deployment_state: typing.Union["ModelEndpointDeploymentState", schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - num_queued_items: typing.Union[MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, - resource_state: typing.Union['ModelEndpointResourceState', schemas.Unset] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + num_queued_items: typing.Union[ + MetaOapg.properties.num_queued_items, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, + resource_state: typing.Union["ModelEndpointResourceState", schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GetModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "GetModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/gpu_type.py b/launch/api_client/model/gpu_type.py index 34158fa2..4620b94b 100644 --- a/launch/api_client/model/gpu_type.py +++ b/launch/api_client/model/gpu_type.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class GpuType( - schemas.EnumBase, - schemas.StrSchema -): +class GpuType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,22 +32,21 @@ class GpuType( Lists allowed GPU types for Launch. """ - class MetaOapg: enum_value_to_name = { "nvidia-tesla-t4": "TESLAT4", "nvidia-ampere-a10": "AMPEREA10", "nvidia-a100": "A100", } - + @schemas.classproperty def TESLAT4(cls): return cls("nvidia-tesla-t4") - + @schemas.classproperty def AMPEREA10(cls): return cls("nvidia-ampere-a10") - + @schemas.classproperty def A100(cls): return cls("nvidia-a100") diff --git a/launch/api_client/model/gpu_type.pyi b/launch/api_client/model/gpu_type.pyi index 2c8853fe..4e384840 100644 --- a/launch/api_client/model/gpu_type.pyi +++ b/launch/api_client/model/gpu_type.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class GpuType( - schemas.EnumBase, - schemas.StrSchema -): +class GpuType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,15 +30,13 @@ class GpuType( Lists allowed GPU types for Launch. """ - + @schemas.classproperty def TESLAT4(cls): return cls("nvidia-tesla-t4") - @schemas.classproperty def AMPEREA10(cls): return cls("nvidia-ampere-a10") - @schemas.classproperty def A100(cls): return cls("nvidia-a100") diff --git a/launch/api_client/model/http_validation_error.py b/launch/api_client/model/http_validation_error.py index e19f05b2..d33da73c 100644 --- a/launch/api_client/model/http_validation_error.py +++ b/launch/api_client/model/http_validation_error.py @@ -23,77 +23,105 @@ from launch.api_client import schemas # noqa: F401 -class HTTPValidationError( - schemas.DictSchema -): +class HTTPValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: - - - class detail( - schemas.ListSchema - ): - - + class detail(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ValidationError']: + def items() -> typing.Type["ValidationError"]: return ValidationError - + def __new__( cls, - _arg: typing.Union[typing.Tuple['ValidationError'], typing.List['ValidationError']], + _arg: typing.Union[typing.Tuple["ValidationError"], typing.List["ValidationError"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'detail': + ) -> "detail": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ValidationError': + + def __getitem__(self, i: int) -> "ValidationError": return super().__getitem__(i) + __annotations__ = { "detail": detail, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: ... - + def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "detail", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["detail"]) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["detail"] + ) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "detail", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], detail: typing.Union[MetaOapg.properties.detail, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HTTPValidationError': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "HTTPValidationError": return super().__new__( cls, *_args, @@ -102,4 +130,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.validation_error import ValidationError diff --git a/launch/api_client/model/http_validation_error.pyi b/launch/api_client/model/http_validation_error.pyi index fa6a6998..1b72a254 100644 --- a/launch/api_client/model/http_validation_error.pyi +++ b/launch/api_client/model/http_validation_error.pyi @@ -22,78 +22,91 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class HTTPValidationError( - schemas.DictSchema -): +class HTTPValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: - - - class detail( - schemas.ListSchema - ): - - + class detail(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ValidationError']: + def items() -> typing.Type["ValidationError"]: return ValidationError - def __new__( cls, - _arg: typing.Union[typing.Tuple['ValidationError'], typing.List['ValidationError']], + _arg: typing.Union[typing.Tuple["ValidationError"], typing.List["ValidationError"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'detail': + ) -> "detail": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ValidationError': + def __getitem__(self, i: int) -> "ValidationError": return super().__getitem__(i) __annotations__ = { "detail": detail, } - @typing.overload def __getitem__(self, name: typing_extensions.Literal["detail"]) -> MetaOapg.properties.detail: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "detail", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["detail"]) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["detail"] + ) -> typing.Union[MetaOapg.properties.detail, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["detail", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "detail", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], detail: typing.Union[MetaOapg.properties.detail, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HTTPValidationError': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "HTTPValidationError": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_bundles_v1_response.py b/launch/api_client/model/list_model_bundles_v1_response.py index 330b8226..709c30e6 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.py +++ b/launch/api_client/model/list_model_bundles_v1_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ListModelBundlesV1Response( - schemas.DictSchema -): +class ListModelBundlesV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,73 +32,106 @@ class ListModelBundlesV1Response( Response object for listing Model Bundles. """ - class MetaOapg: required = { "model_bundles", } - + class properties: - - - class model_bundles( - schemas.ListSchema - ): - - + class model_bundles(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ModelBundleV1Response']: + def items() -> typing.Type["ModelBundleV1Response"]: return ModelBundleV1Response - + def __new__( cls, - _arg: typing.Union[typing.Tuple['ModelBundleV1Response'], typing.List['ModelBundleV1Response']], + _arg: typing.Union[typing.Tuple["ModelBundleV1Response"], typing.List["ModelBundleV1Response"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_bundles': + ) -> "model_bundles": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ModelBundleV1Response': + + def __getitem__(self, i: int) -> "ModelBundleV1Response": return super().__getitem__(i) + __annotations__ = { "model_bundles": model_bundles, } - + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundles: typing.Union[ + MetaOapg.properties.model_bundles, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelBundlesV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelBundlesV1Response": return super().__new__( cls, *_args, @@ -109,4 +140,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response diff --git a/launch/api_client/model/list_model_bundles_v1_response.pyi b/launch/api_client/model/list_model_bundles_v1_response.pyi index 99555d85..ad83715f 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.pyi +++ b/launch/api_client/model/list_model_bundles_v1_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ListModelBundlesV1Response( - schemas.DictSchema -): +class ListModelBundlesV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,73 +31,92 @@ class ListModelBundlesV1Response( Response object for listing Model Bundles. """ - class MetaOapg: required = { "model_bundles", } - + class properties: - - - class model_bundles( - schemas.ListSchema - ): - - + class model_bundles(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ModelBundleV1Response']: + def items() -> typing.Type["ModelBundleV1Response"]: return ModelBundleV1Response - def __new__( cls, - _arg: typing.Union[typing.Tuple['ModelBundleV1Response'], typing.List['ModelBundleV1Response']], + _arg: typing.Union[typing.Tuple["ModelBundleV1Response"], typing.List["ModelBundleV1Response"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_bundles': + ) -> "model_bundles": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ModelBundleV1Response': + def __getitem__(self, i: int) -> "ModelBundleV1Response": return super().__getitem__(i) __annotations__ = { "model_bundles": model_bundles, } - model_bundles: MetaOapg.properties.model_bundles - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundles: typing.Union[ + MetaOapg.properties.model_bundles, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelBundlesV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelBundlesV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_bundles_v2_response.py b/launch/api_client/model/list_model_bundles_v2_response.py index 20f5feb1..766573b9 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.py +++ b/launch/api_client/model/list_model_bundles_v2_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ListModelBundlesV2Response( - schemas.DictSchema -): +class ListModelBundlesV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,73 +32,106 @@ class ListModelBundlesV2Response( Response object for listing Model Bundles. """ - class MetaOapg: required = { "model_bundles", } - + class properties: - - - class model_bundles( - schemas.ListSchema - ): - - + class model_bundles(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ModelBundleV2Response']: + def items() -> typing.Type["ModelBundleV2Response"]: return ModelBundleV2Response - + def __new__( cls, - _arg: typing.Union[typing.Tuple['ModelBundleV2Response'], typing.List['ModelBundleV2Response']], + _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_bundles': + ) -> "model_bundles": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ModelBundleV2Response': + + def __getitem__(self, i: int) -> "ModelBundleV2Response": return super().__getitem__(i) + __annotations__ = { "model_bundles": model_bundles, } - + model_bundles: MetaOapg.properties.model_bundles - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundles: typing.Union[ + MetaOapg.properties.model_bundles, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelBundlesV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelBundlesV2Response": return super().__new__( cls, *_args, @@ -109,4 +140,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response diff --git a/launch/api_client/model/list_model_bundles_v2_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi index 70981b87..17d42401 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ListModelBundlesV2Response( - schemas.DictSchema -): +class ListModelBundlesV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,73 +31,92 @@ class ListModelBundlesV2Response( Response object for listing Model Bundles. """ - class MetaOapg: required = { "model_bundles", } - + class properties: - - - class model_bundles( - schemas.ListSchema - ): - - + class model_bundles(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['ModelBundleV2Response']: + def items() -> typing.Type["ModelBundleV2Response"]: return ModelBundleV2Response - def __new__( cls, - _arg: typing.Union[typing.Tuple['ModelBundleV2Response'], typing.List['ModelBundleV2Response']], + _arg: typing.Union[typing.Tuple["ModelBundleV2Response"], typing.List["ModelBundleV2Response"]], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_bundles': + ) -> "model_bundles": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'ModelBundleV2Response': + def __getitem__(self, i: int) -> "ModelBundleV2Response": return super().__getitem__(i) __annotations__ = { "model_bundles": model_bundles, } - model_bundles: MetaOapg.properties.model_bundles - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["model_bundles"]) -> MetaOapg.properties.model_bundles: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_bundles", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_bundles", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_bundles: typing.Union[MetaOapg.properties.model_bundles, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_bundles: typing.Union[ + MetaOapg.properties.model_bundles, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelBundlesV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelBundlesV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/list_model_endpoints_v1_response.py b/launch/api_client/model/list_model_endpoints_v1_response.py index 4c7007ac..6d278eb6 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.py +++ b/launch/api_client/model/list_model_endpoints_v1_response.py @@ -23,82 +23,115 @@ from launch.api_client import schemas # noqa: F401 -class ListModelEndpointsV1Response( - schemas.DictSchema -): +class ListModelEndpointsV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "model_endpoints", } - + class properties: - - - class model_endpoints( - schemas.ListSchema - ): - - + class model_endpoints(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['GetModelEndpointV1Response']: + def items() -> typing.Type["GetModelEndpointV1Response"]: return GetModelEndpointV1Response - + def __new__( cls, - _arg: typing.Union[typing.Tuple['GetModelEndpointV1Response'], typing.List['GetModelEndpointV1Response']], + _arg: typing.Union[ + typing.Tuple["GetModelEndpointV1Response"], typing.List["GetModelEndpointV1Response"] + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_endpoints': + ) -> "model_endpoints": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'GetModelEndpointV1Response': + + def __getitem__(self, i: int) -> "GetModelEndpointV1Response": return super().__getitem__(i) + __annotations__ = { "model_endpoints": model_endpoints, } - + model_endpoints: MetaOapg.properties.model_endpoints - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... - + def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_endpoints", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... - + def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_endpoints", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_endpoints: typing.Union[MetaOapg.properties.model_endpoints, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_endpoints: typing.Union[ + MetaOapg.properties.model_endpoints, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelEndpointsV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelEndpointsV1Response": return super().__new__( cls, *_args, @@ -107,4 +140,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response diff --git a/launch/api_client/model/list_model_endpoints_v1_response.pyi b/launch/api_client/model/list_model_endpoints_v1_response.pyi index 742211e6..cb892f04 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.pyi +++ b/launch/api_client/model/list_model_endpoints_v1_response.pyi @@ -22,83 +22,105 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ListModelEndpointsV1Response( - schemas.DictSchema -): +class ListModelEndpointsV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "model_endpoints", } - + class properties: - - - class model_endpoints( - schemas.ListSchema - ): - - + class model_endpoints(schemas.ListSchema): class MetaOapg: - @staticmethod - def items() -> typing.Type['GetModelEndpointV1Response']: + def items() -> typing.Type["GetModelEndpointV1Response"]: return GetModelEndpointV1Response - def __new__( cls, - _arg: typing.Union[typing.Tuple['GetModelEndpointV1Response'], typing.List['GetModelEndpointV1Response']], + _arg: typing.Union[ + typing.Tuple["GetModelEndpointV1Response"], typing.List["GetModelEndpointV1Response"] + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_endpoints': + ) -> "model_endpoints": return super().__new__( cls, _arg, _configuration=_configuration, ) - - def __getitem__(self, i: int) -> 'GetModelEndpointV1Response': + def __getitem__(self, i: int) -> "GetModelEndpointV1Response": return super().__getitem__(i) __annotations__ = { "model_endpoints": model_endpoints, } - model_endpoints: MetaOapg.properties.model_endpoints - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_endpoints"] + ) -> MetaOapg.properties.model_endpoints: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_endpoints", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_endpoints"]) -> MetaOapg.properties.model_endpoints: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_endpoints"] + ) -> MetaOapg.properties.model_endpoints: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["model_endpoints", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "model_endpoints", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - model_endpoints: typing.Union[MetaOapg.properties.model_endpoints, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + model_endpoints: typing.Union[ + MetaOapg.properties.model_endpoints, + list, + tuple, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ListModelEndpointsV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ListModelEndpointsV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_bundle_environment_params.py b/launch/api_client/model/model_bundle_environment_params.py index 037698eb..fbdcc619 100644 --- a/launch/api_client/model/model_bundle_environment_params.py +++ b/launch/api_client/model/model_bundle_environment_params.py @@ -23,29 +23,26 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleEnvironmentParams( - schemas.DictSchema -): +class ModelBundleEnvironmentParams(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - This is the entity-layer class for the Model Bundle environment parameters. Being an -entity-layer class, it should be a plain data object. + This is the entity-layer class for the Model Bundle environment parameters. Being an + entity-layer class, it should be a plain data object. """ - class MetaOapg: required = { "framework_type", } - + class properties: - @staticmethod - def framework_type() -> typing.Type['ModelBundleFrameworkType']: + def framework_type() -> typing.Type["ModelBundleFrameworkType"]: return ModelBundleFrameworkType + ecr_repo = schemas.StrSchema image_tag = schemas.StrSchema pytorch_image_tag = schemas.StrSchema @@ -57,65 +54,129 @@ def framework_type() -> typing.Type['ModelBundleFrameworkType']: "pytorch_image_tag": pytorch_image_tag, "tensorflow_version": tensorflow_version, } - - framework_type: 'ModelBundleFrameworkType' - + + framework_type: "ModelBundleFrameworkType" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: ... - + def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - + def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def __getitem__( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "ecr_repo", + "image_tag", + "pytorch_image_tag", + "tensorflow_version", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ecr_repo"]) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["ecr_repo"] + ) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["image_tag"] + ) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "ecr_repo", + "image_tag", + "pytorch_image_tag", + "tensorflow_version", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - framework_type: 'ModelBundleFrameworkType', + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + framework_type: "ModelBundleFrameworkType", ecr_repo: typing.Union[MetaOapg.properties.ecr_repo, str, schemas.Unset] = schemas.unset, image_tag: typing.Union[MetaOapg.properties.image_tag, str, schemas.Unset] = schemas.unset, pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, schemas.Unset] = schemas.unset, tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleEnvironmentParams': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleEnvironmentParams": return super().__new__( cls, *_args, @@ -128,4 +189,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.model_bundle_framework_type import ModelBundleFrameworkType diff --git a/launch/api_client/model/model_bundle_environment_params.pyi b/launch/api_client/model/model_bundle_environment_params.pyi index 34f9c425..b266edaf 100644 --- a/launch/api_client/model/model_bundle_environment_params.pyi +++ b/launch/api_client/model/model_bundle_environment_params.pyi @@ -22,29 +22,24 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundleEnvironmentParams( - schemas.DictSchema -): +class ModelBundleEnvironmentParams(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - This is the entity-layer class for the Model Bundle environment parameters. Being an -entity-layer class, it should be a plain data object. + This is the entity-layer class for the Model Bundle environment parameters. Being an + entity-layer class, it should be a plain data object. """ - class MetaOapg: required = { "framework_type", } - + class properties: - @staticmethod - def framework_type() -> typing.Type['ModelBundleFrameworkType']: + def framework_type() -> typing.Type["ModelBundleFrameworkType"]: return ModelBundleFrameworkType ecr_repo = schemas.StrSchema image_tag = schemas.StrSchema @@ -57,65 +52,102 @@ entity-layer class, it should be a plain data object. "pytorch_image_tag": pytorch_image_tag, "tensorflow_version": tensorflow_version, } - - framework_type: 'ModelBundleFrameworkType' - + framework_type: "ModelBundleFrameworkType" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["ecr_repo"]) -> MetaOapg.properties.ecr_repo: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["image_tag"]) -> MetaOapg.properties.image_tag: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def __getitem__( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "ecr_repo", + "image_tag", + "pytorch_image_tag", + "tensorflow_version", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> 'ModelBundleFrameworkType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> "ModelBundleFrameworkType": ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ecr_repo"]) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["ecr_repo"] + ) -> typing.Union[MetaOapg.properties.ecr_repo, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["image_tag"]) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["image_tag"] + ) -> typing.Union[MetaOapg.properties.image_tag, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> typing.Union[MetaOapg.properties.pytorch_image_tag, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> typing.Union[MetaOapg.properties.tensorflow_version, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "ecr_repo", "image_tag", "pytorch_image_tag", "tensorflow_version", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "ecr_repo", + "image_tag", + "pytorch_image_tag", + "tensorflow_version", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - framework_type: 'ModelBundleFrameworkType', + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + framework_type: "ModelBundleFrameworkType", ecr_repo: typing.Union[MetaOapg.properties.ecr_repo, str, schemas.Unset] = schemas.unset, image_tag: typing.Union[MetaOapg.properties.image_tag, str, schemas.Unset] = schemas.unset, pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, schemas.Unset] = schemas.unset, tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleEnvironmentParams': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleEnvironmentParams": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_bundle_framework_type.py b/launch/api_client/model/model_bundle_framework_type.py index 3a11569b..c7ecb2d8 100644 --- a/launch/api_client/model/model_bundle_framework_type.py +++ b/launch/api_client/model/model_bundle_framework_type.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleFrameworkType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,22 +32,21 @@ class ModelBundleFrameworkType( The canonical list of possible machine learning frameworks of Model Bundles. """ - class MetaOapg: enum_value_to_name = { "pytorch": "PYTORCH", "tensorflow": "TENSORFLOW", "custom_base_image": "CUSTOM_BASE_IMAGE", } - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") - + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") - + @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_framework_type.pyi b/launch/api_client/model/model_bundle_framework_type.pyi index bba8559d..9e08e72a 100644 --- a/launch/api_client/model/model_bundle_framework_type.pyi +++ b/launch/api_client/model/model_bundle_framework_type.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundleFrameworkType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,15 +30,13 @@ class ModelBundleFrameworkType( The canonical list of possible machine learning frameworks of Model Bundles. """ - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") - @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") - @schemas.classproperty def CUSTOM_BASE_IMAGE(cls): return cls("custom_base_image") diff --git a/launch/api_client/model/model_bundle_order_by.py b/launch/api_client/model/model_bundle_order_by.py index fd5679d9..9fa5758b 100644 --- a/launch/api_client/model/model_bundle_order_by.py +++ b/launch/api_client/model/model_bundle_order_by.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleOrderBy( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,17 +32,16 @@ class ModelBundleOrderBy( The canonical list of possible orderings of Model Bundles. """ - class MetaOapg: enum_value_to_name = { "newest": "NEWEST", "oldest": "OLDEST", } - + @schemas.classproperty def NEWEST(cls): return cls("newest") - + @schemas.classproperty def OLDEST(cls): return cls("oldest") diff --git a/launch/api_client/model/model_bundle_order_by.pyi b/launch/api_client/model/model_bundle_order_by.pyi index 8183c616..76189ebb 100644 --- a/launch/api_client/model/model_bundle_order_by.pyi +++ b/launch/api_client/model/model_bundle_order_by.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundleOrderBy( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,11 +30,10 @@ class ModelBundleOrderBy( The canonical list of possible orderings of Model Bundles. """ - + @schemas.classproperty def NEWEST(cls): return cls("newest") - @schemas.classproperty def OLDEST(cls): return cls("oldest") diff --git a/launch/api_client/model/model_bundle_packaging_type.py b/launch/api_client/model/model_bundle_packaging_type.py index 7f92d164..e9d25774 100644 --- a/launch/api_client/model/model_bundle_packaging_type.py +++ b/launch/api_client/model/model_bundle_packaging_type.py @@ -23,36 +23,32 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundlePackagingType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. + The canonical list of possible packaging types for Model Bundles. -These values broadly determine how the model endpoint will obtain its code & dependencies. + These values broadly determine how the model endpoint will obtain its code & dependencies. """ - class MetaOapg: enum_value_to_name = { "cloudpickle": "CLOUDPICKLE", "zip": "ZIP", "lira": "LIRA", } - + @schemas.classproperty def CLOUDPICKLE(cls): return cls("cloudpickle") - + @schemas.classproperty def ZIP(cls): return cls("zip") - + @schemas.classproperty def LIRA(cls): return cls("lira") diff --git a/launch/api_client/model/model_bundle_packaging_type.pyi b/launch/api_client/model/model_bundle_packaging_type.pyi index f2a66978..1c310f5a 100644 --- a/launch/api_client/model/model_bundle_packaging_type.pyi +++ b/launch/api_client/model/model_bundle_packaging_type.pyi @@ -22,29 +22,23 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundlePackagingType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech + Ref: https://openapi-generator.tech - Do not edit the class manually. + Do not edit the class manually. - The canonical list of possible packaging types for Model Bundles. + The canonical list of possible packaging types for Model Bundles. -These values broadly determine how the model endpoint will obtain its code & dependencies. + These values broadly determine how the model endpoint will obtain its code & dependencies. """ - + @schemas.classproperty def CLOUDPICKLE(cls): return cls("cloudpickle") - @schemas.classproperty def ZIP(cls): return cls("zip") - @schemas.classproperty def LIRA(cls): return cls("lira") diff --git a/launch/api_client/model/model_bundle_v1_response.py b/launch/api_client/model/model_bundle_v1_response.py index d3a56489..ba816e41 100644 --- a/launch/api_client/model/model_bundle_v1_response.py +++ b/launch/api_client/model/model_bundle_v1_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleV1Response( - schemas.DictSchema -): +class ModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class ModelBundleV1Response( Response object for a single Model Bundle. """ - class MetaOapg: required = { "metadata", @@ -47,67 +44,86 @@ class MetaOapg: "id", "env_params", } - + class properties: created_at = schemas.DateTimeSchema - + @staticmethod - def env_params() -> typing.Type['ModelBundleEnvironmentParams']: + def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: return ModelBundleEnvironmentParams + id = schemas.StrSchema location = schemas.StrSchema metadata = schemas.DictSchema - - - class model_artifact_ids( - schemas.ListSchema - ): - - + + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_artifact_ids': + ) -> "model_artifact_ids": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type['ModelBundlePackagingType']: + def packaging_type() -> typing.Type["ModelBundlePackagingType"]: return ModelBundlePackagingType - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + app_config = schemas.DictSchema schema_location = schemas.StrSchema __annotations__ = { @@ -123,115 +139,226 @@ def __getitem__(self, i: int) -> MetaOapg.items: "app_config": app_config, "schema_location": schema_location, } - + metadata: MetaOapg.properties.metadata requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: 'ModelBundlePackagingType' + packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: 'ModelBundleEnvironmentParams' - + env_params: "ModelBundleEnvironmentParams" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "env_params", + "id", + "location", + "metadata", + "model_artifact_ids", + "name", + "packaging_type", + "requirements", + "app_config", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "env_params", + "id", + "location", + "metadata", + "model_artifact_ids", + "name", + "packaging_type", + "requirements", + "app_config", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], - packaging_type: 'ModelBundlePackagingType', - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - location: typing.Union[MetaOapg.properties.location, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - env_params: 'ModelBundleEnvironmentParams', - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + model_artifact_ids: typing.Union[ + MetaOapg.properties.model_artifact_ids, + list, + tuple, + ], + packaging_type: "ModelBundlePackagingType", + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], + env_params: "ModelBundleEnvironmentParams", + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleV1Response": return super().__new__( cls, *_args, @@ -250,5 +377,6 @@ def __new__( **kwargs, ) + from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType diff --git a/launch/api_client/model/model_bundle_v1_response.pyi b/launch/api_client/model/model_bundle_v1_response.pyi index 8c3f0594..07b30379 100644 --- a/launch/api_client/model/model_bundle_v1_response.pyi +++ b/launch/api_client/model/model_bundle_v1_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundleV1Response( - schemas.DictSchema -): +class ModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class ModelBundleV1Response( Response object for a single Model Bundle. """ - class MetaOapg: required = { "metadata", @@ -47,65 +43,77 @@ class ModelBundleV1Response( "id", "env_params", } - + class properties: created_at = schemas.DateTimeSchema - + @staticmethod - def env_params() -> typing.Type['ModelBundleEnvironmentParams']: + def env_params() -> typing.Type["ModelBundleEnvironmentParams"]: return ModelBundleEnvironmentParams id = schemas.StrSchema location = schemas.StrSchema metadata = schemas.DictSchema - - - class model_artifact_ids( - schemas.ListSchema - ): - - + + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_artifact_ids': + ) -> "model_artifact_ids": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) name = schemas.StrSchema - + @staticmethod - def packaging_type() -> typing.Type['ModelBundlePackagingType']: + def packaging_type() -> typing.Type["ModelBundlePackagingType"]: return ModelBundlePackagingType - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -123,115 +131,177 @@ class ModelBundleV1Response( "app_config": app_config, "schema_location": schema_location, } - metadata: MetaOapg.properties.metadata requirements: MetaOapg.properties.requirements model_artifact_ids: MetaOapg.properties.model_artifact_ids - packaging_type: 'ModelBundlePackagingType' + packaging_type: "ModelBundlePackagingType" name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at location: MetaOapg.properties.location id: MetaOapg.properties.id - env_params: 'ModelBundleEnvironmentParams' - + env_params: "ModelBundleEnvironmentParams" + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def __getitem__(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def __getitem__(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "env_params", + "id", + "location", + "metadata", + "model_artifact_ids", + "name", + "packaging_type", + "requirements", + "app_config", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> 'ModelBundleEnvironmentParams': ... - + def get_item_oapg(self, name: typing_extensions.Literal["env_params"]) -> "ModelBundleEnvironmentParams": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> 'ModelBundlePackagingType': ... - + def get_item_oapg(self, name: typing_extensions.Literal["packaging_type"]) -> "ModelBundlePackagingType": ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "env_params", "id", "location", "metadata", "model_artifact_ids", "name", "packaging_type", "requirements", "app_config", "schema_location", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "env_params", + "id", + "location", + "metadata", + "model_artifact_ids", + "name", + "packaging_type", + "requirements", + "app_config", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], - packaging_type: 'ModelBundlePackagingType', - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - location: typing.Union[MetaOapg.properties.location, str, ], - id: typing.Union[MetaOapg.properties.id, str, ], - env_params: 'ModelBundleEnvironmentParams', - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + model_artifact_ids: typing.Union[ + MetaOapg.properties.model_artifact_ids, + list, + tuple, + ], + packaging_type: "ModelBundlePackagingType", + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], + env_params: "ModelBundleEnvironmentParams", + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_bundle_v2_response.py b/launch/api_client/model/model_bundle_v2_response.py index 0e28ce6f..8a39a9ed 100644 --- a/launch/api_client/model/model_bundle_v2_response.py +++ b/launch/api_client/model/model_bundle_v2_response.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelBundleV2Response( - schemas.DictSchema -): +class ModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class ModelBundleV2Response( Response object for a single Model Bundle. """ - class MetaOapg: required = { "flavor", @@ -44,18 +41,14 @@ class MetaOapg: "created_at", "id", } - + class properties: created_at = schemas.DateTimeSchema - - + class flavor( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -72,45 +65,86 @@ def one_of(cls): RunnableImageFlavor, TritonEnhancedRunnableImageFlavor, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'flavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + id = schemas.StrSchema metadata = schemas.DictSchema - - - class model_artifact_ids( - schemas.ListSchema - ): - - + + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_artifact_ids': + ) -> "model_artifact_ids": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + name = schemas.StrSchema schema_location = schemas.StrSchema __annotations__ = { @@ -122,84 +156,186 @@ def __getitem__(self, i: int) -> MetaOapg.items: "name": name, "schema_location": schema_location, } - + flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata model_artifact_ids: MetaOapg.properties.model_artifact_ids name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at id: MetaOapg.properties.id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "flavor", + "id", + "metadata", + "model_artifact_ids", + "name", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - + def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "flavor", + "id", + "metadata", + "model_artifact_ids", + "name", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - id: typing.Union[MetaOapg.properties.id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + model_artifact_ids: typing.Union[ + MetaOapg.properties.model_artifact_ids, + list, + tuple, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleV2Response": return super().__new__( cls, *_args, @@ -214,6 +350,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor diff --git a/launch/api_client/model/model_bundle_v2_response.pyi b/launch/api_client/model/model_bundle_v2_response.pyi index 525e26c3..af8ad359 100644 --- a/launch/api_client/model/model_bundle_v2_response.pyi +++ b/launch/api_client/model/model_bundle_v2_response.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelBundleV2Response( - schemas.DictSchema -): +class ModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class ModelBundleV2Response( Response object for a single Model Bundle. """ - class MetaOapg: required = { "flavor", @@ -44,18 +40,14 @@ class ModelBundleV2Response( "created_at", "id", } - + class properties: created_at = schemas.DateTimeSchema - - + class flavor( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -72,14 +64,44 @@ class ModelBundleV2Response( RunnableImageFlavor, TritonEnhancedRunnableImageFlavor, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'flavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "flavor": return super().__new__( cls, *_args, @@ -88,27 +110,33 @@ class ModelBundleV2Response( ) id = schemas.StrSchema metadata = schemas.DictSchema - - - class model_artifact_ids( - schemas.ListSchema - ): - - + + class model_artifact_ids(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'model_artifact_ids': + ) -> "model_artifact_ids": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) name = schemas.StrSchema @@ -122,84 +150,153 @@ class ModelBundleV2Response( "name": name, "schema_location": schema_location, } - flavor: MetaOapg.properties.flavor metadata: MetaOapg.properties.metadata model_artifact_ids: MetaOapg.properties.model_artifact_ids name: MetaOapg.properties.name created_at: MetaOapg.properties.created_at id: MetaOapg.properties.id - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["schema_location"]) -> MetaOapg.properties.schema_location: ... - + def __getitem__( + self, name: typing_extensions.Literal["schema_location"] + ) -> MetaOapg.properties.schema_location: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "flavor", + "id", + "metadata", + "model_artifact_ids", + "name", + "schema_location", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_artifact_ids"]) -> MetaOapg.properties.model_artifact_ids: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_artifact_ids"] + ) -> MetaOapg.properties.model_artifact_ids: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["schema_location"]) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["schema_location"] + ) -> typing.Union[MetaOapg.properties.schema_location, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["created_at", "flavor", "id", "metadata", "model_artifact_ids", "name", "schema_location", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "created_at", + "flavor", + "id", + "metadata", + "model_artifact_ids", + "name", + "schema_location", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, ], - model_artifact_ids: typing.Union[MetaOapg.properties.model_artifact_ids, list, tuple, ], - name: typing.Union[MetaOapg.properties.name, str, ], - created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, ], - id: typing.Union[MetaOapg.properties.id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + metadata: typing.Union[ + MetaOapg.properties.metadata, + dict, + frozendict.frozendict, + ], + model_artifact_ids: typing.Union[ + MetaOapg.properties.model_artifact_ids, + list, + tuple, + ], + name: typing.Union[ + MetaOapg.properties.name, + str, + ], + created_at: typing.Union[ + MetaOapg.properties.created_at, + str, + datetime, + ], + id: typing.Union[ + MetaOapg.properties.id, + str, + ], schema_location: typing.Union[MetaOapg.properties.schema_location, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelBundleV2Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelBundleV2Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_deployment_state.py b/launch/api_client/model/model_endpoint_deployment_state.py index d613d10d..1682bb71 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.py +++ b/launch/api_client/model/model_endpoint_deployment_state.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelEndpointDeploymentState( - schemas.DictSchema -): +class ModelEndpointDeploymentState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,52 +32,32 @@ class ModelEndpointDeploymentState( This is the entity-layer class for the deployment settings related to a Model Endpoint. """ - class MetaOapg: required = { "max_workers", "min_workers", "per_worker", } - + class properties: - - - class max_workers( - schemas.IntSchema - ): - - + class max_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - - class min_workers( - schemas.IntSchema - ): - - + + class min_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 + per_worker = schemas.IntSchema - - - class available_workers( - schemas.IntSchema - ): - - + + class available_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - - class unavailable_workers( - schemas.IntSchema - ): - - + + class unavailable_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 + __annotations__ = { "max_workers": max_workers, "min_workers": min_workers, @@ -87,67 +65,143 @@ class MetaOapg: "available_workers": available_workers, "unavailable_workers": unavailable_workers, } - + max_workers: MetaOapg.properties.max_workers min_workers: MetaOapg.properties.min_workers per_worker: MetaOapg.properties.per_worker - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["available_workers"]) -> MetaOapg.properties.available_workers: ... - + def __getitem__( + self, name: typing_extensions.Literal["available_workers"] + ) -> MetaOapg.properties.available_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unavailable_workers"]) -> MetaOapg.properties.unavailable_workers: ... - + def __getitem__( + self, name: typing_extensions.Literal["unavailable_workers"] + ) -> MetaOapg.properties.unavailable_workers: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "max_workers", + "min_workers", + "per_worker", + "available_workers", + "unavailable_workers", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - + def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["available_workers"]) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["available_workers"] + ) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unavailable_workers"]) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["unavailable_workers"] + ) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "max_workers", + "min_workers", + "per_worker", + "available_workers", + "unavailable_workers", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], - available_workers: typing.Union[MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - unavailable_workers: typing.Union[MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + max_workers: typing.Union[ + MetaOapg.properties.max_workers, + decimal.Decimal, + int, + ], + min_workers: typing.Union[ + MetaOapg.properties.min_workers, + decimal.Decimal, + int, + ], + per_worker: typing.Union[ + MetaOapg.properties.per_worker, + decimal.Decimal, + int, + ], + available_workers: typing.Union[ + MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + unavailable_workers: typing.Union[ + MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelEndpointDeploymentState': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelEndpointDeploymentState": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_deployment_state.pyi b/launch/api_client/model/model_endpoint_deployment_state.pyi index 65d9de9d..af8a29f8 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.pyi +++ b/launch/api_client/model/model_endpoint_deployment_state.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelEndpointDeploymentState( - schemas.DictSchema -): +class ModelEndpointDeploymentState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,39 +31,25 @@ class ModelEndpointDeploymentState( This is the entity-layer class for the deployment settings related to a Model Endpoint. """ - class MetaOapg: required = { "max_workers", "min_workers", "per_worker", } - + class properties: - - - class max_workers( - schemas.IntSchema - ): + class max_workers(schemas.IntSchema): pass - - - class min_workers( - schemas.IntSchema - ): + + class min_workers(schemas.IntSchema): pass per_worker = schemas.IntSchema - - - class available_workers( - schemas.IntSchema - ): + + class available_workers(schemas.IntSchema): pass - - - class unavailable_workers( - schemas.IntSchema - ): + + class unavailable_workers(schemas.IntSchema): pass __annotations__ = { "max_workers": max_workers, @@ -75,67 +58,116 @@ class ModelEndpointDeploymentState( "available_workers": available_workers, "unavailable_workers": unavailable_workers, } - max_workers: MetaOapg.properties.max_workers min_workers: MetaOapg.properties.min_workers per_worker: MetaOapg.properties.per_worker - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["available_workers"]) -> MetaOapg.properties.available_workers: ... - + def __getitem__( + self, name: typing_extensions.Literal["available_workers"] + ) -> MetaOapg.properties.available_workers: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["unavailable_workers"]) -> MetaOapg.properties.unavailable_workers: ... - + def __getitem__( + self, name: typing_extensions.Literal["unavailable_workers"] + ) -> MetaOapg.properties.unavailable_workers: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "max_workers", + "min_workers", + "per_worker", + "available_workers", + "unavailable_workers", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["available_workers"]) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["available_workers"] + ) -> typing.Union[MetaOapg.properties.available_workers, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["unavailable_workers"]) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["unavailable_workers"] + ) -> typing.Union[MetaOapg.properties.unavailable_workers, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["max_workers", "min_workers", "per_worker", "available_workers", "unavailable_workers", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "max_workers", + "min_workers", + "per_worker", + "available_workers", + "unavailable_workers", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, ], - min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, ], - per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, ], - available_workers: typing.Union[MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - unavailable_workers: typing.Union[MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + max_workers: typing.Union[ + MetaOapg.properties.max_workers, + decimal.Decimal, + int, + ], + min_workers: typing.Union[ + MetaOapg.properties.min_workers, + decimal.Decimal, + int, + ], + per_worker: typing.Union[ + MetaOapg.properties.per_worker, + decimal.Decimal, + int, + ], + available_workers: typing.Union[ + MetaOapg.properties.available_workers, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, + unavailable_workers: typing.Union[ + MetaOapg.properties.unavailable_workers, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelEndpointDeploymentState': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelEndpointDeploymentState": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_order_by.py b/launch/api_client/model/model_endpoint_order_by.py index 85a5d7e0..87e6a3e7 100644 --- a/launch/api_client/model/model_endpoint_order_by.py +++ b/launch/api_client/model/model_endpoint_order_by.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelEndpointOrderBy( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,22 +32,21 @@ class ModelEndpointOrderBy( The canonical list of possible orderings of Model Bundles. """ - class MetaOapg: enum_value_to_name = { "newest": "NEWEST", "oldest": "OLDEST", "alphabetical": "ALPHABETICAL", } - + @schemas.classproperty def NEWEST(cls): return cls("newest") - + @schemas.classproperty def OLDEST(cls): return cls("oldest") - + @schemas.classproperty def ALPHABETICAL(cls): return cls("alphabetical") diff --git a/launch/api_client/model/model_endpoint_order_by.pyi b/launch/api_client/model/model_endpoint_order_by.pyi index 891a380d..00acf464 100644 --- a/launch/api_client/model/model_endpoint_order_by.pyi +++ b/launch/api_client/model/model_endpoint_order_by.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelEndpointOrderBy( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,15 +30,13 @@ class ModelEndpointOrderBy( The canonical list of possible orderings of Model Bundles. """ - + @schemas.classproperty def NEWEST(cls): return cls("newest") - @schemas.classproperty def OLDEST(cls): return cls("oldest") - @schemas.classproperty def ALPHABETICAL(cls): return cls("alphabetical") diff --git a/launch/api_client/model/model_endpoint_resource_state.py b/launch/api_client/model/model_endpoint_resource_state.py index e232a176..920408f8 100644 --- a/launch/api_client/model/model_endpoint_resource_state.py +++ b/launch/api_client/model/model_endpoint_resource_state.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelEndpointResourceState( - schemas.DictSchema -): +class ModelEndpointResourceState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,27 +32,22 @@ class ModelEndpointResourceState( This is the entity-layer class for the resource settings per worker of a Model Endpoint. """ - class MetaOapg: required = { "memory", "cpus", "gpus", } - + class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -70,41 +63,64 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class gpus( - schemas.IntSchema - ): - - + + class gpus(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -120,37 +136,66 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType + optimize_costs = schemas.BoolSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -166,20 +211,52 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + __annotations__ = { "cpus": cpus, "gpus": gpus, @@ -188,74 +265,193 @@ def __new__( "optimize_costs": optimize_costs, "storage": storage, } - + memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus gpus: MetaOapg.properties.gpus - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpus", + "memory", + "gpu_type", + "optimize_costs", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpus", + "memory", + "gpu_type", + "optimize_costs", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + gpus: typing.Union[ + MetaOapg.properties.gpus, + decimal.Decimal, + int, + ], + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelEndpointResourceState': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelEndpointResourceState": return super().__new__( cls, *_args, @@ -269,4 +465,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/model_endpoint_resource_state.pyi b/launch/api_client/model/model_endpoint_resource_state.pyi index d114992c..c34afbb1 100644 --- a/launch/api_client/model/model_endpoint_resource_state.pyi +++ b/launch/api_client/model/model_endpoint_resource_state.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelEndpointResourceState( - schemas.DictSchema -): +class ModelEndpointResourceState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,27 +31,22 @@ class ModelEndpointResourceState( This is the entity-layer class for the resource settings per worker of a Model Endpoint. """ - class MetaOapg: required = { "memory", "cpus", "gpus", } - + class properties: - - class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -70,38 +62,62 @@ class ModelEndpointResourceState( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class gpus( - schemas.IntSchema - ): + + class gpus(schemas.IntSchema): pass - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -117,37 +133,63 @@ class ModelEndpointResourceState( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType optimize_costs = schemas.BoolSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -163,14 +205,44 @@ class ModelEndpointResourceState( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, @@ -185,74 +257,162 @@ class ModelEndpointResourceState( "optimize_costs": optimize_costs, "storage": storage, } - memory: MetaOapg.properties.memory cpus: MetaOapg.properties.cpus gpus: MetaOapg.properties.gpus - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpus", + "memory", + "gpu_type", + "optimize_costs", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cpus", "gpus", "memory", "gpu_type", "optimize_costs", "storage", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cpus", + "gpus", + "memory", + "gpu_type", + "optimize_costs", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, ], - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + gpus: typing.Union[ + MetaOapg.properties.gpus, + decimal.Decimal, + int, + ], + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelEndpointResourceState': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ModelEndpointResourceState": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/model_endpoint_status.py b/launch/api_client/model/model_endpoint_status.py index c1ceaf1b..445e3498 100644 --- a/launch/api_client/model/model_endpoint_status.py +++ b/launch/api_client/model/model_endpoint_status.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelEndpointStatus( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +32,6 @@ class ModelEndpointStatus( An enumeration. """ - class MetaOapg: enum_value_to_name = { "READY": "READY", @@ -44,23 +40,23 @@ class MetaOapg: "UPDATE_FAILED": "UPDATE_FAILED", "DELETE_IN_PROGRESS": "DELETE_IN_PROGRESS", } - + @schemas.classproperty def READY(cls): return cls("READY") - + @schemas.classproperty def UPDATE_PENDING(cls): return cls("UPDATE_PENDING") - + @schemas.classproperty def UPDATE_IN_PROGRESS(cls): return cls("UPDATE_IN_PROGRESS") - + @schemas.classproperty def UPDATE_FAILED(cls): return cls("UPDATE_FAILED") - + @schemas.classproperty def DELETE_IN_PROGRESS(cls): return cls("DELETE_IN_PROGRESS") diff --git a/launch/api_client/model/model_endpoint_status.pyi b/launch/api_client/model/model_endpoint_status.pyi index 2c69f8c7..596b3bd7 100644 --- a/launch/api_client/model/model_endpoint_status.pyi +++ b/launch/api_client/model/model_endpoint_status.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelEndpointStatus( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,23 +30,19 @@ class ModelEndpointStatus( An enumeration. """ - + @schemas.classproperty def READY(cls): return cls("READY") - @schemas.classproperty def UPDATE_PENDING(cls): return cls("UPDATE_PENDING") - @schemas.classproperty def UPDATE_IN_PROGRESS(cls): return cls("UPDATE_IN_PROGRESS") - @schemas.classproperty def UPDATE_FAILED(cls): return cls("UPDATE_FAILED") - @schemas.classproperty def DELETE_IN_PROGRESS(cls): return cls("DELETE_IN_PROGRESS") diff --git a/launch/api_client/model/model_endpoint_type.py b/launch/api_client/model/model_endpoint_type.py index 5c5037b8..3e23ae80 100644 --- a/launch/api_client/model/model_endpoint_type.py +++ b/launch/api_client/model/model_endpoint_type.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ModelEndpointType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,17 +32,16 @@ class ModelEndpointType( An enumeration. """ - class MetaOapg: enum_value_to_name = { "async": "ASYNC", "sync": "SYNC", } - + @schemas.classproperty def ASYNC(cls): return cls("async") - + @schemas.classproperty def SYNC(cls): return cls("sync") diff --git a/launch/api_client/model/model_endpoint_type.pyi b/launch/api_client/model/model_endpoint_type.pyi index 15fd296f..c5e640c9 100644 --- a/launch/api_client/model/model_endpoint_type.pyi +++ b/launch/api_client/model/model_endpoint_type.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ModelEndpointType( - schemas.EnumBase, - schemas.StrSchema -): +class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,11 +30,10 @@ class ModelEndpointType( An enumeration. """ - + @schemas.classproperty def ASYNC(cls): return cls("async") - @schemas.classproperty def SYNC(cls): return cls("sync") diff --git a/launch/api_client/model/pytorch_framework.py b/launch/api_client/model/pytorch_framework.py index 4d544b62..fbb1b34f 100644 --- a/launch/api_client/model/pytorch_framework.py +++ b/launch/api_client/model/pytorch_framework.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class PytorchFramework( - schemas.DictSchema -): +class PytorchFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,74 +32,117 @@ class PytorchFramework( This is the entity-layer class for a Pytorch framework specification. """ - class MetaOapg: required = { "pytorch_image_tag", "framework_type", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - - + class framework_type(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "pytorch": "PYTORCH", } - + @schemas.classproperty def PYTORCH(cls): return cls("pytorch") + pytorch_image_tag = schemas.StrSchema __annotations__ = { "framework_type": framework_type, "pytorch_image_tag": pytorch_image_tag, } - + pytorch_image_tag: MetaOapg.properties.pytorch_image_tag framework_type: MetaOapg.properties.framework_type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + pytorch_image_tag: typing.Union[ + MetaOapg.properties.pytorch_image_tag, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PytorchFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "PytorchFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/pytorch_framework.pyi b/launch/api_client/model/pytorch_framework.pyi index 558fe85a..53ddb0cc 100644 --- a/launch/api_client/model/pytorch_framework.pyi +++ b/launch/api_client/model/pytorch_framework.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class PytorchFramework( - schemas.DictSchema -): +class PytorchFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,21 +31,14 @@ class PytorchFramework( This is the entity-layer class for a Pytorch framework specification. """ - class MetaOapg: required = { "pytorch_image_tag", "framework_type", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - + class framework_type(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def PYTORCH(cls): return cls("pytorch") @@ -57,45 +47,82 @@ class PytorchFramework( "framework_type": framework_type, "pytorch_image_tag": pytorch_image_tag, } - pytorch_image_tag: MetaOapg.properties.pytorch_image_tag framework_type: MetaOapg.properties.framework_type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pytorch_image_tag"]) -> MetaOapg.properties.pytorch_image_tag: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["pytorch_image_tag"] + ) -> MetaOapg.properties.pytorch_image_tag: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "pytorch_image_tag", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "pytorch_image_tag", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pytorch_image_tag: typing.Union[MetaOapg.properties.pytorch_image_tag, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + pytorch_image_tag: typing.Union[ + MetaOapg.properties.pytorch_image_tag, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PytorchFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "PytorchFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/request_schema.py b/launch/api_client/model/request_schema.py index 3546ebfd..3dc04b7e 100644 --- a/launch/api_client/model/request_schema.py +++ b/launch/api_client/model/request_schema.py @@ -21,4 +21,5 @@ import frozendict # noqa: F401 from launch.api_client import schemas # noqa: F401 + RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/request_schema.pyi b/launch/api_client/model/request_schema.pyi index 113fed8a..e5da4cba 100644 --- a/launch/api_client/model/request_schema.pyi +++ b/launch/api_client/model/request_schema.pyi @@ -21,4 +21,5 @@ import uuid # noqa: F401 import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 + RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.py b/launch/api_client/model/response_schema.py index 816504b4..2fb37b63 100644 --- a/launch/api_client/model/response_schema.py +++ b/launch/api_client/model/response_schema.py @@ -21,4 +21,5 @@ import frozendict # noqa: F401 from launch.api_client import schemas # noqa: F401 + ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.pyi b/launch/api_client/model/response_schema.pyi index b31db7e3..c3179237 100644 --- a/launch/api_client/model/response_schema.pyi +++ b/launch/api_client/model/response_schema.pyi @@ -21,4 +21,5 @@ import uuid # noqa: F401 import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 + ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/runnable_image_flavor.py b/launch/api_client/model/runnable_image_flavor.py index edb4fba0..33fa7abf 100644 --- a/launch/api_client/model/runnable_image_flavor.py +++ b/launch/api_client/model/runnable_image_flavor.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class RunnableImageFlavor( - schemas.DictSchema -): +class RunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class RunnableImageFlavor( This is the entity-layer class for the Model Bundle flavor of a runnable image. """ - class MetaOapg: required = { "flavor", @@ -43,94 +40,102 @@ class MetaOapg: "repository", "command", } - + class properties: - - - class command( - schemas.ListSchema - ): - - + class command(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'command': + ) -> "command": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - - + + class flavor(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "runnable_image": "RUNNABLE_IMAGE", } - + @schemas.classproperty def RUNNABLE_IMAGE(cls): return cls("runnable_image") - - - class protocol( - schemas.EnumBase, - schemas.StrSchema - ): - - + + class protocol(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "http": "HTTP", } - + @schemas.classproperty def HTTP(cls): return cls("http") + repository = schemas.StrSchema tag = schemas.StrSchema - - - class env( - schemas.DictSchema - ): - - + + class env(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'env': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + readiness_initial_delay_seconds = schemas.IntSchema __annotations__ = { "command": command, @@ -141,83 +146,167 @@ def __new__( "env": env, "readiness_initial_delay_seconds": readiness_initial_delay_seconds, } - + flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag repository: MetaOapg.properties.repository command: MetaOapg.properties.command - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.readiness_initial_delay_seconds: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + "readiness_initial_delay_seconds", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + "readiness_initial_delay_seconds", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - protocol: typing.Union[MetaOapg.properties.protocol, str, ], - tag: typing.Union[MetaOapg.properties.tag, str, ], - repository: typing.Union[MetaOapg.properties.repository, str, ], - command: typing.Union[MetaOapg.properties.command, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RunnableImageFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "RunnableImageFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi index d0255e34..de4f1014 100644 --- a/launch/api_client/model/runnable_image_flavor.pyi +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class RunnableImageFlavor( - schemas.DictSchema -): +class RunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class RunnableImageFlavor( This is the entity-layer class for the Model Bundle flavor of a runnable image. """ - class MetaOapg: required = { "flavor", @@ -43,76 +39,79 @@ class RunnableImageFlavor( "repository", "command", } - + class properties: - - - class command( - schemas.ListSchema - ): - - + class command(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'command': + ) -> "command": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - + + class flavor(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def RUNNABLE_IMAGE(cls): return cls("runnable_image") - - - class protocol( - schemas.EnumBase, - schemas.StrSchema - ): - + + class protocol(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def HTTP(cls): return cls("http") repository = schemas.StrSchema tag = schemas.StrSchema - - - class env( - schemas.DictSchema - ): - - + + class env(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'env': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": return super().__new__( cls, *_args, @@ -129,83 +128,132 @@ class RunnableImageFlavor( "env": env, "readiness_initial_delay_seconds": readiness_initial_delay_seconds, } - flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag repository: MetaOapg.properties.repository command: MetaOapg.properties.command - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.readiness_initial_delay_seconds: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + "readiness_initial_delay_seconds", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "env", "readiness_initial_delay_seconds", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "env", + "readiness_initial_delay_seconds", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - protocol: typing.Union[MetaOapg.properties.protocol, str, ], - tag: typing.Union[MetaOapg.properties.tag, str, ], - repository: typing.Union[MetaOapg.properties.repository, str, ], - command: typing.Union[MetaOapg.properties.command, list, tuple, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RunnableImageFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "RunnableImageFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.py b/launch/api_client/model/sync_endpoint_predict_v1_response.py index 08311f09..fd4f9da8 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.py +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.py @@ -23,26 +23,23 @@ from launch.api_client import schemas # noqa: F401 -class SyncEndpointPredictV1Response( - schemas.DictSchema -): +class SyncEndpointPredictV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "status", } - + class properties: - @staticmethod - def status() -> typing.Type['TaskStatus']: + def status() -> typing.Type["TaskStatus"]: return TaskStatus + result = schemas.AnyTypeSchema traceback = schemas.StrSchema __annotations__ = { @@ -50,51 +47,118 @@ def status() -> typing.Type['TaskStatus']: "result": result, "traceback": traceback, } - - status: 'TaskStatus' - + + status: "TaskStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - + def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... - + def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "result", + "traceback", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["traceback"] + ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "result", + "traceback", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status: 'TaskStatus', - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + status: "TaskStatus", + result: typing.Union[ + MetaOapg.properties.result, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SyncEndpointPredictV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "SyncEndpointPredictV1Response": return super().__new__( cls, *_args, @@ -105,4 +169,5 @@ def __new__( **kwargs, ) + from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi index 063e0357..abfa01e7 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi @@ -22,26 +22,21 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class SyncEndpointPredictV1Response( - schemas.DictSchema -): +class SyncEndpointPredictV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "status", } - + class properties: - @staticmethod - def status() -> typing.Type['TaskStatus']: + def status() -> typing.Type["TaskStatus"]: return TaskStatus result = schemas.AnyTypeSchema traceback = schemas.StrSchema @@ -50,51 +45,99 @@ class SyncEndpointPredictV1Response( "result": result, "traceback": traceback, } - - status: 'TaskStatus' - + status: "TaskStatus" + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def __getitem__(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["result"]) -> MetaOapg.properties.result: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["traceback"]) -> MetaOapg.properties.traceback: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "result", + "traceback", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'TaskStatus': ... - + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> "TaskStatus": ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["result"]) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["result"] + ) -> typing.Union[MetaOapg.properties.result, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["traceback"]) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["traceback"] + ) -> typing.Union[MetaOapg.properties.traceback, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "result", "traceback", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "status", + "result", + "traceback", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status: 'TaskStatus', - result: typing.Union[MetaOapg.properties.result, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + status: "TaskStatus", + result: typing.Union[ + MetaOapg.properties.result, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, traceback: typing.Union[MetaOapg.properties.traceback, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SyncEndpointPredictV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "SyncEndpointPredictV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/task_status.py b/launch/api_client/model/task_status.py index d162efff..5d223f9a 100644 --- a/launch/api_client/model/task_status.py +++ b/launch/api_client/model/task_status.py @@ -23,10 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class TaskStatus( - schemas.EnumBase, - schemas.StrSchema -): +class TaskStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,7 +32,6 @@ class TaskStatus( An enumeration. """ - class MetaOapg: enum_value_to_name = { "PENDING": "PENDING", @@ -44,23 +40,23 @@ class MetaOapg: "FAILURE": "FAILURE", "UNDEFINED": "UNDEFINED", } - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - + @schemas.classproperty def STARTED(cls): return cls("STARTED") - + @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - + @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - + @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/task_status.pyi b/launch/api_client/model/task_status.pyi index 1a313148..9a612f3e 100644 --- a/launch/api_client/model/task_status.pyi +++ b/launch/api_client/model/task_status.pyi @@ -22,11 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class TaskStatus( - schemas.EnumBase, - schemas.StrSchema -): +class TaskStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,23 +30,19 @@ class TaskStatus( An enumeration. """ - + @schemas.classproperty def PENDING(cls): return cls("PENDING") - @schemas.classproperty def STARTED(cls): return cls("STARTED") - @schemas.classproperty def SUCCESS(cls): return cls("SUCCESS") - @schemas.classproperty def FAILURE(cls): return cls("FAILURE") - @schemas.classproperty def UNDEFINED(cls): return cls("UNDEFINED") diff --git a/launch/api_client/model/tensorflow_framework.py b/launch/api_client/model/tensorflow_framework.py index 46fc28a7..0054e671 100644 --- a/launch/api_client/model/tensorflow_framework.py +++ b/launch/api_client/model/tensorflow_framework.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class TensorflowFramework( - schemas.DictSchema -): +class TensorflowFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,74 +32,117 @@ class TensorflowFramework( This is the entity-layer class for a Tensorflow framework specification. """ - class MetaOapg: required = { "tensorflow_version", "framework_type", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - - + class framework_type(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "tensorflow": "TENSORFLOW", } - + @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") + tensorflow_version = schemas.StrSchema __annotations__ = { "framework_type": framework_type, "tensorflow_version": tensorflow_version, } - + tensorflow_version: MetaOapg.properties.tensorflow_version framework_type: MetaOapg.properties.framework_type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def __getitem__( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + tensorflow_version: typing.Union[ + MetaOapg.properties.tensorflow_version, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TensorflowFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "TensorflowFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/tensorflow_framework.pyi b/launch/api_client/model/tensorflow_framework.pyi index 3799b7a5..ef207fe6 100644 --- a/launch/api_client/model/tensorflow_framework.pyi +++ b/launch/api_client/model/tensorflow_framework.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class TensorflowFramework( - schemas.DictSchema -): +class TensorflowFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,21 +31,14 @@ class TensorflowFramework( This is the entity-layer class for a Tensorflow framework specification. """ - class MetaOapg: required = { "tensorflow_version", "framework_type", } - + class properties: - - - class framework_type( - schemas.EnumBase, - schemas.StrSchema - ): - + class framework_type(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def TENSORFLOW(cls): return cls("tensorflow") @@ -57,45 +47,82 @@ class TensorflowFramework( "framework_type": framework_type, "tensorflow_version": tensorflow_version, } - tensorflow_version: MetaOapg.properties.tensorflow_version framework_type: MetaOapg.properties.framework_type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def __getitem__( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework_type"]) -> MetaOapg.properties.framework_type: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["framework_type"] + ) -> MetaOapg.properties.framework_type: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tensorflow_version"]) -> MetaOapg.properties.tensorflow_version: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["tensorflow_version"] + ) -> MetaOapg.properties.tensorflow_version: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["framework_type", "tensorflow_version", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "framework_type", + "tensorflow_version", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - tensorflow_version: typing.Union[MetaOapg.properties.tensorflow_version, str, ], - framework_type: typing.Union[MetaOapg.properties.framework_type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + tensorflow_version: typing.Union[ + MetaOapg.properties.tensorflow_version, + str, + ], + framework_type: typing.Union[ + MetaOapg.properties.framework_type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TensorflowFramework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "TensorflowFramework": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py index 5cc5d766..c7d7e946 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class TritonEnhancedRunnableImageFlavor( - schemas.DictSchema -): +class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class TritonEnhancedRunnableImageFlavor( For deployments that require tritonserver running in a container. """ - class MetaOapg: required = { "flavor", @@ -46,128 +43,148 @@ class MetaOapg: "command", "triton_num_cpu", } - + class properties: - - - class command( - schemas.ListSchema - ): - - + class command(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'command': + ) -> "command": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - - + + class flavor(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "triton_enhanced_runnable_image": "TRITON_ENHANCED_RUNNABLE_IMAGE", } - + @schemas.classproperty def TRITON_ENHANCED_RUNNABLE_IMAGE(cls): return cls("triton_enhanced_runnable_image") - - - class protocol( - schemas.EnumBase, - schemas.StrSchema - ): - - + + class protocol(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "http": "HTTP", } - + @schemas.classproperty def HTTP(cls): return cls("http") + repository = schemas.StrSchema tag = schemas.StrSchema triton_commit_tag = schemas.StrSchema triton_model_repository = schemas.StrSchema triton_num_cpu = schemas.NumberSchema - - - class env( - schemas.DictSchema - ): - - + + class env(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'env': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + readiness_initial_delay_seconds = schemas.IntSchema triton_memory = schemas.StrSchema - - - class triton_model_replicas( - schemas.DictSchema - ): - - + + class triton_model_replicas(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'triton_model_replicas': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "triton_model_replicas": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + triton_readiness_initial_delay_seconds = schemas.IntSchema triton_storage = schemas.StrSchema __annotations__ = { @@ -186,7 +203,7 @@ def __new__( "triton_readiness_initial_delay_seconds": triton_readiness_initial_delay_seconds, "triton_storage": triton_storage, } - + flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag @@ -195,126 +212,273 @@ def __new__( triton_model_repository: MetaOapg.properties.triton_model_repository command: MetaOapg.properties.command triton_num_cpu: MetaOapg.properties.triton_num_cpu - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - + def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - + def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - + def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - + def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_commit_tag"] + ) -> MetaOapg.properties.triton_commit_tag: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_model_repository"] + ) -> MetaOapg.properties.triton_model_repository: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... - + def __getitem__(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.readiness_initial_delay_seconds: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_memory"]) -> MetaOapg.properties.triton_memory: ... - + def __getitem__(self, name: typing_extensions.Literal["triton_memory"]) -> MetaOapg.properties.triton_memory: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_model_replicas"]) -> MetaOapg.properties.triton_model_replicas: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_model_replicas"] + ) -> MetaOapg.properties.triton_model_replicas: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_storage"]) -> MetaOapg.properties.triton_storage: ... - + def __getitem__(self, name: typing_extensions.Literal["triton_storage"]) -> MetaOapg.properties.triton_storage: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "triton_commit_tag", + "triton_model_repository", + "triton_num_cpu", + "env", + "readiness_initial_delay_seconds", + "triton_memory", + "triton_model_replicas", + "triton_readiness_initial_delay_seconds", + "triton_storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - + def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - + def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - + def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - + def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_commit_tag"] + ) -> MetaOapg.properties.triton_commit_tag: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_model_repository"] + ) -> MetaOapg.properties.triton_model_repository: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... - + def get_item_oapg(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_memory"]) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_memory"] + ) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_model_replicas"]) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_model_replicas"] + ) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_storage"]) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_storage"] + ) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "triton_commit_tag", + "triton_model_repository", + "triton_num_cpu", + "env", + "readiness_initial_delay_seconds", + "triton_memory", + "triton_model_replicas", + "triton_readiness_initial_delay_seconds", + "triton_storage", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - protocol: typing.Union[MetaOapg.properties.protocol, str, ], - tag: typing.Union[MetaOapg.properties.tag, str, ], - repository: typing.Union[MetaOapg.properties.repository, str, ], - triton_commit_tag: typing.Union[MetaOapg.properties.triton_commit_tag, str, ], - triton_model_repository: typing.Union[MetaOapg.properties.triton_model_repository, str, ], - command: typing.Union[MetaOapg.properties.command, list, tuple, ], - triton_num_cpu: typing.Union[MetaOapg.properties.triton_num_cpu, decimal.Decimal, int, float, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + triton_commit_tag: typing.Union[ + MetaOapg.properties.triton_commit_tag, + str, + ], + triton_model_repository: typing.Union[ + MetaOapg.properties.triton_model_repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], + triton_num_cpu: typing.Union[ + MetaOapg.properties.triton_num_cpu, + decimal.Decimal, + int, + float, + ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, triton_memory: typing.Union[MetaOapg.properties.triton_memory, str, schemas.Unset] = schemas.unset, - triton_model_replicas: typing.Union[MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - triton_readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_model_replicas: typing.Union[ + MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + triton_readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, triton_storage: typing.Union[MetaOapg.properties.triton_storage, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TritonEnhancedRunnableImageFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "TritonEnhancedRunnableImageFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi index f258dbaf..b5d41390 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class TritonEnhancedRunnableImageFlavor( - schemas.DictSchema -): +class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class TritonEnhancedRunnableImageFlavor( For deployments that require tritonserver running in a container. """ - class MetaOapg: required = { "flavor", @@ -46,48 +42,43 @@ class TritonEnhancedRunnableImageFlavor( "command", "triton_num_cpu", } - + class properties: - - - class command( - schemas.ListSchema - ): - - + class command(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'command': + ) -> "command": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - + + class flavor(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def TRITON_ENHANCED_RUNNABLE_IMAGE(cls): return cls("triton_enhanced_runnable_image") - - - class protocol( - schemas.EnumBase, - schemas.StrSchema - ): - + + class protocol(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def HTTP(cls): return cls("http") @@ -96,29 +87,37 @@ class TritonEnhancedRunnableImageFlavor( triton_commit_tag = schemas.StrSchema triton_model_repository = schemas.StrSchema triton_num_cpu = schemas.NumberSchema - - - class env( - schemas.DictSchema - ): - - + + class env(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'env': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "env": return super().__new__( cls, *_args, @@ -127,29 +126,37 @@ class TritonEnhancedRunnableImageFlavor( ) readiness_initial_delay_seconds = schemas.IntSchema triton_memory = schemas.StrSchema - - - class triton_model_replicas( - schemas.DictSchema - ): - - + + class triton_model_replicas(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'triton_model_replicas': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "triton_model_replicas": return super().__new__( cls, *_args, @@ -174,7 +181,6 @@ class TritonEnhancedRunnableImageFlavor( "triton_readiness_initial_delay_seconds": triton_readiness_initial_delay_seconds, "triton_storage": triton_storage, } - flavor: MetaOapg.properties.flavor protocol: MetaOapg.properties.protocol tag: MetaOapg.properties.tag @@ -183,126 +189,213 @@ class TritonEnhancedRunnableImageFlavor( triton_model_repository: MetaOapg.properties.triton_model_repository command: MetaOapg.properties.command triton_num_cpu: MetaOapg.properties.triton_num_cpu - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_commit_tag"] + ) -> MetaOapg.properties.triton_commit_tag: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_model_repository"] + ) -> MetaOapg.properties.triton_model_repository: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> MetaOapg.properties.readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.readiness_initial_delay_seconds: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["triton_memory"]) -> MetaOapg.properties.triton_memory: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_model_replicas"]) -> MetaOapg.properties.triton_model_replicas: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_model_replicas"] + ) -> MetaOapg.properties.triton_model_replicas: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: ... - + def __getitem__( + self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"] + ) -> MetaOapg.properties.triton_readiness_initial_delay_seconds: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["triton_storage"]) -> MetaOapg.properties.triton_storage: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "triton_commit_tag", + "triton_model_repository", + "triton_num_cpu", + "env", + "readiness_initial_delay_seconds", + "triton_memory", + "triton_model_replicas", + "triton_readiness_initial_delay_seconds", + "triton_storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["command"]) -> MetaOapg.properties.command: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["protocol"]) -> MetaOapg.properties.protocol: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["repository"]) -> MetaOapg.properties.repository: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_commit_tag"]) -> MetaOapg.properties.triton_commit_tag: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_commit_tag"] + ) -> MetaOapg.properties.triton_commit_tag: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_model_repository"]) -> MetaOapg.properties.triton_model_repository: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_model_repository"] + ) -> MetaOapg.properties.triton_model_repository: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_num_cpu"]) -> MetaOapg.properties.triton_num_cpu: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_num_cpu"] + ) -> MetaOapg.properties.triton_num_cpu: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["env"] + ) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_memory"]) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_memory"] + ) -> typing.Union[MetaOapg.properties.triton_memory, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_model_replicas"]) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_model_replicas"] + ) -> typing.Union[MetaOapg.properties.triton_model_replicas, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"]) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_readiness_initial_delay_seconds"] + ) -> typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triton_storage"]) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["triton_storage"] + ) -> typing.Union[MetaOapg.properties.triton_storage, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["command", "flavor", "protocol", "repository", "tag", "triton_commit_tag", "triton_model_repository", "triton_num_cpu", "env", "readiness_initial_delay_seconds", "triton_memory", "triton_model_replicas", "triton_readiness_initial_delay_seconds", "triton_storage", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "command", + "flavor", + "protocol", + "repository", + "tag", + "triton_commit_tag", + "triton_model_repository", + "triton_num_cpu", + "env", + "readiness_initial_delay_seconds", + "triton_memory", + "triton_model_replicas", + "triton_readiness_initial_delay_seconds", + "triton_storage", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - protocol: typing.Union[MetaOapg.properties.protocol, str, ], - tag: typing.Union[MetaOapg.properties.tag, str, ], - repository: typing.Union[MetaOapg.properties.repository, str, ], - triton_commit_tag: typing.Union[MetaOapg.properties.triton_commit_tag, str, ], - triton_model_repository: typing.Union[MetaOapg.properties.triton_model_repository, str, ], - command: typing.Union[MetaOapg.properties.command, list, tuple, ], - triton_num_cpu: typing.Union[MetaOapg.properties.triton_num_cpu, decimal.Decimal, int, float, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + protocol: typing.Union[ + MetaOapg.properties.protocol, + str, + ], + tag: typing.Union[ + MetaOapg.properties.tag, + str, + ], + repository: typing.Union[ + MetaOapg.properties.repository, + str, + ], + triton_commit_tag: typing.Union[ + MetaOapg.properties.triton_commit_tag, + str, + ], + triton_model_repository: typing.Union[ + MetaOapg.properties.triton_model_repository, + str, + ], + command: typing.Union[ + MetaOapg.properties.command, + list, + tuple, + ], + triton_num_cpu: typing.Union[ + MetaOapg.properties.triton_num_cpu, + decimal.Decimal, + int, + float, + ], env: typing.Union[MetaOapg.properties.env, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, triton_memory: typing.Union[MetaOapg.properties.triton_memory, str, schemas.Unset] = schemas.unset, - triton_model_replicas: typing.Union[MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - triton_readiness_initial_delay_seconds: typing.Union[MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset] = schemas.unset, + triton_model_replicas: typing.Union[ + MetaOapg.properties.triton_model_replicas, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + triton_readiness_initial_delay_seconds: typing.Union[ + MetaOapg.properties.triton_readiness_initial_delay_seconds, decimal.Decimal, int, schemas.Unset + ] = schemas.unset, triton_storage: typing.Union[MetaOapg.properties.triton_storage, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TritonEnhancedRunnableImageFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "TritonEnhancedRunnableImageFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_request.py b/launch/api_client/model/update_batch_job_v1_request.py index abf9b3a1..0a981f68 100644 --- a/launch/api_client/model/update_batch_job_v1_request.py +++ b/launch/api_client/model/update_batch_job_v1_request.py @@ -23,57 +23,93 @@ from launch.api_client import schemas # noqa: F401 -class UpdateBatchJobV1Request( - schemas.DictSchema -): +class UpdateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "cancel", } - + class properties: cancel = schemas.BoolSchema __annotations__ = { "cancel": cancel, } - + cancel: MetaOapg.properties.cancel - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - + def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cancel", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - + def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cancel", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cancel: typing.Union[MetaOapg.properties.cancel, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + cancel: typing.Union[ + MetaOapg.properties.cancel, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateBatchJobV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateBatchJobV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_request.pyi b/launch/api_client/model/update_batch_job_v1_request.pyi index 96a62273..e72264b2 100644 --- a/launch/api_client/model/update_batch_job_v1_request.pyi +++ b/launch/api_client/model/update_batch_job_v1_request.pyi @@ -22,58 +22,82 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class UpdateBatchJobV1Request( - schemas.DictSchema -): +class UpdateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "cancel", } - + class properties: cancel = schemas.BoolSchema __annotations__ = { "cancel": cancel, } - cancel: MetaOapg.properties.cancel - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cancel", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["cancel"]) -> MetaOapg.properties.cancel: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cancel", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "cancel", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cancel: typing.Union[MetaOapg.properties.cancel, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + cancel: typing.Union[ + MetaOapg.properties.cancel, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateBatchJobV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateBatchJobV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_response.py b/launch/api_client/model/update_batch_job_v1_response.py index 4f702046..e5db1e25 100644 --- a/launch/api_client/model/update_batch_job_v1_response.py +++ b/launch/api_client/model/update_batch_job_v1_response.py @@ -23,57 +23,93 @@ from launch.api_client import schemas # noqa: F401 -class UpdateBatchJobV1Response( - schemas.DictSchema -): +class UpdateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "success", } - + class properties: success = schemas.BoolSchema __annotations__ = { "success": success, } - + success: MetaOapg.properties.success - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - + def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["success", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "success", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - + def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["success", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "success", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - success: typing.Union[MetaOapg.properties.success, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + success: typing.Union[ + MetaOapg.properties.success, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateBatchJobV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_batch_job_v1_response.pyi b/launch/api_client/model/update_batch_job_v1_response.pyi index ff8a3d63..d71d8b6e 100644 --- a/launch/api_client/model/update_batch_job_v1_response.pyi +++ b/launch/api_client/model/update_batch_job_v1_response.pyi @@ -22,58 +22,82 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class UpdateBatchJobV1Response( - schemas.DictSchema -): +class UpdateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "success", } - + class properties: success = schemas.BoolSchema __annotations__ = { "success": success, } - success: MetaOapg.properties.success - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["success", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "success", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["success"]) -> MetaOapg.properties.success: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["success", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "success", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - success: typing.Union[MetaOapg.properties.success, bool, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + success: typing.Union[ + MetaOapg.properties.success, + bool, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateBatchJobV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateBatchJobV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_request.py b/launch/api_client/model/update_model_endpoint_v1_request.py index 769f2fe7..c9d25155 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.py +++ b/launch/api_client/model/update_model_endpoint_v1_request.py @@ -23,33 +23,26 @@ from launch.api_client import schemas # noqa: F401 -class UpdateModelEndpointV1Request( - schemas.DictSchema -): +class UpdateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: aws_role = schemas.StrSchema billing_tags = schemas.DictSchema - - + class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -65,99 +58,124 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): - - + + class default_callback_url(schemas.StrSchema): class MetaOapg: - format = 'uri' + format = "uri" max_length = 2083 min_length = 1 - + @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType - - - class gpus( - schemas.IntSchema - ): - - + + class gpus(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 + high_priority = schemas.BoolSchema - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class max_workers( - schemas.IntSchema - ): - - + + class max_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -173,70 +191,104 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + metadata = schemas.DictSchema - - - class min_workers( - schemas.IntSchema - ): - - + + class min_workers(schemas.IntSchema): class MetaOapg: inclusive_minimum = 0 + model_bundle_id = schemas.StrSchema optimize_costs = schemas.BoolSchema per_worker = schemas.IntSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + prewarm = schemas.BoolSchema results_s3_bucket = schemas.StrSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -252,20 +304,52 @@ def any_of(cls): cls.any_of_1, cls.any_of_2, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + __annotations__ = { "aws_role": aws_role, "billing_tags": billing_tags, @@ -288,168 +372,389 @@ def __new__( "results_s3_bucket": results_s3_bucket, "storage": storage, } - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - + def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - + def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - + def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - + def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... - + def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - + def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - + def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - + def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - + def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - + def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - + def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - + def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... - + def __getitem__( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> MetaOapg.properties.results_s3_bucket: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - + def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "aws_role", + "billing_tags", + "cpus", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "gpus", + "high_priority", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "optimize_costs", + "per_worker", + "post_inference_hooks", + "prewarm", + "results_s3_bucket", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["aws_role"] + ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["billing_tags"] + ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cpus"] + ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["gpus"] + ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["high_priority"] + ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["labels"] + ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["max_workers"] + ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["memory"] + ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["min_workers"] + ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["per_worker"] + ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["prewarm"] + ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "aws_role", + "billing_tags", + "cpus", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "gpus", + "high_priority", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "optimize_costs", + "per_worker", + "post_inference_hooks", + "prewarm", + "results_s3_bucket", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + billing_tags: typing.Union[ + MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateModelEndpointV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateModelEndpointV1Request": return super().__new__( cls, *_args, @@ -477,5 +782,6 @@ def __new__( **kwargs, ) + from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/update_model_endpoint_v1_request.pyi b/launch/api_client/model/update_model_endpoint_v1_request.pyi index 9aadf01d..9cd3ec43 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_request.pyi @@ -22,34 +22,26 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class UpdateModelEndpointV1Request( - schemas.DictSchema -): +class UpdateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: - class properties: aws_role = schemas.StrSchema billing_tags = schemas.DictSchema - - + class cpus( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -65,88 +57,112 @@ class UpdateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'cpus': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "cpus": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - @staticmethod - def default_callback_auth() -> typing.Type['CallbackAuth']: + def default_callback_auth() -> typing.Type["CallbackAuth"]: return CallbackAuth - - - class default_callback_url( - schemas.StrSchema - ): + + class default_callback_url(schemas.StrSchema): pass - @staticmethod - def gpu_type() -> typing.Type['GpuType']: + def gpu_type() -> typing.Type["GpuType"]: return GpuType - - - class gpus( - schemas.IntSchema - ): + + class gpus(schemas.IntSchema): pass high_priority = schemas.BoolSchema - - - class labels( - schemas.DictSchema - ): - - + + class labels(schemas.DictSchema): class MetaOapg: additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def __getitem__( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + def get_item_oapg( + self, + name: typing.Union[ + str, + ], + ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'labels': + **kwargs: typing.Union[ + MetaOapg.additional_properties, + str, + ], + ) -> "labels": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - - - class max_workers( - schemas.IntSchema - ): + + class max_workers(schemas.IntSchema): pass - - + class memory( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -162,14 +178,44 @@ class UpdateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'memory': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "memory": return super().__new__( cls, *_args, @@ -177,52 +223,52 @@ class UpdateModelEndpointV1Request( **kwargs, ) metadata = schemas.DictSchema - - - class min_workers( - schemas.IntSchema - ): + + class min_workers(schemas.IntSchema): pass model_bundle_id = schemas.StrSchema optimize_costs = schemas.BoolSchema per_worker = schemas.IntSchema - - - class post_inference_hooks( - schemas.ListSchema - ): - - + + class post_inference_hooks(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'post_inference_hooks': + ) -> "post_inference_hooks": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) prewarm = schemas.BoolSchema results_s3_bucket = schemas.StrSchema - - + class storage( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema any_of_2 = schemas.NumberSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -238,14 +284,44 @@ class UpdateModelEndpointV1Request( cls.any_of_1, cls.any_of_2, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'storage': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "storage": return super().__new__( cls, *_args, @@ -274,168 +350,304 @@ class UpdateModelEndpointV1Request( "results_s3_bucket": results_s3_bucket, "storage": storage, } - @typing.overload def __getitem__(self, name: typing_extensions.Literal["aws_role"]) -> MetaOapg.properties.aws_role: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["billing_tags"]) -> MetaOapg.properties.billing_tags: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["cpus"]) -> MetaOapg.properties.cpus: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> 'CallbackAuth': ... - + def __getitem__(self, name: typing_extensions.Literal["default_callback_auth"]) -> "CallbackAuth": ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["default_callback_url"]) -> MetaOapg.properties.default_callback_url: ... - + def __getitem__( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> MetaOapg.properties.default_callback_url: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> 'GpuType': ... - + def __getitem__(self, name: typing_extensions.Literal["gpu_type"]) -> "GpuType": ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["gpus"]) -> MetaOapg.properties.gpus: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["high_priority"]) -> MetaOapg.properties.high_priority: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["labels"]) -> MetaOapg.properties.labels: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["max_workers"]) -> MetaOapg.properties.max_workers: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["min_workers"]) -> MetaOapg.properties.min_workers: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["model_bundle_id"]) -> MetaOapg.properties.model_bundle_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> MetaOapg.properties.model_bundle_id: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["optimize_costs"]) -> MetaOapg.properties.optimize_costs: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["per_worker"]) -> MetaOapg.properties.per_worker: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["post_inference_hooks"]) -> MetaOapg.properties.post_inference_hooks: ... - + def __getitem__( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> MetaOapg.properties.post_inference_hooks: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["prewarm"]) -> MetaOapg.properties.prewarm: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["results_s3_bucket"]) -> MetaOapg.properties.results_s3_bucket: ... - + def __getitem__( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> MetaOapg.properties.results_s3_bucket: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["storage"]) -> MetaOapg.properties.storage: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "aws_role", + "billing_tags", + "cpus", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "gpus", + "high_priority", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "optimize_costs", + "per_worker", + "post_inference_hooks", + "prewarm", + "results_s3_bucket", + "storage", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["aws_role"]) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["aws_role"] + ) -> typing.Union[MetaOapg.properties.aws_role, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["billing_tags"]) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["billing_tags"] + ) -> typing.Union[MetaOapg.properties.billing_tags, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cpus"]) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["cpus"] + ) -> typing.Union[MetaOapg.properties.cpus, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_auth"]) -> typing.Union['CallbackAuth', schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_auth"] + ) -> typing.Union["CallbackAuth", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["default_callback_url"]) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["default_callback_url"] + ) -> typing.Union[MetaOapg.properties.default_callback_url, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union['GpuType', schemas.Unset]: ... - + def get_item_oapg(self, name: typing_extensions.Literal["gpu_type"]) -> typing.Union["GpuType", schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["gpus"]) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["gpus"] + ) -> typing.Union[MetaOapg.properties.gpus, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["high_priority"]) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["high_priority"] + ) -> typing.Union[MetaOapg.properties.high_priority, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["labels"]) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["labels"] + ) -> typing.Union[MetaOapg.properties.labels, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["max_workers"]) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["max_workers"] + ) -> typing.Union[MetaOapg.properties.max_workers, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["memory"] + ) -> typing.Union[MetaOapg.properties.memory, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["metadata"] + ) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["min_workers"]) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["min_workers"] + ) -> typing.Union[MetaOapg.properties.min_workers, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["model_bundle_id"]) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["model_bundle_id"] + ) -> typing.Union[MetaOapg.properties.model_bundle_id, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["optimize_costs"]) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["optimize_costs"] + ) -> typing.Union[MetaOapg.properties.optimize_costs, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["per_worker"]) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["per_worker"] + ) -> typing.Union[MetaOapg.properties.per_worker, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["post_inference_hooks"]) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["post_inference_hooks"] + ) -> typing.Union[MetaOapg.properties.post_inference_hooks, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["prewarm"]) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["prewarm"] + ) -> typing.Union[MetaOapg.properties.prewarm, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["results_s3_bucket"]) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["results_s3_bucket"] + ) -> typing.Union[MetaOapg.properties.results_s3_bucket, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["storage"]) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["storage"] + ) -> typing.Union[MetaOapg.properties.storage, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["aws_role", "billing_tags", "cpus", "default_callback_auth", "default_callback_url", "gpu_type", "gpus", "high_priority", "labels", "max_workers", "memory", "metadata", "min_workers", "model_bundle_id", "optimize_costs", "per_worker", "post_inference_hooks", "prewarm", "results_s3_bucket", "storage", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "aws_role", + "billing_tags", + "cpus", + "default_callback_auth", + "default_callback_url", + "gpu_type", + "gpus", + "high_priority", + "labels", + "max_workers", + "memory", + "metadata", + "min_workers", + "model_bundle_id", + "optimize_costs", + "per_worker", + "post_inference_hooks", + "prewarm", + "results_s3_bucket", + "storage", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], aws_role: typing.Union[MetaOapg.properties.aws_role, str, schemas.Unset] = schemas.unset, - billing_tags: typing.Union[MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - cpus: typing.Union[MetaOapg.properties.cpus, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - default_callback_auth: typing.Union['CallbackAuth', schemas.Unset] = schemas.unset, - default_callback_url: typing.Union[MetaOapg.properties.default_callback_url, str, schemas.Unset] = schemas.unset, - gpu_type: typing.Union['GpuType', schemas.Unset] = schemas.unset, + billing_tags: typing.Union[ + MetaOapg.properties.billing_tags, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, + cpus: typing.Union[ + MetaOapg.properties.cpus, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + default_callback_auth: typing.Union["CallbackAuth", schemas.Unset] = schemas.unset, + default_callback_url: typing.Union[ + MetaOapg.properties.default_callback_url, str, schemas.Unset + ] = schemas.unset, + gpu_type: typing.Union["GpuType", schemas.Unset] = schemas.unset, gpus: typing.Union[MetaOapg.properties.gpus, decimal.Decimal, int, schemas.Unset] = schemas.unset, high_priority: typing.Union[MetaOapg.properties.high_priority, bool, schemas.Unset] = schemas.unset, labels: typing.Union[MetaOapg.properties.labels, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, max_workers: typing.Union[MetaOapg.properties.max_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, - memory: typing.Union[MetaOapg.properties.memory, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + memory: typing.Union[ + MetaOapg.properties.memory, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, + metadata: typing.Union[ + MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, min_workers: typing.Union[MetaOapg.properties.min_workers, decimal.Decimal, int, schemas.Unset] = schemas.unset, model_bundle_id: typing.Union[MetaOapg.properties.model_bundle_id, str, schemas.Unset] = schemas.unset, optimize_costs: typing.Union[MetaOapg.properties.optimize_costs, bool, schemas.Unset] = schemas.unset, per_worker: typing.Union[MetaOapg.properties.per_worker, decimal.Decimal, int, schemas.Unset] = schemas.unset, - post_inference_hooks: typing.Union[MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset] = schemas.unset, + post_inference_hooks: typing.Union[ + MetaOapg.properties.post_inference_hooks, list, tuple, schemas.Unset + ] = schemas.unset, prewarm: typing.Union[MetaOapg.properties.prewarm, bool, schemas.Unset] = schemas.unset, results_s3_bucket: typing.Union[MetaOapg.properties.results_s3_bucket, str, schemas.Unset] = schemas.unset, - storage: typing.Union[MetaOapg.properties.storage, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, + storage: typing.Union[ + MetaOapg.properties.storage, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + schemas.Unset, + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateModelEndpointV1Request': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateModelEndpointV1Request": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_response.py b/launch/api_client/model/update_model_endpoint_v1_response.py index 7aeff47a..9725aec7 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.py +++ b/launch/api_client/model/update_model_endpoint_v1_response.py @@ -23,57 +23,97 @@ from launch.api_client import schemas # noqa: F401 -class UpdateModelEndpointV1Response( - schemas.DictSchema -): +class UpdateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - + endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_creation_task_id: typing.Union[ + MetaOapg.properties.endpoint_creation_task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/update_model_endpoint_v1_response.pyi b/launch/api_client/model/update_model_endpoint_v1_response.pyi index 87aa1609..37a6fc54 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_response.pyi @@ -22,58 +22,86 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class UpdateModelEndpointV1Response( - schemas.DictSchema -): +class UpdateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "endpoint_creation_task_id", } - + class properties: endpoint_creation_task_id = schemas.StrSchema __annotations__ = { "endpoint_creation_task_id": endpoint_creation_task_id, } - endpoint_creation_task_id: MetaOapg.properties.endpoint_creation_task_id - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def __getitem__( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["endpoint_creation_task_id"]) -> MetaOapg.properties.endpoint_creation_task_id: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["endpoint_creation_task_id"] + ) -> MetaOapg.properties.endpoint_creation_task_id: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["endpoint_creation_task_id", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "endpoint_creation_task_id", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - endpoint_creation_task_id: typing.Union[MetaOapg.properties.endpoint_creation_task_id, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + endpoint_creation_task_id: typing.Union[ + MetaOapg.properties.endpoint_creation_task_id, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UpdateModelEndpointV1Response': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "UpdateModelEndpointV1Response": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/validation_error.py b/launch/api_client/model/validation_error.py index 42a25b83..402f6e68 100644 --- a/launch/api_client/model/validation_error.py +++ b/launch/api_client/model/validation_error.py @@ -23,43 +23,30 @@ from launch.api_client import schemas # noqa: F401 -class ValidationError( - schemas.DictSchema -): +class ValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "msg", "loc", "type", } - + class properties: - - - class loc( - schemas.ListSchema - ): - - + class loc(schemas.ListSchema): class MetaOapg: - - class items( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -74,34 +61,109 @@ def any_of(cls): cls.any_of_0, cls.any_of_1, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "items": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'loc': + ) -> "loc": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + msg = schemas.StrSchema type = schemas.StrSchema __annotations__ = { @@ -109,53 +171,107 @@ def __getitem__(self, i: int) -> MetaOapg.items: "msg": msg, "type": type, } - + msg: MetaOapg.properties.msg loc: MetaOapg.properties.loc type: MetaOapg.properties.type - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... - + def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... - + def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "loc", + "msg", + "type", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... - + def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... - + def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "loc", + "msg", + "type", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - msg: typing.Union[MetaOapg.properties.msg, str, ], - loc: typing.Union[MetaOapg.properties.loc, list, tuple, ], - type: typing.Union[MetaOapg.properties.type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + msg: typing.Union[ + MetaOapg.properties.msg, + str, + ], + loc: typing.Union[ + MetaOapg.properties.loc, + list, + tuple, + ], + type: typing.Union[ + MetaOapg.properties.type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ValidationError': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ValidationError": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/validation_error.pyi b/launch/api_client/model/validation_error.pyi index c6a35dac..b6d07049 100644 --- a/launch/api_client/model/validation_error.pyi +++ b/launch/api_client/model/validation_error.pyi @@ -22,44 +22,30 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ValidationError( - schemas.DictSchema -): +class ValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ - class MetaOapg: required = { "msg", "loc", "type", } - + class properties: - - - class loc( - schemas.ListSchema - ): - - + class loc(schemas.ListSchema): class MetaOapg: - - class items( schemas.ComposedSchema, ): - - class MetaOapg: any_of_0 = schemas.StrSchema any_of_1 = schemas.IntSchema - + @classmethod @functools.lru_cache() def any_of(cls): @@ -74,32 +60,103 @@ class ValidationError( cls.any_of_0, cls.any_of_1, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "items": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'loc': + ) -> "loc": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) msg = schemas.StrSchema @@ -109,53 +166,88 @@ class ValidationError( "msg": msg, "type": type, } - msg: MetaOapg.properties.msg loc: MetaOapg.properties.loc type: MetaOapg.properties.type - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "loc", + "msg", + "type", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["loc"]) -> MetaOapg.properties.loc: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["msg"]) -> MetaOapg.properties.msg: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["loc", "msg", "type", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "loc", + "msg", + "type", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - msg: typing.Union[MetaOapg.properties.msg, str, ], - loc: typing.Union[MetaOapg.properties.loc, list, tuple, ], - type: typing.Union[MetaOapg.properties.type, str, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + msg: typing.Union[ + MetaOapg.properties.msg, + str, + ], + loc: typing.Union[ + MetaOapg.properties.loc, + list, + tuple, + ], + type: typing.Union[ + MetaOapg.properties.type, + str, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ValidationError': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ValidationError": return super().__new__( cls, *_args, diff --git a/launch/api_client/model/zip_artifact_flavor.py b/launch/api_client/model/zip_artifact_flavor.py index ea49f1ee..90bb4677 100644 --- a/launch/api_client/model/zip_artifact_flavor.py +++ b/launch/api_client/model/zip_artifact_flavor.py @@ -23,9 +23,7 @@ from launch.api_client import schemas # noqa: F401 -class ZipArtifactFlavor( - schemas.DictSchema -): +class ZipArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +32,6 @@ class ZipArtifactFlavor( This is the entity-layer class for the Model Bundle flavor of a zip artifact. """ - class MetaOapg: required = { "flavor", @@ -44,33 +41,22 @@ class MetaOapg: "location", "load_predict_fn_module_path", } - + class properties: - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - - + class flavor(schemas.EnumBase, schemas.StrSchema): class MetaOapg: enum_value_to_name = { "zip_artifact": "ZIP_ARTIFACT", } - + @schemas.classproperty def ZIP_ARTIFACT(cls): return cls("zip_artifact") - - + class framework( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -86,46 +72,87 @@ def one_of(cls): TensorflowFramework, CustomFramework, ] - - + def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'framework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": return super().__new__( cls, *_args, _configuration=_configuration, **kwargs, ) + load_model_fn_module_path = schemas.StrSchema load_predict_fn_module_path = schemas.StrSchema location = schemas.StrSchema - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - + def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - + def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + app_config = schemas.DictSchema __annotations__ = { "flavor": flavor, @@ -136,84 +163,190 @@ def __getitem__(self, i: int) -> MetaOapg.items: "requirements": requirements, "app_config": app_config, } - + flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path location: MetaOapg.properties.location load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path - + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - + def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... - + def __getitem__( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... - + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - + def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: + ... + @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: + ... + + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - + def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - + def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - + def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - + def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: + ... + @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: + ... + @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: + ... + + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - load_model_fn_module_path: typing.Union[MetaOapg.properties.load_model_fn_module_path, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - load_predict_fn_module_path: typing.Union[MetaOapg.properties.load_predict_fn_module_path, str, ], - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn_module_path: typing.Union[ + MetaOapg.properties.load_model_fn_module_path, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn_module_path: typing.Union[ + MetaOapg.properties.load_predict_fn_module_path, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ZipArtifactFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ZipArtifactFlavor": return super().__new__( cls, *_args, @@ -228,6 +361,7 @@ def __new__( **kwargs, ) + from launch.api_client.model.custom_framework import CustomFramework from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/zip_artifact_flavor.pyi b/launch/api_client/model/zip_artifact_flavor.pyi index a018845c..ffbca945 100644 --- a/launch/api_client/model/zip_artifact_flavor.pyi +++ b/launch/api_client/model/zip_artifact_flavor.pyi @@ -22,10 +22,7 @@ import frozendict # noqa: F401 from launch_client import schemas # noqa: F401 - -class ZipArtifactFlavor( - schemas.DictSchema -): +class ZipArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,7 +31,6 @@ class ZipArtifactFlavor( This is the entity-layer class for the Model Bundle flavor of a zip artifact. """ - class MetaOapg: required = { "flavor", @@ -44,27 +40,17 @@ class ZipArtifactFlavor( "location", "load_predict_fn_module_path", } - + class properties: - - - class flavor( - schemas.EnumBase, - schemas.StrSchema - ): - + class flavor(schemas.EnumBase, schemas.StrSchema): @schemas.classproperty def ZIP_ARTIFACT(cls): return cls("zip_artifact") - - + class framework( schemas.ComposedSchema, ): - - class MetaOapg: - @classmethod @functools.lru_cache() def one_of(cls): @@ -80,14 +66,44 @@ class ZipArtifactFlavor( TensorflowFramework, CustomFramework, ] - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[ + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'framework': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "framework": return super().__new__( cls, *_args, @@ -97,27 +113,33 @@ class ZipArtifactFlavor( load_model_fn_module_path = schemas.StrSchema load_predict_fn_module_path = schemas.StrSchema location = schemas.StrSchema - - - class requirements( - schemas.ListSchema - ): - - + + class requirements(schemas.ListSchema): class MetaOapg: items = schemas.StrSchema - def __new__( cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[ + typing.Tuple[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + typing.List[ + typing.Union[ + MetaOapg.items, + str, + ] + ], + ], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'requirements': + ) -> "requirements": return super().__new__( cls, _arg, _configuration=_configuration, ) - def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) app_config = schemas.DictSchema @@ -130,84 +152,155 @@ class ZipArtifactFlavor( "requirements": requirements, "app_config": app_config, } - flavor: MetaOapg.properties.flavor requirements: MetaOapg.properties.requirements framework: MetaOapg.properties.framework load_model_fn_module_path: MetaOapg.properties.load_model_fn_module_path location: MetaOapg.properties.location load_predict_fn_module_path: MetaOapg.properties.load_predict_fn_module_path - + @typing.overload def __getitem__(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... - + def __getitem__( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... - + def __getitem__( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: ... @typing.overload def __getitem__(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload def __getitem__(self, name: typing_extensions.Literal["app_config"]) -> MetaOapg.properties.app_config: ... - @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): + def __getitem__( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): # dict_instance[name] accessor return super().__getitem__(name) - - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["flavor"]) -> MetaOapg.properties.flavor: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["framework"]) -> MetaOapg.properties.framework: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_model_fn_module_path"]) -> MetaOapg.properties.load_model_fn_module_path: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["load_model_fn_module_path"] + ) -> MetaOapg.properties.load_model_fn_module_path: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["load_predict_fn_module_path"]) -> MetaOapg.properties.load_predict_fn_module_path: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["load_predict_fn_module_path"] + ) -> MetaOapg.properties.load_predict_fn_module_path: ... @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["location"]) -> MetaOapg.properties.location: ... - @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["requirements"]) -> MetaOapg.properties.requirements: ... - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["app_config"]) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... - + def get_item_oapg( + self, name: typing_extensions.Literal["app_config"] + ) -> typing.Union[MetaOapg.properties.app_config, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["flavor", "framework", "load_model_fn_module_path", "load_predict_fn_module_path", "location", "requirements", "app_config", ], str]): + def get_item_oapg( + self, + name: typing.Union[ + typing_extensions.Literal[ + "flavor", + "framework", + "load_model_fn_module_path", + "load_predict_fn_module_path", + "location", + "requirements", + "app_config", + ], + str, + ], + ): return super().get_item_oapg(name) - - def __new__( cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - flavor: typing.Union[MetaOapg.properties.flavor, str, ], - requirements: typing.Union[MetaOapg.properties.requirements, list, tuple, ], - framework: typing.Union[MetaOapg.properties.framework, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - load_model_fn_module_path: typing.Union[MetaOapg.properties.load_model_fn_module_path, str, ], - location: typing.Union[MetaOapg.properties.location, str, ], - load_predict_fn_module_path: typing.Union[MetaOapg.properties.load_predict_fn_module_path, str, ], - app_config: typing.Union[MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + *_args: typing.Union[ + dict, + frozendict.frozendict, + ], + flavor: typing.Union[ + MetaOapg.properties.flavor, + str, + ], + requirements: typing.Union[ + MetaOapg.properties.requirements, + list, + tuple, + ], + framework: typing.Union[ + MetaOapg.properties.framework, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + bool, + None, + list, + tuple, + bytes, + io.FileIO, + io.BufferedReader, + ], + load_model_fn_module_path: typing.Union[ + MetaOapg.properties.load_model_fn_module_path, + str, + ], + location: typing.Union[ + MetaOapg.properties.location, + str, + ], + load_predict_fn_module_path: typing.Union[ + MetaOapg.properties.load_predict_fn_module_path, + str, + ], + app_config: typing.Union[ + MetaOapg.properties.app_config, dict, frozendict.frozendict, schemas.Unset + ] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ZipArtifactFlavor': + **kwargs: typing.Union[ + schemas.AnyTypeSchema, + dict, + frozendict.frozendict, + str, + date, + datetime, + uuid.UUID, + int, + float, + decimal.Decimal, + None, + list, + tuple, + bytes, + ], + ) -> "ZipArtifactFlavor": return super().__new__( cls, *_args, diff --git a/launch/api_client/paths/healthcheck/__init__.py b/launch/api_client/paths/healthcheck/__init__.py index b0eea9c5..ae6dcb46 100644 --- a/launch/api_client/paths/healthcheck/__init__.py +++ b/launch/api_client/paths/healthcheck/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.HEALTHCHECK \ No newline at end of file +path = PathValues.HEALTHCHECK diff --git a/launch/api_client/paths/healthcheck/get.py b/launch/api_client/paths/healthcheck/get.py index 287d610d..52629448 100644 --- a/launch/api_client/paths/healthcheck/get.py +++ b/launch/api_client/paths/healthcheck/get.py @@ -42,16 +42,13 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, + "200": _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -62,9 +59,8 @@ def _healthcheck_healthcheck_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _healthcheck_healthcheck_get_oapg( @@ -73,7 +69,8 @@ def _healthcheck_healthcheck_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _healthcheck_healthcheck_get_oapg( @@ -82,10 +79,8 @@ def _healthcheck_healthcheck_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _healthcheck_healthcheck_get_oapg( self, @@ -106,11 +101,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -126,11 +121,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -145,9 +136,8 @@ def healthcheck_healthcheck_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def healthcheck_healthcheck_get( @@ -156,7 +146,8 @@ def healthcheck_healthcheck_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def healthcheck_healthcheck_get( @@ -165,10 +156,8 @@ def healthcheck_healthcheck_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def healthcheck_healthcheck_get( self, @@ -181,7 +170,7 @@ def healthcheck_healthcheck_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -195,9 +184,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -206,7 +194,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -215,10 +204,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -231,7 +218,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/healthcheck/get.pyi b/launch/api_client/paths/healthcheck/get.pyi index 152c27b6..03a913c4 100644 --- a/launch/api_client/paths/healthcheck/get.pyi +++ b/launch/api_client/paths/healthcheck/get.pyi @@ -27,7 +27,6 @@ from launch_client import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -36,18 +35,13 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -57,10 +51,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _healthcheck_healthcheck_get_oapg( self, @@ -69,7 +60,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _healthcheck_healthcheck_get_oapg( self, @@ -77,11 +67,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _healthcheck_healthcheck_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -101,11 +87,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -121,15 +107,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class HealthcheckHealthcheckGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -140,10 +121,7 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def healthcheck_healthcheck_get( self, @@ -152,7 +130,6 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def healthcheck_healthcheck_get( self, @@ -160,11 +137,7 @@ class HealthcheckHealthcheckGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def healthcheck_healthcheck_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -176,10 +149,9 @@ class HealthcheckHealthcheckGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -190,10 +162,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -202,7 +171,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -210,11 +178,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,7 +190,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/healthz/__init__.py b/launch/api_client/paths/healthz/__init__.py index b4e79532..3253e712 100644 --- a/launch/api_client/paths/healthz/__init__.py +++ b/launch/api_client/paths/healthz/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.HEALTHZ \ No newline at end of file +path = PathValues.HEALTHZ diff --git a/launch/api_client/paths/healthz/get.py b/launch/api_client/paths/healthz/get.py index e8aabd4b..e66b9460 100644 --- a/launch/api_client/paths/healthz/get.py +++ b/launch/api_client/paths/healthz/get.py @@ -42,16 +42,13 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, + "200": _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -62,9 +59,8 @@ def _healthcheck_healthz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _healthcheck_healthz_get_oapg( @@ -73,7 +69,8 @@ def _healthcheck_healthz_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _healthcheck_healthz_get_oapg( @@ -82,10 +79,8 @@ def _healthcheck_healthz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _healthcheck_healthz_get_oapg( self, @@ -106,11 +101,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -126,11 +121,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -145,9 +136,8 @@ def healthcheck_healthz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def healthcheck_healthz_get( @@ -156,7 +146,8 @@ def healthcheck_healthz_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def healthcheck_healthz_get( @@ -165,10 +156,8 @@ def healthcheck_healthz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def healthcheck_healthz_get( self, @@ -181,7 +170,7 @@ def healthcheck_healthz_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -195,9 +184,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -206,7 +194,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -215,10 +204,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -231,7 +218,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/healthz/get.pyi b/launch/api_client/paths/healthz/get.pyi index 21f0bdfe..91b98a03 100644 --- a/launch/api_client/paths/healthz/get.pyi +++ b/launch/api_client/paths/healthz/get.pyi @@ -27,7 +27,6 @@ from launch_client import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -36,18 +35,13 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -57,10 +51,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _healthcheck_healthz_get_oapg( self, @@ -69,7 +60,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _healthcheck_healthz_get_oapg( self, @@ -77,11 +67,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _healthcheck_healthz_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -101,11 +87,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -121,15 +107,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class HealthcheckHealthzGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -140,10 +121,7 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def healthcheck_healthz_get( self, @@ -152,7 +130,6 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def healthcheck_healthz_get( self, @@ -160,11 +137,7 @@ class HealthcheckHealthzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def healthcheck_healthz_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -176,10 +149,9 @@ class HealthcheckHealthzGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -190,10 +162,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -202,7 +171,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -210,11 +178,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,7 +190,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/readyz/__init__.py b/launch/api_client/paths/readyz/__init__.py index 4b5a5af4..9b49ccf0 100644 --- a/launch/api_client/paths/readyz/__init__.py +++ b/launch/api_client/paths/readyz/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.READYZ \ No newline at end of file +path = PathValues.READYZ diff --git a/launch/api_client/paths/readyz/get.py b/launch/api_client/paths/readyz/get.py index ef5201be..5ff6a943 100644 --- a/launch/api_client/paths/readyz/get.py +++ b/launch/api_client/paths/readyz/get.py @@ -42,16 +42,13 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, + "200": _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -62,9 +59,8 @@ def _healthcheck_readyz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _healthcheck_readyz_get_oapg( @@ -73,7 +69,8 @@ def _healthcheck_readyz_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _healthcheck_readyz_get_oapg( @@ -82,10 +79,8 @@ def _healthcheck_readyz_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _healthcheck_readyz_get_oapg( self, @@ -106,11 +101,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -126,11 +121,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -145,9 +136,8 @@ def healthcheck_readyz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def healthcheck_readyz_get( @@ -156,7 +146,8 @@ def healthcheck_readyz_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def healthcheck_readyz_get( @@ -165,10 +156,8 @@ def healthcheck_readyz_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def healthcheck_readyz_get( self, @@ -181,7 +170,7 @@ def healthcheck_readyz_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -195,9 +184,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -206,7 +194,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -215,10 +204,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -231,7 +218,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/readyz/get.pyi b/launch/api_client/paths/readyz/get.pyi index 5f8d2904..1637cbbe 100644 --- a/launch/api_client/paths/readyz/get.pyi +++ b/launch/api_client/paths/readyz/get.pyi @@ -27,7 +27,6 @@ from launch_client import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -36,18 +35,13 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -57,10 +51,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _healthcheck_readyz_get_oapg( self, @@ -69,7 +60,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _healthcheck_readyz_get_oapg( self, @@ -77,11 +67,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _healthcheck_readyz_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -101,11 +87,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, stream=stream, timeout=timeout, @@ -121,15 +107,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class HealthcheckReadyzGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -140,10 +121,7 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def healthcheck_readyz_get( self, @@ -152,7 +130,6 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def healthcheck_readyz_get( self, @@ -160,11 +137,7 @@ class HealthcheckReadyzGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def healthcheck_readyz_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -176,10 +149,9 @@ class HealthcheckReadyzGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -190,10 +162,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -202,7 +171,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -210,11 +178,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,7 +190,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_async_tasks/__init__.py b/launch/api_client/paths/v1_async_tasks/__init__.py index 72df600f..aafe0cc4 100644 --- a/launch/api_client/paths/v1_async_tasks/__init__.py +++ b/launch/api_client/paths/v1_async_tasks/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_ASYNCTASKS \ No newline at end of file +path = PathValues.V1_ASYNCTASKS diff --git a/launch/api_client/paths/v1_async_tasks/post.py b/launch/api_client/paths/v1_async_tasks/post.py index f795a6a0..e2b913ea 100644 --- a/launch/api_client/paths/v1_async_tasks/post.py +++ b/launch/api_client/paths/v1_async_tasks/post.py @@ -34,17 +34,15 @@ # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -64,13 +62,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateAsyncTaskV1Response @@ -87,8 +84,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -106,80 +102,83 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -196,9 +195,7 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_endpoint_id, - ): + for parameter in (request_query_model_endpoint_id,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -212,22 +209,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -246,11 +244,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -261,63 +255,69 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -331,7 +331,7 @@ def create_async_inference_task_v1_async_tasks_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -341,63 +341,69 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -411,7 +417,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_async_tasks/post.pyi b/launch/api_client/paths/v1_async_tasks/post.pyi index f9c2ffc0..bbe79b45 100644 --- a/launch/api_client/paths/v1_async_tasks/post.pyi +++ b/launch/api_client/paths/v1_async_tasks/post.pyi @@ -32,23 +32,19 @@ from launch_client.model.create_async_task_v1_response import CreateAsyncTaskV1R # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) - +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_endpoint_id = api_client.QueryParameter( name="model_endpoint_id", style=api_client.ParameterStyle.FORM, @@ -59,17 +55,14 @@ request_query_model_endpoint_id = api_client.QueryParameter( # body param SchemaForRequestBodyApplicationJson = EndpointPredictV1Request - request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateAsyncTaskV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -78,17 +71,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -97,53 +87,47 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -151,26 +135,25 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -187,9 +170,7 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_endpoint_id, - ): + for parameter in (request_query_model_endpoint_id,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -203,22 +184,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -237,51 +219,45 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -289,26 +265,25 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,46 +297,44 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -369,26 +342,25 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -402,7 +374,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_async_tasks_task_id/__init__.py b/launch/api_client/paths/v1_async_tasks_task_id/__init__.py index ef09b1e6..21c8a0fc 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/__init__.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_ASYNCTASKS_TASK_ID \ No newline at end of file +path = PathValues.V1_ASYNCTASKS_TASK_ID diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.py b/launch/api_client/paths/v1_async_tasks_task_id/get.py index 5d4dca8e..55906b69 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.py @@ -33,17 +33,15 @@ # Path params TaskIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'task_id': typing.Union[TaskIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "task_id": typing.Union[ + TaskIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = GetAsyncTaskV1Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( @@ -127,7 +120,8 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( @@ -137,10 +131,8 @@ def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_task_id, - ): + for parameter in (request_path_task_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def get_async_inference_task_v1_async_tasks_task_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( @@ -229,7 +214,8 @@ def get_async_inference_task_v1_async_tasks_task_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( @@ -239,10 +225,8 @@ def get_async_inference_task_v1_async_tasks_task_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -257,7 +241,7 @@ def get_async_inference_task_v1_async_tasks_task_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -284,7 +267,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -294,10 +278,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -312,7 +294,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi index 3e667842..cc044c79 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.get_async_task_v1_response import GetAsyncTaskV1Respons # Path params TaskIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'task_id': typing.Union[TaskIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "task_id": typing.Union[ + TaskIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_task_id = api_client.PathParameter( name="task_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_task_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetAsyncTaskV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_async_inference_task_v1_async_tasks_task_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_task_id, - ): + for parameter in (request_path_task_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -221,7 +190,6 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_async_inference_task_v1_async_tasks_task_id_get( self, @@ -230,11 +198,7 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_async_inference_task_v1_async_tasks_task_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class GetAsyncInferenceTaskV1AsyncTasksTaskIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -276,7 +236,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -285,11 +244,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs/__init__.py b/launch/api_client/paths/v1_batch_jobs/__init__.py index 65e727af..3d5cef58 100644 --- a/launch/api_client/paths/v1_batch_jobs/__init__.py +++ b/launch/api_client/paths/v1_batch_jobs/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_BATCHJOBS \ No newline at end of file +path = PathValues.V1_BATCHJOBS diff --git a/launch/api_client/paths/v1_batch_jobs/post.py b/launch/api_client/paths/v1_batch_jobs/post.py index 75a0574e..7f4e037c 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.py +++ b/launch/api_client/paths/v1_batch_jobs/post.py @@ -37,13 +37,12 @@ request_body_create_batch_job_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateBatchJobV1Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_batch_job_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def create_batch_job_v1_batch_jobs_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs/post.pyi b/launch/api_client/paths/v1_batch_jobs/post.pyi index 7b84b5b8..eaa9f3cf 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.pyi +++ b/launch/api_client/paths/v1_batch_jobs/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateBatchJobV1Request - request_body_create_batch_job_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateBatchJobV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_batch_job_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateBatchJobV1BatchJobsPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py index 0acdf21c..3fa32eda 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_BATCHJOBS_BATCH_JOB_ID \ No newline at end of file +path = PathValues.V1_BATCHJOBS_BATCH_JOB_ID diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py index d4b52f6f..d34350a9 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py @@ -33,17 +33,15 @@ # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "batch_job_id": typing.Union[ + BatchJobIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = GetBatchJobV1Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( @@ -127,7 +120,8 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( @@ -137,10 +131,8 @@ def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_batch_job_id, - ): + for parameter in (request_path_batch_job_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( @@ -229,7 +214,8 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( @@ -239,10 +225,8 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -257,7 +241,7 @@ def get_batch_job_v1_batch_jobs_batch_job_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -284,7 +267,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -294,10 +278,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -312,7 +294,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi index 23da620e..58bfc9a5 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "batch_job_id": typing.Union[ + BatchJobIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_batch_job_id = api_client.PathParameter( name="batch_job_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_batch_job_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetBatchJobV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_batch_job_v1_batch_jobs_batch_job_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_batch_job_id, - ): + for parameter in (request_path_batch_job_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -221,7 +190,6 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_batch_job_v1_batch_jobs_batch_job_id_get( self, @@ -230,11 +198,7 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_batch_job_v1_batch_jobs_batch_job_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class GetBatchJobV1BatchJobsBatchJobIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -276,7 +236,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -285,11 +244,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py index f0cc38b4..6995f5ce 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py @@ -34,17 +34,15 @@ # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "batch_job_id": typing.Union[ + BatchJobIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -63,13 +61,12 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): request_body_update_batch_job_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = UpdateBatchJobV1Response @@ -86,8 +83,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -105,80 +101,83 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -195,9 +194,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_batch_job_id, - ): + for parameter in (request_path_batch_job_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -205,28 +202,29 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_update_batch_job_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='put'.upper(), + method="put".upper(), headers=_headers, fields=_fields, body=_body, @@ -245,11 +243,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -260,63 +254,69 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -330,7 +330,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -340,63 +340,69 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -410,7 +416,5 @@ def put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi index cf381c97..2ff6b37b 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi @@ -32,23 +32,19 @@ from launch_client.model.update_batch_job_v1_request import UpdateBatchJobV1Requ # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'batch_job_id': typing.Union[BatchJobIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "batch_job_id": typing.Union[ + BatchJobIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_batch_job_id = api_client.PathParameter( name="batch_job_id", style=api_client.ParameterStyle.SIMPLE, @@ -58,17 +54,14 @@ request_path_batch_job_id = api_client.PathParameter( # body param SchemaForRequestBodyApplicationJson = UpdateBatchJobV1Request - request_body_update_batch_job_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = UpdateBatchJobV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -77,17 +70,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -96,53 +86,47 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -150,26 +134,25 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -186,9 +169,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_batch_job_id, - ): + for parameter in (request_path_batch_job_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -196,28 +177,29 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_update_batch_job_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='put'.upper(), + method="put".upper(), headers=_headers, fields=_fields, body=_body, @@ -236,51 +218,45 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -288,26 +264,25 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -321,46 +296,44 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -368,26 +341,25 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -401,7 +373,5 @@ class ApiForput(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles/__init__.py b/launch/api_client/paths/v1_model_bundles/__init__.py index 02168487..46bf5ae2 100644 --- a/launch/api_client/paths/v1_model_bundles/__init__.py +++ b/launch/api_client/paths/v1_model_bundles/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES \ No newline at end of file +path = PathValues.V1_MODELBUNDLES diff --git a/launch/api_client/paths/v1_model_bundles/get.py b/launch/api_client/paths/v1_model_bundles/get.py index dfeb1cdb..08eb496f 100644 --- a/launch/api_client/paths/v1_model_bundles/get.py +++ b/launch/api_client/paths/v1_model_bundles/get.py @@ -34,18 +34,19 @@ # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'model_name': typing.Union[ModelNameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) @@ -66,7 +67,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV1Response @@ -83,8 +84,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -102,17 +102,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -124,9 +121,8 @@ def _list_model_bundles_v1_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( @@ -136,7 +132,8 @@ def _list_model_bundles_v1_model_bundles_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( @@ -146,10 +143,8 @@ def _list_model_bundles_v1_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -186,11 +181,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -207,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -227,9 +218,8 @@ def list_model_bundles_v1_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def list_model_bundles_v1_model_bundles_get( @@ -239,7 +229,8 @@ def list_model_bundles_v1_model_bundles_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def list_model_bundles_v1_model_bundles_get( @@ -249,10 +240,8 @@ def list_model_bundles_v1_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def list_model_bundles_v1_model_bundles_get( self, @@ -267,7 +256,7 @@ def list_model_bundles_v1_model_bundles_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -282,9 +271,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -294,7 +282,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -304,10 +293,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -322,7 +309,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles/get.pyi b/launch/api_client/paths/v1_model_bundles/get.pyi index b912a1ef..2b843d8e 100644 --- a/launch/api_client/paths/v1_model_bundles/get.pyi +++ b/launch/api_client/paths/v1_model_bundles/get.pyi @@ -32,25 +32,24 @@ from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'model_name': typing.Union[ModelNameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) - class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -65,7 +64,6 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -74,17 +72,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -93,18 +88,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -115,10 +105,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -128,7 +115,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _list_model_bundles_v1_model_bundles_get_oapg( self, @@ -137,11 +123,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _list_model_bundles_v1_model_bundles_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -177,11 +159,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -198,15 +180,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class ListModelBundlesV1ModelBundlesGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -218,10 +195,7 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def list_model_bundles_v1_model_bundles_get( self, @@ -231,7 +205,6 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def list_model_bundles_v1_model_bundles_get( self, @@ -240,11 +213,7 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def list_model_bundles_v1_model_bundles_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -258,10 +227,9 @@ class ListModelBundlesV1ModelBundlesGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -273,10 +241,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -286,7 +251,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -295,11 +259,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -313,7 +273,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles/post.py b/launch/api_client/paths/v1_model_bundles/post.py index 69f5290e..c659ef67 100644 --- a/launch/api_client/paths/v1_model_bundles/post.py +++ b/launch/api_client/paths/v1_model_bundles/post.py @@ -37,13 +37,12 @@ request_body_create_model_bundle_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_bundle_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def create_model_bundle_v1_model_bundles_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles/post.pyi b/launch/api_client/paths/v1_model_bundles/post.pyi index 552173d6..7cd790a4 100644 --- a/launch/api_client/paths/v1_model_bundles/post.pyi +++ b/launch/api_client/paths/v1_model_bundles/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.create_model_bundle_v1_response import CreateModelBundl # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV1Request - request_body_create_model_bundle_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_bundle_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateModelBundleV1ModelBundlesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py index b5c960ff..35511bd5 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_CLONEWITHCHANGES \ No newline at end of file +path = PathValues.V1_MODELBUNDLES_CLONEWITHCHANGES diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py index ce1d294b..e053f32f 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py @@ -37,13 +37,12 @@ request_body_clone_model_bundle_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_clone_model_bundle_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi index 4a15bd23..60a34dc2 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.clone_model_bundle_v1_request import CloneModelBundleV1 # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV1Request - request_body_clone_model_bundle_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_clone_model_bundle_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_latest/__init__.py b/launch/api_client/paths/v1_model_bundles_latest/__init__.py index e8834ca7..b5e54b32 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_latest/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_LATEST \ No newline at end of file +path = PathValues.V1_MODELBUNDLES_LATEST diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.py b/launch/api_client/paths/v1_model_bundles_latest/get.py index 1cde5141..5df4b778 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.py +++ b/launch/api_client/paths/v1_model_bundles_latest/get.py @@ -33,17 +33,15 @@ # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_name': typing.Union[ModelNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], }, - total=False ) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -58,7 +56,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @@ -75,8 +73,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -94,17 +91,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -116,9 +110,8 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( @@ -128,7 +121,8 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( @@ -138,10 +132,8 @@ def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -161,9 +153,7 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_name, - ): + for parameter in (request_query_model_name,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -177,11 +167,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -198,11 +188,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -218,9 +204,8 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( @@ -230,7 +215,8 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( @@ -240,10 +226,8 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -258,7 +242,7 @@ def get_latest_model_bundle_v1_model_bundles_latest_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -273,9 +257,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -285,7 +268,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -295,10 +279,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -313,7 +295,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.pyi b/launch/api_client/paths/v1_model_bundles_latest/get.pyi index 6bd40f45..68d6f9af 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_latest/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_name': typing.Union[ModelNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], }, - total=False ) - +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -57,7 +53,6 @@ request_query_model_name = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -66,17 +61,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -85,18 +77,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -107,10 +94,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -120,7 +104,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, @@ -129,11 +112,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_latest_model_bundle_v1_model_bundles_latest_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -152,9 +131,7 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_name, - ): + for parameter in (request_query_model_name,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -168,11 +145,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -189,15 +166,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -209,10 +181,7 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -222,7 +191,6 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_latest_model_bundle_v1_model_bundles_latest_get( self, @@ -231,11 +199,7 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_latest_model_bundle_v1_model_bundles_latest_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -249,10 +213,9 @@ class GetLatestModelBundleV1ModelBundlesLatestGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -264,10 +227,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -277,7 +237,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -286,11 +245,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -304,7 +259,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py index aeafa82e..d3532d3a 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELBUNDLES_MODEL_BUNDLE_ID \ No newline at end of file +path = PathValues.V1_MODELBUNDLES_MODEL_BUNDLE_ID diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py index 638fe89d..fe43aef3 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py @@ -33,17 +33,15 @@ # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( @@ -127,7 +120,8 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( @@ -137,10 +131,8 @@ def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_model_bundle_id, - ): + for parameter in (request_path_model_bundle_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( @@ -229,7 +214,8 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( @@ -239,10 +225,8 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -257,7 +241,7 @@ def get_model_bundle_v1_model_bundles_model_bundle_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -284,7 +267,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -294,10 +278,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -312,7 +294,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi index 6053dffd..7afb69a1 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_model_bundle_id = api_client.PathParameter( name="model_bundle_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_model_bundle_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_model_bundle_v1_model_bundles_model_bundle_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_model_bundle_id, - ): + for parameter in (request_path_model_bundle_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -221,7 +190,6 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, @@ -230,11 +198,7 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_model_bundle_v1_model_bundles_model_bundle_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class GetModelBundleV1ModelBundlesModelBundleIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -276,7 +236,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -285,11 +244,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints/__init__.py b/launch/api_client/paths/v1_model_endpoints/__init__.py index 63a2873d..f58f6045 100644 --- a/launch/api_client/paths/v1_model_endpoints/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTS \ No newline at end of file +path = PathValues.V1_MODELENDPOINTS diff --git a/launch/api_client/paths/v1_model_endpoints/get.py b/launch/api_client/paths/v1_model_endpoints/get.py index d61dd75c..49959697 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.py +++ b/launch/api_client/paths/v1_model_endpoints/get.py @@ -34,18 +34,19 @@ # Query params NameSchema = schemas.StrSchema OrderBySchema = ModelEndpointOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'name': typing.Union[NameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "name": typing.Union[ + NameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) @@ -66,7 +67,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ListModelEndpointsV1Response @@ -83,8 +84,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -102,17 +102,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -124,9 +121,8 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( @@ -136,7 +132,8 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( @@ -146,10 +143,8 @@ def _list_model_endpoints_v1_model_endpoints_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -186,11 +181,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -207,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -227,9 +218,8 @@ def list_model_endpoints_v1_model_endpoints_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def list_model_endpoints_v1_model_endpoints_get( @@ -239,7 +229,8 @@ def list_model_endpoints_v1_model_endpoints_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def list_model_endpoints_v1_model_endpoints_get( @@ -249,10 +240,8 @@ def list_model_endpoints_v1_model_endpoints_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def list_model_endpoints_v1_model_endpoints_get( self, @@ -267,7 +256,7 @@ def list_model_endpoints_v1_model_endpoints_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -282,9 +271,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -294,7 +282,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -304,10 +293,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -322,7 +309,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints/get.pyi b/launch/api_client/paths/v1_model_endpoints/get.pyi index ba836ff4..1ef7b3bc 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints/get.pyi @@ -32,25 +32,24 @@ from launch_client.model.model_endpoint_order_by import ModelEndpointOrderBy # Query params NameSchema = schemas.StrSchema OrderBySchema = ModelEndpointOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'name': typing.Union[NameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "name": typing.Union[ + NameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) - class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_name = api_client.QueryParameter( name="name", style=api_client.ParameterStyle.FORM, @@ -65,7 +64,6 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelEndpointsV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -74,17 +72,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -93,18 +88,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -115,10 +105,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -128,7 +115,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _list_model_endpoints_v1_model_endpoints_get_oapg( self, @@ -137,11 +123,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _list_model_endpoints_v1_model_endpoints_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -177,11 +159,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -198,15 +180,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class ListModelEndpointsV1ModelEndpointsGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -218,10 +195,7 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def list_model_endpoints_v1_model_endpoints_get( self, @@ -231,7 +205,6 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def list_model_endpoints_v1_model_endpoints_get( self, @@ -240,11 +213,7 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def list_model_endpoints_v1_model_endpoints_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -258,10 +227,9 @@ class ListModelEndpointsV1ModelEndpointsGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -273,10 +241,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -286,7 +251,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -295,11 +259,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -313,7 +273,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints/post.py b/launch/api_client/paths/v1_model_endpoints/post.py index 6daab4f2..9a3aa363 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.py +++ b/launch/api_client/paths/v1_model_endpoints/post.py @@ -37,13 +37,12 @@ request_body_create_model_endpoint_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateModelEndpointV1Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_endpoint_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def create_model_endpoint_v1_model_endpoints_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints/post.pyi b/launch/api_client/paths/v1_model_endpoints/post.pyi index ede948a4..166a80d7 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.pyi +++ b/launch/api_client/paths/v1_model_endpoints/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateModelEndpointV1Request - request_body_create_model_endpoint_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelEndpointV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_endpoint_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateModelEndpointV1ModelEndpointsPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_api/__init__.py b/launch/api_client/paths/v1_model_endpoints_api/__init__.py index 69585e08..c4f1910d 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_api/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTSAPI \ No newline at end of file +path = PathValues.V1_MODELENDPOINTSAPI diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.py b/launch/api_client/paths/v1_model_endpoints_api/get.py index b6d33bc2..cc076c7e 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.py +++ b/launch/api_client/paths/v1_model_endpoints_api/get.py @@ -28,7 +28,7 @@ from . import path _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @@ -45,16 +45,13 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, + "200": _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -65,9 +62,8 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( @@ -76,7 +72,8 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( @@ -85,10 +82,8 @@ def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -109,11 +104,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -130,11 +125,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -149,9 +140,8 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( @@ -160,7 +150,8 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( @@ -169,10 +160,8 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -185,7 +174,7 @@ def get_model_endpoints_api_v1_model_endpoints_api_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -199,9 +188,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -210,7 +198,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -219,10 +208,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -235,7 +222,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.pyi b/launch/api_client/paths/v1_model_endpoints_api/get.pyi index c2bd2937..b0da6c51 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_api/get.pyi @@ -27,7 +27,6 @@ from launch_client import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -36,18 +35,13 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -57,10 +51,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -69,7 +60,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, @@ -77,11 +67,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_model_endpoints_api_v1_model_endpoints_api_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -101,11 +87,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -122,15 +108,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -141,10 +122,7 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -153,7 +131,6 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_model_endpoints_api_v1_model_endpoints_api_get( self, @@ -161,11 +138,7 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_model_endpoints_api_v1_model_endpoints_api_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -177,10 +150,9 @@ class GetModelEndpointsApiV1ModelEndpointsApiGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -191,10 +163,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -203,7 +172,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -211,11 +179,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -227,7 +191,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py index e382b4ff..fb6cdf7c 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID \ No newline at end of file +path = PathValues.V1_MODELENDPOINTS_MODEL_ENDPOINT_ID diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py index 4968608b..288eb17f 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py @@ -33,17 +33,15 @@ # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = DeleteModelEndpointV1Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( @@ -127,7 +120,8 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( @@ -137,10 +131,8 @@ def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='delete'.upper(), + method="delete".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( @@ -229,7 +214,8 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( @@ -239,10 +225,8 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -257,7 +241,7 @@ def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def delete( @@ -284,7 +267,8 @@ def delete( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def delete( @@ -294,10 +278,8 @@ def delete( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def delete( self, @@ -312,7 +294,5 @@ def delete( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi index 70c4cda2..01038a46 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_model_endpoint_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = DeleteModelEndpointV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='delete'.upper(), + method="delete".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -221,7 +190,6 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, @@ -230,11 +198,7 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def delete_model_endpoint_v1_model_endpoints_model_endpoint_id_delete( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiFordelete(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def delete( self, @@ -276,7 +236,6 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def delete( self, @@ -285,11 +244,7 @@ class ApiFordelete(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def delete( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiFordelete(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py index 94382ce9..3f9b83ab 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py @@ -33,17 +33,15 @@ # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = GetModelEndpointV1Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( @@ -127,7 +120,8 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( @@ -137,10 +131,8 @@ def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( @@ -229,7 +214,8 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( @@ -239,10 +225,8 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -257,7 +241,7 @@ def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -284,7 +267,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -294,10 +278,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -312,7 +294,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi index 1538b496..40537503 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_model_endpoint_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = GetModelEndpointV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_model_endpoint_v1_model_endpoints_model_endpoint_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -221,7 +190,6 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, @@ -230,11 +198,7 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_model_endpoint_v1_model_endpoints_model_endpoint_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class GetModelEndpointV1ModelEndpointsModelEndpointIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -276,7 +236,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -285,11 +244,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py index 3d96a934..eefe9ce5 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py @@ -34,17 +34,15 @@ # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -63,13 +61,12 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): request_body_update_model_endpoint_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = UpdateModelEndpointV1Response @@ -86,8 +83,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -105,80 +101,83 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -195,9 +194,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -205,28 +202,29 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_update_model_endpoint_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='put'.upper(), + method="put".upper(), headers=_headers, fields=_fields, body=_body, @@ -245,11 +243,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -260,63 +254,69 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -330,7 +330,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -340,63 +340,69 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -410,7 +416,5 @@ def put( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi index 0012df0a..41c90130 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi @@ -32,23 +32,19 @@ from launch_client.model.update_model_endpoint_v1_request import UpdateModelEndp # Path params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_model_endpoint_id = api_client.PathParameter( name="model_endpoint_id", style=api_client.ParameterStyle.SIMPLE, @@ -58,17 +54,14 @@ request_path_model_endpoint_id = api_client.PathParameter( # body param SchemaForRequestBodyApplicationJson = UpdateModelEndpointV1Request - request_body_update_model_endpoint_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = UpdateModelEndpointV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -77,17 +70,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -96,53 +86,47 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -150,26 +134,25 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -186,9 +169,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_model_endpoint_id, - ): + for parameter in (request_path_model_endpoint_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -196,28 +177,29 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_update_model_endpoint_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='put'.upper(), + method="put".upper(), headers=_headers, fields=_fields, body=_body, @@ -236,51 +218,45 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -288,26 +264,25 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -321,46 +296,44 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForput(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -368,26 +341,25 @@ class ApiForput(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def put( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -401,7 +373,5 @@ class ApiForput(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py b/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py index bbefa10f..4dd4f68d 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_MODELENDPOINTSSCHEMA_JSON \ No newline at end of file +path = PathValues.V1_MODELENDPOINTSSCHEMA_JSON diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py index 8c24a455..c9547fc3 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py @@ -28,7 +28,7 @@ from . import path _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @@ -45,16 +45,13 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, + "200": _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -65,9 +62,8 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( @@ -76,7 +72,8 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( @@ -85,10 +82,8 @@ def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -109,11 +104,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -130,11 +125,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -149,9 +140,8 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( @@ -160,7 +150,8 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( @@ -169,10 +160,8 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -185,7 +174,7 @@ def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -199,9 +188,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -210,7 +198,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -219,10 +208,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -235,7 +222,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi index 780a5c95..0a02f769 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi @@ -27,7 +27,6 @@ from launch_client import schemas # noqa: F401 SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -36,18 +35,13 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -57,10 +51,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -69,7 +60,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, @@ -77,11 +67,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_model_endpoints_schema_v1_model_endpoints_schema_json_get_oapg( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -101,11 +87,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -122,15 +108,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -141,10 +122,7 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -153,7 +131,6 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, @@ -161,11 +138,7 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_model_endpoints_schema_v1_model_endpoints_schema_json_get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -177,10 +150,9 @@ class GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -191,10 +163,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -203,7 +172,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -211,11 +179,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -227,7 +191,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_sync_tasks/__init__.py b/launch/api_client/paths/v1_sync_tasks/__init__.py index 0ad403fe..e05b06c3 100644 --- a/launch/api_client/paths/v1_sync_tasks/__init__.py +++ b/launch/api_client/paths/v1_sync_tasks/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V1_SYNCTASKS \ No newline at end of file +path = PathValues.V1_SYNCTASKS diff --git a/launch/api_client/paths/v1_sync_tasks/post.py b/launch/api_client/paths/v1_sync_tasks/post.py index 590fc5b5..1a0222af 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.py +++ b/launch/api_client/paths/v1_sync_tasks/post.py @@ -34,17 +34,15 @@ # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -64,13 +62,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = SyncEndpointPredictV1Response @@ -87,8 +84,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -106,80 +102,83 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -196,9 +195,7 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_endpoint_id, - ): + for parameter in (request_query_model_endpoint_id,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -212,22 +209,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -246,11 +244,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -261,63 +255,69 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -331,7 +331,7 @@ def create_sync_inference_task_v1_sync_tasks_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -341,63 +341,69 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -411,7 +417,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v1_sync_tasks/post.pyi b/launch/api_client/paths/v1_sync_tasks/post.pyi index 1802b388..bc968611 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.pyi +++ b/launch/api_client/paths/v1_sync_tasks/post.pyi @@ -32,23 +32,19 @@ from launch_client.model.sync_endpoint_predict_v1_response import SyncEndpointPr # Query params ModelEndpointIdSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_endpoint_id': typing.Union[ModelEndpointIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_endpoint_id": typing.Union[ + ModelEndpointIdSchema, + str, + ], }, - total=False ) - +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_endpoint_id = api_client.QueryParameter( name="model_endpoint_id", style=api_client.ParameterStyle.FORM, @@ -59,17 +55,14 @@ request_query_model_endpoint_id = api_client.QueryParameter( # body param SchemaForRequestBodyApplicationJson = EndpointPredictV1Request - request_body_endpoint_predict_v1_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = SyncEndpointPredictV1Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -78,17 +71,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -97,53 +87,47 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -151,26 +135,25 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -187,9 +170,7 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_endpoint_id, - ): + for parameter in (request_query_model_endpoint_id,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -203,22 +184,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_endpoint_predict_v1_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -237,51 +219,45 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -289,26 +265,25 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,46 +297,44 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -369,26 +342,25 @@ class ApiForpost(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -402,7 +374,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles/__init__.py b/launch/api_client/paths/v2_model_bundles/__init__.py index a34ff03c..4de08029 100644 --- a/launch/api_client/paths/v2_model_bundles/__init__.py +++ b/launch/api_client/paths/v2_model_bundles/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES \ No newline at end of file +path = PathValues.V2_MODELBUNDLES diff --git a/launch/api_client/paths/v2_model_bundles/get.py b/launch/api_client/paths/v2_model_bundles/get.py index 90a8227e..06794dd6 100644 --- a/launch/api_client/paths/v2_model_bundles/get.py +++ b/launch/api_client/paths/v2_model_bundles/get.py @@ -34,18 +34,19 @@ # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'model_name': typing.Union[ModelNameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) @@ -66,7 +67,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response @@ -83,8 +84,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -102,17 +102,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -124,9 +121,8 @@ def _list_model_bundles_v2_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( @@ -136,7 +132,8 @@ def _list_model_bundles_v2_model_bundles_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( @@ -146,10 +143,8 @@ def _list_model_bundles_v2_model_bundles_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -186,11 +181,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -207,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -227,9 +218,8 @@ def list_model_bundles_v2_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def list_model_bundles_v2_model_bundles_get( @@ -239,7 +229,8 @@ def list_model_bundles_v2_model_bundles_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def list_model_bundles_v2_model_bundles_get( @@ -249,10 +240,8 @@ def list_model_bundles_v2_model_bundles_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def list_model_bundles_v2_model_bundles_get( self, @@ -267,7 +256,7 @@ def list_model_bundles_v2_model_bundles_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -282,9 +271,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -294,7 +282,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -304,10 +293,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -322,7 +309,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi index b1c05840..e81a9b03 100644 --- a/launch/api_client/paths/v2_model_bundles/get.pyi +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -32,25 +32,24 @@ from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema OrderBySchema = ModelBundleOrderBy -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) +RequestRequiredQueryParams = typing_extensions.TypedDict("RequestRequiredQueryParams", {}) RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestOptionalQueryParams", { - 'model_name': typing.Union[ModelNameSchema, str, ], - 'order_by': typing.Union[OrderBySchema, ], + "model_name": typing.Union[ + ModelNameSchema, + str, + ], + "order_by": typing.Union[ + OrderBySchema, + ], }, - total=False + total=False, ) - class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -65,7 +64,6 @@ request_query_order_by = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -74,17 +72,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -93,18 +88,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -115,10 +105,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -128,7 +115,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _list_model_bundles_v2_model_bundles_get_oapg( self, @@ -137,11 +123,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _list_model_bundles_v2_model_bundles_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -177,11 +159,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -198,15 +180,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class ListModelBundlesV2ModelBundlesGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -218,10 +195,7 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def list_model_bundles_v2_model_bundles_get( self, @@ -231,7 +205,6 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def list_model_bundles_v2_model_bundles_get( self, @@ -240,11 +213,7 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def list_model_bundles_v2_model_bundles_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -258,10 +227,9 @@ class ListModelBundlesV2ModelBundlesGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -273,10 +241,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -286,7 +251,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -295,11 +259,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -313,7 +273,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles/post.py b/launch/api_client/paths/v2_model_bundles/post.py index 6e6b6062..ce07fac6 100644 --- a/launch/api_client/paths/v2_model_bundles/post.py +++ b/launch/api_client/paths/v2_model_bundles/post.py @@ -37,13 +37,12 @@ request_body_create_model_bundle_v2_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def create_model_bundle_v2_model_bundles_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi index bf69503f..085b7b57 100644 --- a/launch/api_client/paths/v2_model_bundles/post.pyi +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.create_model_bundle_v2_response import CreateModelBundl # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request - request_body_create_model_bundle_v2_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_create_model_bundle_v2_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CreateModelBundleV2ModelBundlesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py index ac407cd6..1a69800e 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES \ No newline at end of file +path = PathValues.V2_MODELBUNDLES_CLONEWITHCHANGES diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py index 71b1844a..0a558a0b 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py @@ -37,13 +37,12 @@ request_body_clone_model_bundle_v2_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @@ -60,8 +59,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -79,76 +77,79 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -166,22 +167,23 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -200,11 +202,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -215,59 +213,65 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -279,7 +283,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -289,59 +293,65 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -353,7 +363,5 @@ def post( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi index ebd1d600..6040c86c 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -32,17 +32,14 @@ from launch_client.model.clone_model_bundle_v2_request import CloneModelBundleV2 # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request - request_body_clone_model_bundle_v2_request = api_client.RequestBody( content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaForRequestBodyApplicationJson), }, required=True, ) SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -51,17 +48,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -70,76 +64,69 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -157,22 +144,23 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') + "The required body parameter has an invalid value of: unset. Set a valid value instead" + ) _fields = None _body = None serialized_data = request_body_clone_model_bundle_v2_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] + _headers.add("Content-Type", content_type) + if "fields" in serialized_data: + _fields = serialized_data["fields"] + elif "body" in serialized_data: + _body = serialized_data["body"] response = self.api_client.call_api( resource_path=used_path, - method='post'.upper(), + method="post".upper(), headers=_headers, fields=_fields, body=_body, @@ -191,74 +179,67 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -270,69 +251,66 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', + body: typing.Union[ + SchemaForRequestBodyApplicationJson, + ], + content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -344,7 +322,5 @@ class ApiForpost(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_latest/__init__.py b/launch/api_client/paths/v2_model_bundles_latest/__init__.py index 190c18d6..b8ce06cc 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_latest/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_LATEST \ No newline at end of file +path = PathValues.V2_MODELBUNDLES_LATEST diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.py b/launch/api_client/paths/v2_model_bundles_latest/get.py index 8c4bb2fb..c6b94221 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.py +++ b/launch/api_client/paths/v2_model_bundles_latest/get.py @@ -33,17 +33,15 @@ # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_name': typing.Union[ModelNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], }, - total=False ) +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): @@ -58,7 +56,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) explode=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @@ -75,8 +73,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -94,17 +91,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -116,9 +110,8 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( @@ -128,7 +121,8 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( @@ -138,10 +132,8 @@ def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -161,9 +153,7 @@ class instances used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_name, - ): + for parameter in (request_query_model_name,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -177,11 +167,11 @@ class instances # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -198,11 +188,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -218,9 +204,8 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( @@ -230,7 +215,8 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( @@ -240,10 +226,8 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -258,7 +242,7 @@ def get_latest_model_bundle_v2_model_bundles_latest_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -273,9 +257,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -285,7 +268,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -295,10 +279,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -313,7 +295,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi index b4e22922..8a6560c8 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'model_name': typing.Union[ModelNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', + "RequestRequiredQueryParams", { + "model_name": typing.Union[ + ModelNameSchema, + str, + ], }, - total=False ) - +RequestOptionalQueryParams = typing_extensions.TypedDict("RequestOptionalQueryParams", {}, total=False) class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): pass - request_query_model_name = api_client.QueryParameter( name="model_name", style=api_client.ParameterStyle.FORM, @@ -57,7 +53,6 @@ request_query_model_name = api_client.QueryParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -66,17 +61,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -85,18 +77,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -107,10 +94,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -120,7 +104,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, @@ -129,11 +112,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_latest_model_bundle_v2_model_bundles_latest_get_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -152,9 +131,7 @@ class BaseApi(api_client.Api): used_path = path.value prefix_separator_iterator = None - for parameter in ( - request_query_model_name, - ): + for parameter in (request_query_model_name,): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -168,11 +145,11 @@ class BaseApi(api_client.Api): # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -189,15 +166,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -209,10 +181,7 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -222,7 +191,6 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_latest_model_bundle_v2_model_bundles_latest_get( self, @@ -231,11 +199,7 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_latest_model_bundle_v2_model_bundles_latest_get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -249,10 +213,9 @@ class GetLatestModelBundleV2ModelBundlesLatestGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -264,10 +227,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -277,7 +237,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -286,11 +245,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, query_params: RequestQueryParams = frozendict.frozendict(), @@ -304,7 +259,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py index 783f2147..df3c2a79 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/__init__.py @@ -4,4 +4,4 @@ from launch.api_client.paths import PathValues -path = PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID \ No newline at end of file +path = PathValues.V2_MODELBUNDLES_MODEL_BUNDLE_ID diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py index a2d50a0b..49ee7787 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py @@ -33,17 +33,15 @@ # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], }, - total=False ) +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @@ -57,7 +55,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) _auth = [ - 'HTTPBasic', + "HTTPBasic", ] SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @@ -74,8 +72,7 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @@ -93,17 +90,14 @@ class ApiResponseFor422(api_client.ApiResponse): _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) _status_code_to_response = { - '200': _response_for_200, - '422': _response_for_422, + "200": _response_for_200, + "422": _response_for_422, } -_all_accept_content_types = ( - 'application/json', -) +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @@ -115,9 +109,8 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( @@ -127,7 +120,8 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( @@ -137,10 +131,8 @@ def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -160,9 +152,7 @@ class instances used_path = path.value _path_params = {} - for parameter in ( - request_path_model_bundle_id, - ): + for parameter in (request_path_model_bundle_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -170,17 +160,17 @@ class instances _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -197,11 +187,7 @@ class instances api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response @@ -217,9 +203,8 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( @@ -229,7 +214,8 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( @@ -239,10 +225,8 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -257,7 +241,7 @@ def get_model_bundle_v2_model_bundles_model_bundle_id_get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) @@ -272,9 +256,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... + ) -> typing.Union[ApiResponseFor200,]: + ... @typing.overload def get( @@ -284,7 +267,8 @@ def get( accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... + ) -> api_client.ApiResponseWithoutDeserialization: + ... @typing.overload def get( @@ -294,10 +278,8 @@ def get( stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: + ... def get( self, @@ -312,7 +294,5 @@ def get( accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi index 088a3fff..297cd32c 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -31,23 +31,19 @@ from launch_client.model.http_validation_error import HTTPValidationError # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'model_bundle_id': typing.Union[ModelBundleIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', + "RequestRequiredPathParams", { + "model_bundle_id": typing.Union[ + ModelBundleIdSchema, + str, + ], }, - total=False ) - +RequestOptionalPathParams = typing_extensions.TypedDict("RequestOptionalPathParams", {}, total=False) class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): pass - request_path_model_bundle_id = api_client.PathParameter( name="model_bundle_id", style=api_client.ParameterStyle.SIMPLE, @@ -56,7 +52,6 @@ request_path_model_bundle_id = api_client.PathParameter( ) SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response - @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -65,17 +60,14 @@ class ApiResponseFor200(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor200ResponseBodyApplicationJson), }, ) SchemaFor422ResponseBodyApplicationJson = HTTPValidationError - @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse @@ -84,18 +76,13 @@ class ApiResponseFor422(api_client.ApiResponse): ] headers: schemas.Unset = schemas.unset - _response_for_422 = api_client.OpenApiResponse( response_cls=ApiResponseFor422, content={ - 'application/json': api_client.MediaType( - schema=SchemaFor422ResponseBodyApplicationJson), + "application/json": api_client.MediaType(schema=SchemaFor422ResponseBodyApplicationJson), }, ) -_all_accept_content_types = ( - 'application/json', -) - +_all_accept_content_types = ("application/json",) class BaseApi(api_client.Api): @typing.overload @@ -106,10 +93,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -119,7 +103,6 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, @@ -128,11 +111,7 @@ class BaseApi(api_client.Api): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _get_model_bundle_v2_model_bundles_model_bundle_id_get_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -151,9 +130,7 @@ class BaseApi(api_client.Api): used_path = path.value _path_params = {} - for parameter in ( - request_path_model_bundle_id, - ): + for parameter in (request_path_model_bundle_id,): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: continue @@ -161,17 +138,17 @@ class BaseApi(api_client.Api): _path_params.update(serialized_data) for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) + used_path = used_path.replace("{%s}" % k, v) _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) + _headers.add("Accept", accept_content_type) response = self.api_client.call_api( resource_path=used_path, - method='get'.upper(), + method="get".upper(), headers=_headers, auth_settings=_auth, stream=stream, @@ -188,15 +165,10 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) + raise exceptions.ApiException(status=response.status, reason=response.reason, api_response=api_response) return api_response - class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @@ -208,10 +180,7 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -221,7 +190,6 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, @@ -230,11 +198,7 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get_model_bundle_v2_model_bundles_model_bundle_id_get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -248,10 +212,9 @@ class GetModelBundleV2ModelBundlesModelBundleIdGet(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - class ApiForget(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @@ -263,10 +226,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - + ) -> typing.Union[ApiResponseFor200,]: ... @typing.overload def get( self, @@ -276,7 +236,6 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload def get( self, @@ -285,11 +244,7 @@ class ApiForget(BaseApi): stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - + ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def get( self, path_params: RequestPathParams = frozendict.frozendict(), @@ -303,7 +258,5 @@ class ApiForget(BaseApi): accept_content_types=accept_content_types, stream=stream, timeout=timeout, - skip_deserialization=skip_deserialization + skip_deserialization=skip_deserialization, ) - - diff --git a/launch/api_client/rest.py b/launch/api_client/rest.py index 89aa1230..3faf0bd6 100644 --- a/launch/api_client/rest.py +++ b/launch/api_client/rest.py @@ -25,7 +25,6 @@ class RESTClientObject(object): - def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -48,13 +47,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + addition_pool_args["retries"] = configuration.retries if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + addition_pool_args["socket_options"] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -73,7 +72,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, - **addition_pool_args + **addition_pool_args, ) else: self.pool_manager = urllib3.PoolManager( @@ -83,7 +82,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): ca_certs=ca_certs, cert_file=configuration.cert_file, key_file=configuration.key_file, - **addition_pool_args + **addition_pool_args, ) def request( @@ -114,13 +113,10 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if fields and body: - raise ApiValueError( - "body parameter cannot be used with fields parameter." - ) + raise ApiValueError("body parameter cannot be used with fields parameter.") fields = fields or {} headers = headers or {} @@ -128,53 +124,49 @@ def request( if timeout: if isinstance(timeout, (int, float)): # noqa: E501,F821 timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): + elif isinstance(timeout, tuple) and len(timeout) == 2: timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: + if "Content-Type" not in headers and body is None: r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=timeout, - headers=headers + method, url, preload_content=not stream, timeout=timeout, headers=headers ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 r = self.pool_manager.request( - method, url, + method, + url, body=body, fields=fields, encode_multipart=False, preload_content=not stream, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + ) + elif headers["Content-Type"] == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] r = self.pool_manager.request( - method, url, + method, + url, fields=fields, encode_multipart=True, preload_content=not stream, timeout=timeout, - headers=headers) + headers=headers, + ) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is # provided in serialized form elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=timeout, - headers=headers) + method, url, body=request_body, preload_content=not stream, timeout=timeout, headers=headers + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -183,10 +175,7 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=timeout, - headers=headers) + r = self.pool_manager.request(method, url, preload_content=not stream, timeout=timeout, headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) @@ -197,58 +186,23 @@ def request( return r - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) + def GET(self, url, headers=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("GET", url, headers=headers, stream=stream, timeout=timeout, fields=fields) + + def HEAD(self, url, headers=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("HEAD", url, headers=headers, stream=stream, timeout=timeout, fields=fields) + + def OPTIONS(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("OPTIONS", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) + + def DELETE(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("DELETE", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) + + def POST(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("POST", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) + + def PUT(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PUT", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) + + def PATCH(self, url, headers=None, body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: + return self.request("PATCH", url, headers=headers, stream=stream, timeout=timeout, body=body, fields=fields) diff --git a/launch/api_client/schemas.py b/launch/api_client/schemas.py index a8c70520..52a9e974 100644 --- a/launch/api_client/schemas.py +++ b/launch/api_client/schemas.py @@ -36,8 +36,10 @@ class Unset(object): An instance of this class is set as the default value for object type(dict) properties that are optional When a property has an unset value, that property will not be assigned in the dict """ + pass + unset = Unset() none_type = type(None) @@ -53,12 +55,12 @@ class FileIO(io.FileIO): def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): if isinstance(_arg, (io.FileIO, io.BufferedReader)): if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') + raise ApiValueError("Invalid file state; file is closed and must be open") _arg.close() inst = super(FileIO, cls).__new__(cls, _arg.name) super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') + raise ApiValueError("FileIO must be passed _arg which contains the open file") def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -82,13 +84,16 @@ class ValidationMetadata(frozendict.frozendict): """ A class storing metadata that is needed to validate OpenApi Schema payloads """ + def __new__( cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(["args[0]"]), from_server: bool = False, configuration: typing.Optional[Configuration] = None, seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type] + ] = frozendict.frozendict(), ): """ Args: @@ -115,7 +120,7 @@ def __new__( from_server=from_server, configuration=configuration, seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas + validated_path_to_schemas=validated_path_to_schemas, ) def validation_ran_earlier(self, cls: type) -> bool: @@ -129,23 +134,25 @@ def validation_ran_earlier(self, cls: type) -> bool: @property def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') + return self.get("path_to_item") @property def from_server(self) -> bool: - return self.get('from_server') + return self.get("from_server") @property def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') + return self.get("configuration") @property def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') + return self.get("seen_classes") @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') + def validated_path_to_schemas( + self, + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: + return self.get("validated_path_to_schemas") def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): @@ -155,7 +162,7 @@ def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_t for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): if len(path_to_item) < len(current_path_to_item): continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + path_begins_with_current_path = path_to_item[: len(current_path_to_item)] == current_path_to_item if path_begins_with_current_path: other_path_to_schemas[path_to_item] = schemas update(path_to_schemas, other_path_to_schemas) @@ -166,6 +173,7 @@ class Singleton: Enums and singletons are the same The same instance is returned for a given key of (cls, _arg) """ + _instances = {} def __new__(cls, _arg: typing.Any, **kwargs): @@ -189,16 +197,15 @@ def __new__(cls, _arg: typing.Any, **kwargs): def __repr__(self): if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' + return f"<{self.__class__.__name__}: None>" elif isinstance(self, BoolClass): if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' + return f"<{self.__class__.__name__}: True>" + return f"<{self.__class__.__name__}: False>" + return f"<{self.__class__.__name__}: {super().__repr__()}>" class classproperty: - def __init__(self, fget): self.fget = fget @@ -229,7 +236,7 @@ def __bool__(self) -> bool: for key, instance in self._instances.items(): if self is instance: return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') + raise ValueError("Unable to find the boolean value of this instance") class MetaOapgTyped: @@ -239,30 +246,39 @@ class MetaOapgTyped: inclusive_minimum: typing.Union[int, float] max_items: int min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - + discriminator: typing.Dict[str, typing.Dict[str, typing.Type["Schema"]]] class properties: # to hold object properties pass - additional_properties: typing.Optional[typing.Type['Schema']] + additional_properties: typing.Optional[typing.Type["Schema"]] max_properties: int min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] + all_of: typing.List[typing.Type["Schema"]] + one_of: typing.List[typing.Type["Schema"]] + any_of: typing.List[typing.Type["Schema"]] + not_schema: typing.Type["Schema"] max_length: int min_length: int - items: typing.Type['Schema'] + items: typing.Type["Schema"] class Schema: """ the base class of all swagger/openapi schemas/models """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} + + __inheritable_primitive_types_set = { + decimal.Decimal, + str, + tuple, + frozendict.frozendict, + FileIO, + bytes, + BoolClass, + NoneClass, + } _types: typing.Set[typing.Type] MetaOapg = MetaOapgTyped @@ -277,7 +293,9 @@ def __get_valid_classes_phrase(input_classes): return "is one of [{0}]".format(", ".join(all_class_names)) @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: + def _get_class_oapg( + item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type["Schema"]] + ) -> typing.Type["Schema"]: if isinstance(item_cls, types.FunctionType): # referenced schema return item_cls() @@ -287,9 +305,7 @@ def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typ return item_cls @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): + def __type_error_message(cls, var_value=None, var_name=None, valid_classes=None, key_type=None): """ Keyword Args: var_value (any): the variable which has the type_error @@ -332,7 +348,10 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + ) -> typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ]: """ Schema _validate_oapg All keyword validation except for type checking was done in calling stack frames @@ -361,7 +380,9 @@ def _validate_oapg( @staticmethod def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] + schema_classes: typing.Set[ + typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple] + ] ): """ Processes and mutates schema_classes @@ -381,10 +402,8 @@ def _process_schema_classes_oapg( @classmethod def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: + cls, arg, validation_metadata: ValidationMetadata + ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]]: """ Make a new dynamic class and return an instance of that class We are making an instance of cls, but instead of making cls @@ -423,8 +442,7 @@ def __get_new_cls( 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo """ cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) + enum_schema = any(issubclass(this_cls, EnumBase) for this_cls in schema_classes) inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) chosen_schema_classes = schema_classes - inheritable_primitive_type suffix = tuple(inheritable_primitive_type) @@ -432,7 +450,7 @@ def __get_new_cls( suffix = (Singleton,) + suffix used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) + mfg_cls = get_new_class(class_name="DynamicSchema", bases=used_classes) path_to_schemas[path] = mfg_cls return path_to_schemas @@ -442,7 +460,7 @@ def _get_new_instance_without_conversion_oapg( cls, arg: typing.Any, path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], ): # We have a Dynamic class and we are making an instance of it if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): @@ -471,16 +489,16 @@ def from_openapi_data_oapg( decimal.Decimal, bool, None, - 'Schema', + "Schema", dict, frozendict.frozendict, tuple, list, io.FileIO, io.BufferedReader, - bytes + bytes, ], - _configuration: typing.Optional[Configuration] + _configuration: typing.Optional[Configuration], ): """ Schema from_openapi_data_oapg @@ -489,13 +507,12 @@ def from_openapi_data_oapg( validated_path_to_schemas = {} arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) + from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas + ) path_to_schemas = cls.__get_new_cls(arg, validation_metadata) new_cls = path_to_schemas[validation_metadata.path_to_item] new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas + arg, validation_metadata.path_to_item, path_to_schemas ) return new_inst @@ -512,7 +529,41 @@ def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__( + cls, + *_args: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + date, + datetime, + bool, + None, + "Schema", + ], + _configuration: typing.Optional[Configuration] = None, + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + date, + datetime, + bool, + None, + "Schema", + Unset, + ], + ): """ Schema __new__ @@ -527,35 +578,59 @@ def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, """ __kwargs = cls.__remove_unsets(kwargs) if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) + raise TypeError("No input given. args or kwargs must be given.") if not __kwargs and _args and not isinstance(_args[0], dict): __arg = _args[0] else: __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) + __arg = cast_to_allowed_types(__arg, __from_server, __validated_path_to_schemas) __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) + configuration=_configuration, + from_server=__from_server, + validated_path_to_schemas=__validated_path_to_schemas, + ) __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) __new_cls = __path_to_schemas[__validation_metadata.path_to_item] return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas + __arg, __validation_metadata.path_to_item, __path_to_schemas ) def __init__( self, *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + date, + datetime, + bool, + None, + "Schema", + ], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + date, + datetime, + bool, + None, + "Schema", + Unset, + ], ): """ this is needed to fix 'Unexpected argument' warning in pycharm @@ -565,6 +640,7 @@ def __init__( """ pass + """ import itertools data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') @@ -597,266 +673,395 @@ def __init__( # qty 2 class BinaryMixin(bytes, FileIO): pass + class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): pass + class NoneTupleMixin(NoneClass, tuple): pass + class NoneStrMixin(NoneClass, str): pass + class NoneDecimalMixin(NoneClass, decimal.Decimal): pass + class NoneBoolMixin(NoneClass, BoolClass): pass + class FrozenDictTupleMixin(frozendict.frozendict, tuple): pass + class FrozenDictStrMixin(frozendict.frozendict, str): pass + class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): pass + class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): pass + class TupleStrMixin(tuple, str): pass + class TupleDecimalMixin(tuple, decimal.Decimal): pass + class TupleBoolMixin(tuple, BoolClass): pass + class StrDecimalMixin(str, decimal.Decimal): pass + class StrBoolMixin(str, BoolClass): pass + class DecimalBoolMixin(decimal.Decimal, BoolClass): pass + # qty 3 class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): pass + class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): pass + class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): pass + class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): pass + class NoneTupleStrMixin(NoneClass, tuple, str): pass + class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): pass + class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): pass + class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): pass + class NoneStrBoolMixin(NoneClass, str, BoolClass): pass + class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): pass + class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): pass + class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): pass + class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): pass + class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): pass + class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): pass + class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): pass + class TupleStrDecimalMixin(tuple, str, decimal.Decimal): pass + class TupleStrBoolMixin(tuple, str, BoolClass): pass + class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): pass + class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): pass + # qty 4 class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): pass + class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): pass + class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): pass + class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): pass + class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): pass + class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): pass + class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): pass + class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): pass + class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): pass + class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): pass + class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): pass + class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): pass + class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): pass + class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): pass + class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): pass + # qty 5 class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): pass + class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): pass + class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): pass + class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): pass + class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): pass + class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): pass + # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): + class NoneFrozenDictTupleStrDecimalBoolMixin( + NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass + ): pass + # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): + class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin( + NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes + ): pass + else: # qty 1 class NoneMixin: _types = {NoneClass} + class FrozenDictMixin: _types = {frozendict.frozendict} + class TupleMixin: _types = {tuple} + class StrMixin: _types = {str} + class DecimalMixin: _types = {decimal.Decimal} + class BoolMixin: _types = {BoolClass} + class BytesMixin: _types = {bytes} + class FileMixin: _types = {FileIO} + # qty 2 class BinaryMixin: _types = {bytes, FileIO} + class NoneFrozenDictMixin: _types = {NoneClass, frozendict.frozendict} + class NoneTupleMixin: _types = {NoneClass, tuple} + class NoneStrMixin: _types = {NoneClass, str} + class NoneDecimalMixin: _types = {NoneClass, decimal.Decimal} + class NoneBoolMixin: _types = {NoneClass, BoolClass} + class FrozenDictTupleMixin: _types = {frozendict.frozendict, tuple} + class FrozenDictStrMixin: _types = {frozendict.frozendict, str} + class FrozenDictDecimalMixin: _types = {frozendict.frozendict, decimal.Decimal} + class FrozenDictBoolMixin: _types = {frozendict.frozendict, BoolClass} + class TupleStrMixin: _types = {tuple, str} + class TupleDecimalMixin: _types = {tuple, decimal.Decimal} + class TupleBoolMixin: _types = {tuple, BoolClass} + class StrDecimalMixin: _types = {str, decimal.Decimal} + class StrBoolMixin: _types = {str, BoolClass} + class DecimalBoolMixin: _types = {decimal.Decimal, BoolClass} + # qty 3 class NoneFrozenDictTupleMixin: _types = {NoneClass, frozendict.frozendict, tuple} + class NoneFrozenDictStrMixin: _types = {NoneClass, frozendict.frozendict, str} + class NoneFrozenDictDecimalMixin: _types = {NoneClass, frozendict.frozendict, decimal.Decimal} + class NoneFrozenDictBoolMixin: _types = {NoneClass, frozendict.frozendict, BoolClass} + class NoneTupleStrMixin: _types = {NoneClass, tuple, str} + class NoneTupleDecimalMixin: _types = {NoneClass, tuple, decimal.Decimal} + class NoneTupleBoolMixin: _types = {NoneClass, tuple, BoolClass} + class NoneStrDecimalMixin: _types = {NoneClass, str, decimal.Decimal} + class NoneStrBoolMixin: _types = {NoneClass, str, BoolClass} + class NoneDecimalBoolMixin: _types = {NoneClass, decimal.Decimal, BoolClass} + class FrozenDictTupleStrMixin: _types = {frozendict.frozendict, tuple, str} + class FrozenDictTupleDecimalMixin: _types = {frozendict.frozendict, tuple, decimal.Decimal} + class FrozenDictTupleBoolMixin: _types = {frozendict.frozendict, tuple, BoolClass} + class FrozenDictStrDecimalMixin: _types = {frozendict.frozendict, str, decimal.Decimal} + class FrozenDictStrBoolMixin: _types = {frozendict.frozendict, str, BoolClass} + class FrozenDictDecimalBoolMixin: _types = {frozendict.frozendict, decimal.Decimal, BoolClass} + class TupleStrDecimalMixin: _types = {tuple, str, decimal.Decimal} + class TupleStrBoolMixin: _types = {tuple, str, BoolClass} + class TupleDecimalBoolMixin: _types = {tuple, decimal.Decimal, BoolClass} + class StrDecimalBoolMixin: _types = {str, decimal.Decimal, BoolClass} + # qty 4 class NoneFrozenDictTupleStrMixin: _types = {NoneClass, frozendict.frozendict, tuple, str} + class NoneFrozenDictTupleDecimalMixin: _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} + class NoneFrozenDictTupleBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} + class NoneFrozenDictStrDecimalMixin: _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} + class NoneFrozenDictStrBoolMixin: _types = {NoneClass, frozendict.frozendict, str, BoolClass} + class NoneFrozenDictDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalMixin: _types = {NoneClass, tuple, str, decimal.Decimal} + class NoneTupleStrBoolMixin: _types = {NoneClass, tuple, str, BoolClass} + class NoneTupleDecimalBoolMixin: _types = {NoneClass, tuple, decimal.Decimal, BoolClass} + class NoneStrDecimalBoolMixin: _types = {NoneClass, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalMixin: _types = {frozendict.frozendict, tuple, str, decimal.Decimal} + class FrozenDictTupleStrBoolMixin: _types = {frozendict.frozendict, tuple, str, BoolClass} + class FrozenDictTupleDecimalBoolMixin: _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class FrozenDictStrDecimalBoolMixin: _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} + class TupleStrDecimalBoolMixin: _types = {tuple, str, decimal.Decimal, BoolClass} + # qty 5 class NoneFrozenDictTupleStrDecimalMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} + class NoneFrozenDictTupleStrBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} + class NoneFrozenDictTupleDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} + class NoneFrozenDictStrDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} + class NoneTupleStrDecimalBoolMixin: _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} + class FrozenDictTupleStrDecimalBoolMixin: _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 6 class NoneFrozenDictTupleStrDecimalBoolMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} + # qty 8 class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} @@ -876,9 +1081,11 @@ def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) + return ( + configuration is None + or not hasattr(configuration, "_disabled_client_side_validations") + or schema_keyword not in configuration._disabled_client_side_validations + ) @staticmethod def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): @@ -899,7 +1106,10 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + ) -> typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ]: """ EnumBase _validate_oapg Validates that arg is in the enum's allowed values @@ -907,7 +1117,11 @@ def _validate_oapg( try: cls.MetaOapg.enum_value_to_name[arg] except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) + raise ApiValueError( + "Invalid value {} passed in to {}, allowed_values={}".format( + arg, cls, cls.MetaOapg.enum_value_to_name.keys() + ) + ) return super()._validate_oapg(arg, validation_metadata=validation_metadata) @@ -951,68 +1165,69 @@ def as_str_oapg(self) -> str: @property def as_date_oapg(self) -> date: - raise Exception('not implemented') + raise Exception("not implemented") @property def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') + raise Exception("not implemented") @property def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') + raise Exception("not implemented") @property def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') + raise Exception("not implemented") @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): + def __check_str_validations(cls, arg: str, validation_metadata: ValidationMetadata): + if not hasattr(cls, "MetaOapg"): return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): + if ( + cls._is_json_validation_enabled_oapg("maxLength", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "max_length") + and len(arg) > cls.MetaOapg.max_length + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): + if ( + cls._is_json_validation_enabled_oapg("minLength", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "min_length") + and len(arg) < cls.MetaOapg.min_length + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): + if cls._is_json_validation_enabled_oapg("pattern", validation_metadata.configuration) and hasattr( + cls.MetaOapg, "regex" + ): for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): + flags = regex_dict.get("flags", 0) + if not re.search(regex_dict["pattern"], arg, flags=flags): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], + constraint_value=regex_dict["pattern"], path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) + additional_txt=" with flags=`{}`".format(flags), ) cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item + constraint_value=regex_dict["pattern"], + path_to_item=validation_metadata.path_to_item, ) @classmethod @@ -1020,7 +1235,10 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + ) -> typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ]: """ StrBase _validate_oapg Validates that validations pass @@ -1061,22 +1279,21 @@ def _validate_oapg( class CustomIsoparser(isoparser): - @_takes_ascii def parse_isodatetime(self, dt_str): components, pos = self._parse_isodate(dt_str) if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) + if self._sep is None or dt_str[pos : pos + 1] == self._sep: + components += self._parse_isotime(dt_str[pos + 1 :]) else: - raise ValueError('String contains unknown ISO components') + raise ValueError("String contains unknown ISO components") if len(components) > 3 and components[3] == 24: components[3] = 0 return datetime(*components) + timedelta(days=1) if len(components) <= 3: - raise ValueError('Value is not a datetime') + raise ValueError("Value is not a datetime") return datetime(*components) @@ -1085,10 +1302,10 @@ def parse_isodate(self, datestr): components, pos = self._parse_isodate(datestr) if len(datestr) > pos: - raise ValueError('String contains invalid time components') + raise ValueError("String contains invalid time components") if len(components) > 3: - raise ValueError('String contains invalid time components') + raise ValueError("String contains invalid time components") return date(*components) @@ -1214,7 +1431,7 @@ def as_int_oapg(self) -> int: if self.as_tuple().exponent < 0: # this could be represented as an integer but should be represented as a float # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') + raise ApiValueError(f"{self} is not an integer") self._as_int = int(self) return self._as_int @@ -1224,79 +1441,85 @@ def as_float_oapg(self) -> float: return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') + raise ApiValueError(f"{self} is not a float") self._as_float = float(self) return self._as_float @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): + def __check_numeric_validations(cls, arg, validation_metadata: ValidationMetadata): + if not hasattr(cls, "MetaOapg"): return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): + if cls._is_json_validation_enabled_oapg("multipleOf", validation_metadata.configuration) and hasattr( + cls.MetaOapg, "multiple_of" + ): multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): + if not (float(arg) / multiple_of_value).is_integer(): # Note 'multipleOf' will be as good as the floating point arithmetic. cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', + hasattr(cls.MetaOapg, validation_key) + for validation_key in { + "exclusive_maximum", + "inclusive_maximum", + "exclusive_minimum", + "inclusive_minimum", } ) if not checking_max_or_min_values: return - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): + if ( + cls._is_json_validation_enabled_oapg("exclusiveMaximum", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "exclusive_maximum") + and arg >= cls.MetaOapg.exclusive_maximum + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): + if ( + cls._is_json_validation_enabled_oapg("maximum", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "inclusive_maximum") + and arg > cls.MetaOapg.inclusive_maximum + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): + if ( + cls._is_json_validation_enabled_oapg("exclusiveMinimum", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "exclusive_minimum") + and arg <= cls.MetaOapg.exclusive_minimum + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): + if ( + cls._is_json_validation_enabled_oapg("minimum", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "inclusive_minimum") + and arg < cls.MetaOapg.inclusive_minimum + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) @classmethod @@ -1304,7 +1527,10 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + ) -> typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ]: """ NumberBase _validate_oapg Validates that validations pass @@ -1334,59 +1560,64 @@ def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): # if we have definitions for an items schema, use it # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) + item_cls = getattr(cls.MetaOapg, "items", UnsetAnyTypeSchema) item_cls = cls._get_class_oapg(item_cls) path_to_schemas = {} for i, value in enumerate(list_items): item_validation_metadata = ValidationMetadata( from_server=validation_metadata.from_server, configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas + path_to_item=validation_metadata.path_to_item + (i,), + validated_path_to_schemas=validation_metadata.validated_path_to_schemas, ) if item_validation_metadata.validation_ran_earlier(item_cls): add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) + other_path_to_schemas = item_cls._validate_oapg(value, validation_metadata=item_validation_metadata) update(path_to_schemas, other_path_to_schemas) return path_to_schemas @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): + def __check_tuple_validations(cls, arg, validation_metadata: ValidationMetadata): + if not hasattr(cls, "MetaOapg"): return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): + if ( + cls._is_json_validation_enabled_oapg("maxItems", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "max_items") + and len(arg) > cls.MetaOapg.max_items + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): + if ( + cls._is_json_validation_enabled_oapg("minItems", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "min_items") + and len(arg) < cls.MetaOapg.min_items + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): + if ( + cls._is_json_validation_enabled_oapg("uniqueItems", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "unique_items") + and cls.MetaOapg.unique_items + and arg + ): unique_items = set(arg) if len(arg) > len(unique_items): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item + constraint_value="unique_items==True", + path_to_item=validation_metadata.path_to_item, ) @classmethod @@ -1420,7 +1651,7 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas + validated_path_to_schemas=validation_metadata.validated_path_to_schemas, ) other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1428,24 +1659,20 @@ def _validate_oapg( @classmethod def _get_items_oapg( - cls: 'Schema', + cls: "Schema", arg: typing.List[typing.Any], path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], ): - ''' + """ ListBase _get_items_oapg - ''' + """ cast_items = [] for i, value in enumerate(arg): item_path_to_item = path_to_item + (i,) item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) + new_value = item_cls._get_new_instance_without_conversion_oapg(value, item_path_to_item, path_to_schemas) cast_items.append(new_value) return cast_items @@ -1455,12 +1682,16 @@ class Discriminable: MetaOapg: MetaOapgTyped @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): + def _ensure_discriminator_value_present_oapg( + cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args + ): if not args or args and disc_property_name not in args[0]: # The input data does not contain the discriminator property raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) + "The discriminator property '{}' is missing at path: {}".format( + disc_property_name, validation_metadata.path_to_item + ) ) @classmethod @@ -1468,7 +1699,7 @@ def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_valu """ Used in schemas with discriminators """ - if not hasattr(cls.MetaOapg, 'discriminator'): + if not hasattr(cls.MetaOapg, "discriminator"): return None disc = cls.MetaOapg.discriminator() if disc_property_name not in disc: @@ -1476,38 +1707,38 @@ def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_valu discriminated_cls = disc[disc_property_name].get(disc_payload_value) if discriminated_cls is not None: return discriminated_cls - if not hasattr(cls, 'MetaOapg'): + if not hasattr(cls, "MetaOapg"): return None elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') + hasattr(cls.MetaOapg, "all_of") or hasattr(cls.MetaOapg, "one_of") or hasattr(cls.MetaOapg, "any_of") ): return None # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): + if hasattr(cls.MetaOapg, "all_of"): for allof_cls in cls.MetaOapg.all_of(): discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value + ) if discriminated_cls is not None: return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): + if hasattr(cls.MetaOapg, "one_of"): for oneof_cls in cls.MetaOapg.one_of(): discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value + ) if discriminated_cls is not None: return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): + if hasattr(cls.MetaOapg, "any_of"): for anyof_cls in cls.MetaOapg.any_of(): discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) + disc_property_name=disc_property_name, disc_payload_value=disc_payload_value + ) if discriminated_cls is not None: return discriminated_cls return None class DictBase(Discriminable, ValidatorBase): - @classmethod def __validate_arg_presence(cls, arg): """ @@ -1530,10 +1761,10 @@ def __validate_arg_presence(cls, arg): """ seen_required_properties = set() invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) + required_property_names = getattr(cls.MetaOapg, "required", set()) + additional_properties = getattr(cls.MetaOapg, "additional_properties", UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, "properties", {}) + property_annotations = getattr(properties, "__annotations__", {}) for property_name in arg: if property_name in required_property_names: seen_required_properties.add(property_name) @@ -1551,17 +1782,14 @@ def __validate_arg_presence(cls, arg): cls.__name__, len(missing_required_arguments), "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments + missing_required_arguments, ) ) if invalid_arguments: invalid_arguments.sort() raise ApiTypeError( "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments + cls.__name__, len(invalid_arguments), "s" if len(invalid_arguments) > 1 else "", invalid_arguments ) ) @@ -1580,11 +1808,11 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): ApiTypeError - for missing required arguments, or for invalid properties """ path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) + additional_properties = getattr(cls.MetaOapg, "additional_properties", UnsetAnyTypeSchema) + properties = getattr(cls.MetaOapg, "properties", {}) + property_annotations = getattr(properties, "__annotations__", {}) for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) + path_to_item = validation_metadata.path_to_item + (property_name,) if property_name in property_annotations: schema = property_annotations[property_name] elif additional_properties is not NotAnyTypeSchema: @@ -1598,15 +1826,17 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): continue schema = additional_properties else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) + raise ApiTypeError( + "Unable to find schema for value={} in class={} at path_to_item={}".format( + value, cls, validation_metadata.path_to_item + (property_name,) + ) + ) schema = cls._get_class_oapg(schema) arg_validation_metadata = ValidationMetadata( from_server=validation_metadata.from_server, configuration=validation_metadata.configuration, path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas + validated_path_to_schemas=validation_metadata.validated_path_to_schemas, ) if arg_validation_metadata.validation_ran_earlier(schema): add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) @@ -1616,31 +1846,31 @@ def __validate_args(cls, arg, validation_metadata: ValidationMetadata): return path_to_schemas @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): + def __check_dict_validations(cls, arg, validation_metadata: ValidationMetadata): + if not hasattr(cls, "MetaOapg"): return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): + if ( + cls._is_json_validation_enabled_oapg("maxProperties", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "max_properties") + and len(arg) > cls.MetaOapg.max_properties + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): + if ( + cls._is_json_validation_enabled_oapg("minProperties", validation_metadata.configuration) + and hasattr(cls.MetaOapg, "min_properties") + and len(arg) < cls.MetaOapg.min_properties + ): cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item + path_to_item=validation_metadata.path_to_item, ) @classmethod @@ -1680,14 +1910,15 @@ def _validate_oapg( disc_prop_name = list(discriminator.keys())[0] cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) + disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name] + ) if discriminated_cls is None: raise ApiValueError( "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( cls.__name__, disc_prop_name, list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) + validation_metadata.path_to_item + (disc_prop_name,), ) ) updated_vm = ValidationMetadata( @@ -1695,7 +1926,7 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas + validated_path_to_schemas=validation_metadata.validated_path_to_schemas, ) if updated_vm.validation_ran_earlier(discriminated_cls): add_deeper_validated_schemas(updated_vm, _path_to_schemas) @@ -1709,7 +1940,7 @@ def _get_properties_oapg( cls, arg: typing.Dict[str, typing.Any], path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] + path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type["Schema"]], ): """ DictBase _get_properties_oapg, this is how properties are set @@ -1721,9 +1952,7 @@ def _get_properties_oapg( property_path_to_item = path_to_item + (property_name_js,) property_cls = path_to_schemas[property_path_to_item] new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas + value, property_path_to_item, path_to_schemas ) dict_items[property_name_js] = new_value @@ -1731,7 +1960,7 @@ def _get_properties_oapg( def __setattr__(self, name: str, value: typing.Any): if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') + raise AttributeError("property setting not supported on immutable instances") def __getattr__(self, name: str): """ @@ -1758,7 +1987,7 @@ def __getitem__(self, name: str): return super().__getattr__(name) return super().__getitem__(name) - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: + def get_item_oapg(self, name: str) -> typing.Union["AnyTypeSchema", Unset]: # dict_instance[name] accessor if not isinstance(self, frozendict.frozendict): raise NotImplementedError() @@ -1769,10 +1998,30 @@ def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], + arg: typing.Union[ + str, + date, + datetime, + uuid.UUID, + decimal.Decimal, + int, + float, + None, + dict, + frozendict.frozendict, + list, + tuple, + bytes, + Schema, + io.FileIO, + io.BufferedReader, + ], from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), + validated_path_to_schemas: typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ], + path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(["args[0]"]), ) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: """ Casts the input payload arg into the allowed types @@ -1804,11 +2053,18 @@ def cast_to_allowed_types( schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") + type_error = ApiTypeError( + f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}" + ) if isinstance(arg, str): return str(arg) elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) + return frozendict.frozendict( + { + key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) + for key, val in arg.items() + } + ) elif isinstance(arg, (bool, BoolClass)): """ this check must come before isinstance(arg, (int, float)) @@ -1824,10 +2080,15 @@ def cast_to_allowed_types( if decimal_from_float.as_integer_ratio()[1] == 1: # 9.0 -> Decimal('9.0') # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') + return decimal.Decimal(str(decimal_from_float) + ".0") return decimal_from_float elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) + return tuple( + [ + cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) + for i, item in enumerate(arg) + ] + ) elif isinstance(arg, (none_type, NoneClass)): return NoneClass.NONE elif isinstance(arg, (date, datetime)): @@ -1844,11 +2105,10 @@ def cast_to_allowed_types( return bytes(arg) elif isinstance(arg, (io.FileIO, io.BufferedReader)): return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) + raise ValueError("Invalid type passed in got input={} type={}".format(arg, type(arg))) class ComposedBase(Discriminable): - @classmethod def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): path_to_schemas = defaultdict(set) @@ -1898,12 +2158,7 @@ def __get_oneof_class( return path_to_schemas @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): + def __get_anyof_classes(cls, arg, discriminated_cls, validation_metadata: ValidationMetadata): anyof_classes = [] path_to_schemas = defaultdict(set) for anyof_cls in cls.MetaOapg.any_of(): @@ -1932,7 +2187,10 @@ def _validate_oapg( cls, arg, validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: + ) -> typing.Dict[ + typing.Tuple[typing.Union[str, int], ...], + typing.Set[typing.Union["Schema", str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]], + ]: """ ComposedBase _validate_oapg We return dynamic classes of different bases depending upon the inputs @@ -1956,12 +2214,12 @@ def _validate_oapg( from_server=validation_metadata.from_server, path_to_item=validation_metadata.path_to_item, seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas + validated_path_to_schemas=validation_metadata.validated_path_to_schemas, ) # process composed schema discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): + if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "discriminator"): discriminator = cls.MetaOapg.discriminator() discriminated_cls = None if discriminator and arg and isinstance(arg, frozendict.frozendict): @@ -1969,7 +2227,8 @@ def _validate_oapg( cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) # get discriminated_cls by looking at the dict in the current class discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) + disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name] + ) if discriminated_cls is None: raise ApiValueError( "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( @@ -1977,29 +2236,25 @@ def _validate_oapg( cls.__name__, disc_property_name, list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) + updated_vm.path_to_item + (disc_property_name,), ) ) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): + if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "all_of"): other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): + if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "one_of"): other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm + arg, discriminated_cls=discriminated_cls, validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): + if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "any_of"): other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm + arg, discriminated_cls=discriminated_cls, validation_metadata=updated_vm ) update(path_to_schemas, other_path_to_schemas) not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): + if hasattr(cls, "MetaOapg") and hasattr(cls.MetaOapg, "not_schema"): not_cls = cls.MetaOapg.not_schema not_cls = cls._get_class_oapg(not_cls) if not_cls: @@ -2038,37 +2293,29 @@ class ComposedSchema( BoolBase, NoneBase, Schema, - NoneFrozenDictTupleStrDecimalBoolMixin + NoneFrozenDictTupleStrDecimalBoolMixin, ): @classmethod def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): if not args: if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) + raise ApiTypeError("{} is missing required input data in args or kwargs".format(cls.__name__)) + args = (kwargs,) return super().from_openapi_data_oapg(args[0], _configuration=_configuration) -class ListSchema( - ListBase, - Schema, - TupleMixin -): - +class ListSchema(ListBase, Schema, TupleMixin): @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): + def from_openapi_data_oapg( + cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None + ): return super().from_openapi_data_oapg(arg, _configuration=_configuration) def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - +class NoneSchema(NoneBase, Schema, NoneMixin): @classmethod def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2077,18 +2324,16 @@ def __new__(cls, _arg: None, **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): +class NumberSchema(NumberBase, Schema, DecimalMixin): """ This is used for type: number with no format Both integers AND floats are accepted """ @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): + def from_openapi_data_oapg( + cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None + ): return super().from_openapi_data_oapg(arg, _configuration=_configuration) def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): @@ -2129,7 +2374,6 @@ def _validate_oapg( class IntSchema(IntBase, NumberSchema): - @classmethod def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2163,10 +2407,7 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Int32Schema( - Int32Base, - IntSchema -): +class Int32Schema(Int32Base, IntSchema): pass @@ -2195,16 +2436,13 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Int64Schema( - Int64Base, - IntSchema -): +class Int64Schema(Int64Base, IntSchema): pass class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) + __inclusive_minimum = decimal.Decimal(-3.4028234663852886e38) + __inclusive_maximum = decimal.Decimal(3.4028234663852886e38) @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): @@ -2227,19 +2465,15 @@ def _validate_oapg( return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Float32Schema( - Float32Base, - NumberSchema -): - +class Float32Schema(Float32Base, NumberSchema): @classmethod def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) + __inclusive_minimum = decimal.Decimal(-1.7976931348623157e308) + __inclusive_maximum = decimal.Decimal(1.7976931348623157e308) @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): @@ -2261,22 +2495,15 @@ def _validate_oapg( cls.__validate_format(arg, validation_metadata=validation_metadata) return super()._validate_oapg(arg, validation_metadata=validation_metadata) -class Float64Schema( - Float64Base, - NumberSchema -): +class Float64Schema(Float64Base, NumberSchema): @classmethod def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): # todo check format return super().from_openapi_data_oapg(arg, _configuration=_configuration) -class StrSchema( - StrBase, - Schema, - StrMixin -): +class StrSchema(StrBase, Schema, StrMixin): """ date + datetime string types must inherit from this class That is because one can validate a str payload as both: @@ -2285,7 +2512,7 @@ class StrSchema( """ @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': + def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> "StrSchema": return super().from_openapi_data_oapg(arg, _configuration=_configuration) def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): @@ -2293,25 +2520,21 @@ def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: C class UUIDSchema(UUIDBase, StrSchema): - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): - def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads @@ -2324,21 +2547,16 @@ def __new__(cls, _arg: str, **kwargs: Configuration): return super().__new__(cls, _arg, **kwargs) -class BytesSchema( - Schema, - BytesMixin -): +class BytesSchema(Schema, BytesMixin): """ this class will subclass bytes and is immutable """ + def __new__(cls, _arg: bytes, **kwargs: Configuration): return super(Schema, cls).__new__(cls, _arg) -class FileSchema( - Schema, - FileMixin -): +class FileSchema(Schema, FileMixin): """ This class is NOT immutable Dynamic classes are built using it for example when AnyType allows in binary data @@ -2364,12 +2582,7 @@ class BinaryBase: pass -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): +class BinarySchema(ComposedBase, BinaryBase, Schema, BinaryMixin): class MetaOapg: @staticmethod def one_of(): @@ -2382,12 +2595,7 @@ def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwar return super().__new__(cls, _arg) -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - +class BoolSchema(BoolBase, Schema, BoolMixin): @classmethod def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) @@ -2397,14 +2605,7 @@ def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin + DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase, Schema, NoneFrozenDictTupleStrDecimalBoolFileBytesMixin ): # Python representation of a schema defined as true or {} pass @@ -2431,7 +2632,7 @@ def __new__( cls, *_args, _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': + ) -> "NotAnyTypeSchema": return super().__new__( cls, *_args, @@ -2439,16 +2640,35 @@ def __new__( ) -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): +class DictSchema(DictBase, Schema, FrozenDictMixin): @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): + def from_openapi_data_oapg( + cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None + ): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict], + **kwargs: typing.Union[ + dict, + frozendict.frozendict, + list, + tuple, + decimal.Decimal, + float, + int, + str, + date, + datetime, + bool, + None, + bytes, + Schema, + Unset, + ValidationMetadata, + ], + ): return super().__new__(cls, *_args, **kwargs) @@ -2457,8 +2677,7 @@ def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: ty @functools.lru_cache() def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] + class_name: str, bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] ) -> typing.Type[Schema]: """ Returns a new class that is made with the subclass bases @@ -2472,4 +2691,4 @@ def get_new_class( def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file + print(cache_fn.__name__, cache_fn.cache_info()) From 6e08419c8202ddbe640f8152a5dd7c6562180d0b Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:25:09 -0400 Subject: [PATCH 03/13] isort and fix 2 mypy errors launch/connection.py:14: error: Incompatible default for argument "endpoint" (default has type "None", argument has type "str") [assignment] launch/client.py:1811: error: Incompatible default for argument "urls" (default has type "None", argument has type "List[str]") [assignment] --- launch/api_client/__init__.py | 14 +- launch/api_client/api_client.py | 26 ++-- launch/api_client/apis/path_to_api.py | 46 ++++-- .../v1_model_bundles_clone_with_changes.py | 4 +- .../paths/v1_model_bundles_model_bundle_id.py | 4 +- .../v1_model_endpoints_model_endpoint_id.py | 12 +- .../paths/v1_model_endpoints_schema_json.py | 4 +- .../v2_model_bundles_clone_with_changes.py | 4 +- .../paths/v2_model_bundles_model_bundle_id.py | 4 +- launch/api_client/apis/tags/default_api.py | 82 +++++++--- launch/api_client/configuration.py | 4 +- .../model/batch_job_serialization_format.py | 4 +- .../model/batch_job_serialization_format.pyi | 5 +- launch/api_client/model/batch_job_status.py | 4 +- launch/api_client/model/batch_job_status.pyi | 5 +- launch/api_client/model/callback_auth.py | 4 +- launch/api_client/model/callback_auth.pyi | 5 +- .../api_client/model/callback_basic_auth.py | 4 +- .../api_client/model/callback_basic_auth.pyi | 5 +- launch/api_client/model/callbackm_tls_auth.py | 4 +- .../api_client/model/callbackm_tls_auth.pyi | 5 +- .../model/clone_model_bundle_v1_request.py | 4 +- .../model/clone_model_bundle_v1_request.pyi | 5 +- .../model/clone_model_bundle_v2_request.py | 4 +- .../model/clone_model_bundle_v2_request.pyi | 5 +- .../model/cloudpickle_artifact_flavor.py | 4 +- .../model/cloudpickle_artifact_flavor.pyi | 5 +- .../model/create_async_task_v1_response.py | 4 +- .../model/create_async_task_v1_response.pyi | 5 +- .../create_batch_job_resource_requests.py | 4 +- .../create_batch_job_resource_requests.pyi | 5 +- .../model/create_batch_job_v1_request.py | 12 +- .../model/create_batch_job_v1_request.pyi | 13 +- .../model/create_batch_job_v1_response.py | 4 +- .../model/create_batch_job_v1_response.pyi | 5 +- .../model/create_model_bundle_v1_request.py | 12 +- .../model/create_model_bundle_v1_request.pyi | 13 +- .../model/create_model_bundle_v1_response.py | 4 +- .../model/create_model_bundle_v1_response.pyi | 5 +- .../model/create_model_bundle_v2_request.py | 12 +- .../model/create_model_bundle_v2_request.pyi | 13 +- .../model/create_model_bundle_v2_response.py | 4 +- .../model/create_model_bundle_v2_response.pyi | 5 +- .../model/create_model_endpoint_v1_request.py | 4 +- .../create_model_endpoint_v1_request.pyi | 5 +- .../create_model_endpoint_v1_response.py | 4 +- .../create_model_endpoint_v1_response.pyi | 5 +- launch/api_client/model/custom_framework.py | 4 +- launch/api_client/model/custom_framework.pyi | 5 +- .../delete_model_endpoint_v1_response.py | 4 +- .../delete_model_endpoint_v1_response.pyi | 5 +- .../model/endpoint_predict_v1_request.py | 4 +- .../model/endpoint_predict_v1_request.pyi | 5 +- .../model/get_async_task_v1_response.py | 4 +- .../model/get_async_task_v1_response.pyi | 5 +- .../model/get_batch_job_v1_response.py | 4 +- .../model/get_batch_job_v1_response.pyi | 5 +- .../model/get_model_endpoint_v1_response.py | 12 +- .../model/get_model_endpoint_v1_response.pyi | 13 +- launch/api_client/model/gpu_type.py | 4 +- launch/api_client/model/gpu_type.pyi | 5 +- .../api_client/model/http_validation_error.py | 4 +- .../model/http_validation_error.pyi | 5 +- .../model/list_model_bundles_v1_response.py | 8 +- .../model/list_model_bundles_v1_response.pyi | 5 +- .../model/list_model_bundles_v2_response.py | 8 +- .../model/list_model_bundles_v2_response.pyi | 5 +- .../model/list_model_endpoints_v1_response.py | 8 +- .../list_model_endpoints_v1_response.pyi | 9 +- .../model/model_bundle_environment_params.py | 8 +- .../model/model_bundle_environment_params.pyi | 9 +- .../model/model_bundle_framework_type.py | 4 +- .../model/model_bundle_framework_type.pyi | 5 +- .../api_client/model/model_bundle_order_by.py | 4 +- .../model/model_bundle_order_by.pyi | 5 +- .../model/model_bundle_packaging_type.py | 4 +- .../model/model_bundle_packaging_type.pyi | 5 +- .../model/model_bundle_v1_response.py | 12 +- .../model/model_bundle_v1_response.pyi | 13 +- .../model/model_bundle_v2_response.py | 12 +- .../model/model_bundle_v2_response.pyi | 13 +- .../model/model_endpoint_deployment_state.py | 4 +- .../model/model_endpoint_deployment_state.pyi | 5 +- .../model/model_endpoint_order_by.py | 4 +- .../model/model_endpoint_order_by.pyi | 5 +- .../model/model_endpoint_resource_state.py | 4 +- .../model/model_endpoint_resource_state.pyi | 5 +- .../api_client/model/model_endpoint_status.py | 4 +- .../model/model_endpoint_status.pyi | 5 +- .../api_client/model/model_endpoint_type.py | 4 +- .../api_client/model/model_endpoint_type.pyi | 5 +- launch/api_client/model/pytorch_framework.py | 4 +- launch/api_client/model/pytorch_framework.pyi | 5 +- launch/api_client/model/request_schema.py | 4 +- launch/api_client/model/request_schema.pyi | 5 +- launch/api_client/model/response_schema.py | 4 +- launch/api_client/model/response_schema.pyi | 5 +- .../api_client/model/runnable_image_flavor.py | 4 +- .../model/runnable_image_flavor.pyi | 5 +- .../sync_endpoint_predict_v1_response.py | 4 +- .../sync_endpoint_predict_v1_response.pyi | 5 +- launch/api_client/model/task_status.py | 4 +- launch/api_client/model/task_status.pyi | 5 +- .../api_client/model/tensorflow_framework.py | 4 +- .../api_client/model/tensorflow_framework.pyi | 5 +- .../triton_enhanced_runnable_image_flavor.py | 4 +- .../triton_enhanced_runnable_image_flavor.pyi | 5 +- .../model/update_batch_job_v1_request.py | 4 +- .../model/update_batch_job_v1_request.pyi | 5 +- .../model/update_batch_job_v1_response.py | 4 +- .../model/update_batch_job_v1_response.pyi | 5 +- .../model/update_model_endpoint_v1_request.py | 4 +- .../update_model_endpoint_v1_request.pyi | 5 +- .../update_model_endpoint_v1_response.py | 4 +- .../update_model_endpoint_v1_response.pyi | 5 +- launch/api_client/model/validation_error.py | 4 +- launch/api_client/model/validation_error.pyi | 5 +- .../api_client/model/zip_artifact_flavor.py | 4 +- .../api_client/model/zip_artifact_flavor.pyi | 5 +- launch/api_client/models/__init__.py | 144 +++++++++++++----- launch/api_client/paths/healthcheck/get.py | 14 +- launch/api_client/paths/healthcheck/get.pyi | 15 +- launch/api_client/paths/healthz/get.py | 14 +- launch/api_client/paths/healthz/get.pyi | 15 +- launch/api_client/paths/readyz/get.py | 14 +- launch/api_client/paths/readyz/get.pyi | 15 +- .../api_client/paths/v1_async_tasks/post.py | 23 +-- .../api_client/paths/v1_async_tasks/post.pyi | 24 +-- .../paths/v1_async_tasks_task_id/get.py | 19 ++- .../paths/v1_async_tasks_task_id/get.pyi | 20 ++- launch/api_client/paths/v1_batch_jobs/post.py | 23 +-- .../api_client/paths/v1_batch_jobs/post.pyi | 24 +-- .../paths/v1_batch_jobs_batch_job_id/get.py | 19 ++- .../paths/v1_batch_jobs_batch_job_id/get.pyi | 16 +- .../paths/v1_batch_jobs_batch_job_id/put.py | 23 +-- .../paths/v1_batch_jobs_batch_job_id/put.pyi | 24 +-- .../api_client/paths/v1_model_bundles/get.py | 21 ++- .../api_client/paths/v1_model_bundles/get.pyi | 22 ++- .../api_client/paths/v1_model_bundles/post.py | 23 +-- .../paths/v1_model_bundles/post.pyi | 24 +-- .../post.py | 23 +-- .../post.pyi | 24 +-- .../paths/v1_model_bundles_latest/get.py | 19 ++- .../paths/v1_model_bundles_latest/get.pyi | 18 +-- .../v1_model_bundles_model_bundle_id/get.py | 19 ++- .../v1_model_bundles_model_bundle_id/get.pyi | 18 +-- .../paths/v1_model_endpoints/get.py | 23 +-- .../paths/v1_model_endpoints/get.pyi | 20 ++- .../paths/v1_model_endpoints/post.py | 23 +-- .../paths/v1_model_endpoints/post.pyi | 24 +-- .../paths/v1_model_endpoints_api/get.py | 14 +- .../paths/v1_model_endpoints_api/get.pyi | 15 +- .../delete.py | 19 ++- .../delete.pyi | 20 ++- .../get.py | 19 ++- .../get.pyi | 20 ++- .../put.py | 23 +-- .../put.pyi | 24 +-- .../v1_model_endpoints_schema_json/get.py | 14 +- .../v1_model_endpoints_schema_json/get.pyi | 15 +- launch/api_client/paths/v1_sync_tasks/post.py | 23 +-- .../api_client/paths/v1_sync_tasks/post.pyi | 24 +-- .../api_client/paths/v2_model_bundles/get.py | 21 ++- .../api_client/paths/v2_model_bundles/get.pyi | 22 ++- .../api_client/paths/v2_model_bundles/post.py | 23 +-- .../paths/v2_model_bundles/post.pyi | 24 +-- .../post.py | 23 +-- .../post.pyi | 24 +-- .../paths/v2_model_bundles_latest/get.py | 19 ++- .../paths/v2_model_bundles_latest/get.pyi | 18 +-- .../v2_model_bundles_model_bundle_id/get.py | 19 ++- .../v2_model_bundles_model_bundle_id/get.pyi | 18 +-- launch/api_client/rest.py | 3 +- launch/api_client/schemas.py | 17 +-- launch/client.py | 2 +- launch/connection.py | 3 +- 176 files changed, 1057 insertions(+), 966 deletions(-) diff --git a/launch/api_client/__init__.py b/launch/api_client/__init__.py index 2e8cb84e..ce19c32b 100644 --- a/launch/api_client/__init__.py +++ b/launch/api_client/__init__.py @@ -20,9 +20,11 @@ from launch.api_client.configuration import Configuration # import exceptions -from launch.api_client.exceptions import OpenApiException -from launch.api_client.exceptions import ApiAttributeError -from launch.api_client.exceptions import ApiTypeError -from launch.api_client.exceptions import ApiValueError -from launch.api_client.exceptions import ApiKeyError -from launch.api_client.exceptions import ApiException +from launch.api_client.exceptions import ( + ApiAttributeError, + ApiException, + ApiKeyError, + ApiTypeError, + ApiValueError, + OpenApiException, +) diff --git a/launch/api_client/api_client.py b/launch/api_client/api_client.py index 978cf69d..3910e2b9 100644 --- a/launch/api_client/api_client.py +++ b/launch/api_client/api_client.py @@ -8,39 +8,39 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -from decimal import Decimal -import enum +import atexit import email +import enum +import io import json import os -import io -import atexit -from multiprocessing.pool import ThreadPool import re import tempfile import typing +from dataclasses import dataclass +from decimal import Decimal +from multiprocessing.pool import ThreadPool +from urllib.parse import quote, urlparse + +import frozendict import typing_extensions import urllib3 from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote from urllib3.fields import RequestField as RequestFieldBase -import frozendict - from launch.api_client import rest from launch.api_client.configuration import Configuration from launch.api_client.exceptions import ApiTypeError, ApiValueError from launch.api_client.schemas import ( - NoneClass, + BinarySchema, BoolClass, - Schema, FileIO, - BinarySchema, + NoneClass, + Schema, + Unset, date, datetime, none_type, - Unset, unset, ) diff --git a/launch/api_client/apis/path_to_api.py b/launch/api_client/apis/path_to_api.py index 362a5406..b767e3fe 100644 --- a/launch/api_client/apis/path_to_api.py +++ b/launch/api_client/apis/path_to_api.py @@ -1,26 +1,48 @@ import typing_extensions -from launch.api_client.paths import PathValues from launch.api_client.apis.paths.healthcheck import Healthcheck from launch.api_client.apis.paths.healthz import Healthz from launch.api_client.apis.paths.readyz import Readyz from launch.api_client.apis.paths.v1_async_tasks import V1AsyncTasks -from launch.api_client.apis.paths.v1_async_tasks_task_id import V1AsyncTasksTaskId +from launch.api_client.apis.paths.v1_async_tasks_task_id import ( + V1AsyncTasksTaskId, +) from launch.api_client.apis.paths.v1_batch_jobs import V1BatchJobs -from launch.api_client.apis.paths.v1_batch_jobs_batch_job_id import V1BatchJobsBatchJobId +from launch.api_client.apis.paths.v1_batch_jobs_batch_job_id import ( + V1BatchJobsBatchJobId, +) from launch.api_client.apis.paths.v1_model_bundles import V1ModelBundles -from launch.api_client.apis.paths.v1_model_bundles_clone_with_changes import V1ModelBundlesCloneWithChanges -from launch.api_client.apis.paths.v1_model_bundles_latest import V1ModelBundlesLatest -from launch.api_client.apis.paths.v1_model_bundles_model_bundle_id import V1ModelBundlesModelBundleId +from launch.api_client.apis.paths.v1_model_bundles_clone_with_changes import ( + V1ModelBundlesCloneWithChanges, +) +from launch.api_client.apis.paths.v1_model_bundles_latest import ( + V1ModelBundlesLatest, +) +from launch.api_client.apis.paths.v1_model_bundles_model_bundle_id import ( + V1ModelBundlesModelBundleId, +) from launch.api_client.apis.paths.v1_model_endpoints import V1ModelEndpoints -from launch.api_client.apis.paths.v1_model_endpoints_api import V1ModelEndpointsApi -from launch.api_client.apis.paths.v1_model_endpoints_schema_json import V1ModelEndpointsSchemaJson -from launch.api_client.apis.paths.v1_model_endpoints_model_endpoint_id import V1ModelEndpointsModelEndpointId +from launch.api_client.apis.paths.v1_model_endpoints_api import ( + V1ModelEndpointsApi, +) +from launch.api_client.apis.paths.v1_model_endpoints_model_endpoint_id import ( + V1ModelEndpointsModelEndpointId, +) +from launch.api_client.apis.paths.v1_model_endpoints_schema_json import ( + V1ModelEndpointsSchemaJson, +) from launch.api_client.apis.paths.v1_sync_tasks import V1SyncTasks from launch.api_client.apis.paths.v2_model_bundles import V2ModelBundles -from launch.api_client.apis.paths.v2_model_bundles_clone_with_changes import V2ModelBundlesCloneWithChanges -from launch.api_client.apis.paths.v2_model_bundles_latest import V2ModelBundlesLatest -from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import V2ModelBundlesModelBundleId +from launch.api_client.apis.paths.v2_model_bundles_clone_with_changes import ( + V2ModelBundlesCloneWithChanges, +) +from launch.api_client.apis.paths.v2_model_bundles_latest import ( + V2ModelBundlesLatest, +) +from launch.api_client.apis.paths.v2_model_bundles_model_bundle_id import ( + V2ModelBundlesModelBundleId, +) +from launch.api_client.paths import PathValues PathToApi = typing_extensions.TypedDict( "PathToApi", diff --git a/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py b/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py index caf9cf08..df0644e3 100644 --- a/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py +++ b/launch/api_client/apis/paths/v1_model_bundles_clone_with_changes.py @@ -1,4 +1,6 @@ -from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ApiForpost +from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ( + ApiForpost, +) class V1ModelBundlesCloneWithChanges( diff --git a/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py b/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py index c513ff35..0e646257 100644 --- a/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py +++ b/launch/api_client/apis/paths/v1_model_bundles_model_bundle_id.py @@ -1,4 +1,6 @@ -from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ApiForget +from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ( + ApiForget, +) class V1ModelBundlesModelBundleId( diff --git a/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py b/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py index a4bd9dfb..7f4d3e3a 100644 --- a/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py +++ b/launch/api_client/apis/paths/v1_model_endpoints_model_endpoint_id.py @@ -1,6 +1,12 @@ -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ApiForget -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ApiForput -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ApiFordelete +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ( + ApiFordelete, +) +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ( + ApiForget, +) +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( + ApiForput, +) class V1ModelEndpointsModelEndpointId( diff --git a/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py b/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py index de361413..7c62f95b 100644 --- a/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py +++ b/launch/api_client/apis/paths/v1_model_endpoints_schema_json.py @@ -1,4 +1,6 @@ -from launch.api_client.paths.v1_model_endpoints_schema_json.get import ApiForget +from launch.api_client.paths.v1_model_endpoints_schema_json.get import ( + ApiForget, +) class V1ModelEndpointsSchemaJson( diff --git a/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py index c20c7c45..959b2207 100644 --- a/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py +++ b/launch/api_client/apis/paths/v2_model_bundles_clone_with_changes.py @@ -1,4 +1,6 @@ -from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ApiForpost +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( + ApiForpost, +) class V2ModelBundlesCloneWithChanges( diff --git a/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py index c00dbcd7..e8ce8945 100644 --- a/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py +++ b/launch/api_client/apis/paths/v2_model_bundles_model_bundle_id.py @@ -1,4 +1,6 @@ -from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ApiForget +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( + ApiForget, +) class V2ModelBundlesModelBundleId( diff --git a/launch/api_client/apis/tags/default_api.py b/launch/api_client/apis/tags/default_api.py index a913e9a5..bb06ab59 100644 --- a/launch/api_client/apis/tags/default_api.py +++ b/launch/api_client/apis/tags/default_api.py @@ -9,43 +9,77 @@ Generated by: https://openapi-generator.tech """ +from launch.api_client.paths.healthcheck.get import HealthcheckHealthcheckGet +from launch.api_client.paths.healthz.get import HealthcheckHealthzGet +from launch.api_client.paths.readyz.get import HealthcheckReadyzGet +from launch.api_client.paths.v1_async_tasks.post import ( + CreateAsyncInferenceTaskV1AsyncTasksPost, +) +from launch.api_client.paths.v1_async_tasks_task_id.get import ( + GetAsyncInferenceTaskV1AsyncTasksTaskIdGet, +) +from launch.api_client.paths.v1_batch_jobs.post import ( + CreateBatchJobV1BatchJobsPost, +) +from launch.api_client.paths.v1_batch_jobs_batch_job_id.get import ( + GetBatchJobV1BatchJobsBatchJobIdGet, +) +from launch.api_client.paths.v1_batch_jobs_batch_job_id.put import ( + UpdateBatchJobV1BatchJobsBatchJobIdPut, +) +from launch.api_client.paths.v1_model_bundles.get import ( + ListModelBundlesV1ModelBundlesGet, +) +from launch.api_client.paths.v1_model_bundles.post import ( + CreateModelBundleV1ModelBundlesPost, +) from launch.api_client.paths.v1_model_bundles_clone_with_changes.post import ( CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost, ) -from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( - CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, +from launch.api_client.paths.v1_model_bundles_latest.get import ( + GetLatestModelBundleV1ModelBundlesLatestGet, +) +from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import ( + GetModelBundleV1ModelBundlesModelBundleIdGet, +) +from launch.api_client.paths.v1_model_endpoints.get import ( + ListModelEndpointsV1ModelEndpointsGet, +) +from launch.api_client.paths.v1_model_endpoints.post import ( + CreateModelEndpointV1ModelEndpointsPost, +) +from launch.api_client.paths.v1_model_endpoints_api.get import ( + GetModelEndpointsApiV1ModelEndpointsApiGet, ) -from launch.api_client.paths.v1_async_tasks.post import CreateAsyncInferenceTaskV1AsyncTasksPost -from launch.api_client.paths.v1_batch_jobs.post import CreateBatchJobV1BatchJobsPost -from launch.api_client.paths.v1_model_bundles.post import CreateModelBundleV1ModelBundlesPost -from launch.api_client.paths.v2_model_bundles.post import CreateModelBundleV2ModelBundlesPost -from launch.api_client.paths.v1_model_endpoints.post import CreateModelEndpointV1ModelEndpointsPost -from launch.api_client.paths.v1_sync_tasks.post import CreateSyncInferenceTaskV1SyncTasksPost from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.delete import ( DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete, ) -from launch.api_client.paths.v1_async_tasks_task_id.get import GetAsyncInferenceTaskV1AsyncTasksTaskIdGet -from launch.api_client.paths.v1_batch_jobs_batch_job_id.get import GetBatchJobV1BatchJobsBatchJobIdGet -from launch.api_client.paths.v1_model_bundles_latest.get import GetLatestModelBundleV1ModelBundlesLatestGet -from launch.api_client.paths.v2_model_bundles_latest.get import GetLatestModelBundleV2ModelBundlesLatestGet -from launch.api_client.paths.v1_model_bundles_model_bundle_id.get import GetModelBundleV1ModelBundlesModelBundleIdGet -from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import GetModelBundleV2ModelBundlesModelBundleIdGet from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.get import ( GetModelEndpointV1ModelEndpointsModelEndpointIdGet, ) -from launch.api_client.paths.v1_model_endpoints_api.get import GetModelEndpointsApiV1ModelEndpointsApiGet +from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( + UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut, +) from launch.api_client.paths.v1_model_endpoints_schema_json.get import ( GetModelEndpointsSchemaV1ModelEndpointsSchemaJsonGet, ) -from launch.api_client.paths.healthcheck.get import HealthcheckHealthcheckGet -from launch.api_client.paths.healthz.get import HealthcheckHealthzGet -from launch.api_client.paths.readyz.get import HealthcheckReadyzGet -from launch.api_client.paths.v1_model_bundles.get import ListModelBundlesV1ModelBundlesGet -from launch.api_client.paths.v2_model_bundles.get import ListModelBundlesV2ModelBundlesGet -from launch.api_client.paths.v1_model_endpoints.get import ListModelEndpointsV1ModelEndpointsGet -from launch.api_client.paths.v1_batch_jobs_batch_job_id.put import UpdateBatchJobV1BatchJobsBatchJobIdPut -from launch.api_client.paths.v1_model_endpoints_model_endpoint_id.put import ( - UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut, +from launch.api_client.paths.v1_sync_tasks.post import ( + CreateSyncInferenceTaskV1SyncTasksPost, +) +from launch.api_client.paths.v2_model_bundles.get import ( + ListModelBundlesV2ModelBundlesGet, +) +from launch.api_client.paths.v2_model_bundles.post import ( + CreateModelBundleV2ModelBundlesPost, +) +from launch.api_client.paths.v2_model_bundles_clone_with_changes.post import ( + CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost, +) +from launch.api_client.paths.v2_model_bundles_latest.get import ( + GetLatestModelBundleV2ModelBundlesLatestGet, +) +from launch.api_client.paths.v2_model_bundles_model_bundle_id.get import ( + GetModelBundleV2ModelBundlesModelBundleIdGet, ) diff --git a/launch/api_client/configuration.py b/launch/api_client/configuration.py index 35554316..9f3283cc 100644 --- a/launch/api_client/configuration.py +++ b/launch/api_client/configuration.py @@ -13,12 +13,12 @@ import logging import multiprocessing import sys +from http import client as http_client + import urllib3 -from http import client as http_client from launch.api_client.exceptions import ApiValueError - JSON_SCHEMA_VALIDATION_KEYWORDS = { "multipleOf", "maximum", diff --git a/launch/api_client/model/batch_job_serialization_format.py b/launch/api_client/model/batch_job_serialization_format.py index 64095984..7bfc3103 100644 --- a/launch/api_client/model/batch_job_serialization_format.py +++ b/launch/api_client/model/batch_job_serialization_format.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/batch_job_serialization_format.pyi b/launch/api_client/model/batch_job_serialization_format.pyi index 306f694f..7ebc5bff 100644 --- a/launch/api_client/model/batch_job_serialization_format.pyi +++ b/launch/api_client/model/batch_job_serialization_format.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/batch_job_status.py b/launch/api_client/model/batch_job_status.py index b6c5f1c1..e2e71a79 100644 --- a/launch/api_client/model/batch_job_status.py +++ b/launch/api_client/model/batch_job_status.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/batch_job_status.pyi b/launch/api_client/model/batch_job_status.pyi index 92e00149..925b6634 100644 --- a/launch/api_client/model/batch_job_status.pyi +++ b/launch/api_client/model/batch_job_status.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/callback_auth.py b/launch/api_client/model/callback_auth.py index 9c0a040b..493310d9 100644 --- a/launch/api_client/model/callback_auth.py +++ b/launch/api_client/model/callback_auth.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/callback_auth.pyi b/launch/api_client/model/callback_auth.pyi index 78418a72..e7193634 100644 --- a/launch/api_client/model/callback_auth.pyi +++ b/launch/api_client/model/callback_auth.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CallbackAuth( diff --git a/launch/api_client/model/callback_basic_auth.py b/launch/api_client/model/callback_basic_auth.py index 41648753..7e2027d6 100644 --- a/launch/api_client/model/callback_basic_auth.py +++ b/launch/api_client/model/callback_basic_auth.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/callback_basic_auth.pyi b/launch/api_client/model/callback_basic_auth.pyi index 3420fd8f..39f43b29 100644 --- a/launch/api_client/model/callback_basic_auth.pyi +++ b/launch/api_client/model/callback_basic_auth.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CallbackBasicAuth(schemas.DictSchema): diff --git a/launch/api_client/model/callbackm_tls_auth.py b/launch/api_client/model/callbackm_tls_auth.py index fcef6e85..c153d503 100644 --- a/launch/api_client/model/callbackm_tls_auth.py +++ b/launch/api_client/model/callbackm_tls_auth.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/callbackm_tls_auth.pyi b/launch/api_client/model/callbackm_tls_auth.pyi index c665b838..ef8b7dc0 100644 --- a/launch/api_client/model/callbackm_tls_auth.pyi +++ b/launch/api_client/model/callbackm_tls_auth.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CallbackmTLSAuth(schemas.DictSchema): diff --git a/launch/api_client/model/clone_model_bundle_v1_request.py b/launch/api_client/model/clone_model_bundle_v1_request.py index 2af569ad..dc711b84 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.py +++ b/launch/api_client/model/clone_model_bundle_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/clone_model_bundle_v1_request.pyi b/launch/api_client/model/clone_model_bundle_v1_request.pyi index d8afa0ae..dc37a0dc 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CloneModelBundleV1Request(schemas.DictSchema): diff --git a/launch/api_client/model/clone_model_bundle_v2_request.py b/launch/api_client/model/clone_model_bundle_v2_request.py index 1d05cb35..2a918278 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.py +++ b/launch/api_client/model/clone_model_bundle_v2_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/clone_model_bundle_v2_request.pyi b/launch/api_client/model/clone_model_bundle_v2_request.pyi index 6dfa17d0..82891ae5 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v2_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CloneModelBundleV2Request(schemas.DictSchema): diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.py b/launch/api_client/model/cloudpickle_artifact_flavor.py index 4560ce08..c0d3366d 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.py +++ b/launch/api_client/model/cloudpickle_artifact_flavor.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.pyi b/launch/api_client/model/cloudpickle_artifact_flavor.pyi index 755b3e49..021e1b61 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.pyi +++ b/launch/api_client/model/cloudpickle_artifact_flavor.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CloudpickleArtifactFlavor(schemas.DictSchema): diff --git a/launch/api_client/model/create_async_task_v1_response.py b/launch/api_client/model/create_async_task_v1_response.py index 7296ebf9..97f0c4dd 100644 --- a/launch/api_client/model/create_async_task_v1_response.py +++ b/launch/api_client/model/create_async_task_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_async_task_v1_response.pyi b/launch/api_client/model/create_async_task_v1_response.pyi index 5d962032..b4b154be 100644 --- a/launch/api_client/model/create_async_task_v1_response.pyi +++ b/launch/api_client/model/create_async_task_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateAsyncTaskV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/create_batch_job_resource_requests.py b/launch/api_client/model/create_batch_job_resource_requests.py index f37f8a06..48c4adb1 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.py +++ b/launch/api_client/model/create_batch_job_resource_requests.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_batch_job_resource_requests.pyi b/launch/api_client/model/create_batch_job_resource_requests.pyi index fcbe8e04..c3f466a3 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.pyi +++ b/launch/api_client/model/create_batch_job_resource_requests.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateBatchJobResourceRequests(schemas.DictSchema): diff --git a/launch/api_client/model/create_batch_job_v1_request.py b/launch/api_client/model/create_batch_job_v1_request.py index 665a8ace..77e5a687 100644 --- a/launch/api_client/model/create_batch_job_v1_request.py +++ b/launch/api_client/model/create_batch_job_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -237,5 +237,9 @@ def __new__( ) -from launch.api_client.model.batch_job_serialization_format import BatchJobSerializationFormat -from launch.api_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests +from launch.api_client.model.batch_job_serialization_format import ( + BatchJobSerializationFormat, +) +from launch.api_client.model.create_batch_job_resource_requests import ( + CreateBatchJobResourceRequests, +) diff --git a/launch/api_client/model/create_batch_job_v1_request.pyi b/launch/api_client/model/create_batch_job_v1_request.pyi index ef6b3534..673f8d33 100644 --- a/launch/api_client/model/create_batch_job_v1_request.pyi +++ b/launch/api_client/model/create_batch_job_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateBatchJobV1Request(schemas.DictSchema): @@ -210,5 +209,9 @@ class CreateBatchJobV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.batch_job_serialization_format import BatchJobSerializationFormat -from launch_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests +from launch_client.model.batch_job_serialization_format import ( + BatchJobSerializationFormat, +) +from launch_client.model.create_batch_job_resource_requests import ( + CreateBatchJobResourceRequests, +) diff --git a/launch/api_client/model/create_batch_job_v1_response.py b/launch/api_client/model/create_batch_job_v1_response.py index c7f7a2c3..4250d12a 100644 --- a/launch/api_client/model/create_batch_job_v1_response.py +++ b/launch/api_client/model/create_batch_job_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_batch_job_v1_response.pyi b/launch/api_client/model/create_batch_job_v1_response.pyi index 3069477a..c412235a 100644 --- a/launch/api_client/model/create_batch_job_v1_response.pyi +++ b/launch/api_client/model/create_batch_job_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateBatchJobV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/create_model_bundle_v1_request.py b/launch/api_client/model/create_model_bundle_v1_request.py index 04e452ed..c5170611 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.py +++ b/launch/api_client/model/create_model_bundle_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -281,5 +281,9 @@ def __new__( ) -from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams -from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType +from launch.api_client.model.model_bundle_environment_params import ( + ModelBundleEnvironmentParams, +) +from launch.api_client.model.model_bundle_packaging_type import ( + ModelBundlePackagingType, +) diff --git a/launch/api_client/model/create_model_bundle_v1_request.pyi b/launch/api_client/model/create_model_bundle_v1_request.pyi index 2cc59c5b..24f63ed8 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.pyi +++ b/launch/api_client/model/create_model_bundle_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelBundleV1Request(schemas.DictSchema): @@ -238,5 +237,9 @@ class CreateModelBundleV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams -from launch_client.model.model_bundle_packaging_type import ModelBundlePackagingType +from launch_client.model.model_bundle_environment_params import ( + ModelBundleEnvironmentParams, +) +from launch_client.model.model_bundle_packaging_type import ( + ModelBundlePackagingType, +) diff --git a/launch/api_client/model/create_model_bundle_v1_response.py b/launch/api_client/model/create_model_bundle_v1_response.py index ef4907b2..5f40c849 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.py +++ b/launch/api_client/model/create_model_bundle_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_model_bundle_v1_response.pyi b/launch/api_client/model/create_model_bundle_v1_response.pyi index 17d7c269..34ca8bd2 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.pyi +++ b/launch/api_client/model/create_model_bundle_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelBundleV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/create_model_bundle_v2_request.py b/launch/api_client/model/create_model_bundle_v2_request.py index ca63ac72..d77fae80 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.py +++ b/launch/api_client/model/create_model_bundle_v2_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -257,7 +257,11 @@ def __new__( ) -from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor -from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_request.pyi b/launch/api_client/model/create_model_bundle_v2_request.pyi index a816c10e..3f32dea5 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.pyi +++ b/launch/api_client/model/create_model_bundle_v2_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelBundleV2Request(schemas.DictSchema): @@ -234,7 +233,11 @@ class CreateModelBundleV2Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor +from launch_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) from launch_client.model.runnable_image_flavor import RunnableImageFlavor -from launch_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor +from launch_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_response.py b/launch/api_client/model/create_model_bundle_v2_response.py index 925c87a5..a9734aa6 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.py +++ b/launch/api_client/model/create_model_bundle_v2_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_model_bundle_v2_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi index 8023555d..b978ed80 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelBundleV2Response(schemas.DictSchema): diff --git a/launch/api_client/model/create_model_endpoint_v1_request.py b/launch/api_client/model/create_model_endpoint_v1_request.py index e23b77cc..37474032 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.py +++ b/launch/api_client/model/create_model_endpoint_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_model_endpoint_v1_request.pyi b/launch/api_client/model/create_model_endpoint_v1_request.pyi index b912f530..d0f445c7 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelEndpointV1Request(schemas.DictSchema): diff --git a/launch/api_client/model/create_model_endpoint_v1_response.py b/launch/api_client/model/create_model_endpoint_v1_response.py index c0dcf6e3..952b8184 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.py +++ b/launch/api_client/model/create_model_endpoint_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/create_model_endpoint_v1_response.pyi b/launch/api_client/model/create_model_endpoint_v1_response.pyi index 7103f2ec..25eb1309 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CreateModelEndpointV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/custom_framework.py b/launch/api_client/model/custom_framework.py index bfa6d6b3..cf37e753 100644 --- a/launch/api_client/model/custom_framework.py +++ b/launch/api_client/model/custom_framework.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/custom_framework.pyi b/launch/api_client/model/custom_framework.pyi index 407cb319..0ccc9317 100644 --- a/launch/api_client/model/custom_framework.pyi +++ b/launch/api_client/model/custom_framework.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class CustomFramework(schemas.DictSchema): diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.py b/launch/api_client/model/delete_model_endpoint_v1_response.py index abd2d346..7d687930 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.py +++ b/launch/api_client/model/delete_model_endpoint_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.pyi b/launch/api_client/model/delete_model_endpoint_v1_response.pyi index f6895b96..97c361af 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/delete_model_endpoint_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class DeleteModelEndpointV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/endpoint_predict_v1_request.py b/launch/api_client/model/endpoint_predict_v1_request.py index 28a7b332..2fcfd632 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.py +++ b/launch/api_client/model/endpoint_predict_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/endpoint_predict_v1_request.pyi b/launch/api_client/model/endpoint_predict_v1_request.pyi index defbd0d4..13dea9cf 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.pyi +++ b/launch/api_client/model/endpoint_predict_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class EndpointPredictV1Request(schemas.DictSchema): diff --git a/launch/api_client/model/get_async_task_v1_response.py b/launch/api_client/model/get_async_task_v1_response.py index f3340657..80939dab 100644 --- a/launch/api_client/model/get_async_task_v1_response.py +++ b/launch/api_client/model/get_async_task_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/get_async_task_v1_response.pyi b/launch/api_client/model/get_async_task_v1_response.pyi index b7c6e8c4..bf4524d5 100644 --- a/launch/api_client/model/get_async_task_v1_response.pyi +++ b/launch/api_client/model/get_async_task_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class GetAsyncTaskV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/get_batch_job_v1_response.py b/launch/api_client/model/get_batch_job_v1_response.py index f51b1a60..e5327ade 100644 --- a/launch/api_client/model/get_batch_job_v1_response.py +++ b/launch/api_client/model/get_batch_job_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/get_batch_job_v1_response.pyi b/launch/api_client/model/get_batch_job_v1_response.pyi index 5ad4a9b0..264bf1cb 100644 --- a/launch/api_client/model/get_batch_job_v1_response.pyi +++ b/launch/api_client/model/get_batch_job_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class GetBatchJobV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/get_model_endpoint_v1_response.py b/launch/api_client/model/get_model_endpoint_v1_response.py index 1b2868cc..3b2eda68 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.py +++ b/launch/api_client/model/get_model_endpoint_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -552,7 +552,11 @@ def __new__( from launch.api_client.model.callback_auth import CallbackAuth -from launch.api_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState -from launch.api_client.model.model_endpoint_resource_state import ModelEndpointResourceState +from launch.api_client.model.model_endpoint_deployment_state import ( + ModelEndpointDeploymentState, +) +from launch.api_client.model.model_endpoint_resource_state import ( + ModelEndpointResourceState, +) from launch.api_client.model.model_endpoint_status import ModelEndpointStatus from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/get_model_endpoint_v1_response.pyi b/launch/api_client/model/get_model_endpoint_v1_response.pyi index 2cc70911..da1a700e 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/get_model_endpoint_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class GetModelEndpointV1Response(schemas.DictSchema): @@ -457,7 +456,11 @@ class GetModelEndpointV1Response(schemas.DictSchema): ) from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState -from launch_client.model.model_endpoint_resource_state import ModelEndpointResourceState +from launch_client.model.model_endpoint_deployment_state import ( + ModelEndpointDeploymentState, +) +from launch_client.model.model_endpoint_resource_state import ( + ModelEndpointResourceState, +) from launch_client.model.model_endpoint_status import ModelEndpointStatus from launch_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/gpu_type.py b/launch/api_client/model/gpu_type.py index 4620b94b..3d1ee053 100644 --- a/launch/api_client/model/gpu_type.py +++ b/launch/api_client/model/gpu_type.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/gpu_type.pyi b/launch/api_client/model/gpu_type.pyi index 4e384840..f24497d2 100644 --- a/launch/api_client/model/gpu_type.pyi +++ b/launch/api_client/model/gpu_type.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class GpuType(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/http_validation_error.py b/launch/api_client/model/http_validation_error.py index d33da73c..a58583ad 100644 --- a/launch/api_client/model/http_validation_error.py +++ b/launch/api_client/model/http_validation_error.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/http_validation_error.pyi b/launch/api_client/model/http_validation_error.pyi index 1b72a254..c9739cc5 100644 --- a/launch/api_client/model/http_validation_error.pyi +++ b/launch/api_client/model/http_validation_error.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class HTTPValidationError(schemas.DictSchema): diff --git a/launch/api_client/model/list_model_bundles_v1_response.py b/launch/api_client/model/list_model_bundles_v1_response.py index 709c30e6..6c92cc60 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.py +++ b/launch/api_client/model/list_model_bundles_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -141,4 +141,6 @@ def __new__( ) -from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) diff --git a/launch/api_client/model/list_model_bundles_v1_response.pyi b/launch/api_client/model/list_model_bundles_v1_response.pyi index ad83715f..e205308d 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.pyi +++ b/launch/api_client/model/list_model_bundles_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ListModelBundlesV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/list_model_bundles_v2_response.py b/launch/api_client/model/list_model_bundles_v2_response.py index 766573b9..304774ab 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.py +++ b/launch/api_client/model/list_model_bundles_v2_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -141,4 +141,6 @@ def __new__( ) -from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) diff --git a/launch/api_client/model/list_model_bundles_v2_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi index 17d42401..c4f8131f 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ListModelBundlesV2Response(schemas.DictSchema): diff --git a/launch/api_client/model/list_model_endpoints_v1_response.py b/launch/api_client/model/list_model_endpoints_v1_response.py index 6d278eb6..ece1bf7c 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.py +++ b/launch/api_client/model/list_model_endpoints_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -141,4 +141,6 @@ def __new__( ) -from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response +from launch.api_client.model.get_model_endpoint_v1_response import ( + GetModelEndpointV1Response, +) diff --git a/launch/api_client/model/list_model_endpoints_v1_response.pyi b/launch/api_client/model/list_model_endpoints_v1_response.pyi index cb892f04..538ba35a 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.pyi +++ b/launch/api_client/model/list_model_endpoints_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ListModelEndpointsV1Response(schemas.DictSchema): @@ -129,4 +128,6 @@ class ListModelEndpointsV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response +from launch_client.model.get_model_endpoint_v1_response import ( + GetModelEndpointV1Response, +) diff --git a/launch/api_client/model/model_bundle_environment_params.py b/launch/api_client/model/model_bundle_environment_params.py index fbdcc619..52633215 100644 --- a/launch/api_client/model/model_bundle_environment_params.py +++ b/launch/api_client/model/model_bundle_environment_params.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -190,4 +190,6 @@ def __new__( ) -from launch.api_client.model.model_bundle_framework_type import ModelBundleFrameworkType +from launch.api_client.model.model_bundle_framework_type import ( + ModelBundleFrameworkType, +) diff --git a/launch/api_client/model/model_bundle_environment_params.pyi b/launch/api_client/model/model_bundle_environment_params.pyi index b266edaf..54ace726 100644 --- a/launch/api_client/model/model_bundle_environment_params.pyi +++ b/launch/api_client/model/model_bundle_environment_params.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundleEnvironmentParams(schemas.DictSchema): @@ -160,4 +159,6 @@ class ModelBundleEnvironmentParams(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_framework_type import ModelBundleFrameworkType +from launch_client.model.model_bundle_framework_type import ( + ModelBundleFrameworkType, +) diff --git a/launch/api_client/model/model_bundle_framework_type.py b/launch/api_client/model/model_bundle_framework_type.py index c7ecb2d8..cbbdb61d 100644 --- a/launch/api_client/model/model_bundle_framework_type.py +++ b/launch/api_client/model/model_bundle_framework_type.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_bundle_framework_type.pyi b/launch/api_client/model/model_bundle_framework_type.pyi index 9e08e72a..6dac94df 100644 --- a/launch/api_client/model/model_bundle_framework_type.pyi +++ b/launch/api_client/model/model_bundle_framework_type.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/model_bundle_order_by.py b/launch/api_client/model/model_bundle_order_by.py index 9fa5758b..987734ac 100644 --- a/launch/api_client/model/model_bundle_order_by.py +++ b/launch/api_client/model/model_bundle_order_by.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_bundle_order_by.pyi b/launch/api_client/model/model_bundle_order_by.pyi index 76189ebb..caa21cef 100644 --- a/launch/api_client/model/model_bundle_order_by.pyi +++ b/launch/api_client/model/model_bundle_order_by.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/model_bundle_packaging_type.py b/launch/api_client/model/model_bundle_packaging_type.py index e9d25774..e97563f6 100644 --- a/launch/api_client/model/model_bundle_packaging_type.py +++ b/launch/api_client/model/model_bundle_packaging_type.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_bundle_packaging_type.pyi b/launch/api_client/model/model_bundle_packaging_type.pyi index 1c310f5a..0ff122fb 100644 --- a/launch/api_client/model/model_bundle_packaging_type.pyi +++ b/launch/api_client/model/model_bundle_packaging_type.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/model_bundle_v1_response.py b/launch/api_client/model/model_bundle_v1_response.py index ba816e41..90bdef95 100644 --- a/launch/api_client/model/model_bundle_v1_response.py +++ b/launch/api_client/model/model_bundle_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -378,5 +378,9 @@ def __new__( ) -from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams -from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType +from launch.api_client.model.model_bundle_environment_params import ( + ModelBundleEnvironmentParams, +) +from launch.api_client.model.model_bundle_packaging_type import ( + ModelBundlePackagingType, +) diff --git a/launch/api_client/model/model_bundle_v1_response.pyi b/launch/api_client/model/model_bundle_v1_response.pyi index 07b30379..44b97398 100644 --- a/launch/api_client/model/model_bundle_v1_response.pyi +++ b/launch/api_client/model/model_bundle_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundleV1Response(schemas.DictSchema): @@ -320,5 +319,9 @@ class ModelBundleV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams -from launch_client.model.model_bundle_packaging_type import ModelBundlePackagingType +from launch_client.model.model_bundle_environment_params import ( + ModelBundleEnvironmentParams, +) +from launch_client.model.model_bundle_packaging_type import ( + ModelBundlePackagingType, +) diff --git a/launch/api_client/model/model_bundle_v2_response.py b/launch/api_client/model/model_bundle_v2_response.py index 8a39a9ed..1a1331f0 100644 --- a/launch/api_client/model/model_bundle_v2_response.py +++ b/launch/api_client/model/model_bundle_v2_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 @@ -351,7 +351,11 @@ def __new__( ) -from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor -from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_bundle_v2_response.pyi b/launch/api_client/model/model_bundle_v2_response.pyi index af8ad359..fcaeb904 100644 --- a/launch/api_client/model/model_bundle_v2_response.pyi +++ b/launch/api_client/model/model_bundle_v2_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelBundleV2Response(schemas.DictSchema): @@ -311,7 +310,11 @@ class ModelBundleV2Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor +from launch_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) from launch_client.model.runnable_image_flavor import RunnableImageFlavor -from launch_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor +from launch_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_endpoint_deployment_state.py b/launch/api_client/model/model_endpoint_deployment_state.py index 1682bb71..c0a13dff 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.py +++ b/launch/api_client/model/model_endpoint_deployment_state.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_endpoint_deployment_state.pyi b/launch/api_client/model/model_endpoint_deployment_state.pyi index af8a29f8..ff9c7ac0 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.pyi +++ b/launch/api_client/model/model_endpoint_deployment_state.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelEndpointDeploymentState(schemas.DictSchema): diff --git a/launch/api_client/model/model_endpoint_order_by.py b/launch/api_client/model/model_endpoint_order_by.py index 87e6a3e7..e2eb86a1 100644 --- a/launch/api_client/model/model_endpoint_order_by.py +++ b/launch/api_client/model/model_endpoint_order_by.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_endpoint_order_by.pyi b/launch/api_client/model/model_endpoint_order_by.pyi index 00acf464..28193762 100644 --- a/launch/api_client/model/model_endpoint_order_by.pyi +++ b/launch/api_client/model/model_endpoint_order_by.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/model_endpoint_resource_state.py b/launch/api_client/model/model_endpoint_resource_state.py index 920408f8..f6ed43ff 100644 --- a/launch/api_client/model/model_endpoint_resource_state.py +++ b/launch/api_client/model/model_endpoint_resource_state.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_endpoint_resource_state.pyi b/launch/api_client/model/model_endpoint_resource_state.pyi index c34afbb1..01d11482 100644 --- a/launch/api_client/model/model_endpoint_resource_state.pyi +++ b/launch/api_client/model/model_endpoint_resource_state.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelEndpointResourceState(schemas.DictSchema): diff --git a/launch/api_client/model/model_endpoint_status.py b/launch/api_client/model/model_endpoint_status.py index 445e3498..8703e65a 100644 --- a/launch/api_client/model/model_endpoint_status.py +++ b/launch/api_client/model/model_endpoint_status.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_endpoint_status.pyi b/launch/api_client/model/model_endpoint_status.pyi index 596b3bd7..8f1377bd 100644 --- a/launch/api_client/model/model_endpoint_status.pyi +++ b/launch/api_client/model/model_endpoint_status.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/model_endpoint_type.py b/launch/api_client/model/model_endpoint_type.py index 3e23ae80..57c909ed 100644 --- a/launch/api_client/model/model_endpoint_type.py +++ b/launch/api_client/model/model_endpoint_type.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/model_endpoint_type.pyi b/launch/api_client/model/model_endpoint_type.pyi index c5e640c9..7a9bef5b 100644 --- a/launch/api_client/model/model_endpoint_type.pyi +++ b/launch/api_client/model/model_endpoint_type.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/pytorch_framework.py b/launch/api_client/model/pytorch_framework.py index fbb1b34f..08ccf102 100644 --- a/launch/api_client/model/pytorch_framework.py +++ b/launch/api_client/model/pytorch_framework.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/pytorch_framework.pyi b/launch/api_client/model/pytorch_framework.pyi index 53ddb0cc..422a2256 100644 --- a/launch/api_client/model/pytorch_framework.pyi +++ b/launch/api_client/model/pytorch_framework.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class PytorchFramework(schemas.DictSchema): diff --git a/launch/api_client/model/request_schema.py b/launch/api_client/model/request_schema.py index 3dc04b7e..48c12333 100644 --- a/launch/api_client/model/request_schema.py +++ b/launch/api_client/model/request_schema.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/request_schema.pyi b/launch/api_client/model/request_schema.pyi index e5da4cba..031787ad 100644 --- a/launch/api_client/model/request_schema.pyi +++ b/launch/api_client/model/request_schema.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.py b/launch/api_client/model/response_schema.py index 2fb37b63..ac2a8608 100644 --- a/launch/api_client/model/response_schema.py +++ b/launch/api_client/model/response_schema.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/response_schema.pyi b/launch/api_client/model/response_schema.pyi index c3179237..800305f1 100644 --- a/launch/api_client/model/response_schema.pyi +++ b/launch/api_client/model/response_schema.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/runnable_image_flavor.py b/launch/api_client/model/runnable_image_flavor.py index 33fa7abf..1ed2c77f 100644 --- a/launch/api_client/model/runnable_image_flavor.py +++ b/launch/api_client/model/runnable_image_flavor.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi index de4f1014..22086e6f 100644 --- a/launch/api_client/model/runnable_image_flavor.pyi +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class RunnableImageFlavor(schemas.DictSchema): diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.py b/launch/api_client/model/sync_endpoint_predict_v1_response.py index fd4f9da8..e3753b5e 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.py +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi index abfa01e7..49ae96fa 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class SyncEndpointPredictV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/task_status.py b/launch/api_client/model/task_status.py index 5d223f9a..9693fad1 100644 --- a/launch/api_client/model/task_status.py +++ b/launch/api_client/model/task_status.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/task_status.pyi b/launch/api_client/model/task_status.pyi index 9a612f3e..d81b166f 100644 --- a/launch/api_client/model/task_status.pyi +++ b/launch/api_client/model/task_status.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class TaskStatus(schemas.EnumBase, schemas.StrSchema): diff --git a/launch/api_client/model/tensorflow_framework.py b/launch/api_client/model/tensorflow_framework.py index 0054e671..f7a0d24a 100644 --- a/launch/api_client/model/tensorflow_framework.py +++ b/launch/api_client/model/tensorflow_framework.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/tensorflow_framework.pyi b/launch/api_client/model/tensorflow_framework.pyi index ef207fe6..9cf421c8 100644 --- a/launch/api_client/model/tensorflow_framework.pyi +++ b/launch/api_client/model/tensorflow_framework.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class TensorflowFramework(schemas.DictSchema): diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py index c7d7e946..b331b006 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi index b5d41390..0633f538 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): diff --git a/launch/api_client/model/update_batch_job_v1_request.py b/launch/api_client/model/update_batch_job_v1_request.py index 0a981f68..dd49a92d 100644 --- a/launch/api_client/model/update_batch_job_v1_request.py +++ b/launch/api_client/model/update_batch_job_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/update_batch_job_v1_request.pyi b/launch/api_client/model/update_batch_job_v1_request.pyi index e72264b2..9ee6b415 100644 --- a/launch/api_client/model/update_batch_job_v1_request.pyi +++ b/launch/api_client/model/update_batch_job_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class UpdateBatchJobV1Request(schemas.DictSchema): diff --git a/launch/api_client/model/update_batch_job_v1_response.py b/launch/api_client/model/update_batch_job_v1_response.py index e5db1e25..ba0755df 100644 --- a/launch/api_client/model/update_batch_job_v1_response.py +++ b/launch/api_client/model/update_batch_job_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/update_batch_job_v1_response.pyi b/launch/api_client/model/update_batch_job_v1_response.pyi index d71d8b6e..1db1c72e 100644 --- a/launch/api_client/model/update_batch_job_v1_response.pyi +++ b/launch/api_client/model/update_batch_job_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class UpdateBatchJobV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/update_model_endpoint_v1_request.py b/launch/api_client/model/update_model_endpoint_v1_request.py index c9d25155..003ceb89 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.py +++ b/launch/api_client/model/update_model_endpoint_v1_request.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/update_model_endpoint_v1_request.pyi b/launch/api_client/model/update_model_endpoint_v1_request.pyi index 9cd3ec43..757912d2 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_request.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class UpdateModelEndpointV1Request(schemas.DictSchema): diff --git a/launch/api_client/model/update_model_endpoint_v1_response.py b/launch/api_client/model/update_model_endpoint_v1_response.py index 9725aec7..fec5ac01 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.py +++ b/launch/api_client/model/update_model_endpoint_v1_response.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/update_model_endpoint_v1_response.pyi b/launch/api_client/model/update_model_endpoint_v1_response.pyi index 37a6fc54..cad5d2de 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_response.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class UpdateModelEndpointV1Response(schemas.DictSchema): diff --git a/launch/api_client/model/validation_error.py b/launch/api_client/model/validation_error.py index 402f6e68..8cc3cf6a 100644 --- a/launch/api_client/model/validation_error.py +++ b/launch/api_client/model/validation_error.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/validation_error.pyi b/launch/api_client/model/validation_error.pyi index b6d07049..865e67c4 100644 --- a/launch/api_client/model/validation_error.pyi +++ b/launch/api_client/model/validation_error.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ValidationError(schemas.DictSchema): diff --git a/launch/api_client/model/zip_artifact_flavor.py b/launch/api_client/model/zip_artifact_flavor.py index 90bb4677..79286ebc 100644 --- a/launch/api_client/model/zip_artifact_flavor.py +++ b/launch/api_client/model/zip_artifact_flavor.py @@ -9,16 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 from launch.api_client import schemas # noqa: F401 diff --git a/launch/api_client/model/zip_artifact_flavor.pyi b/launch/api_client/model/zip_artifact_flavor.pyi index ffbca945..ac4b9816 100644 --- a/launch/api_client/model/zip_artifact_flavor.pyi +++ b/launch/api_client/model/zip_artifact_flavor.pyi @@ -9,17 +9,16 @@ Generated by: https://openapi-generator.tech """ -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 from launch_client import schemas # noqa: F401 class ZipArtifactFlavor(schemas.DictSchema): diff --git a/launch/api_client/models/__init__.py b/launch/api_client/models/__init__.py index 6ea1b83e..6d1198a4 100644 --- a/launch/api_client/models/__init__.py +++ b/launch/api_client/models/__init__.py @@ -11,57 +11,129 @@ # import sys # sys.setrecursionlimit(n) -from launch.api_client.model.batch_job_serialization_format import BatchJobSerializationFormat +from launch.api_client.model.batch_job_serialization_format import ( + BatchJobSerializationFormat, +) from launch.api_client.model.batch_job_status import BatchJobStatus from launch.api_client.model.callback_auth import CallbackAuth from launch.api_client.model.callback_basic_auth import CallbackBasicAuth from launch.api_client.model.callbackm_tls_auth import CallbackmTLSAuth -from launch.api_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request -from launch.api_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request -from launch.api_client.model.cloudpickle_artifact_flavor import CloudpickleArtifactFlavor -from launch.api_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response -from launch.api_client.model.create_batch_job_resource_requests import CreateBatchJobResourceRequests -from launch.api_client.model.create_batch_job_v1_request import CreateBatchJobV1Request -from launch.api_client.model.create_batch_job_v1_response import CreateBatchJobV1Response -from launch.api_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request -from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response -from launch.api_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request -from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response -from launch.api_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request -from launch.api_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response +from launch.api_client.model.clone_model_bundle_v1_request import ( + CloneModelBundleV1Request, +) +from launch.api_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch.api_client.model.cloudpickle_artifact_flavor import ( + CloudpickleArtifactFlavor, +) +from launch.api_client.model.create_async_task_v1_response import ( + CreateAsyncTaskV1Response, +) +from launch.api_client.model.create_batch_job_resource_requests import ( + CreateBatchJobResourceRequests, +) +from launch.api_client.model.create_batch_job_v1_request import ( + CreateBatchJobV1Request, +) +from launch.api_client.model.create_batch_job_v1_response import ( + CreateBatchJobV1Response, +) +from launch.api_client.model.create_model_bundle_v1_request import ( + CreateModelBundleV1Request, +) +from launch.api_client.model.create_model_bundle_v1_response import ( + CreateModelBundleV1Response, +) +from launch.api_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) +from launch.api_client.model.create_model_endpoint_v1_request import ( + CreateModelEndpointV1Request, +) +from launch.api_client.model.create_model_endpoint_v1_response import ( + CreateModelEndpointV1Response, +) from launch.api_client.model.custom_framework import CustomFramework -from launch.api_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response -from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request -from launch.api_client.model.get_async_task_v1_response import GetAsyncTaskV1Response -from launch.api_client.model.get_batch_job_v1_response import GetBatchJobV1Response -from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response +from launch.api_client.model.delete_model_endpoint_v1_response import ( + DeleteModelEndpointV1Response, +) +from launch.api_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, +) +from launch.api_client.model.get_async_task_v1_response import ( + GetAsyncTaskV1Response, +) +from launch.api_client.model.get_batch_job_v1_response import ( + GetBatchJobV1Response, +) +from launch.api_client.model.get_model_endpoint_v1_response import ( + GetModelEndpointV1Response, +) from launch.api_client.model.gpu_type import GpuType from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response -from launch.api_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response -from launch.api_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response -from launch.api_client.model.model_bundle_environment_params import ModelBundleEnvironmentParams -from launch.api_client.model.model_bundle_framework_type import ModelBundleFrameworkType +from launch.api_client.model.list_model_bundles_v1_response import ( + ListModelBundlesV1Response, +) +from launch.api_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) +from launch.api_client.model.list_model_endpoints_v1_response import ( + ListModelEndpointsV1Response, +) +from launch.api_client.model.model_bundle_environment_params import ( + ModelBundleEnvironmentParams, +) +from launch.api_client.model.model_bundle_framework_type import ( + ModelBundleFrameworkType, +) from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch.api_client.model.model_bundle_packaging_type import ModelBundlePackagingType -from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response -from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response -from launch.api_client.model.model_endpoint_deployment_state import ModelEndpointDeploymentState -from launch.api_client.model.model_endpoint_order_by import ModelEndpointOrderBy -from launch.api_client.model.model_endpoint_resource_state import ModelEndpointResourceState +from launch.api_client.model.model_bundle_packaging_type import ( + ModelBundlePackagingType, +) +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) +from launch.api_client.model.model_endpoint_deployment_state import ( + ModelEndpointDeploymentState, +) +from launch.api_client.model.model_endpoint_order_by import ( + ModelEndpointOrderBy, +) +from launch.api_client.model.model_endpoint_resource_state import ( + ModelEndpointResourceState, +) from launch.api_client.model.model_endpoint_status import ModelEndpointStatus from launch.api_client.model.model_endpoint_type import ModelEndpointType from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.request_schema import RequestSchema from launch.api_client.model.response_schema import ResponseSchema from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor -from launch.api_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response +from launch.api_client.model.sync_endpoint_predict_v1_response import ( + SyncEndpointPredictV1Response, +) from launch.api_client.model.task_status import TaskStatus from launch.api_client.model.tensorflow_framework import TensorflowFramework -from launch.api_client.model.triton_enhanced_runnable_image_flavor import TritonEnhancedRunnableImageFlavor -from launch.api_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request -from launch.api_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response -from launch.api_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request -from launch.api_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) +from launch.api_client.model.update_batch_job_v1_request import ( + UpdateBatchJobV1Request, +) +from launch.api_client.model.update_batch_job_v1_response import ( + UpdateBatchJobV1Response, +) +from launch.api_client.model.update_model_endpoint_v1_request import ( + UpdateModelEndpointV1Request, +) +from launch.api_client.model.update_model_endpoint_v1_response import ( + UpdateModelEndpointV1Response, +) from launch.api_client.model.validation_error import ValidationError from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/paths/healthcheck/get.py b/launch/api_client/paths/healthcheck/get.py index 52629448..36a6cdde 100644 --- a/launch/api_client/paths/healthcheck/get.py +++ b/launch/api_client/paths/healthcheck/get.py @@ -6,24 +6,22 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions from . import path diff --git a/launch/api_client/paths/healthcheck/get.pyi b/launch/api_client/paths/healthcheck/get.pyi index 03a913c4..ff915fa2 100644 --- a/launch/api_client/paths/healthcheck/get.pyi +++ b/launch/api_client/paths/healthcheck/get.pyi @@ -6,24 +6,21 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema diff --git a/launch/api_client/paths/healthz/get.py b/launch/api_client/paths/healthz/get.py index e66b9460..efd5991f 100644 --- a/launch/api_client/paths/healthz/get.py +++ b/launch/api_client/paths/healthz/get.py @@ -6,24 +6,22 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions from . import path diff --git a/launch/api_client/paths/healthz/get.pyi b/launch/api_client/paths/healthz/get.pyi index 91b98a03..c5a06f91 100644 --- a/launch/api_client/paths/healthz/get.pyi +++ b/launch/api_client/paths/healthz/get.pyi @@ -6,24 +6,21 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema diff --git a/launch/api_client/paths/readyz/get.py b/launch/api_client/paths/readyz/get.py index 5ff6a943..b1b0fb7a 100644 --- a/launch/api_client/paths/readyz/get.py +++ b/launch/api_client/paths/readyz/get.py @@ -6,24 +6,22 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions from . import path diff --git a/launch/api_client/paths/readyz/get.pyi b/launch/api_client/paths/readyz/get.pyi index 1637cbbe..f1a5a134 100644 --- a/launch/api_client/paths/readyz/get.pyi +++ b/launch/api_client/paths/readyz/get.pyi @@ -6,24 +6,21 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema diff --git a/launch/api_client/paths/v1_async_tasks/post.py b/launch/api_client/paths/v1_async_tasks/post.py index e2b913ea..9beba143 100644 --- a/launch/api_client/paths/v1_async_tasks/post.py +++ b/launch/api_client/paths/v1_async_tasks/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_async_task_v1_response import ( + CreateAsyncTaskV1Response, +) +from launch.api_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response from . import path diff --git a/launch/api_client/paths/v1_async_tasks/post.pyi b/launch/api_client/paths/v1_async_tasks/post.pyi index bbe79b45..da7f23e6 100644 --- a/launch/api_client/paths/v1_async_tasks/post.pyi +++ b/launch/api_client/paths/v1_async_tasks/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.endpoint_predict_v1_request import EndpointPredictV1Request +from launch_client import api_client, exceptions +from launch_client.model.create_async_task_v1_response import ( + CreateAsyncTaskV1Response, +) +from launch_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.create_async_task_v1_response import CreateAsyncTaskV1Response +from urllib3._collections import HTTPHeaderDict # Query params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.py b/launch/api_client/paths/v1_async_tasks_task_id/get.py index 55906b69..cabae5fd 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.py @@ -6,27 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_async_task_v1_response import ( + GetAsyncTaskV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.get_async_task_v1_response import GetAsyncTaskV1Response from . import path diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi index cc044c79..41aa15e2 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi @@ -6,27 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions +from launch_client.model.get_async_task_v1_response import ( + GetAsyncTaskV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.get_async_task_v1_response import GetAsyncTaskV1Response +from urllib3._collections import HTTPHeaderDict # Path params TaskIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_batch_jobs/post.py b/launch/api_client/paths/v1_batch_jobs/post.py index 7f4e037c..1e1cdc4b 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.py +++ b/launch/api_client/paths/v1_batch_jobs/post.py @@ -6,27 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.create_batch_job_v1_response import CreateBatchJobV1Response -from launch.api_client.model.create_batch_job_v1_request import CreateBatchJobV1Request +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_batch_job_v1_request import ( + CreateBatchJobV1Request, +) +from launch.api_client.model.create_batch_job_v1_response import ( + CreateBatchJobV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError from . import path diff --git a/launch/api_client/paths/v1_batch_jobs/post.pyi b/launch/api_client/paths/v1_batch_jobs/post.pyi index eaa9f3cf..701543c3 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.pyi +++ b/launch/api_client/paths/v1_batch_jobs/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.create_batch_job_v1_response import CreateBatchJobV1Response -from launch_client.model.create_batch_job_v1_request import CreateBatchJobV1Request +from launch_client import api_client, exceptions +from launch_client.model.create_batch_job_v1_request import ( + CreateBatchJobV1Request, +) +from launch_client.model.create_batch_job_v1_response import ( + CreateBatchJobV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateBatchJobV1Request diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py index d34350a9..f6cc4f6b 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py @@ -6,26 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.get_batch_job_v1_response import GetBatchJobV1Response +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_batch_job_v1_response import ( + GetBatchJobV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError from . import path diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi index 58bfc9a5..8e6fb8b9 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi @@ -6,27 +6,23 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions from launch_client.model.get_batch_job_v1_response import GetBatchJobV1Response from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict # Path params BatchJobIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py index 6995f5ce..6548a6f2 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response -from launch.api_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request +from launch.api_client.model.update_batch_job_v1_request import ( + UpdateBatchJobV1Request, +) +from launch.api_client.model.update_batch_job_v1_response import ( + UpdateBatchJobV1Response, +) from . import path diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi index 2ff6b37b..d09f4211 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_batch_job_v1_response import UpdateBatchJobV1Response -from launch_client.model.update_batch_job_v1_request import UpdateBatchJobV1Request +from launch_client.model.update_batch_job_v1_request import ( + UpdateBatchJobV1Request, +) +from launch_client.model.update_batch_job_v1_response import ( + UpdateBatchJobV1Response, +) +from urllib3._collections import HTTPHeaderDict # Path params BatchJobIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_bundles/get.py b/launch/api_client/paths/v1_model_bundles/get.py index 08eb496f..f281a55c 100644 --- a/launch/api_client/paths/v1_model_bundles/get.py +++ b/launch/api_client/paths/v1_model_bundles/get.py @@ -6,28 +6,27 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch.api_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_bundles_v1_response import ( + ListModelBundlesV1Response, +) +from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy from . import path diff --git a/launch/api_client/paths/v1_model_bundles/get.pyi b/launch/api_client/paths/v1_model_bundles/get.pyi index 2b843d8e..ea1d6b1a 100644 --- a/launch/api_client/paths/v1_model_bundles/get.pyi +++ b/launch/api_client/paths/v1_model_bundles/get.pyi @@ -6,28 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch_client.model.list_model_bundles_v1_response import ListModelBundlesV1Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.list_model_bundles_v1_response import ( + ListModelBundlesV1Response, +) +from launch_client.model.model_bundle_order_by import ModelBundleOrderBy +from urllib3._collections import HTTPHeaderDict # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_bundles/post.py b/launch/api_client/paths/v1_model_bundles/post.py index c659ef67..b150eec2 100644 --- a/launch/api_client/paths/v1_model_bundles/post.py +++ b/launch/api_client/paths/v1_model_bundles/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_bundle_v1_request import ( + CreateModelBundleV1Request, +) +from launch.api_client.model.create_model_bundle_v1_response import ( + CreateModelBundleV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response from . import path diff --git a/launch/api_client/paths/v1_model_bundles/post.pyi b/launch/api_client/paths/v1_model_bundles/post.pyi index 7cd790a4..33d6d09a 100644 --- a/launch/api_client/paths/v1_model_bundles/post.pyi +++ b/launch/api_client/paths/v1_model_bundles/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.create_model_bundle_v1_request import CreateModelBundleV1Request +from launch_client import api_client, exceptions +from launch_client.model.create_model_bundle_v1_request import ( + CreateModelBundleV1Request, +) +from launch_client.model.create_model_bundle_v1_response import ( + CreateModelBundleV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV1Request diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py index e053f32f..2039b3f5 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - +from launch.api_client import api_client, exceptions +from launch.api_client.model.clone_model_bundle_v1_request import ( + CloneModelBundleV1Request, +) +from launch.api_client.model.create_model_bundle_v1_response import ( + CreateModelBundleV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response -from launch.api_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request from . import path diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi index 60a34dc2..31db2ebf 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions +from launch_client.model.clone_model_bundle_v1_request import ( + CloneModelBundleV1Request, +) +from launch_client.model.create_model_bundle_v1_response import ( + CreateModelBundleV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.create_model_bundle_v1_response import CreateModelBundleV1Response -from launch_client.model.clone_model_bundle_v1_request import CloneModelBundleV1Request +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV1Request diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.py b/launch/api_client/paths/v1_model_bundles_latest/get.py index 5df4b778..a8c76460 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.py +++ b/launch/api_client/paths/v1_model_bundles_latest/get.py @@ -6,27 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) from . import path diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.pyi b/launch/api_client/paths/v1_model_bundles_latest/get.pyi index 68d6f9af..77775bf4 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_latest/get.pyi @@ -6,27 +6,23 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v1_response import ModelBundleV1Response +from urllib3._collections import HTTPHeaderDict # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py index fe43aef3..0b9f92a2 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py @@ -6,27 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) from . import path diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi index 7afb69a1..f72473b5 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi @@ -6,27 +6,23 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v1_response import ModelBundleV1Response +from urllib3._collections import HTTPHeaderDict # Path params ModelBundleIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints/get.py b/launch/api_client/paths/v1_model_endpoints/get.py index 49959697..9b82fe87 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.py +++ b/launch/api_client/paths/v1_model_endpoints/get.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.model_endpoint_order_by import ModelEndpointOrderBy +from launch.api_client.model.list_model_endpoints_v1_response import ( + ListModelEndpointsV1Response, +) +from launch.api_client.model.model_endpoint_order_by import ( + ModelEndpointOrderBy, +) from . import path diff --git a/launch/api_client/paths/v1_model_endpoints/get.pyi b/launch/api_client/paths/v1_model_endpoints/get.pyi index 1ef7b3bc..3edff101 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints/get.pyi @@ -6,28 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.list_model_endpoints_v1_response import ListModelEndpointsV1Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.list_model_endpoints_v1_response import ( + ListModelEndpointsV1Response, +) from launch_client.model.model_endpoint_order_by import ModelEndpointOrderBy +from urllib3._collections import HTTPHeaderDict # Query params NameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints/post.py b/launch/api_client/paths/v1_model_endpoints/post.py index 9a3aa363..d58c36a1 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.py +++ b/launch/api_client/paths/v1_model_endpoints/post.py @@ -6,27 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response -from launch.api_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_endpoint_v1_request import ( + CreateModelEndpointV1Request, +) +from launch.api_client.model.create_model_endpoint_v1_response import ( + CreateModelEndpointV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError from . import path diff --git a/launch/api_client/paths/v1_model_endpoints/post.pyi b/launch/api_client/paths/v1_model_endpoints/post.pyi index 166a80d7..c96a2e30 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.pyi +++ b/launch/api_client/paths/v1_model_endpoints/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.create_model_endpoint_v1_response import CreateModelEndpointV1Response -from launch_client.model.create_model_endpoint_v1_request import CreateModelEndpointV1Request +from launch_client import api_client, exceptions +from launch_client.model.create_model_endpoint_v1_request import ( + CreateModelEndpointV1Request, +) +from launch_client.model.create_model_endpoint_v1_response import ( + CreateModelEndpointV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateModelEndpointV1Request diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.py b/launch/api_client/paths/v1_model_endpoints_api/get.py index cc076c7e..5c9f46ce 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.py +++ b/launch/api_client/paths/v1_model_endpoints_api/get.py @@ -6,24 +6,22 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions from . import path diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.pyi b/launch/api_client/paths/v1_model_endpoints_api/get.pyi index b0da6c51..6daaceae 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_api/get.pyi @@ -6,24 +6,21 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py index 288eb17f..d857fb84 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py @@ -6,26 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response +from launch.api_client import api_client, exceptions +from launch.api_client.model.delete_model_endpoint_v1_response import ( + DeleteModelEndpointV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError from . import path diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi index 01038a46..0d06a215 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi @@ -6,27 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.delete_model_endpoint_v1_response import DeleteModelEndpointV1Response +from launch_client import api_client, exceptions +from launch_client.model.delete_model_endpoint_v1_response import ( + DeleteModelEndpointV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py index 3f9b83ab..61ca4fb8 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py @@ -6,26 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_model_endpoint_v1_response import ( + GetModelEndpointV1Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError from . import path diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi index 40537503..a4a5c606 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi @@ -6,27 +6,25 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.get_model_endpoint_v1_response import GetModelEndpointV1Response +from launch_client import api_client, exceptions +from launch_client.model.get_model_endpoint_v1_response import ( + GetModelEndpointV1Response, +) from launch_client.model.http_validation_error import HTTPValidationError +from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py index eefe9ce5..f7a3b983 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request +from launch.api_client.model.update_model_endpoint_v1_request import ( + UpdateModelEndpointV1Request, +) +from launch.api_client.model.update_model_endpoint_v1_response import ( + UpdateModelEndpointV1Response, +) from . import path diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi index 41c90130..9130169a 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.update_model_endpoint_v1_response import UpdateModelEndpointV1Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_model_endpoint_v1_request import UpdateModelEndpointV1Request +from launch_client.model.update_model_endpoint_v1_request import ( + UpdateModelEndpointV1Request, +) +from launch_client.model.update_model_endpoint_v1_response import ( + UpdateModelEndpointV1Response, +) +from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py index c9547fc3..f68f401f 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py @@ -6,24 +6,22 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions from . import path diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi index 0a02f769..38c6975c 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi @@ -6,24 +6,21 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 +from launch_client import api_client, exceptions +from urllib3._collections import HTTPHeaderDict SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema diff --git a/launch/api_client/paths/v1_sync_tasks/post.py b/launch/api_client/paths/v1_sync_tasks/post.py index 1a0222af..9ef4075c 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.py +++ b/launch/api_client/paths/v1_sync_tasks/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.endpoint_predict_v1_request import EndpointPredictV1Request +from launch.api_client import api_client, exceptions +from launch.api_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response +from launch.api_client.model.sync_endpoint_predict_v1_response import ( + SyncEndpointPredictV1Response, +) from . import path diff --git a/launch/api_client/paths/v1_sync_tasks/post.pyi b/launch/api_client/paths/v1_sync_tasks/post.pyi index bc968611..fab27c22 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.pyi +++ b/launch/api_client/paths/v1_sync_tasks/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.endpoint_predict_v1_request import EndpointPredictV1Request +from launch_client import api_client, exceptions +from launch_client.model.endpoint_predict_v1_request import ( + EndpointPredictV1Request, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.sync_endpoint_predict_v1_response import SyncEndpointPredictV1Response +from launch_client.model.sync_endpoint_predict_v1_response import ( + SyncEndpointPredictV1Response, +) +from urllib3._collections import HTTPHeaderDict # Query params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v2_model_bundles/get.py b/launch/api_client/paths/v2_model_bundles/get.py index 06794dd6..e6bdbe21 100644 --- a/launch/api_client/paths/v2_model_bundles/get.py +++ b/launch/api_client/paths/v2_model_bundles/get.py @@ -6,28 +6,27 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch.api_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) +from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy from . import path diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi index e81a9b03..5310bfb3 100644 --- a/launch/api_client/paths/v2_model_bundles/get.pyi +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -6,28 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from launch_client.model.list_model_bundles_v2_response import ListModelBundlesV2Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.list_model_bundles_v2_response import ( + ListModelBundlesV2Response, +) +from launch_client.model.model_bundle_order_by import ModelBundleOrderBy +from urllib3._collections import HTTPHeaderDict # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v2_model_bundles/post.py b/launch/api_client/paths/v2_model_bundles/post.py index ce07fac6..1b6588f4 100644 --- a/launch/api_client/paths/v2_model_bundles/post.py +++ b/launch/api_client/paths/v2_model_bundles/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request -from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response from . import path diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi index 085b7b57..ad56e727 100644 --- a/launch/api_client/paths/v2_model_bundles/post.pyi +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions +from launch_client.model.create_model_bundle_v2_request import ( + CreateModelBundleV2Request, +) +from launch_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.create_model_bundle_v2_request import CreateModelBundleV2Request -from launch_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py index 0a558a0b..dd3e56bd 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py @@ -6,28 +6,29 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - +from launch.api_client import api_client, exceptions +from launch.api_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch.api_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) from launch.api_client.model.http_validation_error import HTTPValidationError -from launch.api_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response -from launch.api_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request from . import path diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi index 6040c86c..549a1705 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -6,28 +6,28 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - +from launch_client import api_client, exceptions +from launch_client.model.clone_model_bundle_v2_request import ( + CloneModelBundleV2Request, +) +from launch_client.model.create_model_bundle_v2_response import ( + CreateModelBundleV2Response, +) from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.create_model_bundle_v2_response import CreateModelBundleV2Response -from launch_client.model.clone_model_bundle_v2_request import CloneModelBundleV2Request +from urllib3._collections import HTTPHeaderDict # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.py b/launch/api_client/paths/v2_model_bundles_latest/get.py index c6b94221..67848df5 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.py +++ b/launch/api_client/paths/v2_model_bundles_latest/get.py @@ -6,27 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) from . import path diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi index 8a6560c8..982a0de2 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -6,27 +6,23 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from urllib3._collections import HTTPHeaderDict # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py index 49ee7787..a9b4f2ce 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py @@ -6,27 +6,26 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch.api_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 +import typing_extensions # noqa: F401 +import urllib3 +from urllib3._collections import HTTPHeaderDict from launch.api_client import schemas # noqa: F401 - -from launch.api_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch.api_client import api_client, exceptions from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) from . import path diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi index 297cd32c..527d9834 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -6,27 +6,23 @@ Generated by: https://openapi-generator.tech """ -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from launch_client import api_client, exceptions -from datetime import date, datetime # noqa: F401 import decimal # noqa: F401 import functools # noqa: F401 import io # noqa: F401 import re # noqa: F401 import typing # noqa: F401 -import typing_extensions # noqa: F401 import uuid # noqa: F401 +from dataclasses import dataclass +from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 - +import typing_extensions # noqa: F401 +import urllib3 from launch_client import schemas # noqa: F401 - -from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch_client import api_client, exceptions from launch_client.model.http_validation_error import HTTPValidationError +from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from urllib3._collections import HTTPHeaderDict # Path params ModelBundleIdSchema = schemas.StrSchema diff --git a/launch/api_client/rest.py b/launch/api_client/rest.py index 3faf0bd6..2065508f 100644 --- a/launch/api_client/rest.py +++ b/launch/api_client/rest.py @@ -11,8 +11,8 @@ import logging import ssl -from urllib.parse import urlencode import typing +from urllib.parse import urlencode import certifi import urllib3 @@ -20,7 +20,6 @@ from launch.api_client.exceptions import ApiException, ApiValueError - logger = logging.getLogger(__name__) diff --git a/launch/api_client/schemas.py b/launch/api_client/schemas.py index 52a9e974..9fb94632 100644 --- a/launch/api_client/schemas.py +++ b/launch/api_client/schemas.py @@ -9,26 +9,21 @@ Generated by: https://openapi-generator.tech """ -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools import decimal +import functools import io import re import types import typing import uuid +from collections import defaultdict +from datetime import date, datetime, timedelta # noqa: F401 -from dateutil.parser.isoparser import isoparser, _takes_ascii import frozendict +from dateutil.parser.isoparser import _takes_ascii, isoparser -from launch.api_client.exceptions import ( - ApiTypeError, - ApiValueError, -) -from launch.api_client.configuration import ( - Configuration, -) +from launch.api_client.configuration import Configuration +from launch.api_client.exceptions import ApiTypeError, ApiValueError class Unset(object): diff --git a/launch/client.py b/launch/client.py index ab682f68..ae65e731 100644 --- a/launch/client.py +++ b/launch/client.py @@ -1808,7 +1808,7 @@ def batch_async_request( self, *, model_bundle: Union[ModelBundle, str], - urls: List[str] = None, + urls: Optional[List[str]] = None, inputs: Optional[List[Dict[str, Any]]] = None, batch_url_file_location: Optional[str] = None, serialization_format: str = "JSON", diff --git a/launch/connection.py b/launch/connection.py index a526d445..f44e0aa9 100644 --- a/launch/connection.py +++ b/launch/connection.py @@ -1,4 +1,5 @@ import time +from typing import Optional import requests @@ -11,7 +12,7 @@ class Connection: """Wrapper of HTTP requests to the Launch endpoint.""" - def __init__(self, api_key: str, endpoint: str = None): + def __init__(self, api_key: str, endpoint: Optional[str] = None): self.api_key = api_key self.endpoint = endpoint From af3dd0ad9f70edc1e489748b1e70136600e6b41b Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:34:01 -0400 Subject: [PATCH 04/13] Fix package import --- .../model/batch_job_serialization_format.pyi | 3 ++- launch/api_client/model/batch_job_status.pyi | 3 ++- launch/api_client/model/callback_auth.pyi | 7 ++++--- launch/api_client/model/callback_basic_auth.pyi | 3 ++- launch/api_client/model/callbackm_tls_auth.pyi | 3 ++- .../model/clone_model_bundle_v1_request.pyi | 3 ++- .../model/clone_model_bundle_v2_request.pyi | 3 ++- .../model/cloudpickle_artifact_flavor.pyi | 9 +++++---- .../model/create_async_task_v1_response.pyi | 3 ++- .../model/create_batch_job_resource_requests.pyi | 5 +++-- .../model/create_batch_job_v1_request.pyi | 7 ++++--- .../model/create_batch_job_v1_response.pyi | 3 ++- .../model/create_model_bundle_v1_request.pyi | 7 ++++--- .../model/create_model_bundle_v1_response.pyi | 3 ++- .../model/create_model_bundle_v2_request.pyi | 11 ++++++----- .../model/create_model_bundle_v2_response.pyi | 3 ++- .../model/create_model_endpoint_v1_request.pyi | 9 +++++---- .../model/create_model_endpoint_v1_response.pyi | 3 ++- launch/api_client/model/custom_framework.pyi | 3 ++- .../model/delete_model_endpoint_v1_response.pyi | 3 ++- .../model/endpoint_predict_v1_request.pyi | 5 +++-- .../model/get_async_task_v1_response.pyi | 5 +++-- .../model/get_batch_job_v1_response.pyi | 5 +++-- .../model/get_model_endpoint_v1_response.pyi | 13 +++++++------ launch/api_client/model/gpu_type.pyi | 3 ++- launch/api_client/model/http_validation_error.pyi | 5 +++-- .../model/list_model_bundles_v1_response.pyi | 7 +++++-- .../model/list_model_bundles_v2_response.pyi | 7 +++++-- .../model/list_model_endpoints_v1_response.pyi | 5 +++-- .../model/model_bundle_environment_params.pyi | 5 +++-- .../model/model_bundle_framework_type.pyi | 3 ++- launch/api_client/model/model_bundle_order_by.pyi | 3 ++- .../model/model_bundle_packaging_type.pyi | 3 ++- .../api_client/model/model_bundle_v1_response.pyi | 7 ++++--- .../api_client/model/model_bundle_v2_response.pyi | 11 ++++++----- .../model/model_endpoint_deployment_state.pyi | 3 ++- .../api_client/model/model_endpoint_order_by.pyi | 3 ++- .../model/model_endpoint_resource_state.pyi | 5 +++-- launch/api_client/model/model_endpoint_status.pyi | 3 ++- launch/api_client/model/model_endpoint_type.pyi | 3 ++- launch/api_client/model/pytorch_framework.pyi | 3 ++- launch/api_client/model/request_schema.pyi | 3 ++- launch/api_client/model/response_schema.pyi | 3 ++- launch/api_client/model/runnable_image_flavor.pyi | 3 ++- .../model/sync_endpoint_predict_v1_response.pyi | 5 +++-- launch/api_client/model/task_status.pyi | 3 ++- launch/api_client/model/tensorflow_framework.pyi | 3 ++- .../triton_enhanced_runnable_image_flavor.pyi | 3 ++- .../model/update_batch_job_v1_request.pyi | 3 ++- .../model/update_batch_job_v1_response.pyi | 3 ++- .../model/update_model_endpoint_v1_request.pyi | 7 ++++--- .../model/update_model_endpoint_v1_response.pyi | 3 ++- launch/api_client/model/validation_error.pyi | 3 ++- launch/api_client/model/zip_artifact_flavor.pyi | 9 +++++---- launch/api_client/paths/healthcheck/get.pyi | 5 +++-- launch/api_client/paths/healthz/get.pyi | 5 +++-- launch/api_client/paths/readyz/get.pyi | 5 +++-- launch/api_client/paths/v1_async_tasks/post.pyi | 13 +++++++------ .../paths/v1_async_tasks_task_id/get.pyi | 11 ++++++----- launch/api_client/paths/v1_batch_jobs/post.pyi | 13 +++++++------ .../paths/v1_batch_jobs_batch_job_id/get.pyi | 11 +++++++---- .../paths/v1_batch_jobs_batch_job_id/put.pyi | 13 +++++++------ launch/api_client/paths/v1_model_bundles/get.pyi | 13 +++++++------ launch/api_client/paths/v1_model_bundles/post.pyi | 13 +++++++------ .../v1_model_bundles_clone_with_changes/post.pyi | 13 +++++++------ .../paths/v1_model_bundles_latest/get.pyi | 11 +++++++---- .../v1_model_bundles_model_bundle_id/get.pyi | 11 +++++++---- .../api_client/paths/v1_model_endpoints/get.pyi | 15 +++++++++------ .../api_client/paths/v1_model_endpoints/post.pyi | 13 +++++++------ .../paths/v1_model_endpoints_api/get.pyi | 5 +++-- .../delete.pyi | 11 ++++++----- .../v1_model_endpoints_model_endpoint_id/get.pyi | 11 ++++++----- .../v1_model_endpoints_model_endpoint_id/put.pyi | 13 +++++++------ .../paths/v1_model_endpoints_schema_json/get.pyi | 5 +++-- launch/api_client/paths/v1_sync_tasks/post.pyi | 13 +++++++------ launch/api_client/paths/v2_model_bundles/get.pyi | 13 +++++++------ launch/api_client/paths/v2_model_bundles/post.pyi | 13 +++++++------ .../v2_model_bundles_clone_with_changes/post.pyi | 13 +++++++------ .../paths/v2_model_bundles_latest/get.pyi | 11 +++++++---- .../v2_model_bundles_model_bundle_id/get.pyi | 11 +++++++---- launch/client.py | 2 ++ launch/errors.py | 4 ++-- 82 files changed, 320 insertions(+), 222 deletions(-) diff --git a/launch/api_client/model/batch_job_serialization_format.pyi b/launch/api_client/model/batch_job_serialization_format.pyi index 7ebc5bff..414265bc 100644 --- a/launch/api_client/model/batch_job_serialization_format.pyi +++ b/launch/api_client/model/batch_job_serialization_format.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class BatchJobSerializationFormat(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/batch_job_status.pyi b/launch/api_client/model/batch_job_status.pyi index 925b6634..2149d3c2 100644 --- a/launch/api_client/model/batch_job_status.pyi +++ b/launch/api_client/model/batch_job_status.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class BatchJobStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/callback_auth.pyi b/launch/api_client/model/callback_auth.pyi index e7193634..868c73f6 100644 --- a/launch/api_client/model/callback_auth.pyi +++ b/launch/api_client/model/callback_auth.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CallbackAuth( schemas.ComposedSchema, @@ -100,5 +101,5 @@ class CallbackAuth( **kwargs, ) -from launch_client.model.callback_basic_auth import CallbackBasicAuth -from launch_client.model.callbackm_tls_auth import CallbackmTLSAuth +from launch.api_client.model.callback_basic_auth import CallbackBasicAuth +from launch.api_client.model.callbackm_tls_auth import CallbackmTLSAuth diff --git a/launch/api_client/model/callback_basic_auth.pyi b/launch/api_client/model/callback_basic_auth.pyi index 39f43b29..5c6e2d4a 100644 --- a/launch/api_client/model/callback_basic_auth.pyi +++ b/launch/api_client/model/callback_basic_auth.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CallbackBasicAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/callbackm_tls_auth.pyi b/launch/api_client/model/callbackm_tls_auth.pyi index ef8b7dc0..fb12ce96 100644 --- a/launch/api_client/model/callbackm_tls_auth.pyi +++ b/launch/api_client/model/callbackm_tls_auth.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CallbackmTLSAuth(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/clone_model_bundle_v1_request.pyi b/launch/api_client/model/clone_model_bundle_v1_request.pyi index dc37a0dc..533b83fa 100644 --- a/launch/api_client/model/clone_model_bundle_v1_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CloneModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/clone_model_bundle_v2_request.pyi b/launch/api_client/model/clone_model_bundle_v2_request.pyi index 82891ae5..36e5af68 100644 --- a/launch/api_client/model/clone_model_bundle_v2_request.pyi +++ b/launch/api_client/model/clone_model_bundle_v2_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CloneModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/cloudpickle_artifact_flavor.pyi b/launch/api_client/model/cloudpickle_artifact_flavor.pyi index 021e1b61..31edcfd9 100644 --- a/launch/api_client/model/cloudpickle_artifact_flavor.pyi +++ b/launch/api_client/model/cloudpickle_artifact_flavor.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CloudpickleArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -310,6 +311,6 @@ class CloudpickleArtifactFlavor(schemas.DictSchema): **kwargs, ) -from launch_client.model.custom_framework import CustomFramework -from launch_client.model.pytorch_framework import PytorchFramework -from launch_client.model.tensorflow_framework import TensorflowFramework +from launch.api_client.model.custom_framework import CustomFramework +from launch.api_client.model.pytorch_framework import PytorchFramework +from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/model/create_async_task_v1_response.pyi b/launch/api_client/model/create_async_task_v1_response.pyi index b4b154be..cb94df7d 100644 --- a/launch/api_client/model/create_async_task_v1_response.pyi +++ b/launch/api_client/model/create_async_task_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/create_batch_job_resource_requests.pyi b/launch/api_client/model/create_batch_job_resource_requests.pyi index c3f466a3..7a900b71 100644 --- a/launch/api_client/model/create_batch_job_resource_requests.pyi +++ b/launch/api_client/model/create_batch_job_resource_requests.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateBatchJobResourceRequests(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -427,4 +428,4 @@ class CreateBatchJobResourceRequests(schemas.DictSchema): **kwargs, ) -from launch_client.model.gpu_type import GpuType +from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/create_batch_job_v1_request.pyi b/launch/api_client/model/create_batch_job_v1_request.pyi index 673f8d33..77838e81 100644 --- a/launch/api_client/model/create_batch_job_v1_request.pyi +++ b/launch/api_client/model/create_batch_job_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -209,9 +210,9 @@ class CreateBatchJobV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.batch_job_serialization_format import ( +from launch.api_client.model.batch_job_serialization_format import ( BatchJobSerializationFormat, ) -from launch_client.model.create_batch_job_resource_requests import ( +from launch.api_client.model.create_batch_job_resource_requests import ( CreateBatchJobResourceRequests, ) diff --git a/launch/api_client/model/create_batch_job_v1_response.pyi b/launch/api_client/model/create_batch_job_v1_response.pyi index c412235a..341660ce 100644 --- a/launch/api_client/model/create_batch_job_v1_response.pyi +++ b/launch/api_client/model/create_batch_job_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/create_model_bundle_v1_request.pyi b/launch/api_client/model/create_model_bundle_v1_request.pyi index 24f63ed8..f75b2986 100644 --- a/launch/api_client/model/create_model_bundle_v1_request.pyi +++ b/launch/api_client/model/create_model_bundle_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelBundleV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -237,9 +238,9 @@ class CreateModelBundleV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ( +from launch.api_client.model.model_bundle_environment_params import ( ModelBundleEnvironmentParams, ) -from launch_client.model.model_bundle_packaging_type import ( +from launch.api_client.model.model_bundle_packaging_type import ( ModelBundlePackagingType, ) diff --git a/launch/api_client/model/create_model_bundle_v1_response.pyi b/launch/api_client/model/create_model_bundle_v1_response.pyi index 34ca8bd2..9f52f8b7 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.pyi +++ b/launch/api_client/model/create_model_bundle_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/create_model_bundle_v2_request.pyi b/launch/api_client/model/create_model_bundle_v2_request.pyi index 3f32dea5..cc1880a5 100644 --- a/launch/api_client/model/create_model_bundle_v2_request.pyi +++ b/launch/api_client/model/create_model_bundle_v2_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelBundleV2Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -233,11 +234,11 @@ class CreateModelBundleV2Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import ( +from launch.api_client.model.cloudpickle_artifact_flavor import ( CloudpickleArtifactFlavor, ) -from launch_client.model.runnable_image_flavor import RunnableImageFlavor -from launch_client.model.triton_enhanced_runnable_image_flavor import ( +from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( TritonEnhancedRunnableImageFlavor, ) -from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor +from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/create_model_bundle_v2_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi index b978ed80..c6d1e482 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/create_model_endpoint_v1_request.pyi b/launch/api_client/model/create_model_endpoint_v1_request.pyi index d0f445c7..6c7f79d7 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -708,6 +709,6 @@ class CreateModelEndpointV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.gpu_type import GpuType -from launch_client.model.model_endpoint_type import ModelEndpointType +from launch.api_client.model.callback_auth import CallbackAuth +from launch.api_client.model.gpu_type import GpuType +from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/create_model_endpoint_v1_response.pyi b/launch/api_client/model/create_model_endpoint_v1_response.pyi index 25eb1309..2713055a 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CreateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/custom_framework.pyi b/launch/api_client/model/custom_framework.pyi index 0ccc9317..0d496a21 100644 --- a/launch/api_client/model/custom_framework.pyi +++ b/launch/api_client/model/custom_framework.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class CustomFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.pyi b/launch/api_client/model/delete_model_endpoint_v1_response.pyi index 97c361af..46e0128e 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/delete_model_endpoint_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class DeleteModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/endpoint_predict_v1_request.pyi b/launch/api_client/model/endpoint_predict_v1_request.pyi index 13dea9cf..a3d67635 100644 --- a/launch/api_client/model/endpoint_predict_v1_request.pyi +++ b/launch/api_client/model/endpoint_predict_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class EndpointPredictV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -180,4 +181,4 @@ class EndpointPredictV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.callback_auth import CallbackAuth +from launch.api_client.model.callback_auth import CallbackAuth diff --git a/launch/api_client/model/get_async_task_v1_response.pyi b/launch/api_client/model/get_async_task_v1_response.pyi index bf4524d5..80e63bbe 100644 --- a/launch/api_client/model/get_async_task_v1_response.pyi +++ b/launch/api_client/model/get_async_task_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class GetAsyncTaskV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -162,4 +163,4 @@ class GetAsyncTaskV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.task_status import TaskStatus +from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/get_batch_job_v1_response.pyi b/launch/api_client/model/get_batch_job_v1_response.pyi index 264bf1cb..1ba1c32a 100644 --- a/launch/api_client/model/get_batch_job_v1_response.pyi +++ b/launch/api_client/model/get_batch_job_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class GetBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -166,4 +167,4 @@ class GetBatchJobV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.batch_job_status import BatchJobStatus +from launch.api_client.model.batch_job_status import BatchJobStatus diff --git a/launch/api_client/model/get_model_endpoint_v1_response.pyi b/launch/api_client/model/get_model_endpoint_v1_response.pyi index da1a700e..c4183cf8 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/get_model_endpoint_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class GetModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -455,12 +456,12 @@ class GetModelEndpointV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.model_endpoint_deployment_state import ( +from launch.api_client.model.callback_auth import CallbackAuth +from launch.api_client.model.model_endpoint_deployment_state import ( ModelEndpointDeploymentState, ) -from launch_client.model.model_endpoint_resource_state import ( +from launch.api_client.model.model_endpoint_resource_state import ( ModelEndpointResourceState, ) -from launch_client.model.model_endpoint_status import ModelEndpointStatus -from launch_client.model.model_endpoint_type import ModelEndpointType +from launch.api_client.model.model_endpoint_status import ModelEndpointStatus +from launch.api_client.model.model_endpoint_type import ModelEndpointType diff --git a/launch/api_client/model/gpu_type.pyi b/launch/api_client/model/gpu_type.pyi index f24497d2..89d07fb5 100644 --- a/launch/api_client/model/gpu_type.pyi +++ b/launch/api_client/model/gpu_type.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class GpuType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/http_validation_error.pyi b/launch/api_client/model/http_validation_error.pyi index c9739cc5..d801788f 100644 --- a/launch/api_client/model/http_validation_error.pyi +++ b/launch/api_client/model/http_validation_error.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class HTTPValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -114,4 +115,4 @@ class HTTPValidationError(schemas.DictSchema): **kwargs, ) -from launch_client.model.validation_error import ValidationError +from launch.api_client.model.validation_error import ValidationError diff --git a/launch/api_client/model/list_model_bundles_v1_response.pyi b/launch/api_client/model/list_model_bundles_v1_response.pyi index e205308d..e55cf2f4 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.pyi +++ b/launch/api_client/model/list_model_bundles_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ListModelBundlesV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -124,4 +125,6 @@ class ListModelBundlesV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_v1_response import ModelBundleV1Response +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) diff --git a/launch/api_client/model/list_model_bundles_v2_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi index c4f8131f..2126abc1 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ListModelBundlesV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -124,4 +125,6 @@ class ListModelBundlesV2Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_v2_response import ModelBundleV2Response +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) diff --git a/launch/api_client/model/list_model_endpoints_v1_response.pyi b/launch/api_client/model/list_model_endpoints_v1_response.pyi index 538ba35a..1a052bb4 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.pyi +++ b/launch/api_client/model/list_model_endpoints_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ListModelEndpointsV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -128,6 +129,6 @@ class ListModelEndpointsV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.get_model_endpoint_v1_response import ( +from launch.api_client.model.get_model_endpoint_v1_response import ( GetModelEndpointV1Response, ) diff --git a/launch/api_client/model/model_bundle_environment_params.pyi b/launch/api_client/model/model_bundle_environment_params.pyi index 54ace726..8303b1a7 100644 --- a/launch/api_client/model/model_bundle_environment_params.pyi +++ b/launch/api_client/model/model_bundle_environment_params.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundleEnvironmentParams(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -159,6 +160,6 @@ class ModelBundleEnvironmentParams(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_framework_type import ( +from launch.api_client.model.model_bundle_framework_type import ( ModelBundleFrameworkType, ) diff --git a/launch/api_client/model/model_bundle_framework_type.pyi b/launch/api_client/model/model_bundle_framework_type.pyi index 6dac94df..028887c6 100644 --- a/launch/api_client/model/model_bundle_framework_type.pyi +++ b/launch/api_client/model/model_bundle_framework_type.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundleFrameworkType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_bundle_order_by.pyi b/launch/api_client/model/model_bundle_order_by.pyi index caa21cef..3c923d1d 100644 --- a/launch/api_client/model/model_bundle_order_by.pyi +++ b/launch/api_client/model/model_bundle_order_by.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundleOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_bundle_packaging_type.pyi b/launch/api_client/model/model_bundle_packaging_type.pyi index 0ff122fb..646087dc 100644 --- a/launch/api_client/model/model_bundle_packaging_type.pyi +++ b/launch/api_client/model/model_bundle_packaging_type.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundlePackagingType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_bundle_v1_response.pyi b/launch/api_client/model/model_bundle_v1_response.pyi index 44b97398..6dc410b8 100644 --- a/launch/api_client/model/model_bundle_v1_response.pyi +++ b/launch/api_client/model/model_bundle_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundleV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -319,9 +320,9 @@ class ModelBundleV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.model_bundle_environment_params import ( +from launch.api_client.model.model_bundle_environment_params import ( ModelBundleEnvironmentParams, ) -from launch_client.model.model_bundle_packaging_type import ( +from launch.api_client.model.model_bundle_packaging_type import ( ModelBundlePackagingType, ) diff --git a/launch/api_client/model/model_bundle_v2_response.pyi b/launch/api_client/model/model_bundle_v2_response.pyi index fcaeb904..378d8335 100644 --- a/launch/api_client/model/model_bundle_v2_response.pyi +++ b/launch/api_client/model/model_bundle_v2_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelBundleV2Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -310,11 +311,11 @@ class ModelBundleV2Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.cloudpickle_artifact_flavor import ( +from launch.api_client.model.cloudpickle_artifact_flavor import ( CloudpickleArtifactFlavor, ) -from launch_client.model.runnable_image_flavor import RunnableImageFlavor -from launch_client.model.triton_enhanced_runnable_image_flavor import ( +from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( TritonEnhancedRunnableImageFlavor, ) -from launch_client.model.zip_artifact_flavor import ZipArtifactFlavor +from launch.api_client.model.zip_artifact_flavor import ZipArtifactFlavor diff --git a/launch/api_client/model/model_endpoint_deployment_state.pyi b/launch/api_client/model/model_endpoint_deployment_state.pyi index ff9c7ac0..e9b4d6df 100644 --- a/launch/api_client/model/model_endpoint_deployment_state.pyi +++ b/launch/api_client/model/model_endpoint_deployment_state.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelEndpointDeploymentState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_endpoint_order_by.pyi b/launch/api_client/model/model_endpoint_order_by.pyi index 28193762..f9ea038c 100644 --- a/launch/api_client/model/model_endpoint_order_by.pyi +++ b/launch/api_client/model/model_endpoint_order_by.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelEndpointOrderBy(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_endpoint_resource_state.pyi b/launch/api_client/model/model_endpoint_resource_state.pyi index 01d11482..4a926bda 100644 --- a/launch/api_client/model/model_endpoint_resource_state.pyi +++ b/launch/api_client/model/model_endpoint_resource_state.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelEndpointResourceState(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -425,4 +426,4 @@ class ModelEndpointResourceState(schemas.DictSchema): **kwargs, ) -from launch_client.model.gpu_type import GpuType +from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/model_endpoint_status.pyi b/launch/api_client/model/model_endpoint_status.pyi index 8f1377bd..2ae004af 100644 --- a/launch/api_client/model/model_endpoint_status.pyi +++ b/launch/api_client/model/model_endpoint_status.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelEndpointStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/model_endpoint_type.pyi b/launch/api_client/model/model_endpoint_type.pyi index 7a9bef5b..3d8c2553 100644 --- a/launch/api_client/model/model_endpoint_type.pyi +++ b/launch/api_client/model/model_endpoint_type.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ModelEndpointType(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/pytorch_framework.pyi b/launch/api_client/model/pytorch_framework.pyi index 422a2256..14a92cb6 100644 --- a/launch/api_client/model/pytorch_framework.pyi +++ b/launch/api_client/model/pytorch_framework.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class PytorchFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/request_schema.pyi b/launch/api_client/model/request_schema.pyi index 031787ad..48c12333 100644 --- a/launch/api_client/model/request_schema.pyi +++ b/launch/api_client/model/request_schema.pyi @@ -19,6 +19,7 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 RequestSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/response_schema.pyi b/launch/api_client/model/response_schema.pyi index 800305f1..ac2a8608 100644 --- a/launch/api_client/model/response_schema.pyi +++ b/launch/api_client/model/response_schema.pyi @@ -19,6 +19,7 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 ResponseSchema = schemas.AnyTypeSchema diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi index 22086e6f..cdc76a78 100644 --- a/launch/api_client/model/runnable_image_flavor.pyi +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class RunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi index 49ae96fa..eab633c8 100644 --- a/launch/api_client/model/sync_endpoint_predict_v1_response.pyi +++ b/launch/api_client/model/sync_endpoint_predict_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class SyncEndpointPredictV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -147,4 +148,4 @@ class SyncEndpointPredictV1Response(schemas.DictSchema): **kwargs, ) -from launch_client.model.task_status import TaskStatus +from launch.api_client.model.task_status import TaskStatus diff --git a/launch/api_client/model/task_status.pyi b/launch/api_client/model/task_status.pyi index d81b166f..27d161b5 100644 --- a/launch/api_client/model/task_status.pyi +++ b/launch/api_client/model/task_status.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class TaskStatus(schemas.EnumBase, schemas.StrSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/tensorflow_framework.pyi b/launch/api_client/model/tensorflow_framework.pyi index 9cf421c8..0e57704a 100644 --- a/launch/api_client/model/tensorflow_framework.pyi +++ b/launch/api_client/model/tensorflow_framework.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class TensorflowFramework(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi index 0633f538..9a4d8f6c 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/update_batch_job_v1_request.pyi b/launch/api_client/model/update_batch_job_v1_request.pyi index 9ee6b415..bc0e11dc 100644 --- a/launch/api_client/model/update_batch_job_v1_request.pyi +++ b/launch/api_client/model/update_batch_job_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class UpdateBatchJobV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/update_batch_job_v1_response.pyi b/launch/api_client/model/update_batch_job_v1_response.pyi index 1db1c72e..d518d16c 100644 --- a/launch/api_client/model/update_batch_job_v1_response.pyi +++ b/launch/api_client/model/update_batch_job_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class UpdateBatchJobV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/update_model_endpoint_v1_request.pyi b/launch/api_client/model/update_model_endpoint_v1_request.pyi index 757912d2..ce75b68b 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_request.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class UpdateModelEndpointV1Request(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -674,5 +675,5 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): **kwargs, ) -from launch_client.model.callback_auth import CallbackAuth -from launch_client.model.gpu_type import GpuType +from launch.api_client.model.callback_auth import CallbackAuth +from launch.api_client.model.gpu_type import GpuType diff --git a/launch/api_client/model/update_model_endpoint_v1_response.pyi b/launch/api_client/model/update_model_endpoint_v1_response.pyi index cad5d2de..7a4aaf00 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_response.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class UpdateModelEndpointV1Response(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/validation_error.pyi b/launch/api_client/model/validation_error.pyi index 865e67c4..b6841968 100644 --- a/launch/api_client/model/validation_error.pyi +++ b/launch/api_client/model/validation_error.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ValidationError(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. diff --git a/launch/api_client/model/zip_artifact_flavor.pyi b/launch/api_client/model/zip_artifact_flavor.pyi index ac4b9816..6c2a18c0 100644 --- a/launch/api_client/model/zip_artifact_flavor.pyi +++ b/launch/api_client/model/zip_artifact_flavor.pyi @@ -19,7 +19,8 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 -from launch_client import schemas # noqa: F401 + +from launch.api_client import schemas # noqa: F401 class ZipArtifactFlavor(schemas.DictSchema): """NOTE: This class is auto generated by OpenAPI Generator. @@ -314,6 +315,6 @@ class ZipArtifactFlavor(schemas.DictSchema): **kwargs, ) -from launch_client.model.custom_framework import CustomFramework -from launch_client.model.pytorch_framework import PytorchFramework -from launch_client.model.tensorflow_framework import TensorflowFramework +from launch.api_client.model.custom_framework import CustomFramework +from launch.api_client.model.pytorch_framework import PytorchFramework +from launch.api_client.model.tensorflow_framework import TensorflowFramework diff --git a/launch/api_client/paths/healthcheck/get.pyi b/launch/api_client/paths/healthcheck/get.pyi index ff915fa2..3a43737e 100644 --- a/launch/api_client/paths/healthcheck/get.pyi +++ b/launch/api_client/paths/healthcheck/get.pyi @@ -18,10 +18,11 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions + SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass diff --git a/launch/api_client/paths/healthz/get.pyi b/launch/api_client/paths/healthz/get.pyi index c5a06f91..b289e89b 100644 --- a/launch/api_client/paths/healthz/get.pyi +++ b/launch/api_client/paths/healthz/get.pyi @@ -18,10 +18,11 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions + SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass diff --git a/launch/api_client/paths/readyz/get.pyi b/launch/api_client/paths/readyz/get.pyi index f1a5a134..49f495b4 100644 --- a/launch/api_client/paths/readyz/get.pyi +++ b/launch/api_client/paths/readyz/get.pyi @@ -18,10 +18,11 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions + SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass diff --git a/launch/api_client/paths/v1_async_tasks/post.pyi b/launch/api_client/paths/v1_async_tasks/post.pyi index da7f23e6..d349efd9 100644 --- a/launch/api_client/paths/v1_async_tasks/post.pyi +++ b/launch/api_client/paths/v1_async_tasks/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_async_task_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_async_task_v1_response import ( CreateAsyncTaskV1Response, ) -from launch_client.model.endpoint_predict_v1_request import ( +from launch.api_client.model.endpoint_predict_v1_request import ( EndpointPredictV1Request, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # Query params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi index 41aa15e2..8b62914e 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi @@ -18,13 +18,14 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.get_async_task_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_async_task_v1_response import ( GetAsyncTaskV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # Path params TaskIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_batch_jobs/post.pyi b/launch/api_client/paths/v1_batch_jobs/post.pyi index 701543c3..4b99ae0f 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.pyi +++ b/launch/api_client/paths/v1_batch_jobs/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_batch_job_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_batch_job_v1_request import ( CreateBatchJobV1Request, ) -from launch_client.model.create_batch_job_v1_response import ( +from launch.api_client.model.create_batch_job_v1_response import ( CreateBatchJobV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateBatchJobV1Request diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi index 8e6fb8b9..818ba8d3 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi @@ -18,12 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.get_batch_job_v1_response import GetBatchJobV1Response -from launch_client.model.http_validation_error import HTTPValidationError from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_batch_job_v1_response import ( + GetBatchJobV1Response, +) +from launch.api_client.model.http_validation_error import HTTPValidationError + # Path params BatchJobIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi index d09f4211..a25197ed 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_batch_job_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.update_batch_job_v1_request import ( UpdateBatchJobV1Request, ) -from launch_client.model.update_batch_job_v1_response import ( +from launch.api_client.model.update_batch_job_v1_response import ( UpdateBatchJobV1Response, ) -from urllib3._collections import HTTPHeaderDict # Path params BatchJobIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_bundles/get.pyi b/launch/api_client/paths/v1_model_bundles/get.pyi index ea1d6b1a..36bb811a 100644 --- a/launch/api_client/paths/v1_model_bundles/get.pyi +++ b/launch/api_client/paths/v1_model_bundles/get.pyi @@ -18,14 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_bundles_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_bundles_v1_response import ( ListModelBundlesV1Response, ) -from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_bundles/post.pyi b/launch/api_client/paths/v1_model_bundles/post.pyi index 33d6d09a..b26bfb44 100644 --- a/launch/api_client/paths/v1_model_bundles/post.pyi +++ b/launch/api_client/paths/v1_model_bundles/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_bundle_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_bundle_v1_request import ( CreateModelBundleV1Request, ) -from launch_client.model.create_model_bundle_v1_response import ( +from launch.api_client.model.create_model_bundle_v1_response import ( CreateModelBundleV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV1Request diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi index 31db2ebf..9151b458 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.clone_model_bundle_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.clone_model_bundle_v1_request import ( CloneModelBundleV1Request, ) -from launch_client.model.create_model_bundle_v1_response import ( +from launch.api_client.model.create_model_bundle_v1_response import ( CreateModelBundleV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV1Request diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.pyi b/launch/api_client/paths/v1_model_bundles_latest/get.pyi index 77775bf4..a426664b 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_latest/get.pyi @@ -18,12 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.model_bundle_v1_response import ModelBundleV1Response from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) + # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi index f72473b5..836b7c91 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi @@ -18,12 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.model_bundle_v1_response import ModelBundleV1Response from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v1_response import ( + ModelBundleV1Response, +) + # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( diff --git a/launch/api_client/paths/v1_model_endpoints/get.pyi b/launch/api_client/paths/v1_model_endpoints/get.pyi index 3edff101..fad955d8 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints/get.pyi @@ -18,14 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_endpoints_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_endpoints_v1_response import ( ListModelEndpointsV1Response, ) -from launch_client.model.model_endpoint_order_by import ModelEndpointOrderBy -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.model_endpoint_order_by import ( + ModelEndpointOrderBy, +) # Query params NameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints/post.pyi b/launch/api_client/paths/v1_model_endpoints/post.pyi index c96a2e30..299a6ca5 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.pyi +++ b/launch/api_client/paths/v1_model_endpoints/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_endpoint_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_endpoint_v1_request import ( CreateModelEndpointV1Request, ) -from launch_client.model.create_model_endpoint_v1_response import ( +from launch.api_client.model.create_model_endpoint_v1_response import ( CreateModelEndpointV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateModelEndpointV1Request diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.pyi b/launch/api_client/paths/v1_model_endpoints_api/get.pyi index 6daaceae..f69b0eb8 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_api/get.pyi @@ -18,10 +18,11 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions + SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi index 0d06a215..b654464d 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi @@ -18,13 +18,14 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.delete_model_endpoint_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.delete_model_endpoint_v1_response import ( DeleteModelEndpointV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi index a4a5c606..5bef0a11 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi @@ -18,13 +18,14 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.get_model_endpoint_v1_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.get_model_endpoint_v1_response import ( GetModelEndpointV1Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi index 9130169a..36ee296d 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.update_model_endpoint_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.update_model_endpoint_v1_request import ( UpdateModelEndpointV1Request, ) -from launch_client.model.update_model_endpoint_v1_response import ( +from launch.api_client.model.update_model_endpoint_v1_response import ( UpdateModelEndpointV1Response, ) -from urllib3._collections import HTTPHeaderDict # Path params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi index 38c6975c..ecb53bae 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi @@ -18,10 +18,11 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions + SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass diff --git a/launch/api_client/paths/v1_sync_tasks/post.pyi b/launch/api_client/paths/v1_sync_tasks/post.pyi index fab27c22..d4eef480 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.pyi +++ b/launch/api_client/paths/v1_sync_tasks/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.endpoint_predict_v1_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.endpoint_predict_v1_request import ( EndpointPredictV1Request, ) -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.sync_endpoint_predict_v1_response import ( +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.sync_endpoint_predict_v1_response import ( SyncEndpointPredictV1Response, ) -from urllib3._collections import HTTPHeaderDict # Query params ModelEndpointIdSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi index 5310bfb3..60afe91b 100644 --- a/launch/api_client/paths/v2_model_bundles/get.pyi +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -18,14 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.list_model_bundles_v2_response import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.list_model_bundles_v2_response import ( ListModelBundlesV2Response, ) -from launch_client.model.model_bundle_order_by import ModelBundleOrderBy -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.model_bundle_order_by import ModelBundleOrderBy # Query params ModelNameSchema = schemas.StrSchema diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi index ad56e727..bdad203e 100644 --- a/launch/api_client/paths/v2_model_bundles/post.pyi +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.create_model_bundle_v2_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.create_model_bundle_v2_request import ( CreateModelBundleV2Request, ) -from launch_client.model.create_model_bundle_v2_response import ( +from launch.api_client.model.create_model_bundle_v2_response import ( CreateModelBundleV2Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CreateModelBundleV2Request diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi index 549a1705..aa186c57 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -18,16 +18,17 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.clone_model_bundle_v2_request import ( +from urllib3._collections import HTTPHeaderDict + +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.clone_model_bundle_v2_request import ( CloneModelBundleV2Request, ) -from launch_client.model.create_model_bundle_v2_response import ( +from launch.api_client.model.create_model_bundle_v2_response import ( CreateModelBundleV2Response, ) -from launch_client.model.http_validation_error import HTTPValidationError -from urllib3._collections import HTTPHeaderDict +from launch.api_client.model.http_validation_error import HTTPValidationError # body param SchemaForRequestBodyApplicationJson = CloneModelBundleV2Request diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi index 982a0de2..91eab583 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -18,12 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.model_bundle_v2_response import ModelBundleV2Response from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) + # Query params ModelNameSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi index 527d9834..8a4f4ed8 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -18,12 +18,15 @@ from datetime import date, datetime # noqa: F401 import frozendict # noqa: F401 import typing_extensions # noqa: F401 import urllib3 -from launch_client import schemas # noqa: F401 -from launch_client import api_client, exceptions -from launch_client.model.http_validation_error import HTTPValidationError -from launch_client.model.model_bundle_v2_response import ModelBundleV2Response from urllib3._collections import HTTPHeaderDict +from launch.api_client import schemas # noqa: F401 +from launch.api_client import api_client, exceptions +from launch.api_client.model.http_validation_error import HTTPValidationError +from launch.api_client.model.model_bundle_v2_response import ( + ModelBundleV2Response, +) + # Path params ModelBundleIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( diff --git a/launch/client.py b/launch/client.py index ae65e731..a9a6d07d 100644 --- a/launch/client.py +++ b/launch/client.py @@ -592,6 +592,7 @@ def create_model_bundle_from_runnable_image_v2( tag: str, command: List[str], env: Dict[str, str], + readiness_initial_delay_seconds: int, ) -> CreateModelBundleV2Response: """ Create a model bundle from a runnable image. The specified ``command`` must start a process @@ -627,6 +628,7 @@ def create_model_bundle_from_runnable_image_v2( command=command, env=env, protocol="http", + readiness_initial_delay_seconds=readiness_initial_delay_seconds, ) ) create_model_bundle_request = CreateModelBundleV2Request( diff --git a/launch/errors.py b/launch/errors.py index a75628f2..07cb1191 100644 --- a/launch/errors.py +++ b/launch/errors.py @@ -1,6 +1,6 @@ import pkg_resources -launch_client_version = pkg_resources.get_distribution("scale-launch").version +launch.api_client_version = pkg_resources.get_distribution("scale-launch").version INFRA_FLAKE_MESSAGES = [ "downstream duration timeout", @@ -11,7 +11,7 @@ class APIError(Exception): def __init__(self, endpoint, command, requests_response=None, aiohttp_response=None): message = ( - f"Your client is on version {launch_client_version}. If you have not recently " + f"Your client is on version {launch.api_client_version}. If you have not recently " "done so, please make sure you have updated to the latest version of the " "client by reinstalling the client.\n " ) From 41c12da3a2230a1096790d8310d5d323caabdf44 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:36:14 -0400 Subject: [PATCH 05/13] Added readiness_initial_delay_seconds --- launch/model_bundle.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launch/model_bundle.py b/launch/model_bundle.py index eb4d95e8..44aa761b 100644 --- a/launch/model_bundle.py +++ b/launch/model_bundle.py @@ -120,6 +120,10 @@ class RunnableImageFlavor(BaseModel): protocol: Literal["http"] + readiness_initial_delay_seconds: int = 120 + """The number of seconds to wait until the image's healthcheck is pinged to determine readiness. + """ + class CreateModelBundleV2Response(BaseModel): """ From 345212b69b50b89e3d627421c3e9fa6c7d85e367 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 01:50:42 -0400 Subject: [PATCH 06/13] updating docs --- docs/concepts/model_bundles.md | 68 +++++++++++++++++++++++++-------- launch/model_bundle.py | 69 ++++++++++++++++++++++++---------- 2 files changed, 101 insertions(+), 36 deletions(-) diff --git a/docs/concepts/model_bundles.md b/docs/concepts/model_bundles.md index 4fcbae28..f5791558 100644 --- a/docs/concepts/model_bundles.md +++ b/docs/concepts/model_bundles.md @@ -43,6 +43,12 @@ Each of these modes of creating a model bundle is called a "Flavor". * You are comfortable with building a web server and Docker image to serve your model. + A `TritonEnhancedRunnableImageFlavor` (a runnable image variant) is good if: + + * You want to use a `RunnableImageFlavor` + * You also want to use [NVidia's `tritonserver`](https://developer.nvidia.com/nvidia-triton-inference-server) to accelerate model inference + + === "Creating From Callables" ```py import os @@ -178,29 +184,18 @@ Each of these modes of creating a model bundle is called a "Flavor". BUNDLE_PARAMS = { "model_bundle_name": "test-bundle", - "load_model_fn": my_load_model_fn, - "load_predict_fn": my_load_predict_fn, "request_schema": MyRequestSchema, "response_schema": MyResponseSchema, - "repository": "launch_rearch", - "tag": "12b9131c5a1489c76592cddd186962cce965f0f6-cpu", + "repository": "...", + "tag": "...", "command": [ - "dumb-init", - "--", - "ddtrace-run", - "run-service", - "--config", - "/install/launch_rearch/config/service--user_defined_code.yaml", - "--concurrency", - "1", - "--http", - "production", - "--port", - "5005", + ... ], "env": { "TEST_KEY": "test_value", }, + "readiness_initial_delay_seconds": 30, + } client = LaunchClient(api_key=os.getenv("LAUNCH_API_KEY")) @@ -208,6 +203,47 @@ Each of these modes of creating a model bundle is called a "Flavor". ``` +=== "Creating From a Triton Enhanced Runnable Image" + ```py + import os + from pydantic import BaseModel + from launch import LaunchClient + + + class MyRequestSchema(BaseModel): + x: int + y: str + + class MyResponseSchema(BaseModel): + __root__: int + + + BUNDLE_PARAMS = { + "model_bundle_name": "test-bundle", + "request_schema": MyRequestSchema, + "response_schema": MyResponseSchema, + "repository": "...", + "tag": "...", + "command": [ + ... + ], + "env": { + "TEST_KEY": "test_value", + }, + "triton_model_repository": "...", + "triton_model_replicas": {"": ""}, + "triton_num_cpu": 4.0, + "triton_commit_tag": "", + "triton_storage": "", + "triton_memory": "", + "triton_readiness_initial_delay_seconds": 300, + } + + client = LaunchClient(api_key=os.getenv("LAUNCH_API_KEY")) + client.create_model_bundle_from_triton_enhanced_runnable_image_v2(**BUNDLE_PARAMS) + ``` + + ## Configuring Model Bundles The `app_config` field of a model bundle is a dictionary that can be used to diff --git a/launch/model_bundle.py b/launch/model_bundle.py index 44aa761b..d55ccb66 100644 --- a/launch/model_bundle.py +++ b/launch/model_bundle.py @@ -45,6 +45,7 @@ class ModelBundleFlavorType(str, Enum): CLOUDPICKLE_ARTIFACT = "cloudpickle_artifact" ZIP_ARTIFACT = "zip_artifact" RUNNABLE_IMAGE = "runnable_image" + TRITON_ENHANCED_RUNNABLE_IMAGE = "triton_enhanced_runnable_image" class CloudpickleArtifactFlavor(BaseModel): @@ -103,26 +104,57 @@ class ZipArtifactFlavor(BaseModel): """Path to the module to load the model object.""" -class RunnableImageFlavor(BaseModel): - flavor: Literal[ModelBundleFlavorType.RUNNABLE_IMAGE] +class RunnableImageLike(BaseModel, ABC): + """An abstract base for flavors that are related to bundles defined by runnable images.""" repository: str - """Docker repository of the image.""" - tag: str - """Docker tag of the image.""" - command: List[str] - """Command to run the image.""" - env: Optional[Dict[str, str]] - """Environment variables to set when running the image.""" + protocol: Literal["http"] # TODO: add support for other protocols (e.g. grpc) + readiness_initial_delay_seconds: int = 120 - protocol: Literal["http"] - readiness_initial_delay_seconds: int = 120 - """The number of seconds to wait until the image's healthcheck is pinged to determine readiness. - """ +class RunnableImageFlavor(RunnableImageLike): + """Model bundles that use custom docker images that expose an HTTP server for inference.""" + + flavor: Literal[ModelBundleFlavorType.RUNNABLE_IMAGE] + + +class TritonEnhancedRunnableImageFlavor(RunnableImageLike): + """For runnable image models that require tritonserver running in a container.""" + + flavor: Literal[ModelBundleFlavorType.TRITON_ENHANCED_RUNNABLE_IMAGE] + + triton_model_repository: str + + triton_model_replicas: Optional[Dict[str, str]] + + triton_num_cpu: float + + triton_commit_tag: str + + triton_storage: Optional[str] + + triton_memory: Optional[str] + + triton_readiness_initial_delay_seconds: int = 300 + + +ModelBundleFlavors = Union[ + CloudpickleArtifactFlavor, + ZipArtifactFlavor, + RunnableImageFlavor, + TritonEnhancedRunnableImageFlavor, +] +"""Union type exhaustively representing all valid model bundle flavors. + +Valid model bundle flavors are: +- [`CloudpickleArtifactFlavor`](./#launch.model_bundle.CloudpickleArtifactFlavor) +- [`ZipArtifactFlavor`](./#launch.model_bundle.ZipArtifactFlavor) +- [`RunnableImageFlavor`](./#launch.model_bundle.RunnableImageFlavor) +- [`TritonEnhancedRunnableImageFlavor`](./#launch.model_bundle.TritonEnhancedRunnableImageFlavor) +""" class CreateModelBundleV2Response(BaseModel): @@ -156,13 +188,10 @@ class ModelBundleV2Response(BaseModel): schema_location: Optional[str] - flavor: Union[CloudpickleArtifactFlavor, ZipArtifactFlavor, RunnableImageFlavor] = Field( - ..., discriminator="flavor" - ) - """Flavor of the Model Bundle, representing how the model bundle was packaged. Either - [`CloudpickleArtifactFlavor`](./#launch.model_bundle.CloudpickleArtifactFlavor), - [`ZipArtifactFlavor`](./#launch.model_bundle.ZipArtifactFlavor), or - [`RunnableImageFlavor`](./#launch.model_bundle.RunnableImageFlavor). + flavor: ModelBundleFlavors = Field(..., discriminator="flavor") + """Flavor of the Model Bundle, representing how the model bundle was packaged. + + See [`ModelBundleFlavors`](./#launch_api.model_bundle.ModelBundleFlavors) for details. """ From 416338e1dacb2e675a247946ebeb1b1e091916a4 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 02:29:42 -0400 Subject: [PATCH 07/13] Added create TritonEnhancedRunnableImageFlavor bundle --- launch/client.py | 113 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) diff --git a/launch/client.py b/launch/client.py index a9a6d07d..33d13e0f 100644 --- a/launch/client.py +++ b/launch/client.py @@ -58,6 +58,9 @@ from launch.api_client.model.pytorch_framework import PytorchFramework from launch.api_client.model.runnable_image_flavor import RunnableImageFlavor from launch.api_client.model.tensorflow_framework import TensorflowFramework +from launch.api_client.model.triton_enhanced_runnable_image_flavor import ( + TritonEnhancedRunnableImageFlavor, +) from launch.api_client.model.update_model_endpoint_v1_request import ( UpdateModelEndpointV1Request, ) @@ -598,6 +601,8 @@ def create_model_bundle_from_runnable_image_v2( Create a model bundle from a runnable image. The specified ``command`` must start a process that will listen for requests on port 5005 using HTTP. + Inference requests must be served at the `POST /predict` route while the `GET /readyz` route is a healthcheck. + Parameters: model_bundle_name: The name of the model bundle you want to create. @@ -614,6 +619,10 @@ def create_model_bundle_from_runnable_image_v2( env: A dictionary of environment variables that will be passed to the bundle when it is run. + readiness_initial_delay_seconds: The number of seconds to wait for the HTTP server to become ready and + successfully respond on its healthcheck. + + Returns: An object containing the following keys: @@ -647,6 +656,106 @@ def create_model_bundle_from_runnable_image_v2( return resp + def create_model_bundle_from_triton_enhanced_runnable_image_v2( + self, + *, + model_bundle_name: str, + request_schema: Type[BaseModel], + response_schema: Type[BaseModel], + repository: str, + tag: str, + command: List[str], + env: Dict[str, str], + readiness_initial_delay_seconds: int, + triton_model_repository: str, + triton_model_replicas: Optional[Dict[str, str]], + triton_num_cpu: float, + triton_commit_tag: str, + triton_storage: Optional[str], + triton_memory: Optional[str], + triton_readiness_initial_delay_seconds: int, + ) -> CreateModelBundleV2Response: + """ + Create a model bundle from a runnable image and a tritonserver image. + + Same requirements as :param:`create_model_bundle_from_runnable_image_v2` with additional constraints necessary + for configuring tritonserver's execution. + + Parameters: + model_bundle_name: The name of the model bundle you want to create. + + request_schema: A Pydantic model that defines the request schema for the bundle. + + response_schema: A Pydantic model that defines the response schema for the bundle. + + repository: The name of the Docker repository for the runnable image. + + tag: The tag for the runnable image. + + command: The command that will be used to start the process that listens for requests. + + env: A dictionary of environment variables that will be passed to the bundle when it + is run. + + readiness_initial_delay_seconds: The number of seconds to wait for the HTTP server to become ready and + successfully respond on its healthcheck. + + triton_model_repository: The S3 prefix that contains the contents of the model repository, formatted + according to https://github.com/triton-inference-server/server/blob/main/docs/user_guide/model_repository.md + + triton_model_replicas: If supplied, the name and number of replicas to make for each model. + + triton_num_cpu: Number of CPUs, fractional, to allocate to tritonserver. + + triton_commit_tag: The image tag of the specific trionserver version. + + triton_storage: Amount of storage space to allocate for the tritonserver container. + + triton_memory: Amount of memory to allocate for the tritonserver container. + + triton_readiness_initial_delay_seconds: Like readiness_initial_delay_seconds, but for tritonserver's + own healthcheck. + + Returns: + An object containing the following keys: + + - ``model_bundle_id``: The ID of the created model bundle. + """ + schema_location = self._upload_schemas(request_schema=request_schema, response_schema=response_schema) + flavor = TritonEnhancedRunnableImageFlavor( + **dict_not_none( + flavor="triton_enhanced_runnable_image", + repository=repository, + tag=tag, + command=command, + env=env, + protocol="http", + readiness_initial_delay_seconds=readiness_initial_delay_seconds, + triton_model_repository=triton_model_repository, + triton_model_replicas=triton_model_replicas, + triton_num_cpu=triton_num_cpu, + triton_commit_tag=triton_commit_tag, + triton_storage=triton_storage, + triton_memory=triton_memory, + triton_readiness_initial_delay_seconds=triton_readiness_initial_delay_seconds, + ) + ) + create_model_bundle_request = CreateModelBundleV2Request( + name=model_bundle_name, + schema_location=schema_location, + flavor=flavor, + ) + + with ApiClient(self.configuration) as api_client: + api_instance = DefaultApi(api_client) + response = api_instance.create_model_bundle_v2_model_bundles_post( + body=create_model_bundle_request, + skip_deserialization=True, + ) + resp = CreateModelBundleV2Response.parse_raw(response.response.data) + + return resp + def get_model_bundle_v2(self, model_bundle_id: str) -> ModelBundleV2Response: """ Get a model bundle. @@ -660,7 +769,7 @@ def get_model_bundle_v2(self, model_bundle_id: str) -> ModelBundleV2Response: - ``id``: The ID of the model bundle. - ``name``: The name of the model bundle. - ``flavor``: The flavor of the model bundle. Either `RunnableImage`, - `CloudpickleArtifact`, or `ZipArtifact`. + `CloudpickleArtifact`, `ZipArtifact`, or `TritonEnhancedRunnableImageFlavor`. - ``created_at``: The time the model bundle was created. - ``metadata``: A dictionary of metadata associated with the model bundle. - ``model_artifact_ids``: A list of IDs of model artifacts associated with the @@ -691,7 +800,7 @@ def get_latest_model_bundle_v2(self, model_bundle_name: str) -> ModelBundleV2Res - ``name``: The name of the model bundle. - ``schema_location``: The location of the schema for the model bundle. - ``flavor``: The flavor of the model bundle. Either `RunnableImage`, - `CloudpickleArtifact`, or `ZipArtifact`. + `CloudpickleArtifact`, `ZipArtifact`, or `TritonEnhancedRunnableImageFlavor`. - ``created_at``: The time the model bundle was created. - ``metadata``: A dictionary of metadata associated with the model bundle. - ``model_artifact_ids``: A list of IDs of model artifacts associated with the From 9234deba4bd938340f1cd6ad32f0307722ca9554 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 02:36:05 -0400 Subject: [PATCH 08/13] fix --- docs/concepts/model_bundles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/model_bundles.md b/docs/concepts/model_bundles.md index f5791558..37ddca30 100644 --- a/docs/concepts/model_bundles.md +++ b/docs/concepts/model_bundles.md @@ -16,7 +16,7 @@ The second takes in directories containing a `load_predict_fn` and the module path to the `load_predict_fn`. The third takes a Docker image and a command that starts a process listening for requests at port 5005 using HTTP and exposes `POST /predict` and -`GET /healthz` endpoints. +`GET /readyz` endpoints. Each of these modes of creating a model bundle is called a "Flavor". From 6857fac4f984577a7586efcc9b4672cdf1a28171 Mon Sep 17 00:00:00 2001 From: Malcolm Greaves Date: Fri, 31 Mar 2023 02:37:08 -0400 Subject: [PATCH 09/13] fix --- docs/concepts/model_bundles.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/concepts/model_bundles.md b/docs/concepts/model_bundles.md index 37ddca30..16fd9f72 100644 --- a/docs/concepts/model_bundles.md +++ b/docs/concepts/model_bundles.md @@ -230,6 +230,7 @@ Each of these modes of creating a model bundle is called a "Flavor". "env": { "TEST_KEY": "test_value", }, + "readiness_initial_delay_seconds": 30, "triton_model_repository": "...", "triton_model_replicas": {"": ""}, "triton_num_cpu": 4.0, From f6eaf42717d8492ea8cc6363682203dbc0ccda36 Mon Sep 17 00:00:00 2001 From: Phil Chen Date: Mon, 3 Apr 2023 09:44:38 -0700 Subject: [PATCH 10/13] fix --- launch/api_client/api_client.py | 1 - .../model/create_async_task_v1_response.py | 8 +-- .../model/create_async_task_v1_response.pyi | 8 +-- .../model/create_batch_job_v1_request.py | 8 +-- .../model/create_batch_job_v1_request.pyi | 8 +-- .../model/create_batch_job_v1_response.py | 8 +-- .../model/create_batch_job_v1_response.pyi | 8 +-- .../model/create_model_bundle_v1_response.py | 8 +-- .../model/create_model_bundle_v1_response.pyi | 8 +-- .../model/create_model_bundle_v2_response.py | 8 +-- .../model/create_model_bundle_v2_response.pyi | 8 +-- .../model/create_model_endpoint_v1_request.py | 8 +-- .../create_model_endpoint_v1_request.pyi | 8 +-- .../create_model_endpoint_v1_response.py | 8 +-- .../create_model_endpoint_v1_response.pyi | 8 +-- .../delete_model_endpoint_v1_response.py | 8 +-- .../delete_model_endpoint_v1_response.pyi | 8 +-- .../model/get_model_endpoint_v1_response.py | 8 +-- .../model/get_model_endpoint_v1_response.pyi | 8 +-- .../api_client/model/http_validation_error.py | 8 +-- .../model/http_validation_error.pyi | 8 +-- .../model/list_model_bundles_v1_response.py | 8 +-- .../model/list_model_bundles_v1_response.pyi | 8 +-- .../model/list_model_bundles_v2_response.py | 8 +-- .../model/list_model_bundles_v2_response.pyi | 8 +-- .../model/list_model_endpoints_v1_response.py | 8 +-- .../list_model_endpoints_v1_response.pyi | 8 +-- .../api_client/model/runnable_image_flavor.py | 8 +-- .../model/runnable_image_flavor.pyi | 8 +-- .../triton_enhanced_runnable_image_flavor.py | 16 ++--- .../triton_enhanced_runnable_image_flavor.pyi | 16 ++--- .../model/update_batch_job_v1_request.py | 8 +-- .../model/update_batch_job_v1_request.pyi | 8 +-- .../model/update_batch_job_v1_response.py | 8 +-- .../model/update_batch_job_v1_response.pyi | 8 +-- .../model/update_model_endpoint_v1_request.py | 8 +-- .../update_model_endpoint_v1_request.pyi | 8 +-- .../update_model_endpoint_v1_response.py | 8 +-- .../update_model_endpoint_v1_response.pyi | 8 +-- launch/api_client/paths/healthcheck/get.py | 4 +- launch/api_client/paths/healthcheck/get.pyi | 4 +- launch/api_client/paths/healthz/get.py | 4 +- launch/api_client/paths/healthz/get.pyi | 4 +- launch/api_client/paths/readyz/get.py | 4 +- launch/api_client/paths/readyz/get.pyi | 4 +- .../api_client/paths/v1_async_tasks/post.py | 68 +++++-------------- .../api_client/paths/v1_async_tasks/post.pyi | 68 +++++-------------- .../paths/v1_async_tasks_task_id/get.py | 8 +-- .../paths/v1_async_tasks_task_id/get.pyi | 8 +-- launch/api_client/paths/v1_batch_jobs/post.py | 68 +++++-------------- .../api_client/paths/v1_batch_jobs/post.pyi | 68 +++++-------------- .../paths/v1_batch_jobs_batch_job_id/get.py | 8 +-- .../paths/v1_batch_jobs_batch_job_id/get.pyi | 8 +-- .../paths/v1_batch_jobs_batch_job_id/put.py | 68 +++++-------------- .../paths/v1_batch_jobs_batch_job_id/put.pyi | 68 +++++-------------- .../api_client/paths/v1_model_bundles/get.py | 12 +--- .../api_client/paths/v1_model_bundles/get.pyi | 12 +--- .../api_client/paths/v1_model_bundles/post.py | 68 +++++-------------- .../paths/v1_model_bundles/post.pyi | 68 +++++-------------- .../post.py | 68 +++++-------------- .../post.pyi | 68 +++++-------------- .../paths/v1_model_bundles_latest/get.py | 8 +-- .../paths/v1_model_bundles_latest/get.pyi | 8 +-- .../v1_model_bundles_model_bundle_id/get.py | 8 +-- .../v1_model_bundles_model_bundle_id/get.pyi | 8 +-- .../paths/v1_model_endpoints/get.py | 12 +--- .../paths/v1_model_endpoints/get.pyi | 12 +--- .../paths/v1_model_endpoints/post.py | 68 +++++-------------- .../paths/v1_model_endpoints/post.pyi | 68 +++++-------------- .../paths/v1_model_endpoints_api/get.py | 4 +- .../paths/v1_model_endpoints_api/get.pyi | 4 +- .../delete.py | 8 +-- .../delete.pyi | 8 +-- .../get.py | 8 +-- .../get.pyi | 8 +-- .../put.py | 68 +++++-------------- .../put.pyi | 68 +++++-------------- .../v1_model_endpoints_schema_json/get.py | 4 +- .../v1_model_endpoints_schema_json/get.pyi | 4 +- launch/api_client/paths/v1_sync_tasks/post.py | 68 +++++-------------- .../api_client/paths/v1_sync_tasks/post.pyi | 68 +++++-------------- .../api_client/paths/v2_model_bundles/get.py | 12 +--- .../api_client/paths/v2_model_bundles/get.pyi | 12 +--- .../api_client/paths/v2_model_bundles/post.py | 68 +++++-------------- .../paths/v2_model_bundles/post.pyi | 68 +++++-------------- .../post.py | 68 +++++-------------- .../post.pyi | 68 +++++-------------- .../paths/v2_model_bundles_latest/get.py | 8 +-- .../paths/v2_model_bundles_latest/get.pyi | 8 +-- .../v2_model_bundles_model_bundle_id/get.py | 8 +-- .../v2_model_bundles_model_bundle_id/get.pyi | 8 +-- launch/api_client/schemas.py | 2 +- launch/client.py | 18 ++--- launch/errors.py | 4 +- launch/model_bundle.py | 1 + 95 files changed, 494 insertions(+), 1452 deletions(-) diff --git a/launch/api_client/api_client.py b/launch/api_client/api_client.py index 3910e2b9..01372a74 100644 --- a/launch/api_client/api_client.py +++ b/launch/api_client/api_client.py @@ -1031,7 +1031,6 @@ def __call_api( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, host: typing.Optional[str] = None, ) -> urllib3.HTTPResponse: - # header parameters used_headers = HTTPHeaderDict(self.default_headers) if self.cookie: diff --git a/launch/api_client/model/create_async_task_v1_response.py b/launch/api_client/model/create_async_task_v1_response.py index 97f0c4dd..83b2baaf 100644 --- a/launch/api_client/model/create_async_task_v1_response.py +++ b/launch/api_client/model/create_async_task_v1_response.py @@ -54,9 +54,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "task_id", - ], + typing_extensions.Literal["task_id",], str, ], ): @@ -74,9 +72,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "task_id", - ], + typing_extensions.Literal["task_id",], str, ], ): diff --git a/launch/api_client/model/create_async_task_v1_response.pyi b/launch/api_client/model/create_async_task_v1_response.pyi index cb94df7d..6696066a 100644 --- a/launch/api_client/model/create_async_task_v1_response.pyi +++ b/launch/api_client/model/create_async_task_v1_response.pyi @@ -48,9 +48,7 @@ class CreateAsyncTaskV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "task_id", - ], + typing_extensions.Literal["task_id",], str, ], ): @@ -63,9 +61,7 @@ class CreateAsyncTaskV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "task_id", - ], + typing_extensions.Literal["task_id",], str, ], ): diff --git a/launch/api_client/model/create_batch_job_v1_request.py b/launch/api_client/model/create_batch_job_v1_request.py index 77e5a687..b819f63e 100644 --- a/launch/api_client/model/create_batch_job_v1_request.py +++ b/launch/api_client/model/create_batch_job_v1_request.py @@ -48,18 +48,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/create_batch_job_v1_request.pyi b/launch/api_client/model/create_batch_job_v1_request.pyi index 77838e81..0c5766bb 100644 --- a/launch/api_client/model/create_batch_job_v1_request.pyi +++ b/launch/api_client/model/create_batch_job_v1_request.pyi @@ -46,17 +46,13 @@ class CreateBatchJobV1Request(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/create_batch_job_v1_response.py b/launch/api_client/model/create_batch_job_v1_response.py index 4250d12a..9aebd3da 100644 --- a/launch/api_client/model/create_batch_job_v1_response.py +++ b/launch/api_client/model/create_batch_job_v1_response.py @@ -54,9 +54,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "job_id", - ], + typing_extensions.Literal["job_id",], str, ], ): @@ -74,9 +72,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "job_id", - ], + typing_extensions.Literal["job_id",], str, ], ): diff --git a/launch/api_client/model/create_batch_job_v1_response.pyi b/launch/api_client/model/create_batch_job_v1_response.pyi index 341660ce..faadc085 100644 --- a/launch/api_client/model/create_batch_job_v1_response.pyi +++ b/launch/api_client/model/create_batch_job_v1_response.pyi @@ -48,9 +48,7 @@ class CreateBatchJobV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "job_id", - ], + typing_extensions.Literal["job_id",], str, ], ): @@ -63,9 +61,7 @@ class CreateBatchJobV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "job_id", - ], + typing_extensions.Literal["job_id",], str, ], ): diff --git a/launch/api_client/model/create_model_bundle_v1_response.py b/launch/api_client/model/create_model_bundle_v1_response.py index 5f40c849..394aaf62 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.py +++ b/launch/api_client/model/create_model_bundle_v1_response.py @@ -56,9 +56,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): @@ -76,9 +74,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): diff --git a/launch/api_client/model/create_model_bundle_v1_response.pyi b/launch/api_client/model/create_model_bundle_v1_response.pyi index 9f52f8b7..a79bf527 100644 --- a/launch/api_client/model/create_model_bundle_v1_response.pyi +++ b/launch/api_client/model/create_model_bundle_v1_response.pyi @@ -52,9 +52,7 @@ class CreateModelBundleV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): @@ -69,9 +67,7 @@ class CreateModelBundleV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): diff --git a/launch/api_client/model/create_model_bundle_v2_response.py b/launch/api_client/model/create_model_bundle_v2_response.py index a9734aa6..c108a9e0 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.py +++ b/launch/api_client/model/create_model_bundle_v2_response.py @@ -56,9 +56,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): @@ -76,9 +74,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): diff --git a/launch/api_client/model/create_model_bundle_v2_response.pyi b/launch/api_client/model/create_model_bundle_v2_response.pyi index c6d1e482..8be00a7c 100644 --- a/launch/api_client/model/create_model_bundle_v2_response.pyi +++ b/launch/api_client/model/create_model_bundle_v2_response.pyi @@ -52,9 +52,7 @@ class CreateModelBundleV2Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): @@ -69,9 +67,7 @@ class CreateModelBundleV2Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundle_id", - ], + typing_extensions.Literal["model_bundle_id",], str, ], ): diff --git a/launch/api_client/model/create_model_endpoint_v1_request.py b/launch/api_client/model/create_model_endpoint_v1_request.py index 37474032..d0b9fd42 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.py +++ b/launch/api_client/model/create_model_endpoint_v1_request.py @@ -129,18 +129,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/create_model_endpoint_v1_request.pyi b/launch/api_client/model/create_model_endpoint_v1_request.pyi index 6c7f79d7..7407a09d 100644 --- a/launch/api_client/model/create_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_request.pyi @@ -124,17 +124,13 @@ class CreateModelEndpointV1Request(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/create_model_endpoint_v1_response.py b/launch/api_client/model/create_model_endpoint_v1_response.py index 952b8184..1841c16f 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.py +++ b/launch/api_client/model/create_model_endpoint_v1_response.py @@ -56,9 +56,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): @@ -78,9 +76,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): diff --git a/launch/api_client/model/create_model_endpoint_v1_response.pyi b/launch/api_client/model/create_model_endpoint_v1_response.pyi index 2713055a..f73324eb 100644 --- a/launch/api_client/model/create_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/create_model_endpoint_v1_response.pyi @@ -50,9 +50,7 @@ class CreateModelEndpointV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): @@ -67,9 +65,7 @@ class CreateModelEndpointV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.py b/launch/api_client/model/delete_model_endpoint_v1_response.py index 7d687930..c6f2aaaf 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.py +++ b/launch/api_client/model/delete_model_endpoint_v1_response.py @@ -54,9 +54,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "deleted", - ], + typing_extensions.Literal["deleted",], str, ], ): @@ -74,9 +72,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "deleted", - ], + typing_extensions.Literal["deleted",], str, ], ): diff --git a/launch/api_client/model/delete_model_endpoint_v1_response.pyi b/launch/api_client/model/delete_model_endpoint_v1_response.pyi index 46e0128e..7b497419 100644 --- a/launch/api_client/model/delete_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/delete_model_endpoint_v1_response.pyi @@ -48,9 +48,7 @@ class DeleteModelEndpointV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "deleted", - ], + typing_extensions.Literal["deleted",], str, ], ): @@ -63,9 +61,7 @@ class DeleteModelEndpointV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "deleted", - ], + typing_extensions.Literal["deleted",], str, ], ): diff --git a/launch/api_client/model/get_model_endpoint_v1_response.py b/launch/api_client/model/get_model_endpoint_v1_response.py index 3b2eda68..41b4e554 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.py +++ b/launch/api_client/model/get_model_endpoint_v1_response.py @@ -85,18 +85,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/get_model_endpoint_v1_response.pyi b/launch/api_client/model/get_model_endpoint_v1_response.pyi index c4183cf8..39cbaadf 100644 --- a/launch/api_client/model/get_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/get_model_endpoint_v1_response.pyi @@ -77,17 +77,13 @@ class GetModelEndpointV1Response(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/http_validation_error.py b/launch/api_client/model/http_validation_error.py index a58583ad..6206ad17 100644 --- a/launch/api_client/model/http_validation_error.py +++ b/launch/api_client/model/http_validation_error.py @@ -67,9 +67,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "detail", - ], + typing_extensions.Literal["detail",], str, ], ): @@ -89,9 +87,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "detail", - ], + typing_extensions.Literal["detail",], str, ], ): diff --git a/launch/api_client/model/http_validation_error.pyi b/launch/api_client/model/http_validation_error.pyi index d801788f..2ace3c00 100644 --- a/launch/api_client/model/http_validation_error.pyi +++ b/launch/api_client/model/http_validation_error.pyi @@ -58,9 +58,7 @@ class HTTPValidationError(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "detail", - ], + typing_extensions.Literal["detail",], str, ], ): @@ -75,9 +73,7 @@ class HTTPValidationError(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "detail", - ], + typing_extensions.Literal["detail",], str, ], ): diff --git a/launch/api_client/model/list_model_bundles_v1_response.py b/launch/api_client/model/list_model_bundles_v1_response.py index 6c92cc60..85827680 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.py +++ b/launch/api_client/model/list_model_bundles_v1_response.py @@ -75,9 +75,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): @@ -95,9 +93,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): diff --git a/launch/api_client/model/list_model_bundles_v1_response.pyi b/launch/api_client/model/list_model_bundles_v1_response.pyi index e55cf2f4..aa71c4c4 100644 --- a/launch/api_client/model/list_model_bundles_v1_response.pyi +++ b/launch/api_client/model/list_model_bundles_v1_response.pyi @@ -66,9 +66,7 @@ class ListModelBundlesV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): @@ -81,9 +79,7 @@ class ListModelBundlesV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): diff --git a/launch/api_client/model/list_model_bundles_v2_response.py b/launch/api_client/model/list_model_bundles_v2_response.py index 304774ab..1b92e7e3 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.py +++ b/launch/api_client/model/list_model_bundles_v2_response.py @@ -75,9 +75,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): @@ -95,9 +93,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): diff --git a/launch/api_client/model/list_model_bundles_v2_response.pyi b/launch/api_client/model/list_model_bundles_v2_response.pyi index 2126abc1..89fc4302 100644 --- a/launch/api_client/model/list_model_bundles_v2_response.pyi +++ b/launch/api_client/model/list_model_bundles_v2_response.pyi @@ -66,9 +66,7 @@ class ListModelBundlesV2Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): @@ -81,9 +79,7 @@ class ListModelBundlesV2Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_bundles", - ], + typing_extensions.Literal["model_bundles",], str, ], ): diff --git a/launch/api_client/model/list_model_endpoints_v1_response.py b/launch/api_client/model/list_model_endpoints_v1_response.py index ece1bf7c..7368c7e9 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.py +++ b/launch/api_client/model/list_model_endpoints_v1_response.py @@ -75,9 +75,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_endpoints", - ], + typing_extensions.Literal["model_endpoints",], str, ], ): @@ -95,9 +93,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_endpoints", - ], + typing_extensions.Literal["model_endpoints",], str, ], ): diff --git a/launch/api_client/model/list_model_endpoints_v1_response.pyi b/launch/api_client/model/list_model_endpoints_v1_response.pyi index 1a052bb4..50eb6f06 100644 --- a/launch/api_client/model/list_model_endpoints_v1_response.pyi +++ b/launch/api_client/model/list_model_endpoints_v1_response.pyi @@ -68,9 +68,7 @@ class ListModelEndpointsV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "model_endpoints", - ], + typing_extensions.Literal["model_endpoints",], str, ], ): @@ -85,9 +83,7 @@ class ListModelEndpointsV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "model_endpoints", - ], + typing_extensions.Literal["model_endpoints",], str, ], ): diff --git a/launch/api_client/model/runnable_image_flavor.py b/launch/api_client/model/runnable_image_flavor.py index 1ed2c77f..ad4c82f5 100644 --- a/launch/api_client/model/runnable_image_flavor.py +++ b/launch/api_client/model/runnable_image_flavor.py @@ -102,18 +102,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/runnable_image_flavor.pyi b/launch/api_client/model/runnable_image_flavor.pyi index cdc76a78..f3789401 100644 --- a/launch/api_client/model/runnable_image_flavor.pyi +++ b/launch/api_client/model/runnable_image_flavor.pyi @@ -87,17 +87,13 @@ class RunnableImageFlavor(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py index b331b006..a9098b4f 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.py +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.py @@ -108,18 +108,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) @@ -151,18 +147,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi index 9a4d8f6c..51ab3a58 100644 --- a/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi +++ b/launch/api_client/model/triton_enhanced_runnable_image_flavor.pyi @@ -93,17 +93,13 @@ class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( @@ -132,17 +128,13 @@ class TritonEnhancedRunnableImageFlavor(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/update_batch_job_v1_request.py b/launch/api_client/model/update_batch_job_v1_request.py index dd49a92d..3e1de5a1 100644 --- a/launch/api_client/model/update_batch_job_v1_request.py +++ b/launch/api_client/model/update_batch_job_v1_request.py @@ -54,9 +54,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "cancel", - ], + typing_extensions.Literal["cancel",], str, ], ): @@ -74,9 +72,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "cancel", - ], + typing_extensions.Literal["cancel",], str, ], ): diff --git a/launch/api_client/model/update_batch_job_v1_request.pyi b/launch/api_client/model/update_batch_job_v1_request.pyi index bc0e11dc..4c79befd 100644 --- a/launch/api_client/model/update_batch_job_v1_request.pyi +++ b/launch/api_client/model/update_batch_job_v1_request.pyi @@ -48,9 +48,7 @@ class UpdateBatchJobV1Request(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "cancel", - ], + typing_extensions.Literal["cancel",], str, ], ): @@ -63,9 +61,7 @@ class UpdateBatchJobV1Request(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "cancel", - ], + typing_extensions.Literal["cancel",], str, ], ): diff --git a/launch/api_client/model/update_batch_job_v1_response.py b/launch/api_client/model/update_batch_job_v1_response.py index ba0755df..00236e84 100644 --- a/launch/api_client/model/update_batch_job_v1_response.py +++ b/launch/api_client/model/update_batch_job_v1_response.py @@ -54,9 +54,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "success", - ], + typing_extensions.Literal["success",], str, ], ): @@ -74,9 +72,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "success", - ], + typing_extensions.Literal["success",], str, ], ): diff --git a/launch/api_client/model/update_batch_job_v1_response.pyi b/launch/api_client/model/update_batch_job_v1_response.pyi index d518d16c..ef22eb2e 100644 --- a/launch/api_client/model/update_batch_job_v1_response.pyi +++ b/launch/api_client/model/update_batch_job_v1_response.pyi @@ -48,9 +48,7 @@ class UpdateBatchJobV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "success", - ], + typing_extensions.Literal["success",], str, ], ): @@ -63,9 +61,7 @@ class UpdateBatchJobV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "success", - ], + typing_extensions.Literal["success",], str, ], ): diff --git a/launch/api_client/model/update_model_endpoint_v1_request.py b/launch/api_client/model/update_model_endpoint_v1_request.py index 003ceb89..eea59db8 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.py +++ b/launch/api_client/model/update_model_endpoint_v1_request.py @@ -130,18 +130,14 @@ class MetaOapg: def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) diff --git a/launch/api_client/model/update_model_endpoint_v1_request.pyi b/launch/api_client/model/update_model_endpoint_v1_request.pyi index ce75b68b..7c5f5c74 100644 --- a/launch/api_client/model/update_model_endpoint_v1_request.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_request.pyi @@ -120,17 +120,13 @@ class UpdateModelEndpointV1Request(schemas.DictSchema): additional_properties = schemas.StrSchema def __getitem__( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: # dict_instance[name] accessor return super().__getitem__(name) def get_item_oapg( self, - name: typing.Union[ - str, - ], + name: typing.Union[str,], ) -> MetaOapg.additional_properties: return super().get_item_oapg(name) def __new__( diff --git a/launch/api_client/model/update_model_endpoint_v1_response.py b/launch/api_client/model/update_model_endpoint_v1_response.py index fec5ac01..e65d917f 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.py +++ b/launch/api_client/model/update_model_endpoint_v1_response.py @@ -56,9 +56,7 @@ def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): @@ -78,9 +76,7 @@ def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, s def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): diff --git a/launch/api_client/model/update_model_endpoint_v1_response.pyi b/launch/api_client/model/update_model_endpoint_v1_response.pyi index 7a4aaf00..4d1a123b 100644 --- a/launch/api_client/model/update_model_endpoint_v1_response.pyi +++ b/launch/api_client/model/update_model_endpoint_v1_response.pyi @@ -50,9 +50,7 @@ class UpdateModelEndpointV1Response(schemas.DictSchema): def __getitem__( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): @@ -67,9 +65,7 @@ class UpdateModelEndpointV1Response(schemas.DictSchema): def get_item_oapg( self, name: typing.Union[ - typing_extensions.Literal[ - "endpoint_creation_task_id", - ], + typing_extensions.Literal["endpoint_creation_task_id",], str, ], ): diff --git a/launch/api_client/paths/healthcheck/get.py b/launch/api_client/paths/healthcheck/get.py index 36a6cdde..4cbeec4b 100644 --- a/launch/api_client/paths/healthcheck/get.py +++ b/launch/api_client/paths/healthcheck/get.py @@ -31,9 +31,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/healthcheck/get.pyi b/launch/api_client/paths/healthcheck/get.pyi index 3a43737e..2e836ef3 100644 --- a/launch/api_client/paths/healthcheck/get.pyi +++ b/launch/api_client/paths/healthcheck/get.pyi @@ -28,9 +28,7 @@ SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/healthz/get.py b/launch/api_client/paths/healthz/get.py index efd5991f..c71e242f 100644 --- a/launch/api_client/paths/healthz/get.py +++ b/launch/api_client/paths/healthz/get.py @@ -31,9 +31,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/healthz/get.pyi b/launch/api_client/paths/healthz/get.pyi index b289e89b..54cb1de2 100644 --- a/launch/api_client/paths/healthz/get.pyi +++ b/launch/api_client/paths/healthz/get.pyi @@ -28,9 +28,7 @@ SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/readyz/get.py b/launch/api_client/paths/readyz/get.py index b1b0fb7a..c016a017 100644 --- a/launch/api_client/paths/readyz/get.py +++ b/launch/api_client/paths/readyz/get.py @@ -31,9 +31,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/readyz/get.pyi b/launch/api_client/paths/readyz/get.pyi index 49f495b4..dee1ef79 100644 --- a/launch/api_client/paths/readyz/get.pyi +++ b/launch/api_client/paths/readyz/get.pyi @@ -28,9 +28,7 @@ SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_async_tasks/post.py b/launch/api_client/paths/v1_async_tasks/post.py index 9beba143..19d68ae1 100644 --- a/launch/api_client/paths/v1_async_tasks/post.py +++ b/launch/api_client/paths/v1_async_tasks/post.py @@ -76,9 +76,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -94,9 +92,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -117,9 +113,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -132,9 +126,7 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -147,9 +139,7 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -162,9 +152,7 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -176,9 +164,7 @@ def _create_async_inference_task_v1_async_tasks_post_oapg( def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +242,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -271,9 +255,7 @@ def create_async_inference_task_v1_async_tasks_post( @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -286,9 +268,7 @@ def create_async_inference_task_v1_async_tasks_post( @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -301,9 +281,7 @@ def create_async_inference_task_v1_async_tasks_post( @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -315,9 +293,7 @@ def create_async_inference_task_v1_async_tasks_post( def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -342,9 +318,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -357,9 +331,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -372,9 +344,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -387,9 +357,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -401,9 +369,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_async_tasks/post.pyi b/launch/api_client/paths/v1_async_tasks/post.pyi index d349efd9..23674ea5 100644 --- a/launch/api_client/paths/v1_async_tasks/post.pyi +++ b/launch/api_client/paths/v1_async_tasks/post.pyi @@ -67,9 +67,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateAsyncTaskV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -83,9 +81,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -100,9 +96,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +107,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -126,9 +118,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -139,9 +129,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -151,9 +139,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_async_inference_task_v1_async_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -230,9 +216,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -243,9 +227,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +238,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -269,9 +249,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): @typing.overload def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -281,9 +259,7 @@ class CreateAsyncInferenceTaskV1AsyncTasksPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_async_inference_task_v1_async_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -307,9 +283,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -320,9 +294,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -333,9 +305,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -346,9 +316,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -358,9 +326,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.py b/launch/api_client/paths/v1_async_tasks_task_id/get.py index cabae5fd..7bb49fa2 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.py +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi index 8b62914e..e71cb348 100644 --- a/launch/api_client/paths/v1_async_tasks_task_id/get.pyi +++ b/launch/api_client/paths/v1_async_tasks_task_id/get.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = GetAsyncTaskV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_batch_jobs/post.py b/launch/api_client/paths/v1_batch_jobs/post.py index 1e1cdc4b..f8769488 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.py +++ b/launch/api_client/paths/v1_batch_jobs/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _create_batch_job_v1_batch_jobs_post_oapg( @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _create_batch_job_v1_batch_jobs_post_oapg( @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _create_batch_job_v1_batch_jobs_post_oapg( @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _create_batch_job_v1_batch_jobs_post_oapg( def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def create_batch_job_v1_batch_jobs_post( @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def create_batch_job_v1_batch_jobs_post( @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def create_batch_job_v1_batch_jobs_post( @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def create_batch_job_v1_batch_jobs_post( def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_batch_jobs/post.pyi b/launch/api_client/paths/v1_batch_jobs/post.pyi index 4b99ae0f..a83f5774 100644 --- a/launch/api_client/paths/v1_batch_jobs/post.pyi +++ b/launch/api_client/paths/v1_batch_jobs/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateBatchJobV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_batch_job_v1_batch_jobs_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): @typing.overload def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CreateBatchJobV1BatchJobsPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_batch_job_v1_batch_jobs_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py index f6cc4f6b..f8a0cc74 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi index 818ba8d3..ae92179f 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/get.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = GetBatchJobV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py index 6548a6f2..fdd87da6 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.py @@ -75,9 +75,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -93,9 +91,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -116,9 +112,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -131,9 +125,7 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -146,9 +138,7 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -161,9 +151,7 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -175,9 +163,7 @@ def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -255,9 +241,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -270,9 +254,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -285,9 +267,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -300,9 +280,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -314,9 +292,7 @@ def update_batch_job_v1_batch_jobs_batch_job_id_put( def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -341,9 +317,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -356,9 +330,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -371,9 +343,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -386,9 +356,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -400,9 +368,7 @@ def put( def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi index a25197ed..8dde29a3 100644 --- a/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi +++ b/launch/api_client/paths/v1_batch_jobs_batch_job_id/put.pyi @@ -66,9 +66,7 @@ SchemaFor200ResponseBodyApplicationJson = UpdateBatchJobV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -82,9 +80,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -99,9 +95,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -112,9 +106,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -125,9 +117,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -138,9 +128,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -150,9 +138,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _update_batch_job_v1_batch_jobs_batch_job_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -229,9 +215,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -242,9 +226,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -255,9 +237,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -268,9 +248,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): @typing.overload def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -280,9 +258,7 @@ class UpdateBatchJobV1BatchJobsBatchJobIdPut(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def update_batch_job_v1_batch_jobs_batch_job_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -306,9 +282,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -319,9 +293,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -332,9 +304,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -345,9 +315,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -357,9 +325,7 @@ class ApiForput(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_model_bundles/get.py b/launch/api_client/paths/v1_model_bundles/get.py index f281a55c..4ed7d60d 100644 --- a/launch/api_client/paths/v1_model_bundles/get.py +++ b/launch/api_client/paths/v1_model_bundles/get.py @@ -41,9 +41,7 @@ ModelNameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -74,9 +72,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_bundles/get.pyi b/launch/api_client/paths/v1_model_bundles/get.pyi index 36bb811a..6b28915d 100644 --- a/launch/api_client/paths/v1_model_bundles/get.pyi +++ b/launch/api_client/paths/v1_model_bundles/get.pyi @@ -39,9 +39,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( ModelNameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -66,9 +64,7 @@ SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -82,9 +78,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_bundles/post.py b/launch/api_client/paths/v1_model_bundles/post.py index b150eec2..c850d079 100644 --- a/launch/api_client/paths/v1_model_bundles/post.py +++ b/launch/api_client/paths/v1_model_bundles/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _create_model_bundle_v1_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _create_model_bundle_v1_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _create_model_bundle_v1_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _create_model_bundle_v1_model_bundles_post_oapg( def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def create_model_bundle_v1_model_bundles_post( @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def create_model_bundle_v1_model_bundles_post( @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def create_model_bundle_v1_model_bundles_post( @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def create_model_bundle_v1_model_bundles_post( def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_bundles/post.pyi b/launch/api_client/paths/v1_model_bundles/post.pyi index b26bfb44..c246edc4 100644 --- a/launch/api_client/paths/v1_model_bundles/post.pyi +++ b/launch/api_client/paths/v1_model_bundles/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_bundle_v1_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CreateModelBundleV1ModelBundlesPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_bundle_v1_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py index 2039b3f5..d6665999 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oa def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi index 9151b458..5865de81 100644 --- a/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v1_model_bundles_clone_with_changes/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CloneModelBundleWithChangesV1ModelBundlesCloneWithChangesPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def clone_model_bundle_with_changes_v1_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.py b/launch/api_client/paths/v1_model_bundles_latest/get.py index a8c76460..e4397a5a 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.py +++ b/launch/api_client/paths/v1_model_bundles_latest/get.py @@ -63,9 +63,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -81,9 +79,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_bundles_latest/get.pyi b/launch/api_client/paths/v1_model_bundles_latest/get.pyi index a426664b..abb87b38 100644 --- a/launch/api_client/paths/v1_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_latest/get.pyi @@ -55,9 +55,7 @@ SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -71,9 +69,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py index 0b9f92a2..f79165c8 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi index 836b7c91..fac2e2a0 100644 --- a/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v1_model_bundles_model_bundle_id/get.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = ModelBundleV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_endpoints/get.py b/launch/api_client/paths/v1_model_endpoints/get.py index 9b82fe87..e572a293 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.py +++ b/launch/api_client/paths/v1_model_endpoints/get.py @@ -43,9 +43,7 @@ NameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -76,9 +74,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -94,9 +90,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_endpoints/get.pyi b/launch/api_client/paths/v1_model_endpoints/get.pyi index fad955d8..ccf3d905 100644 --- a/launch/api_client/paths/v1_model_endpoints/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints/get.pyi @@ -41,9 +41,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( NameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -68,9 +66,7 @@ SchemaFor200ResponseBodyApplicationJson = ListModelEndpointsV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -84,9 +80,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_endpoints/post.py b/launch/api_client/paths/v1_model_endpoints/post.py index d58c36a1..99b4a96e 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.py +++ b/launch/api_client/paths/v1_model_endpoints/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _create_model_endpoint_v1_model_endpoints_post_oapg( def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def create_model_endpoint_v1_model_endpoints_post( @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def create_model_endpoint_v1_model_endpoints_post( @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def create_model_endpoint_v1_model_endpoints_post( @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def create_model_endpoint_v1_model_endpoints_post( def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_endpoints/post.pyi b/launch/api_client/paths/v1_model_endpoints/post.pyi index 299a6ca5..703f29c7 100644 --- a/launch/api_client/paths/v1_model_endpoints/post.pyi +++ b/launch/api_client/paths/v1_model_endpoints/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateModelEndpointV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_endpoint_v1_model_endpoints_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): @typing.overload def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CreateModelEndpointV1ModelEndpointsPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_endpoint_v1_model_endpoints_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.py b/launch/api_client/paths/v1_model_endpoints_api/get.py index 5c9f46ce..d46a8f06 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.py +++ b/launch/api_client/paths/v1_model_endpoints_api/get.py @@ -34,9 +34,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_endpoints_api/get.pyi b/launch/api_client/paths/v1_model_endpoints_api/get.pyi index f69b0eb8..9d3365b3 100644 --- a/launch/api_client/paths/v1_model_endpoints_api/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_api/get.pyi @@ -28,9 +28,7 @@ SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py index d857fb84..3add1108 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi index b654464d..e3cba5ae 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/delete.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = DeleteModelEndpointV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py index 61ca4fb8..daa30f01 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi index 5bef0a11..9e3ab5db 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/get.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = GetModelEndpointV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py index f7a3b983..6c1e4cf4 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.py @@ -75,9 +75,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -93,9 +91,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -116,9 +112,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -131,9 +125,7 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -146,9 +138,7 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -161,9 +151,7 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -175,9 +163,7 @@ def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -255,9 +241,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -270,9 +254,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -285,9 +267,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -300,9 +280,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -314,9 +292,7 @@ def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -341,9 +317,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -356,9 +330,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -371,9 +343,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -386,9 +356,7 @@ def put( @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -400,9 +368,7 @@ def put( def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi index 36ee296d..a308264f 100644 --- a/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi +++ b/launch/api_client/paths/v1_model_endpoints_model_endpoint_id/put.pyi @@ -66,9 +66,7 @@ SchemaFor200ResponseBodyApplicationJson = UpdateModelEndpointV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -82,9 +80,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -99,9 +95,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -112,9 +106,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -125,9 +117,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -138,9 +128,7 @@ class BaseApi(api_client.Api): @typing.overload def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -150,9 +138,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _update_model_endpoint_v1_model_endpoints_model_endpoint_id_put_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -229,9 +215,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -242,9 +226,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -255,9 +237,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -268,9 +248,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): @typing.overload def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -280,9 +258,7 @@ class UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def update_model_endpoint_v1_model_endpoints_model_endpoint_id_put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -306,9 +282,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -319,9 +293,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -332,9 +304,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), @@ -345,9 +315,7 @@ class ApiForput(BaseApi): @typing.overload def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -357,9 +325,7 @@ class ApiForput(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def put( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py index f68f401f..2cba49a7 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.py +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.py @@ -34,9 +34,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi index ecb53bae..b13f3a8f 100644 --- a/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi +++ b/launch/api_client/paths/v1_model_endpoints_schema_json/get.pyi @@ -28,9 +28,7 @@ SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v1_sync_tasks/post.py b/launch/api_client/paths/v1_sync_tasks/post.py index 9ef4075c..50fbe602 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.py +++ b/launch/api_client/paths/v1_sync_tasks/post.py @@ -76,9 +76,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -94,9 +92,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -117,9 +113,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -132,9 +126,7 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -147,9 +139,7 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -162,9 +152,7 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -176,9 +164,7 @@ def _create_sync_inference_task_v1_sync_tasks_post_oapg( def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +242,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -271,9 +255,7 @@ def create_sync_inference_task_v1_sync_tasks_post( @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -286,9 +268,7 @@ def create_sync_inference_task_v1_sync_tasks_post( @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -301,9 +281,7 @@ def create_sync_inference_task_v1_sync_tasks_post( @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -315,9 +293,7 @@ def create_sync_inference_task_v1_sync_tasks_post( def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -342,9 +318,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -357,9 +331,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -372,9 +344,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -387,9 +357,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -401,9 +369,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v1_sync_tasks/post.pyi b/launch/api_client/paths/v1_sync_tasks/post.pyi index d4eef480..412f6bec 100644 --- a/launch/api_client/paths/v1_sync_tasks/post.pyi +++ b/launch/api_client/paths/v1_sync_tasks/post.pyi @@ -67,9 +67,7 @@ SchemaFor200ResponseBodyApplicationJson = SyncEndpointPredictV1Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -83,9 +81,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -100,9 +96,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +107,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -126,9 +118,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -139,9 +129,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -151,9 +139,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_sync_inference_task_v1_sync_tasks_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -230,9 +216,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -243,9 +227,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +238,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -269,9 +249,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): @typing.overload def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -281,9 +259,7 @@ class CreateSyncInferenceTaskV1SyncTasksPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_sync_inference_task_v1_sync_tasks_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -307,9 +283,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -320,9 +294,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -333,9 +305,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), @@ -346,9 +316,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -358,9 +326,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, diff --git a/launch/api_client/paths/v2_model_bundles/get.py b/launch/api_client/paths/v2_model_bundles/get.py index e6bdbe21..e9608072 100644 --- a/launch/api_client/paths/v2_model_bundles/get.py +++ b/launch/api_client/paths/v2_model_bundles/get.py @@ -41,9 +41,7 @@ ModelNameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -74,9 +72,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v2_model_bundles/get.pyi b/launch/api_client/paths/v2_model_bundles/get.pyi index 60afe91b..5ddd4c98 100644 --- a/launch/api_client/paths/v2_model_bundles/get.pyi +++ b/launch/api_client/paths/v2_model_bundles/get.pyi @@ -39,9 +39,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( ModelNameSchema, str, ], - "order_by": typing.Union[ - OrderBySchema, - ], + "order_by": typing.Union[OrderBySchema,], }, total=False, ) @@ -66,9 +64,7 @@ SchemaFor200ResponseBodyApplicationJson = ListModelBundlesV2Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -82,9 +78,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v2_model_bundles/post.py b/launch/api_client/paths/v2_model_bundles/post.py index 1b6588f4..75a2ecd2 100644 --- a/launch/api_client/paths/v2_model_bundles/post.py +++ b/launch/api_client/paths/v2_model_bundles/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _create_model_bundle_v2_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _create_model_bundle_v2_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _create_model_bundle_v2_model_bundles_post_oapg( @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _create_model_bundle_v2_model_bundles_post_oapg( def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def create_model_bundle_v2_model_bundles_post( @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def create_model_bundle_v2_model_bundles_post( @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def create_model_bundle_v2_model_bundles_post( @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def create_model_bundle_v2_model_bundles_post( def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v2_model_bundles/post.pyi b/launch/api_client/paths/v2_model_bundles/post.pyi index bdad203e..62e82994 100644 --- a/launch/api_client/paths/v2_model_bundles/post.pyi +++ b/launch/api_client/paths/v2_model_bundles/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _create_model_bundle_v2_model_bundles_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): @typing.overload def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CreateModelBundleV2ModelBundlesPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def create_model_bundle_v2_model_bundles_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py index dd3e56bd..59c29b33 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.py @@ -51,9 +51,7 @@ @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -69,9 +67,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -92,9 +88,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -106,9 +100,7 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -120,9 +112,7 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -134,9 +124,7 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,9 +135,7 @@ def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oa def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +200,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,9 +212,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -242,9 +224,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,9 +236,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,9 +247,7 @@ def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -294,9 +270,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +282,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,9 +294,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -336,9 +306,7 @@ def post( @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,9 +317,7 @@ def post( def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi index aa186c57..71db936e 100644 --- a/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi +++ b/launch/api_client/paths/v2_model_bundles_clone_with_changes/post.pyi @@ -44,9 +44,7 @@ SchemaFor200ResponseBodyApplicationJson = CreateModelBundleV2Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -60,9 +58,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( @@ -77,9 +73,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -89,9 +83,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -101,9 +93,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,9 +103,7 @@ class BaseApi(api_client.Api): @typing.overload def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -124,9 +112,7 @@ class BaseApi(api_client.Api): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def _clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post_oapg( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -190,9 +176,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +186,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -214,9 +196,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,9 +206,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): @typing.overload def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,9 +215,7 @@ class CloneModelBundleWithChangesV2ModelBundlesCloneWithChangesPost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def clone_model_bundle_with_changes_v2_model_bundles_clone_with_changes_post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,9 +237,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,9 +247,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,9 +257,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -297,9 +267,7 @@ class ApiForpost(BaseApi): @typing.overload def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,9 +276,7 @@ class ApiForpost(BaseApi): ) -> typing.Union[ApiResponseFor200, api_client.ApiResponseWithoutDeserialization,]: ... def post( self, - body: typing.Union[ - SchemaForRequestBodyApplicationJson, - ], + body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = "application/json", accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.py b/launch/api_client/paths/v2_model_bundles_latest/get.py index 67848df5..bcb75db6 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.py +++ b/launch/api_client/paths/v2_model_bundles_latest/get.py @@ -63,9 +63,7 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -81,9 +79,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v2_model_bundles_latest/get.pyi b/launch/api_client/paths/v2_model_bundles_latest/get.pyi index 91eab583..10fa583e 100644 --- a/launch/api_client/paths/v2_model_bundles_latest/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_latest/get.pyi @@ -55,9 +55,7 @@ SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -71,9 +69,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py index a9b4f2ce..729ad8c1 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.py @@ -62,9 +62,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset @@ -80,9 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset diff --git a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi index 8a4f4ed8..713335b1 100644 --- a/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi +++ b/launch/api_client/paths/v2_model_bundles_model_bundle_id/get.pyi @@ -54,9 +54,7 @@ SchemaFor200ResponseBodyApplicationJson = ModelBundleV2Response @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor200ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( @@ -70,9 +68,7 @@ SchemaFor422ResponseBodyApplicationJson = HTTPValidationError @dataclass class ApiResponseFor422(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor422ResponseBodyApplicationJson, - ] + body: typing.Union[SchemaFor422ResponseBodyApplicationJson,] headers: schemas.Unset = schemas.unset _response_for_422 = api_client.OpenApiResponse( diff --git a/launch/api_client/schemas.py b/launch/api_client/schemas.py index 9fb94632..3eaf4a2a 100644 --- a/launch/api_client/schemas.py +++ b/launch/api_client/schemas.py @@ -665,6 +665,7 @@ def __init__( BoolMixin = BoolClass BytesMixin = bytes FileMixin = FileIO + # qty 2 class BinaryMixin(bytes, FileIO): pass @@ -2347,7 +2348,6 @@ def as_int_oapg(self) -> int: @classmethod def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): if isinstance(arg, decimal.Decimal): - denominator = arg.as_integer_ratio()[-1] if denominator != 1: raise ApiValueError( diff --git a/launch/client.py b/launch/client.py index 33d13e0f..12077ad9 100644 --- a/launch/client.py +++ b/launch/client.py @@ -167,7 +167,7 @@ def _get_model_bundle_framework( return CustomFramework( image_repository=custom_base_image_repository, image_tag=custom_base_image_tag, - framework_type=ModelBundleFrameworkType.CUSTOM, + framework_type=ModelBundleFrameworkType.CUSTOM_BASE_IMAGE, ) else: raise ValueError( @@ -697,13 +697,15 @@ def create_model_bundle_from_triton_enhanced_runnable_image_v2( env: A dictionary of environment variables that will be passed to the bundle when it is run. - readiness_initial_delay_seconds: The number of seconds to wait for the HTTP server to become ready and - successfully respond on its healthcheck. + readiness_initial_delay_seconds: The number of seconds to wait for the HTTP server to + become ready and successfully respond on its healthcheck. - triton_model_repository: The S3 prefix that contains the contents of the model repository, formatted - according to https://github.com/triton-inference-server/server/blob/main/docs/user_guide/model_repository.md + triton_model_repository: The S3 prefix that contains the contents of the model + repository, formatted according to + https://github.com/triton-inference-server/server/blob/main/docs/user_guide/model_repository.md - triton_model_replicas: If supplied, the name and number of replicas to make for each model. + triton_model_replicas: If supplied, the name and number of replicas to make for each + model. triton_num_cpu: Number of CPUs, fractional, to allocate to tritonserver. @@ -713,8 +715,8 @@ def create_model_bundle_from_triton_enhanced_runnable_image_v2( triton_memory: Amount of memory to allocate for the tritonserver container. - triton_readiness_initial_delay_seconds: Like readiness_initial_delay_seconds, but for tritonserver's - own healthcheck. + triton_readiness_initial_delay_seconds: Like readiness_initial_delay_seconds, but for + tritonserver's own healthcheck. Returns: An object containing the following keys: diff --git a/launch/errors.py b/launch/errors.py index 07cb1191..05615755 100644 --- a/launch/errors.py +++ b/launch/errors.py @@ -1,6 +1,6 @@ import pkg_resources -launch.api_client_version = pkg_resources.get_distribution("scale-launch").version +api_client_version = pkg_resources.get_distribution("scale-launch").version INFRA_FLAKE_MESSAGES = [ "downstream duration timeout", @@ -11,7 +11,7 @@ class APIError(Exception): def __init__(self, endpoint, command, requests_response=None, aiohttp_response=None): message = ( - f"Your client is on version {launch.api_client_version}. If you have not recently " + f"Your client is on version {api_client_version}. If you have not recently " "done so, please make sure you have updated to the latest version of the " "client by reinstalling the client.\n " ) diff --git a/launch/model_bundle.py b/launch/model_bundle.py index d55ccb66..8192cb9e 100644 --- a/launch/model_bundle.py +++ b/launch/model_bundle.py @@ -1,4 +1,5 @@ import datetime +from abc import ABC from dataclasses import dataclass from enum import Enum from typing import Any, Dict, List, Optional, Union From 10f3f3a95657bc004217b70fb0df0c0490b500db Mon Sep 17 00:00:00 2001 From: Phil Chen Date: Mon, 3 Apr 2023 09:50:28 -0700 Subject: [PATCH 11/13] rm space --- docs/concepts/model_bundles.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/concepts/model_bundles.md b/docs/concepts/model_bundles.md index 16fd9f72..20823afe 100644 --- a/docs/concepts/model_bundles.md +++ b/docs/concepts/model_bundles.md @@ -195,7 +195,6 @@ Each of these modes of creating a model bundle is called a "Flavor". "TEST_KEY": "test_value", }, "readiness_initial_delay_seconds": 30, - } client = LaunchClient(api_key=os.getenv("LAUNCH_API_KEY")) From c2c39a8f3ce167973ad98cdeab570510c1209e24 Mon Sep 17 00:00:00 2001 From: Phil Chen Date: Mon, 3 Apr 2023 09:52:53 -0700 Subject: [PATCH 12/13] update docs --- docs/concepts/model_bundles.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/concepts/model_bundles.md b/docs/concepts/model_bundles.md index 20823afe..b9523a58 100644 --- a/docs/concepts/model_bundles.md +++ b/docs/concepts/model_bundles.md @@ -5,11 +5,13 @@ are created by packaging a model up into a deployable format. ## Creating Model Bundles -There are three methods for creating model bundles: +There are four methods for creating model bundles: [`create_model_bundle_from_callable_v2`](/api/client/#launch.client.LaunchClient.create_model_bundle_from_callable_v2), [`create_model_bundle_from_dirs_v2`](/api/client/#launch.client.LaunchClient.create_model_bundle_from_dirs_v2), +[`create_model_bundle_from_runnable_image_v2`](/api/client/#launch.client.LaunchClient.create_model_bundle_from_runnable_image_v2), and -[`create_model_bundle_from_runnable_image_v2`](/api/client/#launch.client.LaunchClient.create_model_bundle_from_runnable_image_v2). +[`create_model_bundle_from_triton_enhanced_runnable_image_v2`](/api/client/#launch.client.LaunchClient.create_model_bundle_from_triton_enhanced_runnable_image_v2). + The first directly pickles a user-specified `load_predict_fn`, a function which loads the model and returns a `predict_fn`, a function which takes in a request. The second takes in directories containing a `load_predict_fn` and the @@ -17,6 +19,8 @@ module path to the `load_predict_fn`. The third takes a Docker image and a command that starts a process listening for requests at port 5005 using HTTP and exposes `POST /predict` and `GET /readyz` endpoints. +The fourth is a variant of the third that also starts an instance of the NVidia +Triton framework for efficient model serving. Each of these modes of creating a model bundle is called a "Flavor". From 479f105f18c33a3723f480dc779933f4d2c9ed92 Mon Sep 17 00:00:00 2001 From: Phil Chen Date: Mon, 3 Apr 2023 09:59:13 -0700 Subject: [PATCH 13/13] fix index docs to new apis --- docs/index.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5caa8eeb..6c373c41 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,22 +33,20 @@ def my_load_predict_fn(model): return returns_model_of_x_plus_len_of_y -def my_model(x): - return x * 2 - -ENV_PARAMS = { - "framework_type": "pytorch", - "pytorch_image_tag": "1.7.1-cuda11.0-cudnn8-runtime", -} +def my_load_model_fn(): + def my_model(x): + return x * 2 + + return my_model BUNDLE_PARAMS = { "model_bundle_name": "test-bundle", - "model": my_model, "load_predict_fn": my_load_predict_fn, - "env_params": ENV_PARAMS, - "requirements": ["pytest==7.2.1", "numpy"], # list your requirements here + "load_model_fn": my_load_model_fn, "request_schema": MyRequestSchema, "response_schema": MyResponseSchema, + "requirements": ["pytest==7.2.1", "numpy"], # list your requirements here + "pytorch_image_tag": "1.7.1-cuda11.0-cudnn8-runtime", } ENDPOINT_PARAMS = { @@ -81,7 +79,7 @@ def predict_on_endpoint(request: MyRequestSchema) -> MyResponseSchema: client = LaunchClient(api_key=os.getenv("LAUNCH_API_KEY")) -client.create_model_bundle(**BUNDLE_PARAMS) +client.create_model_bundle_from_callable_v2(**BUNDLE_PARAMS) endpoint = client.create_model_endpoint(**ENDPOINT_PARAMS) request = MyRequestSchema(x=5, y="hello")