Skip to content

Commit da6e888

Browse files
authored
Files API autogen again (#144)
1 parent 530ef0d commit da6e888

32 files changed

+4241
-0
lines changed

launch/api_client/apis/path_to_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
from launch.api_client.apis.paths.v1_docker_image_batch_jobs_batch_job_id import (
2727
V1DockerImageBatchJobsBatchJobId,
2828
)
29+
from launch.api_client.apis.paths.v1_files import V1Files
30+
from launch.api_client.apis.paths.v1_files_file_id import V1FilesFileId
31+
from launch.api_client.apis.paths.v1_files_file_id_content import (
32+
V1FilesFileIdContent,
33+
)
2934
from launch.api_client.apis.paths.v1_llm_completions_stream import (
3035
V1LlmCompletionsStream,
3136
)
@@ -97,6 +102,9 @@
97102
PathValues.V1_DOCKERIMAGEBATCHJOBBUNDLES_DOCKER_IMAGE_BATCH_JOB_BUNDLE_ID: V1DockerImageBatchJobBundlesDockerImageBatchJobBundleId,
98103
PathValues.V1_DOCKERIMAGEBATCHJOBS: V1DockerImageBatchJobs,
99104
PathValues.V1_DOCKERIMAGEBATCHJOBS_BATCH_JOB_ID: V1DockerImageBatchJobsBatchJobId,
105+
PathValues.V1_FILES: V1Files,
106+
PathValues.V1_FILES_FILE_ID: V1FilesFileId,
107+
PathValues.V1_FILES_FILE_ID_CONTENT: V1FilesFileIdContent,
100108
PathValues.V1_LLM_COMPLETIONSSTREAM: V1LlmCompletionsStream,
101109
PathValues.V1_LLM_COMPLETIONSSYNC: V1LlmCompletionsSync,
102110
PathValues.V1_LLM_FINETUNES: V1LlmFineTunes,
@@ -136,6 +144,9 @@
136144
PathValues.V1_DOCKERIMAGEBATCHJOBBUNDLES_DOCKER_IMAGE_BATCH_JOB_BUNDLE_ID: V1DockerImageBatchJobBundlesDockerImageBatchJobBundleId,
137145
PathValues.V1_DOCKERIMAGEBATCHJOBS: V1DockerImageBatchJobs,
138146
PathValues.V1_DOCKERIMAGEBATCHJOBS_BATCH_JOB_ID: V1DockerImageBatchJobsBatchJobId,
147+
PathValues.V1_FILES: V1Files,
148+
PathValues.V1_FILES_FILE_ID: V1FilesFileId,
149+
PathValues.V1_FILES_FILE_ID_CONTENT: V1FilesFileIdContent,
139150
PathValues.V1_LLM_COMPLETIONSSTREAM: V1LlmCompletionsStream,
140151
PathValues.V1_LLM_COMPLETIONSSYNC: V1LlmCompletionsSync,
141152
PathValues.V1_LLM_FINETUNES: V1LlmFineTunes,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from launch.api_client.paths.v1_files.get import ApiForget
2+
from launch.api_client.paths.v1_files.post import ApiForpost
3+
4+
5+
class V1Files(
6+
ApiForget,
7+
ApiForpost,
8+
):
9+
pass
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from launch.api_client.paths.v1_files_file_id.delete import ApiFordelete
2+
from launch.api_client.paths.v1_files_file_id.get import ApiForget
3+
4+
5+
class V1FilesFileId(
6+
ApiForget,
7+
ApiFordelete,
8+
):
9+
pass
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from launch.api_client.paths.v1_files_file_id_content.get import ApiForget
2+
3+
4+
class V1FilesFileIdContent(
5+
ApiForget,
6+
):
7+
pass

launch/api_client/apis/tags/default_api.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@
4848
from launch.api_client.paths.v1_docker_image_batch_jobs_batch_job_id.put import (
4949
UpdateDockerImageBatchJobV1DockerImageBatchJobsBatchJobIdPut,
5050
)
51+
from launch.api_client.paths.v1_files.get import ListFilesV1FilesGet
52+
from launch.api_client.paths.v1_files.post import UploadFileV1FilesPost
53+
from launch.api_client.paths.v1_files_file_id.delete import (
54+
DeleteFileV1FilesFileIdDelete,
55+
)
56+
from launch.api_client.paths.v1_files_file_id.get import (
57+
GetFileV1FilesFileIdGet,
58+
)
59+
from launch.api_client.paths.v1_files_file_id_content.get import (
60+
GetFileContentV1FilesFileIdContentGet,
61+
)
5162
from launch.api_client.paths.v1_llm_completions_stream.post import (
5263
CreateCompletionStreamTaskV1LlmCompletionsStreamPost,
5364
)
@@ -154,11 +165,14 @@ class DefaultApi(
154165
CreateModelEndpointV1ModelEndpointsPost,
155166
CreateStreamingInferenceTaskV1StreamingTasksPost,
156167
CreateSyncInferenceTaskV1SyncTasksPost,
168+
DeleteFileV1FilesFileIdDelete,
157169
DeleteModelEndpointV1ModelEndpointsModelEndpointIdDelete,
158170
GetAsyncInferenceTaskV1AsyncTasksTaskIdGet,
159171
GetBatchJobV1BatchJobsBatchJobIdGet,
160172
GetDockerImageBatchJobModelBundleV1DockerImageBatchJobBundlesDockerImageBatchJobBundleIdGet,
161173
GetDockerImageBatchJobV1DockerImageBatchJobsBatchJobIdGet,
174+
GetFileContentV1FilesFileIdContentGet,
175+
GetFileV1FilesFileIdGet,
162176
GetFineTuneEventsV1LlmFineTunesFineTuneIdEventsGet,
163177
GetFineTuneV1LlmFineTunesFineTuneIdGet,
164178
GetLatestDockerImageBatchJobBundleV1DockerImageBatchJobBundlesLatestGet,
@@ -174,6 +188,7 @@ class DefaultApi(
174188
HealthcheckHealthzGet,
175189
HealthcheckReadyzGet,
176190
ListDockerImageBatchJobModelBundlesV1DockerImageBatchJobBundlesGet,
191+
ListFilesV1FilesGet,
177192
ListFineTunesV1LlmFineTunesGet,
178193
ListModelBundlesV1ModelBundlesGet,
179194
ListModelBundlesV2ModelBundlesGet,
@@ -182,6 +197,7 @@ class DefaultApi(
182197
UpdateBatchJobV1BatchJobsBatchJobIdPut,
183198
UpdateDockerImageBatchJobV1DockerImageBatchJobsBatchJobIdPut,
184199
UpdateModelEndpointV1ModelEndpointsModelEndpointIdPut,
200+
UploadFileV1FilesPost,
185201
):
186202
"""NOTE: This class is auto generated by OpenAPI Generator
187203
Ref: https://openapi-generator.tech
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# coding: utf-8
2+
3+
"""
4+
launch
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
import decimal # noqa: F401
13+
import functools # noqa: F401
14+
import io # noqa: F401
15+
import re # noqa: F401
16+
import typing # noqa: F401
17+
import uuid # noqa: F401
18+
from datetime import date, datetime # noqa: F401
19+
20+
import frozendict # noqa: F401
21+
import typing_extensions # noqa: F401
22+
23+
from launch.api_client import schemas # noqa: F401
24+
25+
26+
class BodyUploadFileV1FilesPost(schemas.DictSchema):
27+
"""NOTE: This class is auto generated by OpenAPI Generator.
28+
Ref: https://openapi-generator.tech
29+
30+
Do not edit the class manually.
31+
"""
32+
33+
class MetaOapg:
34+
required = {
35+
"file",
36+
}
37+
38+
class properties:
39+
file = schemas.BinarySchema
40+
__annotations__ = {
41+
"file": file,
42+
}
43+
44+
file: MetaOapg.properties.file
45+
46+
@typing.overload
47+
def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file:
48+
...
49+
50+
@typing.overload
51+
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema:
52+
...
53+
54+
def __getitem__(
55+
self,
56+
name: typing.Union[
57+
typing_extensions.Literal["file",],
58+
str,
59+
],
60+
):
61+
# dict_instance[name] accessor
62+
return super().__getitem__(name)
63+
64+
@typing.overload
65+
def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file:
66+
...
67+
68+
@typing.overload
69+
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]:
70+
...
71+
72+
def get_item_oapg(
73+
self,
74+
name: typing.Union[
75+
typing_extensions.Literal["file",],
76+
str,
77+
],
78+
):
79+
return super().get_item_oapg(name)
80+
81+
def __new__(
82+
cls,
83+
*_args: typing.Union[
84+
dict,
85+
frozendict.frozendict,
86+
],
87+
file: typing.Union[
88+
MetaOapg.properties.file,
89+
bytes,
90+
io.FileIO,
91+
io.BufferedReader,
92+
],
93+
_configuration: typing.Optional[schemas.Configuration] = None,
94+
**kwargs: typing.Union[
95+
schemas.AnyTypeSchema,
96+
dict,
97+
frozendict.frozendict,
98+
str,
99+
date,
100+
datetime,
101+
uuid.UUID,
102+
int,
103+
float,
104+
decimal.Decimal,
105+
None,
106+
list,
107+
tuple,
108+
bytes,
109+
],
110+
) -> "BodyUploadFileV1FilesPost":
111+
return super().__new__(
112+
cls,
113+
*_args,
114+
file=file,
115+
_configuration=_configuration,
116+
**kwargs,
117+
)
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# coding: utf-8
2+
3+
"""
4+
launch
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7+
8+
The version of the OpenAPI document: 1.0.0
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
import decimal # noqa: F401
13+
import functools # noqa: F401
14+
import io # noqa: F401
15+
import re # noqa: F401
16+
import typing # noqa: F401
17+
import uuid # noqa: F401
18+
from datetime import date, datetime # noqa: F401
19+
20+
import frozendict # noqa: F401
21+
import typing_extensions # noqa: F401
22+
from launch_client import schemas # noqa: F401
23+
24+
class BodyUploadFileV1FilesPost(schemas.DictSchema):
25+
"""NOTE: This class is auto generated by OpenAPI Generator.
26+
Ref: https://openapi-generator.tech
27+
28+
Do not edit the class manually.
29+
"""
30+
31+
class MetaOapg:
32+
required = {
33+
"file",
34+
}
35+
36+
class properties:
37+
file = schemas.BinarySchema
38+
__annotations__ = {
39+
"file": file,
40+
}
41+
file: MetaOapg.properties.file
42+
43+
@typing.overload
44+
def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ...
45+
@typing.overload
46+
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
47+
def __getitem__(
48+
self,
49+
name: typing.Union[
50+
typing_extensions.Literal["file",],
51+
str,
52+
],
53+
):
54+
# dict_instance[name] accessor
55+
return super().__getitem__(name)
56+
@typing.overload
57+
def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ...
58+
@typing.overload
59+
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
60+
def get_item_oapg(
61+
self,
62+
name: typing.Union[
63+
typing_extensions.Literal["file",],
64+
str,
65+
],
66+
):
67+
return super().get_item_oapg(name)
68+
def __new__(
69+
cls,
70+
*_args: typing.Union[
71+
dict,
72+
frozendict.frozendict,
73+
],
74+
file: typing.Union[
75+
MetaOapg.properties.file,
76+
bytes,
77+
io.FileIO,
78+
io.BufferedReader,
79+
],
80+
_configuration: typing.Optional[schemas.Configuration] = None,
81+
**kwargs: typing.Union[
82+
schemas.AnyTypeSchema,
83+
dict,
84+
frozendict.frozendict,
85+
str,
86+
date,
87+
datetime,
88+
uuid.UUID,
89+
int,
90+
float,
91+
decimal.Decimal,
92+
None,
93+
list,
94+
tuple,
95+
bytes,
96+
],
97+
) -> "BodyUploadFileV1FilesPost":
98+
return super().__new__(
99+
cls,
100+
*_args,
101+
file=file,
102+
_configuration=_configuration,
103+
**kwargs,
104+
)

0 commit comments

Comments
 (0)