Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.1.0
- Package version: 4.4.0
- Package version: 4.5.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down Expand Up @@ -145,6 +145,7 @@ Class | Method | HTTP request | Description

- [APIKeyRequest](docs/APIKeyRequest.md)
- [APIKeyResponse](docs/APIKeyResponse.md)
- [BackendProtocol](docs/BackendProtocol.md)
- [CServeRecipePerf](docs/CServeRecipePerf.md)
- [CServeRecipeResponse](docs/CServeRecipeResponse.md)
- [CServeV2Recipe](docs/CServeV2Recipe.md)
Expand Down
12 changes: 12 additions & 0 deletions docs/BackendProtocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# BackendProtocol


## Enum

* `HTTP` (value: `'HTTP'`)

* `GRPC` (value: `'GRPC'`)

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


1 change: 1 addition & 0 deletions docs/CreateInferenceV3DeploymentRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Name | Type | Description | Notes
**command** | **str** | | [optional]
**endpoint_bearer_token** | **str** | | [optional]
**endpoint_certificate_authority** | **str** | | [optional]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Name | Type | Description | Notes
**command_args** | **List[str]** | | [optional]
**original_command** | **str** | | [optional]
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/GetInferenceV3DeploymentResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Name | Type | Description | Notes
**command_args** | **List[str]** | | [optional]
**original_command** | **str** | | [optional]
**image_pull_secret_credentials** | [**ImagePullSecretCredentials**](ImagePullSecretCredentials.md) | | [optional]
**backend_protocol** | [**BackendProtocol**](BackendProtocol.md) | | [optional]

## Example

Expand Down
3 changes: 2 additions & 1 deletion platform_api_python_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "4.4.0"
__version__ = "4.5.0"

# import apis into sdk package
from platform_api_python_client.api.external_api import EXTERNALApi
Expand All @@ -33,6 +33,7 @@
# import models into sdk package
from platform_api_python_client.models.api_key_request import APIKeyRequest
from platform_api_python_client.models.api_key_response import APIKeyResponse
from platform_api_python_client.models.backend_protocol import BackendProtocol
from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf
from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/4.4.0/python'
self.user_agent = 'OpenAPI-Generator/4.5.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion platform_api_python_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 0.1.0\n"\
"SDK Package Version: 4.4.0".\
"SDK Package Version: 4.5.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
1 change: 1 addition & 0 deletions platform_api_python_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# import models into model package
from platform_api_python_client.models.api_key_request import APIKeyRequest
from platform_api_python_client.models.api_key_response import APIKeyResponse
from platform_api_python_client.models.backend_protocol import BackendProtocol
from platform_api_python_client.models.c_serve_recipe_perf import CServeRecipePerf
from platform_api_python_client.models.c_serve_recipe_response import CServeRecipeResponse
from platform_api_python_client.models.c_serve_v2_recipe import CServeV2Recipe
Expand Down
37 changes: 37 additions & 0 deletions platform_api_python_client/models/backend_protocol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding: utf-8

"""
Platform External API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class BackendProtocol(str, Enum):
"""
BackendProtocol
"""

"""
allowed enum values
"""
HTTP = 'HTTP'
GRPC = 'GRPC'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of BackendProtocol from a JSON string"""
return cls(json.loads(json_str))


Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from platform_api_python_client.models.backend_protocol import BackendProtocol
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -45,7 +46,8 @@ class CreateInferenceV3DeploymentRequest(BaseModel):
command: Optional[StrictStr] = None
endpoint_bearer_token: Optional[StrictStr] = None
endpoint_certificate_authority: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority"]
backend_protocol: Optional[BackendProtocol] = None
__properties: ClassVar[List[str]] = ["max_surge", "max_unavailable", "name", "cluster_id", "hardware_instance_id", "image_url", "image_pull_secret_credentials", "port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "env_vars", "command", "endpoint_bearer_token", "endpoint_certificate_authority", "backend_protocol"]

@field_validator('name')
def name_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -174,7 +176,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"env_vars": obj.get("env_vars"),
"command": obj.get("command"),
"endpoint_bearer_token": obj.get("endpoint_bearer_token"),
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority")
"endpoint_certificate_authority": obj.get("endpoint_certificate_authority"),
"backend_protocol": obj.get("backend_protocol")
})
return _obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from datetime import datetime
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from platform_api_python_client.models.backend_protocol import BackendProtocol
from platform_api_python_client.models.deployment_status import DeploymentStatus
from platform_api_python_client.models.deployment_type import DeploymentType
from platform_api_python_client.models.image_pull_secret_credentials import ImagePullSecretCredentials
Expand Down Expand Up @@ -54,7 +55,8 @@ class GetInferenceV3DeploymentResponse(BaseModel):
command_args: Optional[List[StrictStr]] = None
original_command: Optional[StrictStr] = None
image_pull_secret_credentials: Optional[ImagePullSecretCredentials] = None
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "container_port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials"]
backend_protocol: Optional[BackendProtocol] = None
__properties: ClassVar[List[str]] = ["creator_email", "cluster_id", "id", "name", "endpoint_url", "image_url", "type", "status", "created_at", "hardware_instance_id", "revision_number", "container_port", "min_replicas", "max_replicas", "initial_replicas", "concurrency", "healthcheck", "endpoint_certificate_authority", "endpoint_bearer_token", "env_vars", "command", "command_args", "original_command", "image_pull_secret_credentials", "backend_protocol"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -188,7 +190,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"command": obj.get("command"),
"command_args": obj.get("command_args"),
"original_command": obj.get("original_command"),
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None
"image_pull_secret_credentials": ImagePullSecretCredentials.from_dict(obj["image_pull_secret_credentials"]) if obj.get("image_pull_secret_credentials") is not None else None,
"backend_protocol": obj.get("backend_protocol")
})
return _obj

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "platform_api_python_client"
version = "4.4.0"
version = "4.5.0"
description = "Platform External API"
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
license = "NoLicense"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "platform-api-python-client"
VERSION = "4.4.0"
VERSION = "4.5.0"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 3.0.0",
Expand Down
33 changes: 33 additions & 0 deletions test/test_backend_protocol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding: utf-8

"""
Platform External API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: 0.1.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


import unittest

from platform_api_python_client.models.backend_protocol import BackendProtocol

class TestBackendProtocol(unittest.TestCase):
"""BackendProtocol unit test stubs"""

def setUp(self):
pass

def tearDown(self):
pass

def testBackendProtocol(self):
"""Test BackendProtocol"""
# inst = BackendProtocol()

if __name__ == '__main__':
unittest.main()
3 changes: 2 additions & 1 deletion test/test_create_inference_v3_deployment_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def make_instance(self, include_optional) -> CreateInferenceV3DeploymentRequest:
},
command = '',
endpoint_bearer_token = '',
endpoint_certificate_authority = ''
endpoint_certificate_authority = '',
backend_protocol = 'HTTP'
)
else:
return CreateInferenceV3DeploymentRequest(
Expand Down
3 changes: 2 additions & 1 deletion test/test_deployment_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def make_instance(self, include_optional) -> DeploymentResponse:
original_command = '',
image_pull_secret_credentials = platform_api_python_client.models.image_pull_secret_credentials.ImagePullSecretCredentials(
username = '',
password = '', )
password = '', ),
backend_protocol = 'HTTP'
)
else:
return DeploymentResponse(
Expand Down
3 changes: 2 additions & 1 deletion test/test_get_inference_v3_deployment_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def make_instance(self, include_optional) -> GetInferenceV3DeploymentResponse:
original_command = '',
image_pull_secret_credentials = platform_api_python_client.models.image_pull_secret_credentials.ImagePullSecretCredentials(
username = '',
password = '', )
password = '', ),
backend_protocol = 'HTTP'
)
else:
return GetInferenceV3DeploymentResponse(
Expand Down