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
2 changes: 1 addition & 1 deletion DO_OPENAPI_COMMIT_SHA.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2d2ec6c
fb6f08f
118 changes: 46 additions & 72 deletions src/pydo/aio/operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -139665,12 +139665,15 @@ async def list_members(
"droplet_id": 0, # The unique identifier of the Droplet.
Required.
"health_status": "str", # The health status of the Droplet.
Required.
Required. Known values are: "healthy" and "unhealthy".
"status": "str", # The power status of the Droplet.
Required. Known values are: "provisioning", "active", "deleting", and
"off".
"updated_at": "2020-02-20 00:00:00" # The last updated time
"updated_at": "2020-02-20 00:00:00", # The last updated time
of the Droplet in ISO8601 combined date and time format. Required.
"unhealthy_reason": "str" # Optional. A human-readable
description of why the Droplet is unhealthy. Only present when
``health_status`` is ``unhealthy``.
}
],
"links": {
Expand Down Expand Up @@ -253506,7 +253509,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
Expand All @@ -253525,18 +253535,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
Expand All @@ -253560,7 +253559,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]
Expand All @@ -253574,18 +253580,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
Expand All @@ -253605,7 +253600,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]
Expand All @@ -253621,18 +253623,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
Expand Down Expand Up @@ -253694,44 +253685,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
Expand Down
118 changes: 46 additions & 72 deletions src/pydo/operations/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -154712,12 +154712,15 @@ def list_members(
"droplet_id": 0, # The unique identifier of the Droplet.
Required.
"health_status": "str", # The health status of the Droplet.
Required.
Required. Known values are: "healthy" and "unhealthy".
"status": "str", # The power status of the Droplet.
Required. Known values are: "provisioning", "active", "deleting", and
"off".
"updated_at": "2020-02-20 00:00:00" # The last updated time
"updated_at": "2020-02-20 00:00:00", # The last updated time
of the Droplet in ISO8601 combined date and time format. Required.
"unhealthy_reason": "str" # Optional. A human-readable
description of why the Droplet is unhealthy. Only present when
``health_status`` is ``unhealthy``.
}
],
"links": {
Expand Down Expand Up @@ -268517,7 +268520,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
Expand All @@ -268536,18 +268546,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
Expand All @@ -268571,7 +268570,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]
Expand All @@ -268585,18 +268591,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
Expand All @@ -268616,7 +268611,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]
Expand All @@ -268632,18 +268634,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
Expand Down Expand Up @@ -268705,44 +268696,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
Expand Down
Loading