Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TEST_OPTS=-v -test.timeout 300s
GIT_USER_ID?=koyeb
GIT_REPO_ID?=koyeb-api-client-python
OPENAPI_GENERATOR_VERSION?=latest
PACKAGE_VERSION?=1.5.3
PACKAGE_VERSION?=1.5.4
DOCKER ?= docker


Expand Down
2 changes: 1 addition & 1 deletion bumpver.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpver]
current_version = "1.5.3"
current_version = "1.5.4"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit = false
tag = false
Expand Down
2 changes: 1 addition & 1 deletion koyeb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

__version__ = "1.5.3"
__version__ = "1.5.4"

# Make Sandbox available at package level
from .sandbox import Sandbox, AsyncSandbox, ConfigFile, Secret
Expand Down
23 changes: 0 additions & 23 deletions koyeb/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -942,27 +942,4 @@ koyeb/api/models/verify_docker_image_reply.py
koyeb/api/models/verify_docker_image_reply_err_code.py
koyeb/api/rest.py
koyeb/api/test/__init__.py
koyeb/api/test/test_create_service_pool.py
koyeb/api/test/test_create_service_pool_reply.py
koyeb/api/test/test_get_organization_quotas_usage_reply.py
koyeb/api/test/test_get_pool_claim_reply.py
koyeb/api/test/test_get_service_pool_reply.py
koyeb/api/test/test_instance_snapshot_type_usage.py
koyeb/api/test/test_instance_type_usage.py
koyeb/api/test/test_list_pool_claim_reply.py
koyeb/api/test/test_list_service_pools_reply.py
koyeb/api/test/test_mesh.py
koyeb/api/test/test_mesh_scope.py
koyeb/api/test/test_persistent_volume_region_usage.py
koyeb/api/test/test_pool_claim.py
koyeb/api/test/test_pool_claim_reply.py
koyeb/api/test/test_pool_claim_request.py
koyeb/api/test/test_pool_claim_status.py
koyeb/api/test/test_pool_claims_api.py
koyeb/api/test/test_quota_usage.py
koyeb/api/test/test_service_pool.py
koyeb/api/test/test_service_pool_status.py
koyeb/api/test/test_service_pools_api.py
koyeb/api/test/test_update_service_pool.py
koyeb/api/test/test_update_service_pool_reply.py
koyeb/api_README.md
2 changes: 1 addition & 1 deletion koyeb/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "1.5.3"
__version__ = "1.5.4"

# Define package exports
__all__ = [
Expand Down
259 changes: 258 additions & 1 deletion koyeb/api/api/service_pools_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing_extensions import Annotated

from pydantic import StrictStr
from typing import Optional
from typing import Any, Dict, Optional
from koyeb.api.models.create_service_pool import CreateServicePool
from koyeb.api.models.create_service_pool_reply import CreateServicePoolReply
from koyeb.api.models.get_service_pool_reply import GetServicePoolReply
Expand Down Expand Up @@ -298,6 +298,263 @@ def _create_service_pool_serialize(
_request_auth=_request_auth,
)

@validate_call
def delete_service_pool(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> object:
"""Delete a ServicePool


:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._delete_service_pool_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "object",
"400": "ErrorWithFields",
"401": "Error",
"403": "Error",
"404": "Error",
"500": "Error",
"503": "Error",
"default": "GoogleRpcStatus",
}
response_data = self.api_client.call_api(
*_param, _request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data

@validate_call
def delete_service_pool_with_http_info(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[object]:
"""Delete a ServicePool


:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._delete_service_pool_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "object",
"400": "ErrorWithFields",
"401": "Error",
"403": "Error",
"404": "Error",
"500": "Error",
"503": "Error",
"default": "GoogleRpcStatus",
}
response_data = self.api_client.call_api(
*_param, _request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)

@validate_call
def delete_service_pool_without_preload_content(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
],
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Delete a ServicePool


:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501

_param = self._delete_service_pool_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index,
)

_response_types_map: Dict[str, Optional[str]] = {
"200": "object",
"400": "ErrorWithFields",
"401": "Error",
"403": "Error",
"404": "Error",
"500": "Error",
"503": "Error",
"default": "GoogleRpcStatus",
}
response_data = self.api_client.call_api(
*_param, _request_timeout=_request_timeout
)
return response_data.response

def _delete_service_pool_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None

_collection_formats: Dict[str, str] = {}

_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None

# process the path parameters
if id is not None:
_path_params["id"] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter

# set the HTTP header `Accept`
if "Accept" not in _header_params:
_header_params["Accept"] = self.api_client.select_header_accept(["*/*"])

# authentication setting
_auth_settings: List[str] = ["Bearer"]

return self.api_client.param_serialize(
method="DELETE",
resource_path="/v1/service_pools/{id}",
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth,
)

@validate_call
def get_service_pool(
self,
Expand Down
2 changes: 1 addition & 1 deletion koyeb/api/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = "OpenAPI-Generator/1.5.3/python"
self.user_agent = "OpenAPI-Generator/1.5.4/python"
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion koyeb/api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 1.0.0\n"
"SDK Package Version: 1.5.3".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 1.5.4".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
Loading