client: regenerate from hanzo-inc/cloud@ce4f33a2bf (8.5.719)

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-10-12 08:42:45 +00:00
co-authored by Hanzo Dev
parent 9cc5c12ccc
commit cfad648f7f
11 changed files with 365 additions and 24 deletions
+1
View File
@@ -2804,6 +2804,7 @@ pkg/hanzoai/cloud/models/session.py
pkg/hanzoai/cloud/models/settings_settings_req.py
pkg/hanzoai/cloud/models/settings_view.py
pkg/hanzoai/cloud/models/share_enable_resp.py
pkg/hanzoai/cloud/models/share_rotated.py
pkg/hanzoai/cloud/models/share_share_view.py
pkg/hanzoai/cloud/models/share_shares_out.py
pkg/hanzoai/cloud/models/social_social_account.py
+2 -2
View File
@@ -1,4 +1,4 @@
ref=4bb3369ad325f85ab288ccb9ef7c3147e92bb381
sha256=bbd05b7947a83e752ccef718d5b3a7618f83d6e08c4c1e764945eb3899b11190
ref=ce4f33a2bf09d6797013d62de2a354fe96eb2aaf
sha256=95b084f1f51d6b507a4b9e4ab0dbf2c01e3dd43f4e4f9e275d81c449a66132af
repo=hanzo-inc/cloud
path=openapi.yaml
+2
View File
@@ -2826,6 +2826,7 @@ __all__ = [
"SettingsSettingsReq",
"SettingsView",
"ShareEnableResp",
"ShareRotated",
"ShareShareView",
"ShareSharesOut",
"SocialSocialAccount",
@@ -5992,6 +5993,7 @@ from hanzoai.cloud.models.session import Session as Session
from hanzoai.cloud.models.settings_settings_req import SettingsSettingsReq as SettingsSettingsReq
from hanzoai.cloud.models.settings_view import SettingsView as SettingsView
from hanzoai.cloud.models.share_enable_resp import ShareEnableResp as ShareEnableResp
from hanzoai.cloud.models.share_rotated import ShareRotated as ShareRotated
from hanzoai.cloud.models.share_share_view import ShareShareView as ShareShareView
from hanzoai.cloud.models.share_shares_out import ShareSharesOut as ShareSharesOut
from hanzoai.cloud.models.social_social_account import SocialSocialAccount as SocialSocialAccount
+6 -6
View File
@@ -7232,7 +7232,7 @@ class AgentApi:
) -> AgentSessionDetail:
"""Returns one session with its direct child sessions and its 50 most recent events, oldest of those first.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org. In a held org, where self-serve signups land beside the platform's staff, a session is its person's alone.
:param id: ID is the session to act on, from the path. (required)
:type id: str
@@ -7299,7 +7299,7 @@ class AgentApi:
) -> ApiResponse[AgentSessionDetail]:
"""Returns one session with its direct child sessions and its 50 most recent events, oldest of those first.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org. In a held org, where self-serve signups land beside the platform's staff, a session is its person's alone.
:param id: ID is the session to act on, from the path. (required)
:type id: str
@@ -7366,7 +7366,7 @@ class AgentApi:
) -> RESTResponseType:
"""Returns one session with its direct child sessions and its 50 most recent events, oldest of those first.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org.
Returns one session with its direct child sessions and its 50 most recent events, oldest of those first. The children are those the caller may see, by the rule the session itself is read by: a member's own, and every one for an admin of the org. In a held org, where self-serve signups land beside the platform's staff, a session is its person's alone.
:param id: ID is the session to act on, from the path. (required)
:type id: str
@@ -8532,7 +8532,7 @@ class AgentApi:
) -> AgentTargetList:
"""Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load. In a held org, where self-serve signups land beside the platform's staff, it is only the caller's own.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -8595,7 +8595,7 @@ class AgentApi:
) -> ApiResponse[AgentTargetList]:
"""Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load. In a held org, where self-serve signups land beside the platform's staff, it is only the caller's own.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -8658,7 +8658,7 @@ class AgentApi:
) -> RESTResponseType:
"""Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load.
Returns every machine registered to the caller's org, newest first, each with its live session load. In a held org, where self-serve signups land beside the platform's staff, it is only the caller's own.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
+260 -12
View File
@@ -17,6 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from hanzoai.cloud.models.share_enable_resp import ShareEnableResp
from hanzoai.cloud.models.share_rotated import ShareRotated
from hanzoai.cloud.models.share_shares_out import ShareSharesOut
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
@@ -53,9 +54,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ShareSharesOut:
"""Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled.
"""Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled.
Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -116,9 +117,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[ShareSharesOut]:
"""Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled.
"""Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled.
Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -179,9 +180,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled.
"""Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled.
Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
Returns the tunnel shares the caller's account currently has open — their org's, or in a held org their own — across every environment it has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -300,9 +301,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ShareEnableResp:
"""Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel.
"""Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel.
Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN org's account. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org and, in a held org, the caller's attested subject, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -363,9 +364,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[ShareEnableResp]:
"""Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel.
"""Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel.
Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN org's account. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org and, in a held org, the caller's attested subject, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -426,9 +427,9 @@ class ShareApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel.
"""Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel.
Provisions the caller org's tunnel account and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN org's account. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
Provisions the caller's tunnel account — their org's, or in a held org, where every self-serve signup lands, their own — and returns the credential the `hanzo share` CLI needs to run a tunnel. It is idempotent: the account is keyed deterministically off the VALIDATED org and, in a held org, the caller's attested subject, so a repeat call hands back the same account rather than creating a second one, and a caller can only ever provision their OWN. 503 when the deployment has no share controller configured; 502 when that controller is unreachable.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -529,3 +530,250 @@ class ShareApi:
)
@validate_call
def post_share_rotate(
self,
_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,
) -> ShareRotated:
"""Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on.
Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on. The account is kept: enable hands its holder the new credential. In a customer's org the account is the org's, which its members share, and an admin of the org or a SuperAdmin rotates it. In a held org each person's account is their own, and they rotate it — every account they hold, the one an API key of theirs was handed before included, so none stays live. An admin of the org or a SuperAdmin then rotates the org's own account, which no call there hands out, whether or not they hold an account of their own; when that one cannot be rotated, `pending` says so and their own are rotated still. An account never provisioned has nothing to rotate and counts 0. 503 when the deployment has no share controller configured; 502 when that controller is unreachable, or holds the caller's account under a credential this deployment does not derive — out of a rotation's reach, so it is refused rather than reported done.
: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._post_share_rotate_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ShareRotated",
}
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 post_share_rotate_with_http_info(
self,
_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[ShareRotated]:
"""Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on.
Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on. The account is kept: enable hands its holder the new credential. In a customer's org the account is the org's, which its members share, and an admin of the org or a SuperAdmin rotates it. In a held org each person's account is their own, and they rotate it — every account they hold, the one an API key of theirs was handed before included, so none stays live. An admin of the org or a SuperAdmin then rotates the org's own account, which no call there hands out, whether or not they hold an account of their own; when that one cannot be rotated, `pending` says so and their own are rotated still. An account never provisioned has nothing to rotate and counts 0. 503 when the deployment has no share controller configured; 502 when that controller is unreachable, or holds the caller's account under a credential this deployment does not derive — out of a rotation's reach, so it is refused rather than reported done.
: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._post_share_rotate_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ShareRotated",
}
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 post_share_rotate_without_preload_content(
self,
_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:
"""Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on.
Replaces the credential of a tunnel account and ends every environment enabled with it, shares and all, so a credential handed out before — to a member who has left, or to anyone who read it — opens nothing from now on. The account is kept: enable hands its holder the new credential. In a customer's org the account is the org's, which its members share, and an admin of the org or a SuperAdmin rotates it. In a held org each person's account is their own, and they rotate it — every account they hold, the one an API key of theirs was handed before included, so none stays live. An admin of the org or a SuperAdmin then rotates the org's own account, which no call there hands out, whether or not they hold an account of their own; when that one cannot be rotated, `pending` says so and their own are rotated still. An account never provisioned has nothing to rotate and counts 0. 503 when the deployment has no share controller configured; 502 when that controller is unreachable, or holds the caller's account under a credential this deployment does not derive — out of a rotation's reach, so it is refused rather than reported done.
: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._post_share_rotate_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ShareRotated",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_share_rotate_serialize(
self,
_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
# 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(
[
'application/json',
'application/problem+json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/share/rotate',
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
)
+1
View File
@@ -2687,6 +2687,7 @@ from hanzoai.cloud.models.session import Session
from hanzoai.cloud.models.settings_settings_req import SettingsSettingsReq
from hanzoai.cloud.models.settings_view import SettingsView
from hanzoai.cloud.models.share_enable_resp import ShareEnableResp
from hanzoai.cloud.models.share_rotated import ShareRotated
from hanzoai.cloud.models.share_share_view import ShareShareView
from hanzoai.cloud.models.share_shares_out import ShareSharesOut
from hanzoai.cloud.models.social_social_account import SocialSocialAccount
@@ -27,7 +27,7 @@ class AgentTargetList(BaseModel):
"""
AgentTargetList
""" # noqa: E501
targets: Optional[List[AgentTargetView]] = Field(default=None, description="Targets is every target registered to the caller's org.")
targets: Optional[List[AgentTargetView]] = Field(default=None, description="Targets is every target registered to the caller's org; in a held org, the caller's own.")
__properties: ClassVar[List[str]] = ["targets"]
model_config = ConfigDict(
@@ -26,7 +26,7 @@ class ShareEnableResp(BaseModel):
"""
ShareEnableResp
""" # noqa: E501
account_token: Optional[StrictStr] = Field(default=None, description="AccountToken is the org's own tunnel-account credential. Treat it as a secret: it is what the CLI enables an environment with.", alias="accountToken")
account_token: Optional[StrictStr] = Field(default=None, description="AccountToken is the caller's tunnel-account credential: their org's, or in a held org their own. Treat it as a secret: it is what the CLI enables an environment with.", alias="accountToken")
controller: Optional[StrictStr] = Field(default=None, description="Controller is the public controller endpoint the CLI enables against.")
namespace: Optional[StrictStr] = Field(default=None, description="Namespace is the public frontend a share is published into, when the deployment names one.")
url_template: Optional[StrictStr] = Field(default=None, description="URLTemplate is the shape a share token expands to, so the CLI can print the resulting URL without asking again.", alias="urlTemplate")
+89
View File
@@ -0,0 +1,89 @@
# coding: utf-8
"""
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
The version of the OpenAPI document: v1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ShareRotated(BaseModel):
"""
ShareRotated
""" # noqa: E501
ended: Optional[StrictInt] = Field(default=None, description="Ended is how many environments the rotated accounts had enabled. Each is ended with its shares, so a machine that ran a tunnel on an account enables again with the new credential.")
pending: Optional[StrictStr] = Field(default=None, description="Pending says what this call could not rotate, and is empty when it rotated everything. In a held org an admin rotates their own account first and the org's own after it, so the org's failing to rotate is said here rather than keeping them from their own; calling again tries it again.")
__properties: ClassVar[List[str]] = ["ended", "pending"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ShareRotated from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ShareRotated from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ended": obj.get("ended"),
"pending": obj.get("pending")
})
return _obj
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "hanzoai"
version = "8.5.718"
version = "8.5.719"
description = "The official Python library for the Hanzo API"
dynamic = ["readme"]
license = "Apache-2.0"
Generated
+1 -1
View File
@@ -2252,7 +2252,7 @@ wheels = [
[[package]]
name = "hanzoai"
version = "8.5.717"
version = "8.5.718"
source = { editable = "." }
dependencies = [
{ name = "pydantic" },