Regenerate the cloud client from v8.5.491

The release lane regenerates pkg/hanzoai/cloud from the served document
and refuses to publish when the committed client differs; it had drifted
since v8.5.458, so every python-sdk tag, hanzo-mcp and
hanzo-tools-browser included, stopped at that check. The lock now names
v8.5.491 and the hash api.hanzo.ai serves.
This commit is contained in:
2026-09-30 14:54:13 -07:00
parent 58801c6ccc
commit fedeec8d70
50 changed files with 7911 additions and 31 deletions
+56
View File
@@ -308,7 +308,11 @@ __all__ = [
"AiRetrainMeta",
"AiRouterHistory",
"AiRouterStats",
"AiRoutingEdit",
"AiRoutingProbe",
"AiRoutingProposal",
"AiRoutingRewardResult",
"AiRoutingView",
"AiStatsWindow",
"AiTaskStats",
"AiThroughputStats",
@@ -339,6 +343,12 @@ __all__ = [
"AuthorEnrolment",
"AuthorOrgView",
"AuthorVerifyRequest",
"AutoAutomation",
"AutoAutomationIn",
"AutoAutomationPage",
"AutoAutomationPatch",
"AutoAutomationRun",
"AutoAutomationRunPage",
"AutoCatalog",
"AutoConnectorAction",
"AutoConnectorAuth",
@@ -352,12 +362,18 @@ __all__ = [
"AutoFlowRun",
"AutoFlowTrigger",
"AutoFlowVersion",
"AutoLastRun",
"AutoPatchFlowIn",
"AutoPopulatedFlow",
"AutoPropSpec",
"AutoRunHandle",
"AutoRunIn",
"AutoRunPage",
"AutoRunResp",
"AutoRunStarted",
"AutoSchedule",
"AutoStarter",
"AutoStarterPage",
"AutoStepSettings",
"AutoVersionPage",
"BankTally",
@@ -991,6 +1007,7 @@ __all__ = [
"GetAiProviders200Response",
"GetAiRecords200Response",
"GetAiRemoteConnections200Response",
"GetAiRouterCatalog200Response",
"GetAiRouterHistory200Response",
"GetAiRouterJudgePanel200Response",
"GetAiRouterStats200Response",
@@ -1180,6 +1197,7 @@ __all__ = [
"IamProviderItem",
"IamProviderResult",
"IamRegistration",
"IamReleaseOutput",
"IamReply",
"IamRole",
"IamRolesDeleteOutput",
@@ -1199,11 +1217,13 @@ __all__ = [
"IamTeamsDeleteOutput",
"IamTeamsInput",
"IamTeamsListOutput",
"IamTermsBody",
"IamThemeData",
"IamToggle",
"IamToken",
"IamTokenMutation",
"IamTokenResult",
"IamTombstone",
"IamUpdateInput",
"IamUpdateOrganizationInput",
"IamUpdateSessionIn",
@@ -2408,6 +2428,8 @@ __all__ = [
"PostAiRagIngest200Response",
"PostAiRecords200Response",
"PostAiRemoteConnections200Response",
"PostAiRouterCatalogPropose200Response",
"PostAiRouterCatalogTest200Response",
"PostAiRoutes200Response",
"PostAiScales200Response",
"PostAiScans200Response",
@@ -2587,6 +2609,7 @@ __all__ = [
"PubsubBusMessage",
"PubsubBusPublish",
"PubsubBusRequest",
"PutAiRouterCatalog200Response",
"Question",
"RagEmbedResult",
"ReferenceClearReferenceOut",
@@ -2648,6 +2671,7 @@ __all__ = [
"RiskRiskTrial",
"RiskRiskValue",
"Root",
"RoutingVersion",
"RunnerContext",
"RunnerDeclareIn",
"RunnerDeclareOut",
@@ -2892,18 +2916,22 @@ __all__ = [
"ToolBuildOut",
"ToolBuildRequest",
"ToolCreateServerReq",
"ToolKit",
"ToolMCPListing",
"ToolMCPPackage",
"ToolMCPRemote",
"ToolMCPServer",
"ToolMcpCatalog",
"ToolMcpServerList",
"ToolMuteReq",
"ToolPluginDeleted",
"ToolPluginMount",
"ToolPluginMountList",
"ToolPrice",
"ToolRemote",
"ToolSkill",
"ToolSkillDeleted",
"ToolSkillDoc",
"ToolSkillIn",
"ToolSkillWritten",
"ToolSourceToolList",
@@ -3309,7 +3337,11 @@ from hanzoai.cloud.models.ai_responses_usage import AiResponsesUsage as AiRespon
from hanzoai.cloud.models.ai_retrain_meta import AiRetrainMeta as AiRetrainMeta
from hanzoai.cloud.models.ai_router_history import AiRouterHistory as AiRouterHistory
from hanzoai.cloud.models.ai_router_stats import AiRouterStats as AiRouterStats
from hanzoai.cloud.models.ai_routing_edit import AiRoutingEdit as AiRoutingEdit
from hanzoai.cloud.models.ai_routing_probe import AiRoutingProbe as AiRoutingProbe
from hanzoai.cloud.models.ai_routing_proposal import AiRoutingProposal as AiRoutingProposal
from hanzoai.cloud.models.ai_routing_reward_result import AiRoutingRewardResult as AiRoutingRewardResult
from hanzoai.cloud.models.ai_routing_view import AiRoutingView as AiRoutingView
from hanzoai.cloud.models.ai_stats_window import AiStatsWindow as AiStatsWindow
from hanzoai.cloud.models.ai_task_stats import AiTaskStats as AiTaskStats
from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats as AiThroughputStats
@@ -3340,6 +3372,12 @@ from hanzoai.cloud.models.author_deploy_request import AuthorDeployRequest as Au
from hanzoai.cloud.models.author_enrolment import AuthorEnrolment as AuthorEnrolment
from hanzoai.cloud.models.author_org_view import AuthorOrgView as AuthorOrgView
from hanzoai.cloud.models.author_verify_request import AuthorVerifyRequest as AuthorVerifyRequest
from hanzoai.cloud.models.auto_automation import AutoAutomation as AutoAutomation
from hanzoai.cloud.models.auto_automation_in import AutoAutomationIn as AutoAutomationIn
from hanzoai.cloud.models.auto_automation_page import AutoAutomationPage as AutoAutomationPage
from hanzoai.cloud.models.auto_automation_patch import AutoAutomationPatch as AutoAutomationPatch
from hanzoai.cloud.models.auto_automation_run import AutoAutomationRun as AutoAutomationRun
from hanzoai.cloud.models.auto_automation_run_page import AutoAutomationRunPage as AutoAutomationRunPage
from hanzoai.cloud.models.auto_catalog import AutoCatalog as AutoCatalog
from hanzoai.cloud.models.auto_connector_action import AutoConnectorAction as AutoConnectorAction
from hanzoai.cloud.models.auto_connector_auth import AutoConnectorAuth as AutoConnectorAuth
@@ -3353,12 +3391,18 @@ from hanzoai.cloud.models.auto_flow_page import AutoFlowPage as AutoFlowPage
from hanzoai.cloud.models.auto_flow_run import AutoFlowRun as AutoFlowRun
from hanzoai.cloud.models.auto_flow_trigger import AutoFlowTrigger as AutoFlowTrigger
from hanzoai.cloud.models.auto_flow_version import AutoFlowVersion as AutoFlowVersion
from hanzoai.cloud.models.auto_last_run import AutoLastRun as AutoLastRun
from hanzoai.cloud.models.auto_patch_flow_in import AutoPatchFlowIn as AutoPatchFlowIn
from hanzoai.cloud.models.auto_populated_flow import AutoPopulatedFlow as AutoPopulatedFlow
from hanzoai.cloud.models.auto_prop_spec import AutoPropSpec as AutoPropSpec
from hanzoai.cloud.models.auto_run_handle import AutoRunHandle as AutoRunHandle
from hanzoai.cloud.models.auto_run_in import AutoRunIn as AutoRunIn
from hanzoai.cloud.models.auto_run_page import AutoRunPage as AutoRunPage
from hanzoai.cloud.models.auto_run_resp import AutoRunResp as AutoRunResp
from hanzoai.cloud.models.auto_run_started import AutoRunStarted as AutoRunStarted
from hanzoai.cloud.models.auto_schedule import AutoSchedule as AutoSchedule
from hanzoai.cloud.models.auto_starter import AutoStarter as AutoStarter
from hanzoai.cloud.models.auto_starter_page import AutoStarterPage as AutoStarterPage
from hanzoai.cloud.models.auto_step_settings import AutoStepSettings as AutoStepSettings
from hanzoai.cloud.models.auto_version_page import AutoVersionPage as AutoVersionPage
from hanzoai.cloud.models.bank_tally import BankTally as BankTally
@@ -3992,6 +4036,7 @@ from hanzoai.cloud.models.get_ai_nodes200_response import GetAiNodes200Response
from hanzoai.cloud.models.get_ai_providers200_response import GetAiProviders200Response as GetAiProviders200Response
from hanzoai.cloud.models.get_ai_records200_response import GetAiRecords200Response as GetAiRecords200Response
from hanzoai.cloud.models.get_ai_remote_connections200_response import GetAiRemoteConnections200Response as GetAiRemoteConnections200Response
from hanzoai.cloud.models.get_ai_router_catalog200_response import GetAiRouterCatalog200Response as GetAiRouterCatalog200Response
from hanzoai.cloud.models.get_ai_router_history200_response import GetAiRouterHistory200Response as GetAiRouterHistory200Response
from hanzoai.cloud.models.get_ai_router_judge_panel200_response import GetAiRouterJudgePanel200Response as GetAiRouterJudgePanel200Response
from hanzoai.cloud.models.get_ai_router_stats200_response import GetAiRouterStats200Response as GetAiRouterStats200Response
@@ -4181,6 +4226,7 @@ from hanzoai.cloud.models.iam_provider import IamProvider as IamProvider
from hanzoai.cloud.models.iam_provider_item import IamProviderItem as IamProviderItem
from hanzoai.cloud.models.iam_provider_result import IamProviderResult as IamProviderResult
from hanzoai.cloud.models.iam_registration import IamRegistration as IamRegistration
from hanzoai.cloud.models.iam_release_output import IamReleaseOutput as IamReleaseOutput
from hanzoai.cloud.models.iam_reply import IamReply as IamReply
from hanzoai.cloud.models.iam_role import IamRole as IamRole
from hanzoai.cloud.models.iam_roles_delete_output import IamRolesDeleteOutput as IamRolesDeleteOutput
@@ -4200,11 +4246,13 @@ from hanzoai.cloud.models.iam_team import IamTeam as IamTeam
from hanzoai.cloud.models.iam_teams_delete_output import IamTeamsDeleteOutput as IamTeamsDeleteOutput
from hanzoai.cloud.models.iam_teams_input import IamTeamsInput as IamTeamsInput
from hanzoai.cloud.models.iam_teams_list_output import IamTeamsListOutput as IamTeamsListOutput
from hanzoai.cloud.models.iam_terms_body import IamTermsBody as IamTermsBody
from hanzoai.cloud.models.iam_theme_data import IamThemeData as IamThemeData
from hanzoai.cloud.models.iam_toggle import IamToggle as IamToggle
from hanzoai.cloud.models.iam_token import IamToken as IamToken
from hanzoai.cloud.models.iam_token_mutation import IamTokenMutation as IamTokenMutation
from hanzoai.cloud.models.iam_token_result import IamTokenResult as IamTokenResult
from hanzoai.cloud.models.iam_tombstone import IamTombstone as IamTombstone
from hanzoai.cloud.models.iam_update_input import IamUpdateInput as IamUpdateInput
from hanzoai.cloud.models.iam_update_organization_input import IamUpdateOrganizationInput as IamUpdateOrganizationInput
from hanzoai.cloud.models.iam_update_session_in import IamUpdateSessionIn as IamUpdateSessionIn
@@ -5409,6 +5457,8 @@ from hanzoai.cloud.models.post_ai_rag_embed200_response import PostAiRagEmbed200
from hanzoai.cloud.models.post_ai_rag_ingest200_response import PostAiRagIngest200Response as PostAiRagIngest200Response
from hanzoai.cloud.models.post_ai_records200_response import PostAiRecords200Response as PostAiRecords200Response
from hanzoai.cloud.models.post_ai_remote_connections200_response import PostAiRemoteConnections200Response as PostAiRemoteConnections200Response
from hanzoai.cloud.models.post_ai_router_catalog_propose200_response import PostAiRouterCatalogPropose200Response as PostAiRouterCatalogPropose200Response
from hanzoai.cloud.models.post_ai_router_catalog_test200_response import PostAiRouterCatalogTest200Response as PostAiRouterCatalogTest200Response
from hanzoai.cloud.models.post_ai_routes200_response import PostAiRoutes200Response as PostAiRoutes200Response
from hanzoai.cloud.models.post_ai_scales200_response import PostAiScales200Response as PostAiScales200Response
from hanzoai.cloud.models.post_ai_scans200_response import PostAiScans200Response as PostAiScans200Response
@@ -5588,6 +5638,7 @@ from hanzoai.cloud.models.pubsub_bus_ack import PubsubBusAck as PubsubBusAck
from hanzoai.cloud.models.pubsub_bus_message import PubsubBusMessage as PubsubBusMessage
from hanzoai.cloud.models.pubsub_bus_publish import PubsubBusPublish as PubsubBusPublish
from hanzoai.cloud.models.pubsub_bus_request import PubsubBusRequest as PubsubBusRequest
from hanzoai.cloud.models.put_ai_router_catalog200_response import PutAiRouterCatalog200Response as PutAiRouterCatalog200Response
from hanzoai.cloud.models.question import Question as Question
from hanzoai.cloud.models.rag_embed_result import RagEmbedResult as RagEmbedResult
from hanzoai.cloud.models.reference_clear_reference_out import ReferenceClearReferenceOut as ReferenceClearReferenceOut
@@ -5649,6 +5700,7 @@ from hanzoai.cloud.models.risk_risk_topology import RiskRiskTopology as RiskRisk
from hanzoai.cloud.models.risk_risk_trial import RiskRiskTrial as RiskRiskTrial
from hanzoai.cloud.models.risk_risk_value import RiskRiskValue as RiskRiskValue
from hanzoai.cloud.models.root import Root as Root
from hanzoai.cloud.models.routing_version import RoutingVersion as RoutingVersion
from hanzoai.cloud.models.runner_context import RunnerContext as RunnerContext
from hanzoai.cloud.models.runner_declare_in import RunnerDeclareIn as RunnerDeclareIn
from hanzoai.cloud.models.runner_declare_out import RunnerDeclareOut as RunnerDeclareOut
@@ -5893,18 +5945,22 @@ from hanzoai.cloud.models.tool_authored_skill_list import ToolAuthoredSkillList
from hanzoai.cloud.models.tool_build_out import ToolBuildOut as ToolBuildOut
from hanzoai.cloud.models.tool_build_request import ToolBuildRequest as ToolBuildRequest
from hanzoai.cloud.models.tool_create_server_req import ToolCreateServerReq as ToolCreateServerReq
from hanzoai.cloud.models.tool_kit import ToolKit as ToolKit
from hanzoai.cloud.models.tool_mcp_listing import ToolMCPListing as ToolMCPListing
from hanzoai.cloud.models.tool_mcp_package import ToolMCPPackage as ToolMCPPackage
from hanzoai.cloud.models.tool_mcp_remote import ToolMCPRemote as ToolMCPRemote
from hanzoai.cloud.models.tool_mcp_server import ToolMCPServer as ToolMCPServer
from hanzoai.cloud.models.tool_mcp_catalog import ToolMcpCatalog as ToolMcpCatalog
from hanzoai.cloud.models.tool_mcp_server_list import ToolMcpServerList as ToolMcpServerList
from hanzoai.cloud.models.tool_mute_req import ToolMuteReq as ToolMuteReq
from hanzoai.cloud.models.tool_plugin_deleted import ToolPluginDeleted as ToolPluginDeleted
from hanzoai.cloud.models.tool_plugin_mount import ToolPluginMount as ToolPluginMount
from hanzoai.cloud.models.tool_plugin_mount_list import ToolPluginMountList as ToolPluginMountList
from hanzoai.cloud.models.tool_price import ToolPrice as ToolPrice
from hanzoai.cloud.models.tool_remote import ToolRemote as ToolRemote
from hanzoai.cloud.models.tool_skill import ToolSkill as ToolSkill
from hanzoai.cloud.models.tool_skill_deleted import ToolSkillDeleted as ToolSkillDeleted
from hanzoai.cloud.models.tool_skill_doc import ToolSkillDoc as ToolSkillDoc
from hanzoai.cloud.models.tool_skill_in import ToolSkillIn as ToolSkillIn
from hanzoai.cloud.models.tool_skill_written import ToolSkillWritten as ToolSkillWritten
from hanzoai.cloud.models.tool_source_tool_list import ToolSourceToolList as ToolSourceToolList
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -63,7 +63,7 @@ class FlagApi:
) -> FlagDeletedOut:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -130,7 +130,7 @@ class FlagApi:
) -> ApiResponse[FlagDeletedOut]:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -197,7 +197,7 @@ class FlagApi:
) -> RESTResponseType:
"""Removes one flag definition by key and records the deletion in the change log.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404.
Removes one flag definition by key and records the deletion in the change log. A key the caller's store does not hold is a 404. A staged capability's key is a SuperAdmin's to remove, as it is to set.
:param key: Key is the flag key to act on, from the path. (required)
:type key: str
@@ -1896,7 +1896,7 @@ class FlagApi:
) -> FlagDefRow:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
@@ -1967,7 +1967,7 @@ class FlagApi:
) -> ApiResponse[FlagDefRow]:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
@@ -2038,7 +2038,7 @@ class FlagApi:
) -> RESTResponseType:
"""Creates or replaces the flag definition at the path's key and returns the stored row.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.
Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its \"key\" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity. A key that lets an org into a capability that is not ga — research, machines — is a SuperAdmin's to set, never an org admin's, and its write is on the audit trail before it lands.
:param key: Key is the flag key to write, from the path. (required)
:type key: str
+886
View File
@@ -67,6 +67,7 @@ from hanzoai.cloud.models.iam_projects_list_output import IamProjectsListOutput
from hanzoai.cloud.models.iam_provider import IamProvider
from hanzoai.cloud.models.iam_provider_result import IamProviderResult
from hanzoai.cloud.models.iam_registration import IamRegistration
from hanzoai.cloud.models.iam_release_output import IamReleaseOutput
from hanzoai.cloud.models.iam_reply import IamReply
from hanzoai.cloud.models.iam_role import IamRole
from hanzoai.cloud.models.iam_roles_delete_output import IamRolesDeleteOutput
@@ -79,9 +80,11 @@ from hanzoai.cloud.models.iam_team import IamTeam
from hanzoai.cloud.models.iam_teams_delete_output import IamTeamsDeleteOutput
from hanzoai.cloud.models.iam_teams_input import IamTeamsInput
from hanzoai.cloud.models.iam_teams_list_output import IamTeamsListOutput
from hanzoai.cloud.models.iam_terms_body import IamTermsBody
from hanzoai.cloud.models.iam_token import IamToken
from hanzoai.cloud.models.iam_token_mutation import IamTokenMutation
from hanzoai.cloud.models.iam_token_result import IamTokenResult
from hanzoai.cloud.models.iam_tombstone import IamTombstone
from hanzoai.cloud.models.iam_update_input import IamUpdateInput
from hanzoai.cloud.models.iam_update_organization_input import IamUpdateOrganizationInput
from hanzoai.cloud.models.iam_update_session_in import IamUpdateSessionIn
@@ -20748,6 +20751,286 @@ class IamApi:
@validate_call
def get_organization_tombstone(
self,
owner: StrictStr,
name: 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,
) -> IamTombstone:
"""Returns what holds a deleted organization's name: when it was deleted and who founded it.
Returns what holds a deleted organization's name: when it was deleted and who founded it. A SuperAdmin reads it before deciding to release the name.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._get_organization_tombstone_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamTombstone",
'202': "Approval",
}
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 get_organization_tombstone_with_http_info(
self,
owner: StrictStr,
name: 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[IamTombstone]:
"""Returns what holds a deleted organization's name: when it was deleted and who founded it.
Returns what holds a deleted organization's name: when it was deleted and who founded it. A SuperAdmin reads it before deciding to release the name.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._get_organization_tombstone_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamTombstone",
'202': "Approval",
}
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 get_organization_tombstone_without_preload_content(
self,
owner: StrictStr,
name: 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:
"""Returns what holds a deleted organization's name: when it was deleted and who founded it.
Returns what holds a deleted organization's name: when it was deleted and who founded it. A SuperAdmin reads it before deciding to release the name.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._get_organization_tombstone_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamTombstone",
'202': "Approval",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_organization_tombstone_serialize(
self,
owner,
name,
_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 owner is not None:
_path_params['owner'] = owner
if name is not None:
_path_params['name'] = name
# 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='GET',
resource_path='/v1/iam/organizations/tombstones/{owner}/{name}',
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_provider(
self,
@@ -38995,6 +39278,329 @@ class IamApi:
@validate_call
def put_iam_terms(
self,
iam_terms_body: IamTermsBody,
cookie: Optional[StrictStr] = None,
authorization: Optional[StrictStr] = None,
x_forwarded_for: Optional[StrictStr] = None,
_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,
) -> IamAnswer:
"""Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named.
Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named. It is how a person who arrived by a social provider, whose account the callback already made, records the same acceptance a code sign-up records at creation. Only the caller's own row is reachable.
:param iam_terms_body: (required)
:type iam_terms_body: IamTermsBody
:param cookie:
:type cookie: str
:param authorization:
:type authorization: str
:param x_forwarded_for:
:type x_forwarded_for: 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._put_iam_terms_serialize(
iam_terms_body=iam_terms_body,
cookie=cookie,
authorization=authorization,
x_forwarded_for=x_forwarded_for,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamAnswer",
'400': "IamAnswer",
}
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 put_iam_terms_with_http_info(
self,
iam_terms_body: IamTermsBody,
cookie: Optional[StrictStr] = None,
authorization: Optional[StrictStr] = None,
x_forwarded_for: Optional[StrictStr] = None,
_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[IamAnswer]:
"""Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named.
Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named. It is how a person who arrived by a social provider, whose account the callback already made, records the same acceptance a code sign-up records at creation. Only the caller's own row is reachable.
:param iam_terms_body: (required)
:type iam_terms_body: IamTermsBody
:param cookie:
:type cookie: str
:param authorization:
:type authorization: str
:param x_forwarded_for:
:type x_forwarded_for: 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._put_iam_terms_serialize(
iam_terms_body=iam_terms_body,
cookie=cookie,
authorization=authorization,
x_forwarded_for=x_forwarded_for,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamAnswer",
'400': "IamAnswer",
}
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 put_iam_terms_without_preload_content(
self,
iam_terms_body: IamTermsBody,
cookie: Optional[StrictStr] = None,
authorization: Optional[StrictStr] = None,
x_forwarded_for: Optional[StrictStr] = None,
_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:
"""Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named.
Records that the signed-in caller accepted the terms and the acceptable use policy, at the versions named. It is how a person who arrived by a social provider, whose account the callback already made, records the same acceptance a code sign-up records at creation. Only the caller's own row is reachable.
:param iam_terms_body: (required)
:type iam_terms_body: IamTermsBody
:param cookie:
:type cookie: str
:param authorization:
:type authorization: str
:param x_forwarded_for:
:type x_forwarded_for: 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._put_iam_terms_serialize(
iam_terms_body=iam_terms_body,
cookie=cookie,
authorization=authorization,
x_forwarded_for=x_forwarded_for,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamAnswer",
'400': "IamAnswer",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _put_iam_terms_serialize(
self,
iam_terms_body,
cookie,
authorization,
x_forwarded_for,
_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
if cookie is not None:
_header_params['Cookie'] = cookie
if authorization is not None:
_header_params['Authorization'] = authorization
if x_forwarded_for is not None:
_header_params['X-Forwarded-For'] = x_forwarded_for
# process the form parameters
# process the body parameter
if iam_terms_body is not None:
_body_params = iam_terms_body
# 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'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='PUT',
resource_path='/v1/iam/terms',
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 put_iam_users_by_owner_by_name(
self,
@@ -39611,6 +40217,286 @@ class IamApi:
@validate_call
def release_organization_name(
self,
owner: StrictStr,
name: 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,
) -> IamReleaseOutput:
"""Frees the name of a deleted organization so it can be founded again.
Frees the name of a deleted organization so it can be founded again. Deleting an organization leaves its name held, because every service keys a tenant by that name; releasing it is a SuperAdmin's decision, recorded on the audit trail, and it is refused while anything IAM keeps is still keyed by the name. Everything else keyed by it across the estate must be purged first.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._release_organization_name_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamReleaseOutput",
'202': "Approval",
}
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 release_organization_name_with_http_info(
self,
owner: StrictStr,
name: 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[IamReleaseOutput]:
"""Frees the name of a deleted organization so it can be founded again.
Frees the name of a deleted organization so it can be founded again. Deleting an organization leaves its name held, because every service keys a tenant by that name; releasing it is a SuperAdmin's decision, recorded on the audit trail, and it is refused while anything IAM keeps is still keyed by the name. Everything else keyed by it across the estate must be purged first.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._release_organization_name_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamReleaseOutput",
'202': "Approval",
}
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 release_organization_name_without_preload_content(
self,
owner: StrictStr,
name: 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:
"""Frees the name of a deleted organization so it can be founded again.
Frees the name of a deleted organization so it can be founded again. Deleting an organization leaves its name held, because every service keys a tenant by that name; releasing it is a SuperAdmin's decision, recorded on the audit trail, and it is refused while anything IAM keeps is still keyed by the name. Everything else keyed by it across the estate must be purged first.
:param owner: (required)
:type owner: str
:param name: (required)
:type name: 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._release_organization_name_serialize(
owner=owner,
name=name,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "IamReleaseOutput",
'202': "Approval",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _release_organization_name_serialize(
self,
owner,
name,
_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 owner is not None:
_path_params['owner'] = owner
if name is not None:
_path_params['name'] = name
# 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='DELETE',
resource_path='/v1/iam/organizations/tombstones/{owner}/{name}',
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 set_organization_avatar(
self,
+3 -3
View File
@@ -4257,7 +4257,7 @@ class ProjectApi:
) -> TagConfig:
"""The site's browser tag set for the hosted tag — which pixels to inject, by publishable key
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config.
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config. `audience` says who is asking — `bot` (automation, a crawler, or a cloud provider's published address), `internal` (a member of the site's org, by the IAM bearer the page sends, or an address in the project's internal networks) or `person` — and the set answers for it: nothing for a bot, Google Analytics alone for the team.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -4320,7 +4320,7 @@ class ProjectApi:
) -> ApiResponse[TagConfig]:
"""The site's browser tag set for the hosted tag — which pixels to inject, by publishable key
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config.
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config. `audience` says who is asking — `bot` (automation, a crawler, or a cloud provider's published address), `internal` (a member of the site's org, by the IAM bearer the page sends, or an address in the project's internal networks) or `person` — and the set answers for it: nothing for a bot, Google Analytics alone for the team.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -4383,7 +4383,7 @@ class ProjectApi:
) -> RESTResponseType:
"""The site's browser tag set for the hosted tag — which pixels to inject, by publishable key
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config.
Returns the client-side pixels the SITE has connected (GA4, Google Ads, LinkedIn, Meta, Pinterest, Reddit, TikTok, X) with their NON-SECRET ids, so the hosted tag injects them first-party and stamps each browser event with the same event_id the server-side Conversions API uses — deduping the two. Resolved per site: by the publishable key on ?key= when it names a project, else by the request host, so hanzo.ai and hanzo.chat carry different tags under one org. WITHOUT a resolvable site it answers an empty set at 200 — a page never breaks on its tag config. `audience` says who is asking — `bot` (automation, a crawler, or a cloud provider's published address), `internal` (a member of the site's org, by the IAM bearer the page sends, or an address in the project's internal networks) or `person` — and the set answers for it: nothing for a bot, Google Analytics alone for the team.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
+524
View File
@@ -26,10 +26,12 @@ from hanzoai.cloud.models.tool_authored_skill_list import ToolAuthoredSkillList
from hanzoai.cloud.models.tool_build_out import ToolBuildOut
from hanzoai.cloud.models.tool_build_request import ToolBuildRequest
from hanzoai.cloud.models.tool_create_server_req import ToolCreateServerReq
from hanzoai.cloud.models.tool_kit import ToolKit
from hanzoai.cloud.models.tool_mcp_listing import ToolMCPListing
from hanzoai.cloud.models.tool_mcp_server import ToolMCPServer
from hanzoai.cloud.models.tool_mcp_catalog import ToolMcpCatalog
from hanzoai.cloud.models.tool_mcp_server_list import ToolMcpServerList
from hanzoai.cloud.models.tool_mute_req import ToolMuteReq
from hanzoai.cloud.models.tool_plugin_deleted import ToolPluginDeleted
from hanzoai.cloud.models.tool_plugin_mount_list import ToolPluginMountList
from hanzoai.cloud.models.tool_skill_deleted import ToolSkillDeleted
@@ -1963,6 +1965,253 @@ class ToolApi:
@validate_call
def get_tool_kit(
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,
) -> ToolKit:
"""Answers the caller's kit: what their coding runs carry of the org's tool plane.
Answers the caller's kit: what their coding runs carry of the org's tool plane. Skills are the documents of those an admin of the org activated; servers are those an admin registered, each by its id with the tools of it an admin activated — never an address or a credential, which stay on the plane. Both leave out what the caller muted, and muted names it. It is the one read a run makes, so what it answers is what the caller's runs carry.
: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._get_tool_kit_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
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 get_tool_kit_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[ToolKit]:
"""Answers the caller's kit: what their coding runs carry of the org's tool plane.
Answers the caller's kit: what their coding runs carry of the org's tool plane. Skills are the documents of those an admin of the org activated; servers are those an admin registered, each by its id with the tools of it an admin activated — never an address or a credential, which stay on the plane. Both leave out what the caller muted, and muted names it. It is the one read a run makes, so what it answers is what the caller's runs carry.
: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._get_tool_kit_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
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 get_tool_kit_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:
"""Answers the caller's kit: what their coding runs carry of the org's tool plane.
Answers the caller's kit: what their coding runs carry of the org's tool plane. Skills are the documents of those an admin of the org activated; servers are those an admin registered, each by its id with the tools of it an admin activated — never an address or a credential, which stay on the plane. Both leave out what the caller muted, and muted names it. It is the one read a run makes, so what it answers is what the caller's runs carry.
: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._get_tool_kit_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_tool_kit_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='GET',
resource_path='/v1/tool/kit',
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_tool_mcp_servers(
self,
@@ -4605,3 +4854,278 @@ class ToolApi:
)
@validate_call
def put_tool_kit(
self,
tool_mute_req: ToolMuteReq,
_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,
) -> ToolKit:
"""Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after.
Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after. The layer only narrows: a name the org's kit does not carry is refused 400, since muting it would say nothing, and unmuting never gives the caller more than an admin put in place. It is the caller's own, so any member may write it. More than 256 names is refused 413.
:param tool_mute_req: (required)
:type tool_mute_req: ToolMuteReq
: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._put_tool_kit_serialize(
tool_mute_req=tool_mute_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
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 put_tool_kit_with_http_info(
self,
tool_mute_req: ToolMuteReq,
_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[ToolKit]:
"""Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after.
Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after. The layer only narrows: a name the org's kit does not carry is refused 400, since muting it would say nothing, and unmuting never gives the caller more than an admin put in place. It is the caller's own, so any member may write it. More than 256 names is refused 413.
:param tool_mute_req: (required)
:type tool_mute_req: ToolMuteReq
: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._put_tool_kit_serialize(
tool_mute_req=tool_mute_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
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 put_tool_kit_without_preload_content(
self,
tool_mute_req: ToolMuteReq,
_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:
"""Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after.
Mutes and unmutes names of the org's kit for the caller's own runs, and answers the caller's kit after. The layer only narrows: a name the org's kit does not carry is refused 400, since muting it would say nothing, and unmuting never gives the caller more than an admin put in place. It is the caller's own, so any member may write it. More than 256 names is refused 413.
:param tool_mute_req: (required)
:type tool_mute_req: ToolMuteReq
: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._put_tool_kit_serialize(
tool_mute_req=tool_mute_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ToolKit",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _put_tool_kit_serialize(
self,
tool_mute_req,
_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
if tool_mute_req is not None:
_body_params = tool_mute_req
# 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'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='PUT',
resource_path='/v1/tool/kit',
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
)
+28
View File
@@ -171,7 +171,11 @@ from hanzoai.cloud.models.ai_responses_usage import AiResponsesUsage
from hanzoai.cloud.models.ai_retrain_meta import AiRetrainMeta
from hanzoai.cloud.models.ai_router_history import AiRouterHistory
from hanzoai.cloud.models.ai_router_stats import AiRouterStats
from hanzoai.cloud.models.ai_routing_edit import AiRoutingEdit
from hanzoai.cloud.models.ai_routing_probe import AiRoutingProbe
from hanzoai.cloud.models.ai_routing_proposal import AiRoutingProposal
from hanzoai.cloud.models.ai_routing_reward_result import AiRoutingRewardResult
from hanzoai.cloud.models.ai_routing_view import AiRoutingView
from hanzoai.cloud.models.ai_stats_window import AiStatsWindow
from hanzoai.cloud.models.ai_task_stats import AiTaskStats
from hanzoai.cloud.models.ai_throughput_stats import AiThroughputStats
@@ -202,6 +206,12 @@ from hanzoai.cloud.models.author_deploy_request import AuthorDeployRequest
from hanzoai.cloud.models.author_enrolment import AuthorEnrolment
from hanzoai.cloud.models.author_org_view import AuthorOrgView
from hanzoai.cloud.models.author_verify_request import AuthorVerifyRequest
from hanzoai.cloud.models.auto_automation import AutoAutomation
from hanzoai.cloud.models.auto_automation_in import AutoAutomationIn
from hanzoai.cloud.models.auto_automation_page import AutoAutomationPage
from hanzoai.cloud.models.auto_automation_patch import AutoAutomationPatch
from hanzoai.cloud.models.auto_automation_run import AutoAutomationRun
from hanzoai.cloud.models.auto_automation_run_page import AutoAutomationRunPage
from hanzoai.cloud.models.auto_catalog import AutoCatalog
from hanzoai.cloud.models.auto_connector_action import AutoConnectorAction
from hanzoai.cloud.models.auto_connector_auth import AutoConnectorAuth
@@ -215,12 +225,18 @@ from hanzoai.cloud.models.auto_flow_page import AutoFlowPage
from hanzoai.cloud.models.auto_flow_run import AutoFlowRun
from hanzoai.cloud.models.auto_flow_trigger import AutoFlowTrigger
from hanzoai.cloud.models.auto_flow_version import AutoFlowVersion
from hanzoai.cloud.models.auto_last_run import AutoLastRun
from hanzoai.cloud.models.auto_patch_flow_in import AutoPatchFlowIn
from hanzoai.cloud.models.auto_populated_flow import AutoPopulatedFlow
from hanzoai.cloud.models.auto_prop_spec import AutoPropSpec
from hanzoai.cloud.models.auto_run_handle import AutoRunHandle
from hanzoai.cloud.models.auto_run_in import AutoRunIn
from hanzoai.cloud.models.auto_run_page import AutoRunPage
from hanzoai.cloud.models.auto_run_resp import AutoRunResp
from hanzoai.cloud.models.auto_run_started import AutoRunStarted
from hanzoai.cloud.models.auto_schedule import AutoSchedule
from hanzoai.cloud.models.auto_starter import AutoStarter
from hanzoai.cloud.models.auto_starter_page import AutoStarterPage
from hanzoai.cloud.models.auto_step_settings import AutoStepSettings
from hanzoai.cloud.models.auto_version_page import AutoVersionPage
from hanzoai.cloud.models.bank_tally import BankTally
@@ -854,6 +870,7 @@ from hanzoai.cloud.models.get_ai_nodes200_response import GetAiNodes200Response
from hanzoai.cloud.models.get_ai_providers200_response import GetAiProviders200Response
from hanzoai.cloud.models.get_ai_records200_response import GetAiRecords200Response
from hanzoai.cloud.models.get_ai_remote_connections200_response import GetAiRemoteConnections200Response
from hanzoai.cloud.models.get_ai_router_catalog200_response import GetAiRouterCatalog200Response
from hanzoai.cloud.models.get_ai_router_history200_response import GetAiRouterHistory200Response
from hanzoai.cloud.models.get_ai_router_judge_panel200_response import GetAiRouterJudgePanel200Response
from hanzoai.cloud.models.get_ai_router_stats200_response import GetAiRouterStats200Response
@@ -1043,6 +1060,7 @@ from hanzoai.cloud.models.iam_provider import IamProvider
from hanzoai.cloud.models.iam_provider_item import IamProviderItem
from hanzoai.cloud.models.iam_provider_result import IamProviderResult
from hanzoai.cloud.models.iam_registration import IamRegistration
from hanzoai.cloud.models.iam_release_output import IamReleaseOutput
from hanzoai.cloud.models.iam_reply import IamReply
from hanzoai.cloud.models.iam_role import IamRole
from hanzoai.cloud.models.iam_roles_delete_output import IamRolesDeleteOutput
@@ -1062,11 +1080,13 @@ from hanzoai.cloud.models.iam_team import IamTeam
from hanzoai.cloud.models.iam_teams_delete_output import IamTeamsDeleteOutput
from hanzoai.cloud.models.iam_teams_input import IamTeamsInput
from hanzoai.cloud.models.iam_teams_list_output import IamTeamsListOutput
from hanzoai.cloud.models.iam_terms_body import IamTermsBody
from hanzoai.cloud.models.iam_theme_data import IamThemeData
from hanzoai.cloud.models.iam_toggle import IamToggle
from hanzoai.cloud.models.iam_token import IamToken
from hanzoai.cloud.models.iam_token_mutation import IamTokenMutation
from hanzoai.cloud.models.iam_token_result import IamTokenResult
from hanzoai.cloud.models.iam_tombstone import IamTombstone
from hanzoai.cloud.models.iam_update_input import IamUpdateInput
from hanzoai.cloud.models.iam_update_organization_input import IamUpdateOrganizationInput
from hanzoai.cloud.models.iam_update_session_in import IamUpdateSessionIn
@@ -2271,6 +2291,8 @@ from hanzoai.cloud.models.post_ai_rag_embed200_response import PostAiRagEmbed200
from hanzoai.cloud.models.post_ai_rag_ingest200_response import PostAiRagIngest200Response
from hanzoai.cloud.models.post_ai_records200_response import PostAiRecords200Response
from hanzoai.cloud.models.post_ai_remote_connections200_response import PostAiRemoteConnections200Response
from hanzoai.cloud.models.post_ai_router_catalog_propose200_response import PostAiRouterCatalogPropose200Response
from hanzoai.cloud.models.post_ai_router_catalog_test200_response import PostAiRouterCatalogTest200Response
from hanzoai.cloud.models.post_ai_routes200_response import PostAiRoutes200Response
from hanzoai.cloud.models.post_ai_scales200_response import PostAiScales200Response
from hanzoai.cloud.models.post_ai_scans200_response import PostAiScans200Response
@@ -2450,6 +2472,7 @@ from hanzoai.cloud.models.pubsub_bus_ack import PubsubBusAck
from hanzoai.cloud.models.pubsub_bus_message import PubsubBusMessage
from hanzoai.cloud.models.pubsub_bus_publish import PubsubBusPublish
from hanzoai.cloud.models.pubsub_bus_request import PubsubBusRequest
from hanzoai.cloud.models.put_ai_router_catalog200_response import PutAiRouterCatalog200Response
from hanzoai.cloud.models.question import Question
from hanzoai.cloud.models.rag_embed_result import RagEmbedResult
from hanzoai.cloud.models.reference_clear_reference_out import ReferenceClearReferenceOut
@@ -2511,6 +2534,7 @@ from hanzoai.cloud.models.risk_risk_topology import RiskRiskTopology
from hanzoai.cloud.models.risk_risk_trial import RiskRiskTrial
from hanzoai.cloud.models.risk_risk_value import RiskRiskValue
from hanzoai.cloud.models.root import Root
from hanzoai.cloud.models.routing_version import RoutingVersion
from hanzoai.cloud.models.runner_context import RunnerContext
from hanzoai.cloud.models.runner_declare_in import RunnerDeclareIn
from hanzoai.cloud.models.runner_declare_out import RunnerDeclareOut
@@ -2755,18 +2779,22 @@ from hanzoai.cloud.models.tool_authored_skill_list import ToolAuthoredSkillList
from hanzoai.cloud.models.tool_build_out import ToolBuildOut
from hanzoai.cloud.models.tool_build_request import ToolBuildRequest
from hanzoai.cloud.models.tool_create_server_req import ToolCreateServerReq
from hanzoai.cloud.models.tool_kit import ToolKit
from hanzoai.cloud.models.tool_mcp_listing import ToolMCPListing
from hanzoai.cloud.models.tool_mcp_package import ToolMCPPackage
from hanzoai.cloud.models.tool_mcp_remote import ToolMCPRemote
from hanzoai.cloud.models.tool_mcp_server import ToolMCPServer
from hanzoai.cloud.models.tool_mcp_catalog import ToolMcpCatalog
from hanzoai.cloud.models.tool_mcp_server_list import ToolMcpServerList
from hanzoai.cloud.models.tool_mute_req import ToolMuteReq
from hanzoai.cloud.models.tool_plugin_deleted import ToolPluginDeleted
from hanzoai.cloud.models.tool_plugin_mount import ToolPluginMount
from hanzoai.cloud.models.tool_plugin_mount_list import ToolPluginMountList
from hanzoai.cloud.models.tool_price import ToolPrice
from hanzoai.cloud.models.tool_remote import ToolRemote
from hanzoai.cloud.models.tool_skill import ToolSkill
from hanzoai.cloud.models.tool_skill_deleted import ToolSkillDeleted
from hanzoai.cloud.models.tool_skill_doc import ToolSkillDoc
from hanzoai.cloud.models.tool_skill_in import ToolSkillIn
from hanzoai.cloud.models.tool_skill_written import ToolSkillWritten
from hanzoai.cloud.models.tool_source_tool_list import ToolSourceToolList
+3 -1
View File
@@ -29,6 +29,7 @@ class AiModelInfo(BaseModel):
AiModelInfo
""" # noqa: E501
access: Optional[AiModelAccessInfo] = None
canonical_slug: Optional[StrictStr] = None
context_window: Optional[StrictInt] = None
created: Optional[StrictInt] = None
id: Optional[StrictStr] = None
@@ -41,7 +42,7 @@ class AiModelInfo(BaseModel):
provider: Optional[StrictStr] = None
supports_tools: Optional[StrictBool] = None
supports_vision: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["access", "context_window", "created", "id", "max_output_tokens", "object", "outputs", "owned_by", "premium", "pricing", "provider", "supports_tools", "supports_vision"]
__properties: ClassVar[List[str]] = ["access", "canonical_slug", "context_window", "created", "id", "max_output_tokens", "object", "outputs", "owned_by", "premium", "pricing", "provider", "supports_tools", "supports_vision"]
model_config = ConfigDict(
populate_by_name=True,
@@ -101,6 +102,7 @@ class AiModelInfo(BaseModel):
_obj = cls.model_validate({
"access": AiModelAccessInfo.from_dict(obj["access"]) if obj.get("access") is not None else None,
"canonical_slug": obj.get("canonical_slug"),
"context_window": obj.get("context_window"),
"created": obj.get("created"),
"id": obj.get("id"),
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
@@ -26,9 +26,11 @@ class AiModelPricingInfo(BaseModel):
"""
AiModelPricingInfo
""" # noqa: E501
input: Optional[Union[StrictFloat, StrictInt]] = None
output: Optional[Union[StrictFloat, StrictInt]] = None
__properties: ClassVar[List[str]] = ["input", "output"]
completion: Optional[StrictStr] = None
input_per_million: Optional[Union[StrictFloat, StrictInt]] = None
output_per_million: Optional[Union[StrictFloat, StrictInt]] = None
prompt: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["completion", "input_per_million", "output_per_million", "prompt"]
model_config = ConfigDict(
populate_by_name=True,
@@ -81,8 +83,10 @@ class AiModelPricingInfo(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"input": obj.get("input"),
"output": obj.get("output")
"completion": obj.get("completion"),
"input_per_million": obj.get("input_per_million"),
"output_per_million": obj.get("output_per_million"),
"prompt": obj.get("prompt")
})
return _obj
+102
View File
@@ -0,0 +1,102 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AiRoutingEdit(BaseModel):
"""
AiRoutingEdit
""" # noqa: E501
base: Optional[StrictInt] = None
catalog: Optional[Any] = None
family: Optional[StrictStr] = None
model: Optional[StrictStr] = None
note: Optional[StrictStr] = None
version: Optional[StrictInt] = None
__properties: ClassVar[List[str]] = ["base", "catalog", "family", "model", "note", "version"]
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 AiRoutingEdit 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,
)
# set to None if catalog (nullable) is None
# and model_fields_set contains the field
if self.catalog is None and "catalog" in self.model_fields_set:
_dict['catalog'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AiRoutingEdit from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"base": obj.get("base"),
"catalog": obj.get("catalog"),
"family": obj.get("family"),
"model": obj.get("model"),
"note": obj.get("note"),
"version": obj.get("version")
})
return _obj
@@ -0,0 +1,97 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AiRoutingProbe(BaseModel):
"""
AiRoutingProbe
""" # noqa: E501
arm: Optional[StrictStr] = None
failover: Optional[StrictStr] = None
ms: Optional[StrictInt] = None
reply: Optional[StrictStr] = None
sku: Optional[StrictStr] = None
status: Optional[StrictInt] = None
__properties: ClassVar[List[str]] = ["arm", "failover", "ms", "reply", "sku", "status"]
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 AiRoutingProbe 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 AiRoutingProbe from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"arm": obj.get("arm"),
"failover": obj.get("failover"),
"ms": obj.get("ms"),
"reply": obj.get("reply"),
"sku": obj.get("sku"),
"status": obj.get("status")
})
return _obj
@@ -0,0 +1,91 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AiRoutingProposal(BaseModel):
"""
AiRoutingProposal
""" # noqa: E501
base: Optional[StrictInt] = None
diff: Optional[StrictStr] = None
family: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["base", "diff", "family"]
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 AiRoutingProposal 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 AiRoutingProposal from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"base": obj.get("base"),
"diff": obj.get("diff"),
"family": obj.get("family")
})
return _obj
+120
View File
@@ -0,0 +1,120 @@
# 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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.routing_version import RoutingVersion
from typing import Optional, Set
from typing_extensions import Self
class AiRoutingView(BaseModel):
"""
AiRoutingView
""" # noqa: E501
catalog: Optional[Any] = None
drift: Optional[StrictBool] = None
error: Optional[StrictStr] = None
family: Optional[StrictStr] = None
stats: Optional[Any] = None
version: Optional[RoutingVersion] = None
versions: Optional[List[RoutingVersion]] = None
__properties: ClassVar[List[str]] = ["catalog", "drift", "error", "family", "stats", "version", "versions"]
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 AiRoutingView 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,
)
# override the default output from pydantic by calling `to_dict()` of version
if self.version:
_dict['version'] = self.version.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in versions (list)
_items = []
if self.versions:
for _item_versions in self.versions:
if _item_versions:
_items.append(_item_versions.to_dict())
_dict['versions'] = _items
# set to None if catalog (nullable) is None
# and model_fields_set contains the field
if self.catalog is None and "catalog" in self.model_fields_set:
_dict['catalog'] = None
# set to None if stats (nullable) is None
# and model_fields_set contains the field
if self.stats is None and "stats" in self.model_fields_set:
_dict['stats'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AiRoutingView from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"catalog": obj.get("catalog"),
"drift": obj.get("drift"),
"error": obj.get("error"),
"family": obj.get("family"),
"stats": obj.get("stats"),
"version": RoutingVersion.from_dict(obj["version"]) if obj.get("version") is not None else None,
"versions": [RoutingVersion.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None
})
return _obj
+119
View File
@@ -0,0 +1,119 @@
# 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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_last_run import AutoLastRun
from hanzoai.cloud.models.auto_schedule import AutoSchedule
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomation(BaseModel):
"""
AutoAutomation
""" # noqa: E501
created: Optional[StrictStr] = Field(default=None, description="Created and Updated are RFC 3339 UTC.")
enabled: Optional[StrictBool] = Field(default=None, description="Enabled is whether its schedule is armed.")
id: Optional[StrictStr] = Field(default=None, description="ID is the automation's id, which is also its flow's.")
instructions: Optional[StrictStr] = Field(default=None, description="Instructions are what the agent is asked to do each run.")
last: Optional[AutoLastRun] = Field(default=None, description="Last is its most recent run that was not skipped; null before the first.")
model: Optional[StrictStr] = Field(default=None, description="Model is the model the agent thinks with; null for the default.")
name: Optional[StrictStr] = Field(default=None, description="Name is what it is called.")
next: Optional[StrictStr] = Field(default=None, description="Next is when it runs next, RFC 3339 UTC; null when manual or disabled.")
notify: Optional[StrictBool] = Field(default=None, description="Notify sends a one-line summary to the automation's person when a run ends.")
permissions: Optional[StrictStr] = Field(default=None, description="Permissions is auto (works and uses connectors without stopping) or ask (changes nothing and ends with the actions it proposes; agent.go agentTask).")
project: Optional[StrictStr] = Field(default=None, description="Project is the Dev project the run works in, by its slug; null for none.")
schedule: Optional[AutoSchedule] = Field(default=None, description="Schedule is when it runs.")
updated: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["created", "enabled", "id", "instructions", "last", "model", "name", "next", "notify", "permissions", "project", "schedule", "updated"]
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 AutoAutomation 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,
)
# override the default output from pydantic by calling `to_dict()` of last
if self.last:
_dict['last'] = self.last.to_dict()
# override the default output from pydantic by calling `to_dict()` of schedule
if self.schedule:
_dict['schedule'] = self.schedule.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoAutomation from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"created": obj.get("created"),
"enabled": obj.get("enabled"),
"id": obj.get("id"),
"instructions": obj.get("instructions"),
"last": AutoLastRun.from_dict(obj["last"]) if obj.get("last") is not None else None,
"model": obj.get("model"),
"name": obj.get("name"),
"next": obj.get("next"),
"notify": obj.get("notify"),
"permissions": obj.get("permissions"),
"project": obj.get("project"),
"schedule": AutoSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None,
"updated": obj.get("updated")
})
return _obj
@@ -0,0 +1,103 @@
# 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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_schedule import AutoSchedule
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomationIn(BaseModel):
"""
AutoAutomationIn
""" # noqa: E501
instructions: Optional[StrictStr] = Field(default=None, description="Instructions are what the agent is asked to do each run. Required.")
model: Optional[StrictStr] = Field(default=None, description="Model is the model id to think with. Optional; absent is the default.")
name: Optional[StrictStr] = Field(default=None, description="Name is what it is called. Required.")
notify: Optional[StrictBool] = Field(default=None, description="Notify sends a one-line summary when a run ends.")
permissions: Optional[StrictStr] = Field(default=None, description="Permissions is auto (works without stopping) or ask (proposes, changes nothing). Absent is ask.")
project: Optional[StrictStr] = Field(default=None, description="Project is a Dev project's slug to work in. Optional.")
schedule: Optional[AutoSchedule] = Field(default=None, description="Schedule is when it runs. Absent runs it only on demand.")
__properties: ClassVar[List[str]] = ["instructions", "model", "name", "notify", "permissions", "project", "schedule"]
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 AutoAutomationIn 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,
)
# override the default output from pydantic by calling `to_dict()` of schedule
if self.schedule:
_dict['schedule'] = self.schedule.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoAutomationIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"instructions": obj.get("instructions"),
"model": obj.get("model"),
"name": obj.get("name"),
"notify": obj.get("notify"),
"permissions": obj.get("permissions"),
"project": obj.get("project"),
"schedule": AutoSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
})
return _obj
@@ -0,0 +1,95 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_automation import AutoAutomation
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomationPage(BaseModel):
"""
AutoAutomationPage
""" # noqa: E501
data: Optional[List[AutoAutomation]] = Field(default=None, description="Data is the org's automations.")
__properties: ClassVar[List[str]] = ["data"]
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 AutoAutomationPage 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,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoAutomationPage from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [AutoAutomation.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj
@@ -0,0 +1,107 @@
# 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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_schedule import AutoSchedule
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomationPatch(BaseModel):
"""
AutoAutomationPatch
""" # noqa: E501
enabled: Optional[StrictBool] = Field(default=None, description="Enabled arms or disarms its schedule.")
id: Optional[StrictStr] = Field(default=None, description="ID is the automation, from the path.")
instructions: Optional[StrictStr] = None
model: Optional[StrictStr] = None
name: Optional[StrictStr] = None
notify: Optional[StrictBool] = None
permissions: Optional[StrictStr] = None
project: Optional[StrictStr] = None
schedule: Optional[AutoSchedule] = None
__properties: ClassVar[List[str]] = ["enabled", "id", "instructions", "model", "name", "notify", "permissions", "project", "schedule"]
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 AutoAutomationPatch 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,
)
# override the default output from pydantic by calling `to_dict()` of schedule
if self.schedule:
_dict['schedule'] = self.schedule.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoAutomationPatch from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"enabled": obj.get("enabled"),
"id": obj.get("id"),
"instructions": obj.get("instructions"),
"model": obj.get("model"),
"name": obj.get("name"),
"notify": obj.get("notify"),
"permissions": obj.get("permissions"),
"project": obj.get("project"),
"schedule": AutoSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
})
return _obj
@@ -0,0 +1,97 @@
# 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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomationRun(BaseModel):
"""
AutoAutomationRun
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is when it started and Finished when it ended (null while it runs), RFC 3339 UTC.")
finished: Optional[StrictStr] = None
id: Optional[StrictStr] = None
status: Optional[StrictStr] = Field(default=None, description="Status is succeeded, failed, running, queued, skipped for a start that found the previous run still going, or refused for a run whose person is no longer a member of the org.")
summary: Optional[StrictStr] = Field(default=None, description="Summary is one line on how it went.")
transcript: Optional[StrictStr] = Field(default=None, description="Transcript opens the run's Dev run; null when it started none.")
__properties: ClassVar[List[str]] = ["at", "finished", "id", "status", "summary", "transcript"]
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 AutoAutomationRun 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 AutoAutomationRun from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"at": obj.get("at"),
"finished": obj.get("finished"),
"id": obj.get("id"),
"status": obj.get("status"),
"summary": obj.get("summary"),
"transcript": obj.get("transcript")
})
return _obj
@@ -0,0 +1,95 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_automation_run import AutoAutomationRun
from typing import Optional, Set
from typing_extensions import Self
class AutoAutomationRunPage(BaseModel):
"""
AutoAutomationRunPage
""" # noqa: E501
data: Optional[List[AutoAutomationRun]] = Field(default=None, description="Data is the automation's runs, newest first.")
__properties: ClassVar[List[str]] = ["data"]
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 AutoAutomationRunPage 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,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoAutomationRunPage from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [AutoAutomationRun.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj
+93
View File
@@ -0,0 +1,93 @@
# 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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AutoLastRun(BaseModel):
"""
AutoLastRun
""" # noqa: E501
at: Optional[StrictStr] = None
id: Optional[StrictStr] = None
status: Optional[StrictStr] = Field(default=None, description="Status is succeeded, failed, running or queued.")
summary: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["at", "id", "status", "summary"]
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 AutoLastRun 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 AutoLastRun from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"at": obj.get("at"),
"id": obj.get("id"),
"status": obj.get("status"),
"summary": obj.get("summary")
})
return _obj
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AutoRunHandle(BaseModel):
"""
AutoRunHandle
""" # noqa: E501
id: Optional[StrictStr] = None
status: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["id", "status"]
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 AutoRunHandle 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 AutoRunHandle from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"status": obj.get("status")
})
return _obj
@@ -0,0 +1,91 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_run_handle import AutoRunHandle
from typing import Optional, Set
from typing_extensions import Self
class AutoRunStarted(BaseModel):
"""
AutoRunStarted
""" # noqa: E501
run: Optional[AutoRunHandle] = Field(default=None, description="Run is the run this started, or the skipped start when one was going.")
__properties: ClassVar[List[str]] = ["run"]
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 AutoRunStarted 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,
)
# override the default output from pydantic by calling `to_dict()` of run
if self.run:
_dict['run'] = self.run.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoRunStarted from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"run": AutoRunHandle.from_dict(obj["run"]) if obj.get("run") is not None else None
})
return _obj
+95
View File
@@ -0,0 +1,95 @@
# 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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AutoSchedule(BaseModel):
"""
AutoSchedule
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is the local time, HH:MM on a 24-hour clock, for daily, weekdays and weekly. Hourly takes its minute, and runs on the hour without one.")
cron: Optional[StrictStr] = Field(default=None, description="Cron is a five-field cron expression (minute hour day-of-month month day-of-week), for kind cron only, read in TZ.")
day: Optional[StrictStr] = Field(default=None, description="Day is the weekday a weekly schedule runs on: mon, tue, wed, thu, fri, sat or sun.")
kind: Optional[StrictStr] = Field(default=None, description="Kind is manual, hourly, daily, weekdays, weekly or cron. Manual runs only when asked.")
tz: Optional[StrictStr] = Field(default=None, description="TZ is the IANA time zone every time here is read in. Empty is UTC.")
__properties: ClassVar[List[str]] = ["at", "cron", "day", "kind", "tz"]
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 AutoSchedule 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 AutoSchedule from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"at": obj.get("at"),
"cron": obj.get("cron"),
"day": obj.get("day"),
"kind": obj.get("kind"),
"tz": obj.get("tz")
})
return _obj
+101
View File
@@ -0,0 +1,101 @@
# 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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_schedule import AutoSchedule
from typing import Optional, Set
from typing_extensions import Self
class AutoStarter(BaseModel):
"""
AutoStarter
""" # noqa: E501
description: Optional[StrictStr] = None
icon: Optional[StrictStr] = None
instructions: Optional[StrictStr] = None
key: Optional[StrictStr] = None
name: Optional[StrictStr] = None
schedule: Optional[AutoSchedule] = None
__properties: ClassVar[List[str]] = ["description", "icon", "instructions", "key", "name", "schedule"]
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 AutoStarter 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,
)
# override the default output from pydantic by calling `to_dict()` of schedule
if self.schedule:
_dict['schedule'] = self.schedule.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoStarter from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"description": obj.get("description"),
"icon": obj.get("icon"),
"instructions": obj.get("instructions"),
"key": obj.get("key"),
"name": obj.get("name"),
"schedule": AutoSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None
})
return _obj
@@ -0,0 +1,95 @@
# 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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.auto_starter import AutoStarter
from typing import Optional, Set
from typing_extensions import Self
class AutoStarterPage(BaseModel):
"""
AutoStarterPage
""" # noqa: E501
data: Optional[List[AutoStarter]] = Field(default=None, description="Data is the starters.")
__properties: ClassVar[List[str]] = ["data"]
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 AutoStarterPage 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,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AutoStarterPage from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [AutoStarter.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj
@@ -40,12 +40,13 @@ class BillingSubscription(BaseModel):
plan_id: Optional[StrictStr] = Field(default=None, description="PlanID is the plan slug, e.g. \"max-20x\".", alias="planId")
provider_type: Optional[StrictStr] = Field(default=None, description="ProviderType is who collects it: a processor (\"square\"), \"credit\" for a plan bought with credits, \"internal\" or \"bundle\" for a row nobody paid for.", alias="providerType")
quantity: Optional[StrictInt] = Field(default=None, description="Quantity is the seat count; a flat plan holds 1.")
settled: Optional[StrictStr] = Field(default=None, description="Settled is how the period in hand was paid: \"card\" (a card paid all of it), \"external:<processor>\" (a payment recorded as collected outside commerce), \"balance\", \"credit\" or \"mixed\" (prepaid money). Empty when unpaid or unknown.")
status: Optional[StrictStr] = Field(default=None, description="Status is trialing, active, past_due, canceled or unpaid. Only active and trialing confer the plan.")
trial_end: Optional[StrictStr] = Field(default=None, description="TrialEnd is when that trial ends; absent when there was none.", alias="trialEnd")
trial_start: Optional[StrictStr] = Field(default=None, description="TrialStart is when a trial began; absent when there was none.", alias="trialStart")
updated_at: Optional[StrictStr] = Field(default=None, description="UpdatedAt is when the row last changed, RFC 3339.", alias="updatedAt")
user_id: Optional[StrictStr] = Field(default=None, description="UserID is the billing account that holds it: the org slug for an org's own plan, \"<org>/<name>\" for a member's.", alias="userId")
__properties: ClassVar[List[str]] = ["cancelAtPeriodEnd", "canceledAt", "createdAt", "currentPeriodEnd", "currentPeriodStart", "defaultPaymentMethod", "endedAt", "id", "mrrCents", "plan", "planId", "providerType", "quantity", "status", "trialEnd", "trialStart", "updatedAt", "userId"]
__properties: ClassVar[List[str]] = ["cancelAtPeriodEnd", "canceledAt", "createdAt", "currentPeriodEnd", "currentPeriodStart", "defaultPaymentMethod", "endedAt", "id", "mrrCents", "plan", "planId", "providerType", "quantity", "settled", "status", "trialEnd", "trialStart", "updatedAt", "userId"]
model_config = ConfigDict(
populate_by_name=True,
@@ -114,6 +115,7 @@ class BillingSubscription(BaseModel):
"planId": obj.get("planId"),
"providerType": obj.get("providerType"),
"quantity": obj.get("quantity"),
"settled": obj.get("settled"),
"status": obj.get("status"),
"trialEnd": obj.get("trialEnd"),
"trialStart": obj.get("trialStart"),
@@ -0,0 +1,113 @@
# 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, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.ai_routing_view import AiRoutingView
from typing import Optional, Set
from typing_extensions import Self
class GetAiRouterCatalog200Response(BaseModel):
"""
GetAiRouterCatalog200Response
""" # noqa: E501
data: Optional[List[AiRoutingView]] = None
data2: Optional[Any] = None
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
status: StrictStr
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['ok', 'error']):
raise ValueError("must be one of enum values ('ok', 'error')")
return value
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 GetAiRouterCatalog200Response 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,
)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.data:
for _item_data in self.data:
if _item_data:
_items.append(_item_data.to_dict())
_dict['data'] = _items
# set to None if data2 (nullable) is None
# and model_fields_set contains the field
if self.data2 is None and "data2" in self.model_fields_set:
_dict['data2'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetAiRouterCatalog200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [AiRoutingView.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
"data2": obj.get("data2"),
"msg": obj.get("msg"),
"status": obj.get("status")
})
return _obj
@@ -81,6 +81,7 @@ class IamCreateOrganizationInput(BaseModel):
password_options: Optional[List[StrictStr]] = Field(default=None, alias="passwordOptions")
password_salt: Optional[StrictStr] = Field(default=None, alias="passwordSalt")
password_type: Optional[StrictStr] = Field(default=None, alias="passwordType")
platform: Optional[StrictBool] = None
tags: Optional[List[StrictStr]] = None
theme_data: Optional[IamThemeData] = Field(default=None, alias="themeData")
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
@@ -91,7 +92,7 @@ class IamCreateOrganizationInput(BaseModel):
user_types: Optional[List[StrictStr]] = Field(default=None, alias="userTypes")
website_url: Optional[StrictStr] = Field(default=None, alias="websiteUrl")
widget_items: Optional[List[StrictStr]] = Field(default=None, alias="widgetItems")
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "platform", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
model_config = ConfigDict(
populate_by_name=True,
@@ -212,6 +213,7 @@ class IamCreateOrganizationInput(BaseModel):
"passwordOptions": obj.get("passwordOptions"),
"passwordSalt": obj.get("passwordSalt"),
"passwordType": obj.get("passwordType"),
"platform": obj.get("platform"),
"tags": obj.get("tags"),
"themeData": IamThemeData.from_dict(obj["themeData"]) if obj.get("themeData") is not None else None,
"updatedAt": obj.get("updatedAt"),
+3 -1
View File
@@ -81,6 +81,7 @@ class IamOrganization(BaseModel):
password_options: Optional[List[StrictStr]] = Field(default=None, alias="passwordOptions")
password_salt: Optional[StrictStr] = Field(default=None, alias="passwordSalt")
password_type: Optional[StrictStr] = Field(default=None, alias="passwordType")
platform: Optional[StrictBool] = Field(default=None, description="Platform marks an organization the platform itself declares (init_data.json): the brand orgs and the others the seed creates, never one a customer made. The seed stamps it on every declared organization at boot, and no request sets or clears it. Only a SuperAdmin may delete an organization that carries it.")
tags: Optional[List[StrictStr]] = None
theme_data: Optional[IamThemeData] = Field(default=None, alias="themeData")
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
@@ -91,7 +92,7 @@ class IamOrganization(BaseModel):
user_types: Optional[List[StrictStr]] = Field(default=None, alias="userTypes")
website_url: Optional[StrictStr] = Field(default=None, alias="websiteUrl")
widget_items: Optional[List[StrictStr]] = Field(default=None, alias="widgetItems")
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "platform", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
model_config = ConfigDict(
populate_by_name=True,
@@ -212,6 +213,7 @@ class IamOrganization(BaseModel):
"passwordOptions": obj.get("passwordOptions"),
"passwordSalt": obj.get("passwordSalt"),
"passwordType": obj.get("passwordType"),
"platform": obj.get("platform"),
"tags": obj.get("tags"),
"themeData": IamThemeData.from_dict(obj["themeData"]) if obj.get("themeData") is not None else None,
"updatedAt": obj.get("updatedAt"),
@@ -0,0 +1,87 @@
# 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, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class IamReleaseOutput(BaseModel):
"""
IamReleaseOutput
""" # noqa: E501
released: Optional[StrictBool] = None
__properties: ClassVar[List[str]] = ["released"]
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 IamReleaseOutput 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 IamReleaseOutput from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"released": obj.get("released")
})
return _obj
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class IamTermsBody(BaseModel):
"""
IamTermsBody
""" # noqa: E501
aup: Optional[StrictStr] = None
terms: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["aup", "terms"]
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 IamTermsBody 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 IamTermsBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"aup": obj.get("aup"),
"terms": obj.get("terms")
})
return _obj
+102
View File
@@ -0,0 +1,102 @@
# 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 datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class IamTombstone(BaseModel):
"""
IamTombstone
""" # noqa: E501
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
deleted: Optional[StrictBool] = None
founder: Optional[StrictStr] = Field(default=None, description="Founder carries the deleted org's founder, so an org counted against its founder's cap stays counted after it is deleted.")
id: Optional[StrictStr] = None
name: Optional[StrictStr] = Field(default=None, description="the organization's name")
owner: Optional[StrictStr] = Field(default=None, description="the admin registry, as for organizations")
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
__properties: ClassVar[List[str]] = ["createdAt", "createdTime", "deleted", "founder", "id", "name", "owner", "updatedAt"]
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 IamTombstone 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 IamTombstone from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"createdAt": obj.get("createdAt"),
"createdTime": obj.get("createdTime"),
"deleted": obj.get("deleted"),
"founder": obj.get("founder"),
"id": obj.get("id"),
"name": obj.get("name"),
"owner": obj.get("owner"),
"updatedAt": obj.get("updatedAt")
})
return _obj
@@ -81,6 +81,7 @@ class IamUpdateOrganizationInput(BaseModel):
password_options: Optional[List[StrictStr]] = Field(default=None, alias="passwordOptions")
password_salt: Optional[StrictStr] = Field(default=None, alias="passwordSalt")
password_type: Optional[StrictStr] = Field(default=None, alias="passwordType")
platform: Optional[StrictBool] = None
tags: Optional[List[StrictStr]] = None
theme_data: Optional[IamThemeData] = Field(default=None, alias="themeData")
updated_at: Optional[datetime] = Field(default=None, alias="updatedAt")
@@ -91,7 +92,7 @@ class IamUpdateOrganizationInput(BaseModel):
user_types: Optional[List[StrictStr]] = Field(default=None, alias="userTypes")
website_url: Optional[StrictStr] = Field(default=None, alias="websiteUrl")
widget_items: Optional[List[StrictStr]] = Field(default=None, alias="widgetItems")
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
__properties: ClassVar[List[str]] = ["accountItems", "accountMenu", "avatar", "balanceCredit", "balanceCurrency", "countryCodes", "createdAt", "createdTime", "dcrPolicy", "defaultApplication", "defaultAvatar", "defaultPassword", "deleted", "disableSignin", "displayName", "emoji", "enableSoftDeletion", "enableTour", "failedSigninFrozenTime", "failedSigninLimit", "favicon", "founder", "hasPrivilegeConsent", "id", "initScore", "ipRestriction", "ipWhitelist", "isPersonal", "isProfilePublic", "kerberosKdcHost", "kerberosKeytab", "kerberosRealm", "kerberosServiceName", "languages", "ldapAttributes", "logo", "logoDark", "masterPassword", "masterVerificationCode", "mfaItems", "mfaRememberInHours", "name", "navItems", "orgBalance", "owner", "passwordExpireDays", "passwordObfuscatorKey", "passwordObfuscatorType", "passwordOptions", "passwordSalt", "passwordType", "platform", "tags", "themeData", "updatedAt", "useEmailAsUsername", "usePermanentAvatar", "userBalance", "userNavItems", "userTypes", "websiteUrl", "widgetItems"]
model_config = ConfigDict(
populate_by_name=True,
@@ -212,6 +213,7 @@ class IamUpdateOrganizationInput(BaseModel):
"passwordOptions": obj.get("passwordOptions"),
"passwordSalt": obj.get("passwordSalt"),
"passwordType": obj.get("passwordType"),
"platform": obj.get("platform"),
"tags": obj.get("tags"),
"themeData": IamThemeData.from_dict(obj["themeData"]) if obj.get("themeData") is not None else None,
"updatedAt": obj.get("updatedAt"),
@@ -0,0 +1,109 @@
# 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, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.ai_routing_proposal import AiRoutingProposal
from typing import Optional, Set
from typing_extensions import Self
class PostAiRouterCatalogPropose200Response(BaseModel):
"""
PostAiRouterCatalogPropose200Response
""" # noqa: E501
data: Optional[AiRoutingProposal] = None
data2: Optional[Any] = None
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
status: StrictStr
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['ok', 'error']):
raise ValueError("must be one of enum values ('ok', 'error')")
return value
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 PostAiRouterCatalogPropose200Response 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,
)
# override the default output from pydantic by calling `to_dict()` of data
if self.data:
_dict['data'] = self.data.to_dict()
# set to None if data2 (nullable) is None
# and model_fields_set contains the field
if self.data2 is None and "data2" in self.model_fields_set:
_dict['data2'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PostAiRouterCatalogPropose200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": AiRoutingProposal.from_dict(obj["data"]) if obj.get("data") is not None else None,
"data2": obj.get("data2"),
"msg": obj.get("msg"),
"status": obj.get("status")
})
return _obj
@@ -0,0 +1,109 @@
# 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, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.ai_routing_probe import AiRoutingProbe
from typing import Optional, Set
from typing_extensions import Self
class PostAiRouterCatalogTest200Response(BaseModel):
"""
PostAiRouterCatalogTest200Response
""" # noqa: E501
data: Optional[AiRoutingProbe] = None
data2: Optional[Any] = None
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
status: StrictStr
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['ok', 'error']):
raise ValueError("must be one of enum values ('ok', 'error')")
return value
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 PostAiRouterCatalogTest200Response 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,
)
# override the default output from pydantic by calling `to_dict()` of data
if self.data:
_dict['data'] = self.data.to_dict()
# set to None if data2 (nullable) is None
# and model_fields_set contains the field
if self.data2 is None and "data2" in self.model_fields_set:
_dict['data2'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PostAiRouterCatalogTest200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": AiRoutingProbe.from_dict(obj["data"]) if obj.get("data") is not None else None,
"data2": obj.get("data2"),
"msg": obj.get("msg"),
"status": obj.get("status")
})
return _obj
@@ -28,6 +28,8 @@ class ProjectProjectsComplete(BaseModel):
""" # noqa: E501
bytes: Optional[StrictInt] = Field(default=None, description="Bytes is their total size in bytes.")
commit: Optional[StrictStr] = Field(default=None, description="Commit is the revision that was built, recorded on the deployment.")
copy: Optional[List[StrictStr]] = Field(default=None, description="Copy lists the keys to take from CopyFrom's prefix, relative to it. They are also named in Keys, which stays the whole release.")
copy_from: Optional[StrictStr] = Field(default=None, description="CopyFrom names another site of the same org whose prefix already holds the bytes of Copy. A host that shares a build with another differs from it by a page or two, so CI uploads those and asks for the rest to be copied inside the object store instead of sent again over the runner's link.", alias="copyFrom")
files: Optional[StrictInt] = Field(default=None, description="Files is how many objects CI published.")
id: Optional[StrictStr] = Field(default=None, description="ID is the queued deployment to complete, from the path.")
keys: Optional[List[StrictStr]] = Field(default=None, description="Keys is the manifest CI just uploaded, RELATIVE to the deployment prefix. It is what replaces `aws s3 sync --delete`: an upload grant authorizes writes only, so CI cannot remove a file, and cloud reconciles the prefix against this list instead (grant.go). Omit it and nothing is deleted — the prefix only grows, which is the old pre-grant behaviour and a safe default.")
@@ -35,7 +37,7 @@ class ProjectProjectsComplete(BaseModel):
message: Optional[StrictStr] = Field(default=None, description="Message is what happened, in words — on an error completion, why it failed.")
slug: Optional[StrictStr] = Field(default=None, description="Slug is the project the deployment belongs to, from the path.")
status: Optional[StrictStr] = Field(default=None, description="Status is how the build ended: `live` if it succeeded, `error` if it did not. Nothing else is accepted.")
__properties: ClassVar[List[str]] = ["bytes", "commit", "files", "id", "keys", "liveUrl", "message", "slug", "status"]
__properties: ClassVar[List[str]] = ["bytes", "commit", "copy", "copyFrom", "files", "id", "keys", "liveUrl", "message", "slug", "status"]
model_config = ConfigDict(
populate_by_name=True,
@@ -90,6 +92,8 @@ class ProjectProjectsComplete(BaseModel):
_obj = cls.model_validate({
"bytes": obj.get("bytes"),
"commit": obj.get("commit"),
"copy": obj.get("copy"),
"copyFrom": obj.get("copyFrom"),
"files": obj.get("files"),
"id": obj.get("id"),
"keys": obj.get("keys"),
@@ -39,6 +39,7 @@ class ProjectProjectsProject(BaseModel):
hidden: Optional[StrictBool] = Field(default=None, description="Hidden is PLATFORM MODERATION, and it is a different axis from visibility: it pulls a public project out of the catalogue without editing the publisher's own choice, so un-hiding restores exactly what they asked for. A project is listed only when it is public AND not hidden. Always present, never omitted, for the same reason as visibility.")
hidden_reason: Optional[StrictStr] = Field(default=None, description="HiddenReason is why moderation hid it. Absent when it is not hidden.", alias="hiddenReason")
id: Optional[StrictStr] = Field(default=None, description="ID is the project's internal identifier. It is stable across a rename, but it is not what the API addresses this project by — `slug` is.")
internal_networks: Optional[List[StrictStr]] = Field(default=None, description="InternalNetworks are the site's own addresses, as CIDRs (\"203.0.113.0/24\"). A visit from one is the site's team: the tag config answers audience \"internal\" (Google Analytics tagged internal, no ad pixel) and its events are stamped internal and forwarded to no ad platform. Empty unless set.", alias="internalNetworks")
key: Optional[StrictStr] = Field(default=None, description="Key is the project's publishable ingest key, minted at create. It is the value the injected beacon carries and the ONE thing that attributes this site's events; the static-builder reads it beside analytics. Publishable means it belongs in a page's source: it names a write scope and mints no principal, so it is returned in full rather than masked. Masking it would only mean every caller needed a second endpoint to get the thing the page already ships.")
last_purge_at: Optional[StrictInt] = Field(default=None, description="LastPurgeAt is when the edge cache was last cleared, as Unix seconds, so a console can say how fresh what readers see actually is. Absent means never.", alias="lastPurgeAt")
license: Optional[StrictStr] = Field(default=None, description="License is the terms that upstream work carries. Absent has the same reading: undeclared, not unencumbered.")
@@ -54,7 +55,7 @@ class ProjectProjectsProject(BaseModel):
updated_at: Optional[StrictInt] = Field(default=None, description="UpdatedAt is when the project's own record last changed, as Unix seconds. A deploy is not an edit of the project, so this does not move on every publish.", alias="updatedAt")
upstream: Optional[StrictStr] = Field(default=None, description="Upstream credits the third-party work this project was published from — a free-text line, because the honest answer is a name and a title that no enum could hold. Absent means NOBODY HAS SAID, not that there is nothing to say.")
visibility: Optional[StrictStr] = Field(default=None, description="Visibility is \"public\" or \"private\", and Hidden reports platform moderation. Both are always present (never omitempty) so a consumer can tell a real answer from \"this API is too old to say\" — and so a console never renders a project as public because a field was missing. Authorship is deliberately absent: it is Org, above.")
__properties: ClassVar[List[str]] = ["analytics", "bucket", "cacheControl", "createdAt", "currentDeploymentId", "description", "dropLocal", "forkedFrom", "framework", "hidden", "hiddenReason", "id", "key", "lastPurgeAt", "license", "liveUrl", "name", "org", "repo", "slug", "space", "starred", "status", "tags", "updatedAt", "upstream", "visibility"]
__properties: ClassVar[List[str]] = ["analytics", "bucket", "cacheControl", "createdAt", "currentDeploymentId", "description", "dropLocal", "forkedFrom", "framework", "hidden", "hiddenReason", "id", "internalNetworks", "key", "lastPurgeAt", "license", "liveUrl", "name", "org", "repo", "slug", "space", "starred", "status", "tags", "updatedAt", "upstream", "visibility"]
model_config = ConfigDict(
populate_by_name=True,
@@ -122,6 +123,7 @@ class ProjectProjectsProject(BaseModel):
"hidden": obj.get("hidden"),
"hiddenReason": obj.get("hiddenReason"),
"id": obj.get("id"),
"internalNetworks": obj.get("internalNetworks"),
"key": obj.get("key"),
"lastPurgeAt": obj.get("lastPurgeAt"),
"license": obj.get("license"),
@@ -33,6 +33,7 @@ class ProjectProjectsUpdate(BaseModel):
framework: Optional[StrictStr] = Field(default=None, description="Framework replaces the build hint. It affects the NEXT build only — nothing already deployed is rebuilt.")
hidden: Optional[StrictBool] = Field(default=None, description="Hidden is MODERATION, and the only admin-gated field on this body: it pulls a public project out of the catalogue from admin.hanzo.ai without editing the publisher's own visibility choice, so un-hiding restores exactly what they asked for. A tenant sending it is ignored.")
hidden_reason: Optional[StrictStr] = Field(default=None, description="HiddenReason records WHY moderation hid it, so the action can be explained and reviewed later. Admin-gated like hidden itself.", alias="hiddenReason")
internal_networks: Optional[List[StrictStr]] = Field(default=None, description="InternalNetworks replaces the site's own addresses: CIDRs or bare addresses, at most 64. Absent leaves them; send [] to clear.", alias="internalNetworks")
license: Optional[StrictStr] = Field(default=None, description="License is the terms that upstream work carries, with the same clear-versus- leave rule.")
name: Optional[StrictStr] = Field(default=None, description="Name replaces the display name. Absent leaves it; the slug never moves with it.")
repo: Optional[ProjectProjectsUpdateRepo] = None
@@ -40,7 +41,7 @@ class ProjectProjectsUpdate(BaseModel):
tags: Optional[Dict[str, StrictStr]] = Field(default=None, description="Tags sets the site's browser tag config: platform slug → non-secret pixel id (e.g. {\"ga4\":\"G-…\",\"meta\":\"…\"}). track.js injects these first-party and the server CAPI reads them, per site. Absent LEAVES them; a present object REPLACES the set (send {} to clear). The ids are public — they ship in the page — so this is not the SECRET path (a CAPI token is sealed via POST /v1/destination).")
upstream: Optional[StrictStr] = Field(default=None, description="Upstream credits the third-party work this project was published from, and is settable after the fact because the live demos are the ones that most need crediting. An explicit empty string CLEARS the credit; absent leaves it.")
visibility: Optional[StrictStr] = Field(default=None, description="Visibility flips an existing project between \"public\" and \"private\". Same ONE rule as at create: public is free, private needs a paid plan.")
__properties: ClassVar[List[str]] = ["cacheControl", "description", "dropLocal", "framework", "hidden", "hiddenReason", "license", "name", "repo", "slug", "tags", "upstream", "visibility"]
__properties: ClassVar[List[str]] = ["cacheControl", "description", "dropLocal", "framework", "hidden", "hiddenReason", "internalNetworks", "license", "name", "repo", "slug", "tags", "upstream", "visibility"]
model_config = ConfigDict(
populate_by_name=True,
@@ -102,6 +103,7 @@ class ProjectProjectsUpdate(BaseModel):
"framework": obj.get("framework"),
"hidden": obj.get("hidden"),
"hiddenReason": obj.get("hiddenReason"),
"internalNetworks": obj.get("internalNetworks"),
"license": obj.get("license"),
"name": obj.get("name"),
"repo": ProjectProjectsUpdateRepo.from_dict(obj["repo"]) if obj.get("repo") is not None else None,
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -26,12 +26,13 @@ class ProjectProjectsUploadGrant(BaseModel):
"""
ProjectProjectsUploadGrant
""" # noqa: E501
copy: Optional[StrictBool] = Field(default=None, description="Copy is true when the completion of this deployment accepts copyFrom and copy. A client that does not see it uploads every object itself, since a server that ignores those fields would leave the copied keys missing.")
expires_at: Optional[StrictInt] = Field(default=None, description="ExpiresAt is when the grant stops being accepted, as Unix seconds. It is short-lived by design and is handed out ONCE, on the response that queues the deployment — a later read of that deployment does not carry it, so a grant cannot be fetched again after the build it was minted for.", alias="expiresAt")
fields: Optional[Dict[str, StrictStr]] = Field(default=None, description="Fields are form values every POST must carry VERBATIM, alongside `key` and `file`. The signature covers them, so altering any one of them — including widening the key to reach outside the prefix — invalidates the grant rather than extending it.")
max_bytes: Optional[StrictInt] = Field(default=None, description="MaxBytes bounds ONE object, not the upload as a whole.", alias="maxBytes")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix is the only place this grant can write: the deployment's own key prefix. It authorizes WRITES ONLY, which is why completing a deployment reconciles the prefix against a manifest instead of letting CI delete.")
url: Optional[StrictStr] = Field(default=None, description="URL is the address to POST each object to. It is signed for the PUBLIC endpoint, because the signature covers the host and CI posts from outside the cluster.")
__properties: ClassVar[List[str]] = ["expiresAt", "fields", "maxBytes", "prefix", "url"]
__properties: ClassVar[List[str]] = ["copy", "expiresAt", "fields", "maxBytes", "prefix", "url"]
model_config = ConfigDict(
populate_by_name=True,
@@ -84,6 +85,7 @@ class ProjectProjectsUploadGrant(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"copy": obj.get("copy"),
"expiresAt": obj.get("expiresAt"),
"fields": obj.get("fields"),
"maxBytes": obj.get("maxBytes"),
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
@@ -26,12 +26,13 @@ class ProjectsUploadGrant(BaseModel):
"""
ProjectsUploadGrant
""" # noqa: E501
copy: Optional[StrictBool] = None
expires_at: Optional[StrictInt] = Field(default=None, alias="expiresAt")
fields: Optional[Dict[str, StrictStr]] = None
max_bytes: Optional[StrictInt] = Field(default=None, alias="maxBytes")
prefix: Optional[StrictStr] = None
url: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["expiresAt", "fields", "maxBytes", "prefix", "url"]
__properties: ClassVar[List[str]] = ["copy", "expiresAt", "fields", "maxBytes", "prefix", "url"]
model_config = ConfigDict(
populate_by_name=True,
@@ -84,6 +85,7 @@ class ProjectsUploadGrant(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"copy": obj.get("copy"),
"expiresAt": obj.get("expiresAt"),
"fields": obj.get("fields"),
"maxBytes": obj.get("maxBytes"),
@@ -0,0 +1,109 @@
# 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, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.routing_version import RoutingVersion
from typing import Optional, Set
from typing_extensions import Self
class PutAiRouterCatalog200Response(BaseModel):
"""
PutAiRouterCatalog200Response
""" # noqa: E501
data: Optional[RoutingVersion] = None
data2: Optional[Any] = None
msg: StrictStr = Field(description="Empty on success, the reason on failure.")
status: StrictStr
__properties: ClassVar[List[str]] = ["data", "data2", "msg", "status"]
@field_validator('status')
def status_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['ok', 'error']):
raise ValueError("must be one of enum values ('ok', 'error')")
return value
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 PutAiRouterCatalog200Response 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,
)
# override the default output from pydantic by calling `to_dict()` of data
if self.data:
_dict['data'] = self.data.to_dict()
# set to None if data2 (nullable) is None
# and model_fields_set contains the field
if self.data2 is None and "data2" in self.model_fields_set:
_dict['data2'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PutAiRouterCatalog200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": RoutingVersion.from_dict(obj["data"]) if obj.get("data") is not None else None,
"data2": obj.get("data2"),
"msg": obj.get("msg"),
"status": obj.get("status")
})
return _obj
+103
View File
@@ -0,0 +1,103 @@
# 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 RoutingVersion(BaseModel):
"""
RoutingVersion
""" # noqa: E501
actor: Optional[StrictStr] = None
base: Optional[StrictInt] = None
catalog: Optional[StrictStr] = None
created_time: Optional[StrictStr] = Field(default=None, alias="createdTime")
diff: Optional[StrictStr] = None
family: Optional[StrictStr] = None
id: Optional[StrictInt] = None
note: Optional[StrictStr] = None
sum: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["actor", "base", "catalog", "createdTime", "diff", "family", "id", "note", "sum"]
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 RoutingVersion 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 RoutingVersion from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"actor": obj.get("actor"),
"base": obj.get("base"),
"catalog": obj.get("catalog"),
"createdTime": obj.get("createdTime"),
"diff": obj.get("diff"),
"family": obj.get("family"),
"id": obj.get("id"),
"note": obj.get("note"),
"sum": obj.get("sum")
})
return _obj
+4 -2
View File
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.browser_tag_out import BrowserTagOut
from hanzoai.cloud.models.decision import Decision
@@ -28,9 +28,10 @@ class TagConfig(BaseModel):
"""
TagConfig
""" # noqa: E501
audience: Optional[StrictStr] = None
consent: Optional[Decision] = None
tags: Optional[List[BrowserTagOut]] = None
__properties: ClassVar[List[str]] = ["consent", "tags"]
__properties: ClassVar[List[str]] = ["audience", "consent", "tags"]
model_config = ConfigDict(
populate_by_name=True,
@@ -93,6 +94,7 @@ class TagConfig(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"audience": obj.get("audience"),
"consent": Decision.from_dict(obj["consent"]) if obj.get("consent") is not None else None,
"tags": [BrowserTagOut.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None
})
+111
View File
@@ -0,0 +1,111 @@
# 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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.tool_remote import ToolRemote
from hanzoai.cloud.models.tool_skill_doc import ToolSkillDoc
from typing import Optional, Set
from typing_extensions import Self
class ToolKit(BaseModel):
"""
ToolKit
""" # noqa: E501
excess: Optional[List[StrictStr]] = Field(default=None, description="Excess are servers left out, by id, because a run carries only so many.")
muted: Optional[List[StrictStr]] = Field(default=None, description="Muted are the names the run's person took out of their own runs — a skill, a server's tool, or a server by its id. None of them is above.")
omitted: Optional[List[StrictStr]] = Field(default=None, description="Omitted are activated skills left out because a run carries only so many.")
servers: Optional[List[ToolRemote]] = Field(default=None, description="Servers are the MCP servers an admin registered and activated tools of, at most KitServers of them.")
skills: Optional[List[ToolSkillDoc]] = Field(default=None, description="Skills are the documents of the skills an admin activated, by name.")
__properties: ClassVar[List[str]] = ["excess", "muted", "omitted", "servers", "skills"]
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 ToolKit 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,
)
# override the default output from pydantic by calling `to_dict()` of each item in servers (list)
_items = []
if self.servers:
for _item_servers in self.servers:
if _item_servers:
_items.append(_item_servers.to_dict())
_dict['servers'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in skills (list)
_items = []
if self.skills:
for _item_skills in self.skills:
if _item_skills:
_items.append(_item_skills.to_dict())
_dict['skills'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ToolKit from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"excess": obj.get("excess"),
"muted": obj.get("muted"),
"omitted": obj.get("omitted"),
"servers": [ToolRemote.from_dict(_item) for _item in obj["servers"]] if obj.get("servers") is not None else None,
"skills": [ToolSkillDoc.from_dict(_item) for _item in obj["skills"]] if obj.get("skills") is not None else None
})
return _obj
+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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ToolMuteReq(BaseModel):
"""
ToolMuteReq
""" # noqa: E501
mute: Optional[List[StrictStr]] = Field(default=None, description="Mute takes these out of the caller's runs: a skill (skill_<name>), a server's tool (<server>_<tool>) or a whole server (<server>), each one the org's kit carries.")
unmute: Optional[List[StrictStr]] = Field(default=None, description="Unmute gives these back, as far as the org's kit carries them.")
__properties: ClassVar[List[str]] = ["mute", "unmute"]
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 ToolMuteReq 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 ToolMuteReq from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"mute": obj.get("mute"),
"unmute": obj.get("unmute")
})
return _obj
+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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ToolRemote(BaseModel):
"""
ToolRemote
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the server's id in the org, which also prefixes its tools on the tool plane, and names it to ToolsRelay.")
tools: Optional[List[StrictStr]] = Field(default=None, description="Tools are the tools of it an admin activated, each by the server's own name for it: all a run's harness may call of it.")
__properties: ClassVar[List[str]] = ["name", "tools"]
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 ToolRemote 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 ToolRemote from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"tools": obj.get("tools")
})
return _obj
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ToolSkillDoc(BaseModel):
"""
ToolSkillDoc
""" # noqa: E501
content: Optional[StrictStr] = Field(default=None, description="Content is the skill's SKILL.md, verbatim.")
name: Optional[StrictStr] = Field(default=None, description="Name is the skill's bare name, which is also the directory its SKILL.md is written into.")
__properties: ClassVar[List[str]] = ["content", "name"]
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 ToolSkillDoc 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 ToolSkillDoc from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"content": obj.get("content"),
"name": obj.get("name")
})
return _obj