From 878b31384969260e0b8748af1a149dbd116c86f8 Mon Sep 17 00:00:00 2001 From: API Engineering Date: Fri, 12 Jun 2026 06:59:22 +0000 Subject: [PATCH] [bot] Updated client based on openapi-0100958/clientgen --- DO_OPENAPI_COMMIT_SHA.txt | 2 +- src/pydo/aio/operations/_operations.py | 111 +++++++++---------------- src/pydo/operations/_operations.py | 111 +++++++++---------------- 3 files changed, 83 insertions(+), 141 deletions(-) diff --git a/DO_OPENAPI_COMMIT_SHA.txt b/DO_OPENAPI_COMMIT_SHA.txt index 476d9fa6..297bfe79 100644 --- a/DO_OPENAPI_COMMIT_SHA.txt +++ b/DO_OPENAPI_COMMIT_SHA.txt @@ -1 +1 @@ -2d2ec6c +0100958 diff --git a/src/pydo/aio/operations/_operations.py b/src/pydo/aio/operations/_operations.py index 524e2daa..6bcd85f0 100644 --- a/src/pydo/aio/operations/_operations.py +++ b/src/pydo/aio/operations/_operations.py @@ -253506,7 +253506,14 @@ async def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Default value is None. :type body: JSON @@ -253525,18 +253532,7 @@ async def create_model_api_key( "name": "str" # Optional. A human friendly name to identify the key. } - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -253560,7 +253556,14 @@ async def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Default value is None. :type body: IO[bytes] @@ -253574,18 +253577,7 @@ async def create_model_api_key( Example: .. code-block:: python - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -253605,7 +253597,14 @@ async def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Is either a JSON type or a IO[bytes] type. Default value is None. :type body: JSON or IO[bytes] @@ -253621,18 +253620,7 @@ async def create_model_api_key( "name": "str" # Optional. A human friendly name to identify the key. } - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -253694,44 +253682,27 @@ async def create_model_api_key( response = pipeline_response.http_response - if response.status_code not in [200, 404]: + if response.status_code not in [410]: if _stream: await response.read() # Load the body in memory and close the socket map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 200: - response_headers["ratelimit-limit"] = self._deserialize( - "int", response.headers.get("ratelimit-limit") - ) - response_headers["ratelimit-remaining"] = self._deserialize( - "int", response.headers.get("ratelimit-remaining") - ) - response_headers["ratelimit-reset"] = self._deserialize( - "int", response.headers.get("ratelimit-reset") - ) - - if response.content: - deserialized = response.json() - else: - deserialized = None - - if response.status_code == 404: - response_headers["ratelimit-limit"] = self._deserialize( - "int", response.headers.get("ratelimit-limit") - ) - response_headers["ratelimit-remaining"] = self._deserialize( - "int", response.headers.get("ratelimit-remaining") - ) - response_headers["ratelimit-reset"] = self._deserialize( - "int", response.headers.get("ratelimit-reset") - ) + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) - if response.content: - deserialized = response.json() - else: - deserialized = None + if response.content: + deserialized = response.json() + else: + deserialized = None if cls: return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore diff --git a/src/pydo/operations/_operations.py b/src/pydo/operations/_operations.py index f35deb95..fa97a0e4 100644 --- a/src/pydo/operations/_operations.py +++ b/src/pydo/operations/_operations.py @@ -268517,7 +268517,14 @@ def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Default value is None. :type body: JSON @@ -268536,18 +268543,7 @@ def create_model_api_key( "name": "str" # Optional. A human friendly name to identify the key. } - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -268571,7 +268567,14 @@ def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Default value is None. :type body: IO[bytes] @@ -268585,18 +268588,7 @@ def create_model_api_key( Example: .. code-block:: python - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -268616,7 +268608,14 @@ def create_model_api_key( # pylint: disable=line-too-long """Create a Model API Key. - To create a model API key, send a POST request to ``/v2/gen-ai/models/api_keys``. + **Note: This endpoint is deprecated and has been retired. All requests return a ``410 gone`` + response.** + + Creating model API keys through this endpoint is no longer supported. To create a model access + key, visit the manage page in the control panel. + + Previously, you could create a model API key by sending a POST request to + ``/v2/gen-ai/models/api_keys``. :param body: Is either a JSON type or a IO[bytes] type. Default value is None. :type body: JSON or IO[bytes] @@ -268632,18 +268631,7 @@ def create_model_api_key( "name": "str" # Optional. A human friendly name to identify the key. } - # response body for status code(s): 200 - response == { - "api_key_info": { - "created_at": "2020-02-20 00:00:00", # Optional. Creation date. - "created_by": "str", # Optional. Created by. - "deleted_at": "2020-02-20 00:00:00", # Optional. Deleted date. - "name": "str", # Optional. Name. - "secret_key": "str", # Optional. Model API Key Info. - "uuid": "str" # Optional. Uuid. - } - } - # response body for status code(s): 404 + # response body for status code(s): 410 response == { "id": "str", # A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would @@ -268705,44 +268693,27 @@ def create_model_api_key( response = pipeline_response.http_response - if response.status_code not in [200, 404]: + if response.status_code not in [410]: if _stream: response.read() # Load the body in memory and close the socket map_error(status_code=response.status_code, response=response, error_map=error_map) # type: ignore raise HttpResponseError(response=response) response_headers = {} - if response.status_code == 200: - response_headers["ratelimit-limit"] = self._deserialize( - "int", response.headers.get("ratelimit-limit") - ) - response_headers["ratelimit-remaining"] = self._deserialize( - "int", response.headers.get("ratelimit-remaining") - ) - response_headers["ratelimit-reset"] = self._deserialize( - "int", response.headers.get("ratelimit-reset") - ) - - if response.content: - deserialized = response.json() - else: - deserialized = None - - if response.status_code == 404: - response_headers["ratelimit-limit"] = self._deserialize( - "int", response.headers.get("ratelimit-limit") - ) - response_headers["ratelimit-remaining"] = self._deserialize( - "int", response.headers.get("ratelimit-remaining") - ) - response_headers["ratelimit-reset"] = self._deserialize( - "int", response.headers.get("ratelimit-reset") - ) + response_headers["ratelimit-limit"] = self._deserialize( + "int", response.headers.get("ratelimit-limit") + ) + response_headers["ratelimit-remaining"] = self._deserialize( + "int", response.headers.get("ratelimit-remaining") + ) + response_headers["ratelimit-reset"] = self._deserialize( + "int", response.headers.get("ratelimit-reset") + ) - if response.content: - deserialized = response.json() - else: - deserialized = None + if response.content: + deserialized = response.json() + else: + deserialized = None if cls: return cls(pipeline_response, cast(JSON, deserialized), response_headers) # type: ignore