client: regenerate from hanzo-inc/cloud@2314af8b90 (8.5.160)
Hanzo CI/CD / cicd (push) Failing after 2m6s
CI/CD / cicd (push) Failing after 2m7s

The committed client had fallen behind the API it projects: 116 modules the
document now names were missing, 13 it no longer names were still here, and
30 had moved. The release lane refuses to publish a projection that does not
match the document, so v8.5.158 and v8.5.159 were tagged and never reached
the index.

Regenerated from the document production serves (sha256 aa1b79d0797704608e25a3898adb2ca69fec82a03f74c09671c372b63066cafe),
with the driver at hanzoai/openapi@88ea26b — the same inputs the lane reads,
and the same +116 -13 ~30 it reported. The repo's own gate ran over exactly
these bytes: 121 api and 2675 model modules import, no class declares a field
twice across 2804 modules, and every example flow resolves its method names.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-09-18 17:28:47 -07:00
co-authored by Hanzo Dev
parent ea1940e3e3
commit 40cb597c2f
150 changed files with 37966 additions and 3358 deletions
+232 -26
View File
@@ -74,7 +74,6 @@ __all__ = [
"IamApi",
"IndexApi",
"IngressApi",
"IntegrationApi",
"KmsApi",
"KnowledgeApi",
"KvApi",
@@ -96,12 +95,14 @@ __all__ = [
"NotifyApi",
"O11yApi",
"OpenapiApi",
"PatrolApi",
"PlanApi",
"PlatformApi",
"PrefApi",
"PricingApi",
"ProjectApi",
"PromptApi",
"ProviderApi",
"ProvisioningApi",
"PubsubApi",
"ReferenceApi",
@@ -436,6 +437,7 @@ __all__ = [
"CaptureEvent",
"CaptureResult",
"CapturedError",
"Card",
"Cart",
"CartItem",
"CartItemSet",
@@ -505,8 +507,8 @@ __all__ = [
"CommitJSON",
"CommitsJSON",
"Completion",
"Component",
"Config",
"ConnView",
"ConnectIn",
"ConnectOut",
"ConnectRequest",
@@ -516,12 +518,8 @@ __all__ = [
"ConnectorAction",
"ConnectorAuth",
"ConnectorMetadata",
"ConnectorProviderView",
"ConnectorProvidersOut",
"ConnectorTokenOut",
"ConnectorTrigger",
"ConnectorView",
"ConnectorsOut",
"ConsoleSettings",
"ConsoleSettingsDexConfig",
"ConsoleSettingsGoogleAnalytics",
@@ -557,8 +555,6 @@ __all__ = [
"CreateServerReq",
"CreateVersionIn",
"CreateWalletIn",
"CredentialIn",
"CredentialOut",
"CreditBalance",
"CreditEntry",
"CreditGrant",
@@ -625,9 +621,6 @@ __all__ = [
"DestinationStatus",
"DestinationTest",
"Detachment",
"DevicePollOut",
"DeviceStartIn",
"DeviceStartOut",
"DeviceView",
"Diagnostic",
"DisconnectOut",
@@ -665,6 +658,8 @@ __all__ = [
"EndpointReq",
"EndpointView",
"EngineAdvertisement",
"EngineReplica",
"EngineReplicaUpdate",
"EngineStatus",
"EnrollInput",
"EnrollReq",
@@ -857,6 +852,7 @@ __all__ = [
"GraphAssertIn",
"GraphAssertOut",
"GraphEdge",
"GraphExtractOut",
"GraphFact",
"GraphNeighborsIn",
"GraphNeighborsOut",
@@ -868,6 +864,8 @@ __all__ = [
"GraphReadOut",
"GraphResolveIn",
"GraphResolveOut",
"GraphSourceIn",
"GraphTriple",
"GraphVocabularyOut",
"HandleRequest",
"HandleSet",
@@ -901,6 +899,7 @@ __all__ = [
"IamAnswer",
"IamApplication",
"IamApplicationListResult",
"IamApproval",
"IamAssumeBody",
"IamAuditLog",
"IamBulk",
@@ -1055,6 +1054,7 @@ __all__ = [
"JobCancel",
"JobCanceled",
"JobList",
"JobView",
"JoinFailure",
"JourneyStep",
"JudgeSpec",
@@ -1234,6 +1234,7 @@ __all__ = [
"O11yAnnQueueDetailView",
"O11yAnnQueueList",
"O11yAnnQueueView",
"O11yApproval",
"O11yAssociatedComponent",
"O11yAttributeKey",
"O11yAttributesComponentEntry",
@@ -1988,7 +1989,6 @@ __all__ = [
"O11yWebexConfig",
"O11yWebhookConfig",
"O11yWechatConfig",
"OauthBundleIn",
"ObjectItem",
"ObjectList",
"Obligation",
@@ -2057,6 +2057,60 @@ __all__ = [
"PatchSyncIn",
"PatchTargetIn",
"PathIn",
"PatrolAct",
"PatrolActivation",
"PatrolAlarmIn",
"PatrolAlarmOut",
"PatrolCamera",
"PatrolCameraList",
"PatrolCheckpoint",
"PatrolCheckpointOut",
"PatrolClock",
"PatrolConfirmIn",
"PatrolEstate",
"PatrolEvent",
"PatrolEventIn",
"PatrolEventList",
"PatrolEventOut",
"PatrolFix",
"PatrolFixIn",
"PatrolFixOut",
"PatrolFixed",
"PatrolIncident",
"PatrolIncidentAct",
"PatrolIncidentIn",
"PatrolIncidentList",
"PatrolIncidentOut",
"PatrolKey",
"PatrolKeyList",
"PatrolKeyOut",
"PatrolMoveIn",
"PatrolNearList",
"PatrolNearest",
"PatrolNote",
"PatrolNoteIn",
"PatrolNoteList",
"PatrolNoteOut",
"PatrolReport",
"PatrolReportIn",
"PatrolReportOut",
"PatrolSite",
"PatrolSiteEdit",
"PatrolSiteList",
"PatrolSiteOut",
"PatrolSnapshotOut",
"PatrolStream",
"PatrolStreamOut",
"PatrolTenant",
"PatrolTenantOut",
"PatrolTicketOut",
"PatrolTour",
"PatrolTourList",
"PatrolUnit",
"PatrolUnitList",
"PatrolUnitOut",
"PatrolUnitStateIn",
"PatrolZone",
"PaymentConfig",
"Payout",
"PeriodEarningView",
@@ -2087,7 +2141,11 @@ __all__ = [
"PolicyList",
"Pool",
"PoolCreate",
"PoolDeclare",
"PoolDeclared",
"PoolList",
"PoolScale",
"PoolView",
"Pools",
"PopulatedFlow",
"Position",
@@ -2220,6 +2278,7 @@ __all__ = [
"RaiseIn",
"Ran",
"Range",
"Rate",
"RateCard",
"Reach",
"Reachability",
@@ -2251,7 +2310,6 @@ __all__ = [
"ReferenceSource",
"ReferenceTaken",
"ReferenceVersion",
"RefreshOut",
"RefreshReferenceIn",
"RefreshReferenceOut",
"RefsJSON",
@@ -2283,6 +2341,7 @@ __all__ = [
"RenewResult",
"ReplaceKitIn",
"ReplayBody",
"Reply",
"RepoList",
"RepoTree",
"RepoView",
@@ -2388,10 +2447,31 @@ __all__ = [
"RunReq",
"RunRequest",
"RunResp",
"RunStart",
"RunSummary",
"RunView",
"RunnerBuildReq",
"RunnerBuildResp",
"RunnerContext",
"RunnerDeclareIn",
"RunnerDeclareOut",
"RunnerIdentity",
"RunnerLine",
"RunnerList",
"RunnerLogIn",
"RunnerLogOut",
"RunnerNeed",
"RunnerPair",
"RunnerRegisterIn",
"RunnerRegisterOut",
"RunnerState",
"RunnerStateIn",
"RunnerStateOut",
"RunnerStep",
"RunnerTask",
"RunnerTaskIn",
"RunnerTaskOut",
"RunnerView",
"Runs",
"S3Health",
"SMS",
@@ -2461,6 +2541,8 @@ __all__ = [
"ServiceIn",
"ServicePort",
"Session",
"SessionBudgetIn",
"SessionBudgetView",
"SessionDetail",
"SessionEnded",
"SessionList",
@@ -2484,7 +2566,22 @@ __all__ = [
"SkillDeleted",
"SkillIn",
"SkillWritten",
"SlackChannelsOut",
"SlackConversation",
"SlackDeleteMessageOut",
"SlackFile",
"SlackJoinOut",
"SlackMessage",
"SlackMessagesOut",
"SlackReactIn",
"SlackReactOut",
"SlackSearchHit",
"SlackSearchIn",
"SlackSearchOut",
"SlackSendMessageIn",
"SlackSendMessageOut",
"SlackUpdateMessageIn",
"SlackUpdateMessageOut",
"SlotView",
"SocialAccount",
"SocialAccountBody",
@@ -2509,8 +2606,10 @@ __all__ = [
"Span",
"SpanBody",
"Spec",
"Speed",
"Spend",
"SpendPoint",
"SpendView",
"StarterKit",
"State",
"StateGraph",
@@ -2715,6 +2814,10 @@ __all__ = [
"WorkerList",
"WorkerScriptPut",
"Workflow",
"WorkflowList",
"WorkflowRun",
"WorkflowRuns",
"WorkflowView",
"WorldIndex",
"WorldWire",
"WriteIn",
@@ -2779,7 +2882,6 @@ from hanzoai.cloud.api.help_api import HelpApi as HelpApi
from hanzoai.cloud.api.iam_api import IamApi as IamApi
from hanzoai.cloud.api.index_api import IndexApi as IndexApi
from hanzoai.cloud.api.ingress_api import IngressApi as IngressApi
from hanzoai.cloud.api.integration_api import IntegrationApi as IntegrationApi
from hanzoai.cloud.api.kms_api import KmsApi as KmsApi
from hanzoai.cloud.api.knowledge_api import KnowledgeApi as KnowledgeApi
from hanzoai.cloud.api.kv_api import KvApi as KvApi
@@ -2801,12 +2903,14 @@ from hanzoai.cloud.api.node_api import NodeApi as NodeApi
from hanzoai.cloud.api.notify_api import NotifyApi as NotifyApi
from hanzoai.cloud.api.o11y_api import O11yApi as O11yApi
from hanzoai.cloud.api.openapi_api import OpenapiApi as OpenapiApi
from hanzoai.cloud.api.patrol_api import PatrolApi as PatrolApi
from hanzoai.cloud.api.plan_api import PlanApi as PlanApi
from hanzoai.cloud.api.platform_api import PlatformApi as PlatformApi
from hanzoai.cloud.api.pref_api import PrefApi as PrefApi
from hanzoai.cloud.api.pricing_api import PricingApi as PricingApi
from hanzoai.cloud.api.project_api import ProjectApi as ProjectApi
from hanzoai.cloud.api.prompt_api import PromptApi as PromptApi
from hanzoai.cloud.api.provider_api import ProviderApi as ProviderApi
from hanzoai.cloud.api.provisioning_api import ProvisioningApi as ProvisioningApi
from hanzoai.cloud.api.pubsub_api import PubsubApi as PubsubApi
from hanzoai.cloud.api.reference_api import ReferenceApi as ReferenceApi
@@ -3145,6 +3249,7 @@ from hanzoai.cloud.models.capture_batch import CaptureBatch as CaptureBatch
from hanzoai.cloud.models.capture_event import CaptureEvent as CaptureEvent
from hanzoai.cloud.models.capture_result import CaptureResult as CaptureResult
from hanzoai.cloud.models.captured_error import CapturedError as CapturedError
from hanzoai.cloud.models.card import Card as Card
from hanzoai.cloud.models.cart import Cart as Cart
from hanzoai.cloud.models.cart_item import CartItem as CartItem
from hanzoai.cloud.models.cart_item_set import CartItemSet as CartItemSet
@@ -3214,8 +3319,8 @@ from hanzoai.cloud.models.commerce_overview import CommerceOverview as CommerceO
from hanzoai.cloud.models.commit_json import CommitJSON as CommitJSON
from hanzoai.cloud.models.commits_json import CommitsJSON as CommitsJSON
from hanzoai.cloud.models.completion import Completion as Completion
from hanzoai.cloud.models.component import Component as Component
from hanzoai.cloud.models.config import Config as Config
from hanzoai.cloud.models.conn_view import ConnView as ConnView
from hanzoai.cloud.models.connect_in import ConnectIn as ConnectIn
from hanzoai.cloud.models.connect_out import ConnectOut as ConnectOut
from hanzoai.cloud.models.connect_request import ConnectRequest as ConnectRequest
@@ -3225,12 +3330,8 @@ from hanzoai.cloud.models.connection_view import ConnectionView as ConnectionVie
from hanzoai.cloud.models.connector_action import ConnectorAction as ConnectorAction
from hanzoai.cloud.models.connector_auth import ConnectorAuth as ConnectorAuth
from hanzoai.cloud.models.connector_metadata import ConnectorMetadata as ConnectorMetadata
from hanzoai.cloud.models.connector_provider_view import ConnectorProviderView as ConnectorProviderView
from hanzoai.cloud.models.connector_providers_out import ConnectorProvidersOut as ConnectorProvidersOut
from hanzoai.cloud.models.connector_token_out import ConnectorTokenOut as ConnectorTokenOut
from hanzoai.cloud.models.connector_trigger import ConnectorTrigger as ConnectorTrigger
from hanzoai.cloud.models.connector_view import ConnectorView as ConnectorView
from hanzoai.cloud.models.connectors_out import ConnectorsOut as ConnectorsOut
from hanzoai.cloud.models.console_settings import ConsoleSettings as ConsoleSettings
from hanzoai.cloud.models.console_settings_dex_config import ConsoleSettingsDexConfig as ConsoleSettingsDexConfig
from hanzoai.cloud.models.console_settings_google_analytics import ConsoleSettingsGoogleAnalytics as ConsoleSettingsGoogleAnalytics
@@ -3266,8 +3367,6 @@ from hanzoai.cloud.models.create_req import CreateReq as CreateReq
from hanzoai.cloud.models.create_server_req import CreateServerReq as CreateServerReq
from hanzoai.cloud.models.create_version_in import CreateVersionIn as CreateVersionIn
from hanzoai.cloud.models.create_wallet_in import CreateWalletIn as CreateWalletIn
from hanzoai.cloud.models.credential_in import CredentialIn as CredentialIn
from hanzoai.cloud.models.credential_out import CredentialOut as CredentialOut
from hanzoai.cloud.models.credit_balance import CreditBalance as CreditBalance
from hanzoai.cloud.models.credit_entry import CreditEntry as CreditEntry
from hanzoai.cloud.models.credit_grant import CreditGrant as CreditGrant
@@ -3334,9 +3433,6 @@ from hanzoai.cloud.models.destination_list import DestinationList as Destination
from hanzoai.cloud.models.destination_status import DestinationStatus as DestinationStatus
from hanzoai.cloud.models.destination_test import DestinationTest as DestinationTest
from hanzoai.cloud.models.detachment import Detachment as Detachment
from hanzoai.cloud.models.device_poll_out import DevicePollOut as DevicePollOut
from hanzoai.cloud.models.device_start_in import DeviceStartIn as DeviceStartIn
from hanzoai.cloud.models.device_start_out import DeviceStartOut as DeviceStartOut
from hanzoai.cloud.models.device_view import DeviceView as DeviceView
from hanzoai.cloud.models.diagnostic import Diagnostic as Diagnostic
from hanzoai.cloud.models.disconnect_out import DisconnectOut as DisconnectOut
@@ -3374,6 +3470,8 @@ from hanzoai.cloud.models.endpoint_list import EndpointList as EndpointList
from hanzoai.cloud.models.endpoint_req import EndpointReq as EndpointReq
from hanzoai.cloud.models.endpoint_view import EndpointView as EndpointView
from hanzoai.cloud.models.engine_advertisement import EngineAdvertisement as EngineAdvertisement
from hanzoai.cloud.models.engine_replica import EngineReplica as EngineReplica
from hanzoai.cloud.models.engine_replica_update import EngineReplicaUpdate as EngineReplicaUpdate
from hanzoai.cloud.models.engine_status import EngineStatus as EngineStatus
from hanzoai.cloud.models.enroll_input import EnrollInput as EnrollInput
from hanzoai.cloud.models.enroll_req import EnrollReq as EnrollReq
@@ -3566,6 +3664,7 @@ from hanzoai.cloud.models.graph import Graph as Graph
from hanzoai.cloud.models.graph_assert_in import GraphAssertIn as GraphAssertIn
from hanzoai.cloud.models.graph_assert_out import GraphAssertOut as GraphAssertOut
from hanzoai.cloud.models.graph_edge import GraphEdge as GraphEdge
from hanzoai.cloud.models.graph_extract_out import GraphExtractOut as GraphExtractOut
from hanzoai.cloud.models.graph_fact import GraphFact as GraphFact
from hanzoai.cloud.models.graph_neighbors_in import GraphNeighborsIn as GraphNeighborsIn
from hanzoai.cloud.models.graph_neighbors_out import GraphNeighborsOut as GraphNeighborsOut
@@ -3577,6 +3676,8 @@ from hanzoai.cloud.models.graph_ql_out import GraphQLOut as GraphQLOut
from hanzoai.cloud.models.graph_read_out import GraphReadOut as GraphReadOut
from hanzoai.cloud.models.graph_resolve_in import GraphResolveIn as GraphResolveIn
from hanzoai.cloud.models.graph_resolve_out import GraphResolveOut as GraphResolveOut
from hanzoai.cloud.models.graph_source_in import GraphSourceIn as GraphSourceIn
from hanzoai.cloud.models.graph_triple import GraphTriple as GraphTriple
from hanzoai.cloud.models.graph_vocabulary_out import GraphVocabularyOut as GraphVocabularyOut
from hanzoai.cloud.models.handle_request import HandleRequest as HandleRequest
from hanzoai.cloud.models.handle_set import HandleSet as HandleSet
@@ -3610,6 +3711,7 @@ from hanzoai.cloud.models.iam_address import IamAddress as IamAddress
from hanzoai.cloud.models.iam_answer import IamAnswer as IamAnswer
from hanzoai.cloud.models.iam_application import IamApplication as IamApplication
from hanzoai.cloud.models.iam_application_list_result import IamApplicationListResult as IamApplicationListResult
from hanzoai.cloud.models.iam_approval import IamApproval as IamApproval
from hanzoai.cloud.models.iam_assume_body import IamAssumeBody as IamAssumeBody
from hanzoai.cloud.models.iam_audit_log import IamAuditLog as IamAuditLog
from hanzoai.cloud.models.iam_bulk import IamBulk as IamBulk
@@ -3764,6 +3866,7 @@ from hanzoai.cloud.models.item_view import ItemView as ItemView
from hanzoai.cloud.models.job_cancel import JobCancel as JobCancel
from hanzoai.cloud.models.job_canceled import JobCanceled as JobCanceled
from hanzoai.cloud.models.job_list import JobList as JobList
from hanzoai.cloud.models.job_view import JobView as JobView
from hanzoai.cloud.models.join_failure import JoinFailure as JoinFailure
from hanzoai.cloud.models.journey_step import JourneyStep as JourneyStep
from hanzoai.cloud.models.judge_spec import JudgeSpec as JudgeSpec
@@ -3943,6 +4046,7 @@ from hanzoai.cloud.models.o11y_ann_queue_deleted import O11yAnnQueueDeleted as O
from hanzoai.cloud.models.o11y_ann_queue_detail_view import O11yAnnQueueDetailView as O11yAnnQueueDetailView
from hanzoai.cloud.models.o11y_ann_queue_list import O11yAnnQueueList as O11yAnnQueueList
from hanzoai.cloud.models.o11y_ann_queue_view import O11yAnnQueueView as O11yAnnQueueView
from hanzoai.cloud.models.o11y_approval import O11yApproval as O11yApproval
from hanzoai.cloud.models.o11y_associated_component import O11yAssociatedComponent as O11yAssociatedComponent
from hanzoai.cloud.models.o11y_attribute_key import O11yAttributeKey as O11yAttributeKey
from hanzoai.cloud.models.o11y_attributes_component_entry import O11yAttributesComponentEntry as O11yAttributesComponentEntry
@@ -4697,7 +4801,6 @@ from hanzoai.cloud.models.o11y_waterfall_span import O11yWaterfallSpan as O11yWa
from hanzoai.cloud.models.o11y_webex_config import O11yWebexConfig as O11yWebexConfig
from hanzoai.cloud.models.o11y_webhook_config import O11yWebhookConfig as O11yWebhookConfig
from hanzoai.cloud.models.o11y_wechat_config import O11yWechatConfig as O11yWechatConfig
from hanzoai.cloud.models.oauth_bundle_in import OauthBundleIn as OauthBundleIn
from hanzoai.cloud.models.object_item import ObjectItem as ObjectItem
from hanzoai.cloud.models.object_list import ObjectList as ObjectList
from hanzoai.cloud.models.obligation import Obligation as Obligation
@@ -4766,6 +4869,60 @@ from hanzoai.cloud.models.patch_session_in import PatchSessionIn as PatchSession
from hanzoai.cloud.models.patch_sync_in import PatchSyncIn as PatchSyncIn
from hanzoai.cloud.models.patch_target_in import PatchTargetIn as PatchTargetIn
from hanzoai.cloud.models.path_in import PathIn as PathIn
from hanzoai.cloud.models.patrol_act import PatrolAct as PatrolAct
from hanzoai.cloud.models.patrol_activation import PatrolActivation as PatrolActivation
from hanzoai.cloud.models.patrol_alarm_in import PatrolAlarmIn as PatrolAlarmIn
from hanzoai.cloud.models.patrol_alarm_out import PatrolAlarmOut as PatrolAlarmOut
from hanzoai.cloud.models.patrol_camera import PatrolCamera as PatrolCamera
from hanzoai.cloud.models.patrol_camera_list import PatrolCameraList as PatrolCameraList
from hanzoai.cloud.models.patrol_checkpoint import PatrolCheckpoint as PatrolCheckpoint
from hanzoai.cloud.models.patrol_checkpoint_out import PatrolCheckpointOut as PatrolCheckpointOut
from hanzoai.cloud.models.patrol_clock import PatrolClock as PatrolClock
from hanzoai.cloud.models.patrol_confirm_in import PatrolConfirmIn as PatrolConfirmIn
from hanzoai.cloud.models.patrol_estate import PatrolEstate as PatrolEstate
from hanzoai.cloud.models.patrol_event import PatrolEvent as PatrolEvent
from hanzoai.cloud.models.patrol_event_in import PatrolEventIn as PatrolEventIn
from hanzoai.cloud.models.patrol_event_list import PatrolEventList as PatrolEventList
from hanzoai.cloud.models.patrol_event_out import PatrolEventOut as PatrolEventOut
from hanzoai.cloud.models.patrol_fix import PatrolFix as PatrolFix
from hanzoai.cloud.models.patrol_fix_in import PatrolFixIn as PatrolFixIn
from hanzoai.cloud.models.patrol_fix_out import PatrolFixOut as PatrolFixOut
from hanzoai.cloud.models.patrol_fixed import PatrolFixed as PatrolFixed
from hanzoai.cloud.models.patrol_incident import PatrolIncident as PatrolIncident
from hanzoai.cloud.models.patrol_incident_act import PatrolIncidentAct as PatrolIncidentAct
from hanzoai.cloud.models.patrol_incident_in import PatrolIncidentIn as PatrolIncidentIn
from hanzoai.cloud.models.patrol_incident_list import PatrolIncidentList as PatrolIncidentList
from hanzoai.cloud.models.patrol_incident_out import PatrolIncidentOut as PatrolIncidentOut
from hanzoai.cloud.models.patrol_key import PatrolKey as PatrolKey
from hanzoai.cloud.models.patrol_key_list import PatrolKeyList as PatrolKeyList
from hanzoai.cloud.models.patrol_key_out import PatrolKeyOut as PatrolKeyOut
from hanzoai.cloud.models.patrol_move_in import PatrolMoveIn as PatrolMoveIn
from hanzoai.cloud.models.patrol_near_list import PatrolNearList as PatrolNearList
from hanzoai.cloud.models.patrol_nearest import PatrolNearest as PatrolNearest
from hanzoai.cloud.models.patrol_note import PatrolNote as PatrolNote
from hanzoai.cloud.models.patrol_note_in import PatrolNoteIn as PatrolNoteIn
from hanzoai.cloud.models.patrol_note_list import PatrolNoteList as PatrolNoteList
from hanzoai.cloud.models.patrol_note_out import PatrolNoteOut as PatrolNoteOut
from hanzoai.cloud.models.patrol_report import PatrolReport as PatrolReport
from hanzoai.cloud.models.patrol_report_in import PatrolReportIn as PatrolReportIn
from hanzoai.cloud.models.patrol_report_out import PatrolReportOut as PatrolReportOut
from hanzoai.cloud.models.patrol_site import PatrolSite as PatrolSite
from hanzoai.cloud.models.patrol_site_edit import PatrolSiteEdit as PatrolSiteEdit
from hanzoai.cloud.models.patrol_site_list import PatrolSiteList as PatrolSiteList
from hanzoai.cloud.models.patrol_site_out import PatrolSiteOut as PatrolSiteOut
from hanzoai.cloud.models.patrol_snapshot_out import PatrolSnapshotOut as PatrolSnapshotOut
from hanzoai.cloud.models.patrol_stream import PatrolStream as PatrolStream
from hanzoai.cloud.models.patrol_stream_out import PatrolStreamOut as PatrolStreamOut
from hanzoai.cloud.models.patrol_tenant import PatrolTenant as PatrolTenant
from hanzoai.cloud.models.patrol_tenant_out import PatrolTenantOut as PatrolTenantOut
from hanzoai.cloud.models.patrol_ticket_out import PatrolTicketOut as PatrolTicketOut
from hanzoai.cloud.models.patrol_tour import PatrolTour as PatrolTour
from hanzoai.cloud.models.patrol_tour_list import PatrolTourList as PatrolTourList
from hanzoai.cloud.models.patrol_unit import PatrolUnit as PatrolUnit
from hanzoai.cloud.models.patrol_unit_list import PatrolUnitList as PatrolUnitList
from hanzoai.cloud.models.patrol_unit_out import PatrolUnitOut as PatrolUnitOut
from hanzoai.cloud.models.patrol_unit_state_in import PatrolUnitStateIn as PatrolUnitStateIn
from hanzoai.cloud.models.patrol_zone import PatrolZone as PatrolZone
from hanzoai.cloud.models.payment_config import PaymentConfig as PaymentConfig
from hanzoai.cloud.models.payout import Payout as Payout
from hanzoai.cloud.models.period_earning_view import PeriodEarningView as PeriodEarningView
@@ -4796,7 +4953,11 @@ from hanzoai.cloud.models.policy import Policy as Policy
from hanzoai.cloud.models.policy_list import PolicyList as PolicyList
from hanzoai.cloud.models.pool import Pool as Pool
from hanzoai.cloud.models.pool_create import PoolCreate as PoolCreate
from hanzoai.cloud.models.pool_declare import PoolDeclare as PoolDeclare
from hanzoai.cloud.models.pool_declared import PoolDeclared as PoolDeclared
from hanzoai.cloud.models.pool_list import PoolList as PoolList
from hanzoai.cloud.models.pool_scale import PoolScale as PoolScale
from hanzoai.cloud.models.pool_view import PoolView as PoolView
from hanzoai.cloud.models.pools import Pools as Pools
from hanzoai.cloud.models.populated_flow import PopulatedFlow as PopulatedFlow
from hanzoai.cloud.models.position import Position as Position
@@ -4929,6 +5090,7 @@ from hanzoai.cloud.models.rag_embed_result import RagEmbedResult as RagEmbedResu
from hanzoai.cloud.models.raise_in import RaiseIn as RaiseIn
from hanzoai.cloud.models.ran import Ran as Ran
from hanzoai.cloud.models.range import Range as Range
from hanzoai.cloud.models.rate import Rate as Rate
from hanzoai.cloud.models.rate_card import RateCard as RateCard
from hanzoai.cloud.models.reach import Reach as Reach
from hanzoai.cloud.models.reachability import Reachability as Reachability
@@ -4960,7 +5122,6 @@ from hanzoai.cloud.models.reference_sets_out import ReferenceSetsOut as Referenc
from hanzoai.cloud.models.reference_source import ReferenceSource as ReferenceSource
from hanzoai.cloud.models.reference_taken import ReferenceTaken as ReferenceTaken
from hanzoai.cloud.models.reference_version import ReferenceVersion as ReferenceVersion
from hanzoai.cloud.models.refresh_out import RefreshOut as RefreshOut
from hanzoai.cloud.models.refresh_reference_in import RefreshReferenceIn as RefreshReferenceIn
from hanzoai.cloud.models.refresh_reference_out import RefreshReferenceOut as RefreshReferenceOut
from hanzoai.cloud.models.refs_json import RefsJSON as RefsJSON
@@ -4992,6 +5153,7 @@ from hanzoai.cloud.models.renew_req import RenewReq as RenewReq
from hanzoai.cloud.models.renew_result import RenewResult as RenewResult
from hanzoai.cloud.models.replace_kit_in import ReplaceKitIn as ReplaceKitIn
from hanzoai.cloud.models.replay_body import ReplayBody as ReplayBody
from hanzoai.cloud.models.reply import Reply as Reply
from hanzoai.cloud.models.repo_list import RepoList as RepoList
from hanzoai.cloud.models.repo_tree import RepoTree as RepoTree
from hanzoai.cloud.models.repo_view import RepoView as RepoView
@@ -5097,10 +5259,31 @@ from hanzoai.cloud.models.run_record import RunRecord as RunRecord
from hanzoai.cloud.models.run_req import RunReq as RunReq
from hanzoai.cloud.models.run_request import RunRequest as RunRequest
from hanzoai.cloud.models.run_resp import RunResp as RunResp
from hanzoai.cloud.models.run_start import RunStart as RunStart
from hanzoai.cloud.models.run_summary import RunSummary as RunSummary
from hanzoai.cloud.models.run_view import RunView as RunView
from hanzoai.cloud.models.runner_build_req import RunnerBuildReq as RunnerBuildReq
from hanzoai.cloud.models.runner_build_resp import RunnerBuildResp as RunnerBuildResp
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
from hanzoai.cloud.models.runner_identity import RunnerIdentity as RunnerIdentity
from hanzoai.cloud.models.runner_line import RunnerLine as RunnerLine
from hanzoai.cloud.models.runner_list import RunnerList as RunnerList
from hanzoai.cloud.models.runner_log_in import RunnerLogIn as RunnerLogIn
from hanzoai.cloud.models.runner_log_out import RunnerLogOut as RunnerLogOut
from hanzoai.cloud.models.runner_need import RunnerNeed as RunnerNeed
from hanzoai.cloud.models.runner_pair import RunnerPair as RunnerPair
from hanzoai.cloud.models.runner_register_in import RunnerRegisterIn as RunnerRegisterIn
from hanzoai.cloud.models.runner_register_out import RunnerRegisterOut as RunnerRegisterOut
from hanzoai.cloud.models.runner_state import RunnerState as RunnerState
from hanzoai.cloud.models.runner_state_in import RunnerStateIn as RunnerStateIn
from hanzoai.cloud.models.runner_state_out import RunnerStateOut as RunnerStateOut
from hanzoai.cloud.models.runner_step import RunnerStep as RunnerStep
from hanzoai.cloud.models.runner_task import RunnerTask as RunnerTask
from hanzoai.cloud.models.runner_task_in import RunnerTaskIn as RunnerTaskIn
from hanzoai.cloud.models.runner_task_out import RunnerTaskOut as RunnerTaskOut
from hanzoai.cloud.models.runner_view import RunnerView as RunnerView
from hanzoai.cloud.models.runs import Runs as Runs
from hanzoai.cloud.models.s3_health import S3Health as S3Health
from hanzoai.cloud.models.sms import SMS as SMS
@@ -5170,6 +5353,8 @@ from hanzoai.cloud.models.service_detail import ServiceDetail as ServiceDetail
from hanzoai.cloud.models.service_in import ServiceIn as ServiceIn
from hanzoai.cloud.models.service_port import ServicePort as ServicePort
from hanzoai.cloud.models.session import Session as Session
from hanzoai.cloud.models.session_budget_in import SessionBudgetIn as SessionBudgetIn
from hanzoai.cloud.models.session_budget_view import SessionBudgetView as SessionBudgetView
from hanzoai.cloud.models.session_detail import SessionDetail as SessionDetail
from hanzoai.cloud.models.session_ended import SessionEnded as SessionEnded
from hanzoai.cloud.models.session_list import SessionList as SessionList
@@ -5193,7 +5378,22 @@ from hanzoai.cloud.models.skill import Skill as Skill
from hanzoai.cloud.models.skill_deleted import SkillDeleted as SkillDeleted
from hanzoai.cloud.models.skill_in import SkillIn as SkillIn
from hanzoai.cloud.models.skill_written import SkillWritten as SkillWritten
from hanzoai.cloud.models.slack_channels_out import SlackChannelsOut as SlackChannelsOut
from hanzoai.cloud.models.slack_conversation import SlackConversation as SlackConversation
from hanzoai.cloud.models.slack_delete_message_out import SlackDeleteMessageOut as SlackDeleteMessageOut
from hanzoai.cloud.models.slack_file import SlackFile as SlackFile
from hanzoai.cloud.models.slack_join_out import SlackJoinOut as SlackJoinOut
from hanzoai.cloud.models.slack_message import SlackMessage as SlackMessage
from hanzoai.cloud.models.slack_messages_out import SlackMessagesOut as SlackMessagesOut
from hanzoai.cloud.models.slack_react_in import SlackReactIn as SlackReactIn
from hanzoai.cloud.models.slack_react_out import SlackReactOut as SlackReactOut
from hanzoai.cloud.models.slack_search_hit import SlackSearchHit as SlackSearchHit
from hanzoai.cloud.models.slack_search_in import SlackSearchIn as SlackSearchIn
from hanzoai.cloud.models.slack_search_out import SlackSearchOut as SlackSearchOut
from hanzoai.cloud.models.slack_send_message_in import SlackSendMessageIn as SlackSendMessageIn
from hanzoai.cloud.models.slack_send_message_out import SlackSendMessageOut as SlackSendMessageOut
from hanzoai.cloud.models.slack_update_message_in import SlackUpdateMessageIn as SlackUpdateMessageIn
from hanzoai.cloud.models.slack_update_message_out import SlackUpdateMessageOut as SlackUpdateMessageOut
from hanzoai.cloud.models.slot_view import SlotView as SlotView
from hanzoai.cloud.models.social_account import SocialAccount as SocialAccount
from hanzoai.cloud.models.social_account_body import SocialAccountBody as SocialAccountBody
@@ -5218,8 +5418,10 @@ from hanzoai.cloud.models.space_list import SpaceList as SpaceList
from hanzoai.cloud.models.span import Span as Span
from hanzoai.cloud.models.span_body import SpanBody as SpanBody
from hanzoai.cloud.models.spec import Spec as Spec
from hanzoai.cloud.models.speed import Speed as Speed
from hanzoai.cloud.models.spend import Spend as Spend
from hanzoai.cloud.models.spend_point import SpendPoint as SpendPoint
from hanzoai.cloud.models.spend_view import SpendView as SpendView
from hanzoai.cloud.models.starter_kit import StarterKit as StarterKit
from hanzoai.cloud.models.state import State as State
from hanzoai.cloud.models.state_graph import StateGraph as StateGraph
@@ -5424,6 +5626,10 @@ from hanzoai.cloud.models.wire_instructions import WireInstructions as WireInstr
from hanzoai.cloud.models.worker_list import WorkerList as WorkerList
from hanzoai.cloud.models.worker_script_put import WorkerScriptPut as WorkerScriptPut
from hanzoai.cloud.models.workflow import Workflow as Workflow
from hanzoai.cloud.models.workflow_list import WorkflowList as WorkflowList
from hanzoai.cloud.models.workflow_run import WorkflowRun as WorkflowRun
from hanzoai.cloud.models.workflow_runs import WorkflowRuns as WorkflowRuns
from hanzoai.cloud.models.workflow_view import WorkflowView as WorkflowView
from hanzoai.cloud.models.world_index import WorldIndex as WorldIndex
from hanzoai.cloud.models.world_wire import WorldWire as WorldWire
from hanzoai.cloud.models.write_in import WriteIn as WriteIn
+2 -1
View File
@@ -57,7 +57,6 @@ from hanzoai.cloud.api.help_api import HelpApi
from hanzoai.cloud.api.iam_api import IamApi
from hanzoai.cloud.api.index_api import IndexApi
from hanzoai.cloud.api.ingress_api import IngressApi
from hanzoai.cloud.api.integration_api import IntegrationApi
from hanzoai.cloud.api.kms_api import KmsApi
from hanzoai.cloud.api.knowledge_api import KnowledgeApi
from hanzoai.cloud.api.kv_api import KvApi
@@ -79,12 +78,14 @@ from hanzoai.cloud.api.node_api import NodeApi
from hanzoai.cloud.api.notify_api import NotifyApi
from hanzoai.cloud.api.o11y_api import O11yApi
from hanzoai.cloud.api.openapi_api import OpenapiApi
from hanzoai.cloud.api.patrol_api import PatrolApi
from hanzoai.cloud.api.plan_api import PlanApi
from hanzoai.cloud.api.platform_api import PlatformApi
from hanzoai.cloud.api.pref_api import PrefApi
from hanzoai.cloud.api.pricing_api import PricingApi
from hanzoai.cloud.api.project_api import ProjectApi
from hanzoai.cloud.api.prompt_api import PromptApi
from hanzoai.cloud.api.provider_api import ProviderApi
from hanzoai.cloud.api.provisioning_api import ProvisioningApi
from hanzoai.cloud.api.pubsub_api import PubsubApi
from hanzoai.cloud.api.reference_api import ReferenceApi
+570
View File
@@ -42,10 +42,13 @@ from hanzoai.cloud.models.report_out import ReportOut
from hanzoai.cloud.models.report_run_in import ReportRunIn
from hanzoai.cloud.models.routed_run_out import RoutedRunOut
from hanzoai.cloud.models.run_list import RunList
from hanzoai.cloud.models.session_budget_in import SessionBudgetIn
from hanzoai.cloud.models.session_budget_view import SessionBudgetView
from hanzoai.cloud.models.session_detail import SessionDetail
from hanzoai.cloud.models.session_list import SessionList
from hanzoai.cloud.models.session_progress import SessionProgress
from hanzoai.cloud.models.session_view import SessionView
from hanzoai.cloud.models.spend_view import SpendView
from hanzoai.cloud.models.target_deleted import TargetDeleted
from hanzoai.cloud.models.target_list import TargetList
from hanzoai.cloud.models.target_req import TargetReq
@@ -2156,6 +2159,284 @@ class AgentApi:
@validate_call
def get_agent_by_ref_spend(
self,
ref: Annotated[StrictStr, Field(description="Ref is the agent's public id or its org-unique name.")],
by: Annotated[Optional[StrictStr], Field(description="By groups the answer: \"component\" is the only grouping today.")] = 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,
) -> SpendView:
"""Answers what one of your org's agents has spent, in integer micro-USD.
Answers what one of your org's agents has spent, in integer micro-USD. It answers the agent's budget — `cap_micro_usd` per `period`, `max_task_micro_usd` per run — with what the current period has consumed, what remains, and `by_component`: the spend attributed to `model` (every completion the agent bought), `computer` (the runtime it was resident for) and `tool`. A component with no spend is absent, not zero. Every amount is an integer number of micro-USD (1,000,000 = $1); 11902000 is $11.902. Pass `by=component` to ask for the breakdown by name — it is the one grouping, and the default.
:param ref: Ref is the agent's public id or its org-unique name. (required)
:type ref: str
:param by: By groups the answer: \"component\" is the only grouping today.
:type by: 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_agent_by_ref_spend_serialize(
ref=ref,
by=by,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SpendView",
}
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_agent_by_ref_spend_with_http_info(
self,
ref: Annotated[StrictStr, Field(description="Ref is the agent's public id or its org-unique name.")],
by: Annotated[Optional[StrictStr], Field(description="By groups the answer: \"component\" is the only grouping today.")] = 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[SpendView]:
"""Answers what one of your org's agents has spent, in integer micro-USD.
Answers what one of your org's agents has spent, in integer micro-USD. It answers the agent's budget — `cap_micro_usd` per `period`, `max_task_micro_usd` per run — with what the current period has consumed, what remains, and `by_component`: the spend attributed to `model` (every completion the agent bought), `computer` (the runtime it was resident for) and `tool`. A component with no spend is absent, not zero. Every amount is an integer number of micro-USD (1,000,000 = $1); 11902000 is $11.902. Pass `by=component` to ask for the breakdown by name — it is the one grouping, and the default.
:param ref: Ref is the agent's public id or its org-unique name. (required)
:type ref: str
:param by: By groups the answer: \"component\" is the only grouping today.
:type by: 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_agent_by_ref_spend_serialize(
ref=ref,
by=by,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SpendView",
}
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_agent_by_ref_spend_without_preload_content(
self,
ref: Annotated[StrictStr, Field(description="Ref is the agent's public id or its org-unique name.")],
by: Annotated[Optional[StrictStr], Field(description="By groups the answer: \"component\" is the only grouping today.")] = 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:
"""Answers what one of your org's agents has spent, in integer micro-USD.
Answers what one of your org's agents has spent, in integer micro-USD. It answers the agent's budget — `cap_micro_usd` per `period`, `max_task_micro_usd` per run — with what the current period has consumed, what remains, and `by_component`: the spend attributed to `model` (every completion the agent bought), `computer` (the runtime it was resident for) and `tool`. A component with no spend is absent, not zero. Every amount is an integer number of micro-USD (1,000,000 = $1); 11902000 is $11.902. Pass `by=component` to ask for the breakdown by name — it is the one grouping, and the default.
:param ref: Ref is the agent's public id or its org-unique name. (required)
:type ref: str
:param by: By groups the answer: \"component\" is the only grouping today.
:type by: 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_agent_by_ref_spend_serialize(
ref=ref,
by=by,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SpendView",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_agent_by_ref_spend_serialize(
self,
ref,
by,
_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 ref is not None:
_path_params['ref'] = ref
# process the query parameters
if by is not None:
_query_params.append(('by', by))
# 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'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/agent/{ref}/spend',
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_agent_chat_conversations(
self,
@@ -7983,6 +8264,295 @@ class AgentApi:
@validate_call
def post_agent_sessions_by_id_budget(
self,
id: Annotated[StrictStr, Field(description="ID is the session, from the path.")],
session_budget_in: SessionBudgetIn,
_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,
) -> SessionBudgetView:
"""Sets, raises, or removes a session's cap.
Sets, raises, or removes a session's cap. - a replacement must be strictly greater than what the session has consumed - removal is one-way: a session whose cap was removed cannot take one again, and a session created without one cannot be given one - raising or removing the cap resumes work that paused at it
:param id: ID is the session, from the path. (required)
:type id: str
:param session_budget_in: (required)
:type session_budget_in: SessionBudgetIn
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_agent_sessions_by_id_budget_serialize(
id=id,
session_budget_in=session_budget_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SessionBudgetView",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def post_agent_sessions_by_id_budget_with_http_info(
self,
id: Annotated[StrictStr, Field(description="ID is the session, from the path.")],
session_budget_in: SessionBudgetIn,
_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[SessionBudgetView]:
"""Sets, raises, or removes a session's cap.
Sets, raises, or removes a session's cap. - a replacement must be strictly greater than what the session has consumed - removal is one-way: a session whose cap was removed cannot take one again, and a session created without one cannot be given one - raising or removing the cap resumes work that paused at it
:param id: ID is the session, from the path. (required)
:type id: str
:param session_budget_in: (required)
:type session_budget_in: SessionBudgetIn
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_agent_sessions_by_id_budget_serialize(
id=id,
session_budget_in=session_budget_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SessionBudgetView",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def post_agent_sessions_by_id_budget_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="ID is the session, from the path.")],
session_budget_in: SessionBudgetIn,
_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:
"""Sets, raises, or removes a session's cap.
Sets, raises, or removes a session's cap. - a replacement must be strictly greater than what the session has consumed - removal is one-way: a session whose cap was removed cannot take one again, and a session created without one cannot be given one - raising or removing the cap resumes work that paused at it
:param id: ID is the session, from the path. (required)
:type id: str
:param session_budget_in: (required)
:type session_budget_in: SessionBudgetIn
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_agent_sessions_by_id_budget_serialize(
id=id,
session_budget_in=session_budget_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "SessionBudgetView",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_agent_sessions_by_id_budget_serialize(
self,
id,
session_budget_in,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if session_budget_in is not None:
_body_params = session_budget_in
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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='POST',
resource_path='/v1/agent/sessions/{id}/budget',
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 post_agent_sessions_by_id_events(
self,
+738
View File
@@ -9649,6 +9649,508 @@ class AiApi:
@validate_call
def get3d_by_id(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""Implements GET /v1/3d/:id (Retrieve 3D status).
Implements GET /v1/3d/:id (Retrieve 3D status).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get3d_by_id_with_http_info(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""Implements GET /v1/3d/:id (Retrieve 3D status).
Implements GET /v1/3d/:id (Retrieve 3D status).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get3d_by_id_without_preload_content(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Implements GET /v1/3d/:id (Retrieve 3D status).
Implements GET /v1/3d/:id (Retrieve 3D status).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get3d_by_id_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/3d/{id}',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get3d_by_id_content(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_content_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get3d_by_id_content_with_http_info(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_content_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 get3d_by_id_content_without_preload_content(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
Implements GET /v1/3d/:id/content (Download 3D splat/glb content).
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get3d_by_id_content_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get3d_by_id_content_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/3d/{id}/content',
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_ai_account(
self,
@@ -47579,6 +48081,242 @@ class AiApi:
@validate_call
def post3d_generations(
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,
) -> None:
"""Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
: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._post3d_generations_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 post3d_generations_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[None]:
"""Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
: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._post3d_generations_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
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 post3d_generations_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:
"""Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
Implements POST /v1/3d/generations (Text/Image to 3D & Gaussian Splats).
: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._post3d_generations_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post3d_generations_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
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/3d/generations',
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 post_ai_articles(
self,
+92 -7
View File
@@ -16,7 +16,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictStr
from pydantic import Field, StrictInt, StrictStr
from typing import Any, List, Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.accounts import Accounts
@@ -2174,7 +2174,7 @@ class BillingApi:
) -> CapVerdict:
"""Answers whether one proposed spend fits inside this org's caps.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: a service token plus the gateway-pinned org, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: the platform, stating the org over the plane, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param project: Project narrows the verdict to one project's caps. Empty is the org-wide row.
:type project: str
@@ -2253,7 +2253,7 @@ class BillingApi:
) -> ApiResponse[CapVerdict]:
"""Answers whether one proposed spend fits inside this org's caps.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: a service token plus the gateway-pinned org, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: the platform, stating the org over the plane, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param project: Project narrows the verdict to one project's caps. Empty is the org-wide row.
:type project: str
@@ -2332,7 +2332,7 @@ class BillingApi:
) -> RESTResponseType:
"""Answers whether one proposed spend fits inside this org's caps.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: a service token plus the gateway-pinned org, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
Answers whether one proposed spend fits inside this org's caps. It is the per-request verdict the metering edge consumes before every priced call, and its caller is a SERVICE rather than a person: the platform, stating the org over the plane, with no user behind it. So this admits that principal where the CRUD beside it does not. Every covering row is evaluated, most-restrictive-wins, and the tightest one is what `capCents`, `spentCents` and `reason` describe. Soft rows never deny; nor does a project-scoped enforcing row whose project axis the caller could not establish — `pv=1` is how a caller states that it did, and an unproven claim must not be able to refuse traffic. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param project: Project narrows the verdict to one project's caps. Empty is the org-wide row.
:type project: str
@@ -2484,7 +2484,7 @@ class BillingApi:
) -> None:
"""Prepaid credit the caller's org can still spend
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401 — with one exception, the trusted in-process service token the AI gate itself presents, which reads the gateway-pinned org and nothing it could name. A balance that cannot be READ is 502, never 0: unknown is not broke.
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401. A balance that cannot be READ is 502, never 0: unknown is not broke.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -2546,7 +2546,7 @@ class BillingApi:
) -> ApiResponse[None]:
"""Prepaid credit the caller's org can still spend
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401 — with one exception, the trusted in-process service token the AI gate itself presents, which reads the gateway-pinned org and nothing it could name. A balance that cannot be READ is 502, never 0: unknown is not broke.
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401. A balance that cannot be READ is 502, never 0: unknown is not broke.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -2608,7 +2608,7 @@ class BillingApi:
) -> RESTResponseType:
"""Prepaid credit the caller's org can still spend
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401 — with one exception, the trusted in-process service token the AI gate itself presents, which reads the gateway-pinned org and nothing it could name. A balance that cannot be READ is 502, never 0: unknown is not broke.
Answers the spendable prepaid balance of the wallet this caller bills from — the same wallet the AI prepaid gate reads before admitting a paid request, the edge meter debits, and a top-up credits. The wallet is an ADDRESS, not an org: `account` echoes the key resolved within the ledger — the org's shared pool for a tenant org, a personal account for a member of the shared signup org. The echo is the point. A browser could only GUESS its own payer by decoding its own token, and a guess that disagrees with the server is how money lands in an account the gate never reads. `balance`, `holds` and `available` are whole USD cents, ROUNDED from the ledger's exact 18-decimal value. On the co-resident ledger `holds` is 0 and `available` equals `balance`: the gate's reservations live in its own pod and are never posted, so the settled balance IS the spendable one. The ledger is the caller's own org, taken from the VALIDATED IAM owner claim and never from a client header. No validated principal is 401. A balance that cannot be READ is 502, never 0: unknown is not broke.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -3950,6 +3950,11 @@ class BillingApi:
@validate_call
def get_billing_invoices(
self,
subject: Optional[StrictStr] = None,
status: Optional[StrictStr] = None,
subscription_id: Optional[StrictStr] = None,
limit: Optional[StrictInt] = None,
cursor: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -3967,6 +3972,16 @@ class BillingApi:
Lists the caller's invoices, newest first, with the count beside them. It is scoped to the caller's own billing subject — the wallet this request bills from, resolved server-side — so a query cannot widen it to another customer of the same org. An org with no invoices is an empty list, not a refusal. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param subject:
:type subject: str
:param status:
:type status: str
:param subscription_id:
:type subscription_id: str
:param limit:
:type limit: int
:param cursor:
:type cursor: 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
@@ -3990,6 +4005,11 @@ class BillingApi:
""" # noqa: E501
_param = self._get_billing_invoices_serialize(
subject=subject,
status=status,
subscription_id=subscription_id,
limit=limit,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4013,6 +4033,11 @@ class BillingApi:
@validate_call
def get_billing_invoices_with_http_info(
self,
subject: Optional[StrictStr] = None,
status: Optional[StrictStr] = None,
subscription_id: Optional[StrictStr] = None,
limit: Optional[StrictInt] = None,
cursor: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4030,6 +4055,16 @@ class BillingApi:
Lists the caller's invoices, newest first, with the count beside them. It is scoped to the caller's own billing subject — the wallet this request bills from, resolved server-side — so a query cannot widen it to another customer of the same org. An org with no invoices is an empty list, not a refusal. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param subject:
:type subject: str
:param status:
:type status: str
:param subscription_id:
:type subscription_id: str
:param limit:
:type limit: int
:param cursor:
:type cursor: 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
@@ -4053,6 +4088,11 @@ class BillingApi:
""" # noqa: E501
_param = self._get_billing_invoices_serialize(
subject=subject,
status=status,
subscription_id=subscription_id,
limit=limit,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4076,6 +4116,11 @@ class BillingApi:
@validate_call
def get_billing_invoices_without_preload_content(
self,
subject: Optional[StrictStr] = None,
status: Optional[StrictStr] = None,
subscription_id: Optional[StrictStr] = None,
limit: Optional[StrictInt] = None,
cursor: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@@ -4093,6 +4138,16 @@ class BillingApi:
Lists the caller's invoices, newest first, with the count beside them. It is scoped to the caller's own billing subject — the wallet this request bills from, resolved server-side — so a query cannot widen it to another customer of the same org. An org with no invoices is an empty list, not a refusal. A named handler, not a closure, so zipdoc can lift this prose into the registry.
:param subject:
:type subject: str
:param status:
:type status: str
:param subscription_id:
:type subscription_id: str
:param limit:
:type limit: int
:param cursor:
:type cursor: 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
@@ -4116,6 +4171,11 @@ class BillingApi:
""" # noqa: E501
_param = self._get_billing_invoices_serialize(
subject=subject,
status=status,
subscription_id=subscription_id,
limit=limit,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
@@ -4134,6 +4194,11 @@ class BillingApi:
def _get_billing_invoices_serialize(
self,
subject,
status,
subscription_id,
limit,
cursor,
_request_auth,
_content_type,
_headers,
@@ -4156,6 +4221,26 @@ class BillingApi:
# process the path parameters
# process the query parameters
if subject is not None:
_query_params.append(('subject', subject))
if status is not None:
_query_params.append(('status', status))
if subscription_id is not None:
_query_params.append(('subscriptionId', subscription_id))
if limit is not None:
_query_params.append(('limit', limit))
if cursor is not None:
_query_params.append(('cursor', cursor))
# process the header parameters
# process the form parameters
# process the body parameter
File diff suppressed because it is too large Load Diff
+523 -1
View File
@@ -17,8 +17,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictStr
from typing import Any, Optional
from typing import Any, Dict, List, Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.engine_replica import EngineReplica
from hanzoai.cloud.models.engine_replica_update import EngineReplicaUpdate
from hanzoai.cloud.models.engine_status import EngineStatus
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
@@ -548,6 +550,252 @@ class EngineApi:
@validate_call
def engine_replicas(
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,
) -> Dict[str, List[EngineReplica]]:
"""Read shared AI worker placement and health (SuperAdmin)
Replicas reads the private native router's configured model pools, worker health, concurrency, role preferences and observed time to first byte. This shared infrastructure inventory is restricted to platform SuperAdmins.
: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._engine_replicas_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
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 engine_replicas_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[Dict[str, List[EngineReplica]]]:
"""Read shared AI worker placement and health (SuperAdmin)
Replicas reads the private native router's configured model pools, worker health, concurrency, role preferences and observed time to first byte. This shared infrastructure inventory is restricted to platform SuperAdmins.
: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._engine_replicas_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
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 engine_replicas_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:
"""Read shared AI worker placement and health (SuperAdmin)
Replicas reads the private native router's configured model pools, worker health, concurrency, role preferences and observed time to first byte. This shared infrastructure inventory is restricted to platform SuperAdmins.
: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._engine_replicas_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _engine_replicas_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'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/engine/replicas',
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 engine_status(
self,
@@ -1038,3 +1286,277 @@ class EngineApi:
)
@validate_call
def engine_update_replica(
self,
engine_replica_update: EngineReplicaUpdate,
_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,
) -> Dict[str, List[EngineReplica]]:
"""Save shared AI worker capacity and role preferences (SuperAdmin)
Saves capacity, weight and preferred agent roles in the native router's pool file and applies them without dropping running streams or pins. Only platform SuperAdmins can retune shared workers. The Rust runtime owns validation, durable storage and activation; cloud only carries the operation.
:param engine_replica_update: (required)
:type engine_replica_update: EngineReplicaUpdate
: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._engine_update_replica_serialize(
engine_replica_update=engine_replica_update,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
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 engine_update_replica_with_http_info(
self,
engine_replica_update: EngineReplicaUpdate,
_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[Dict[str, List[EngineReplica]]]:
"""Save shared AI worker capacity and role preferences (SuperAdmin)
Saves capacity, weight and preferred agent roles in the native router's pool file and applies them without dropping running streams or pins. Only platform SuperAdmins can retune shared workers. The Rust runtime owns validation, durable storage and activation; cloud only carries the operation.
:param engine_replica_update: (required)
:type engine_replica_update: EngineReplicaUpdate
: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._engine_update_replica_serialize(
engine_replica_update=engine_replica_update,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
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 engine_update_replica_without_preload_content(
self,
engine_replica_update: EngineReplicaUpdate,
_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:
"""Save shared AI worker capacity and role preferences (SuperAdmin)
Saves capacity, weight and preferred agent roles in the native router's pool file and applies them without dropping running streams or pins. Only platform SuperAdmins can retune shared workers. The Rust runtime owns validation, durable storage and activation; cloud only carries the operation.
:param engine_replica_update: (required)
:type engine_replica_update: EngineReplicaUpdate
: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._engine_update_replica_serialize(
engine_replica_update=engine_replica_update,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Dict[str, List[EngineReplica]]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _engine_update_replica_serialize(
self,
engine_replica_update,
_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 engine_replica_update is not None:
_body_params = engine_replica_update
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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/engine/replicas',
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
)
+3 -3
View File
@@ -321,7 +321,7 @@ class ExecApi:
) -> CodeResult:
"""Run a code snippet in a sandboxed interpreter
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying neither a validated principal nor exec's own admission marker, so those entry points fail closed without a second gate to keep in step.
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying no validated principal, so those entry points fail closed without a second gate to keep in step.
:param code_run: (required)
:type code_run: CodeRun
@@ -388,7 +388,7 @@ class ExecApi:
) -> ApiResponse[CodeResult]:
"""Run a code snippet in a sandboxed interpreter
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying neither a validated principal nor exec's own admission marker, so those entry points fail closed without a second gate to keep in step.
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying no validated principal, so those entry points fail closed without a second gate to keep in step.
:param code_run: (required)
:type code_run: CodeRun
@@ -455,7 +455,7 @@ class ExecApi:
) -> RESTResponseType:
"""Run a code snippet in a sandboxed interpreter
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying neither a validated principal nor exec's own admission marker, so those entry points fail closed without a second gate to keep in step.
Executes a program in a throwaway sandbox and answers with what it printed and what it left behind. `lang` names one of the thirteen the sandbox image carries — py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90 — and `code` is the whole program, not a fragment: a compiled language is compiled and then run, an interpreted one is interpreted, and `args` becomes the program's own argv either way. Nothing is installed for you; the image is the environment. A PROGRAM THAT FAILS IS A SUCCESSFUL CALL. A non-zero exit answers 200 with the diagnostics on `stderr`, because \"the code threw\" and \"the interpreter is down\" are different facts a caller renders differently. Only the second is an error status. Runs are stateful through `session_id`. Omit it and the run gets a fresh sandbox whose id comes back on the answer; pass that id again and the next run sees the same filesystem, so a program can write a file one call and read it the next. `files` names bytes already uploaded to a session (POST /v1/exec/upload), copied in before the program starts. `files` on the ANSWER is what the program created or changed, by comparison against a marker taken at start — so it is the run's real output, not a listing of the directory — and each is fetched from GET /v1/exec/download/{session}/{name}. The tenant is the caller's, never the body's, at every entry point. A typed op is also an MCP tool and an op-plane op; MCP's tools/call invokes it directly, with no route and therefore no middleware, so nothing there could have checked a credential. tenantOf refuses a context carrying no validated principal, so those entry points fail closed without a second gate to keep in step.
:param code_run: (required)
:type code_run: CodeRun
File diff suppressed because it is too large Load Diff
+550
View File
@@ -21,6 +21,7 @@ from typing import Optional
from typing_extensions import Annotated
from hanzoai.cloud.models.graph_assert_in import GraphAssertIn
from hanzoai.cloud.models.graph_assert_out import GraphAssertOut
from hanzoai.cloud.models.graph_extract_out import GraphExtractOut
from hanzoai.cloud.models.graph_neighbors_in import GraphNeighborsIn
from hanzoai.cloud.models.graph_neighbors_out import GraphNeighborsOut
from hanzoai.cloud.models.graph_qlin import GraphQLIn
@@ -28,6 +29,7 @@ from hanzoai.cloud.models.graph_ql_out import GraphQLOut
from hanzoai.cloud.models.graph_read_out import GraphReadOut
from hanzoai.cloud.models.graph_resolve_in import GraphResolveIn
from hanzoai.cloud.models.graph_resolve_out import GraphResolveOut
from hanzoai.cloud.models.graph_source_in import GraphSourceIn
from hanzoai.cloud.models.graph_vocabulary_out import GraphVocabularyOut
from hanzoai.cloud.api_client import ApiClient, RequestSerialized
@@ -319,6 +321,554 @@ class GraphApi:
@validate_call
def graph_extract(
self,
graph_source_in: GraphSourceIn,
_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,
) -> GraphExtractOut:
"""Read the relations a source states, without recording them
Reads a source and returns the relations it states, recording nothing. It is how a caller sees what a document would file before the plane — which has no update and no delete — has anything filed into it. A relation is stated as `relation:: value` on its own line; prose states none. A value written `[[key]]` names another entity, which makes the assertion an edge. The subject is the nearest heading above the line, or the request's `subject` until a heading names one.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_extract_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphExtractOut",
}
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 graph_extract_with_http_info(
self,
graph_source_in: GraphSourceIn,
_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[GraphExtractOut]:
"""Read the relations a source states, without recording them
Reads a source and returns the relations it states, recording nothing. It is how a caller sees what a document would file before the plane — which has no update and no delete — has anything filed into it. A relation is stated as `relation:: value` on its own line; prose states none. A value written `[[key]]` names another entity, which makes the assertion an edge. The subject is the nearest heading above the line, or the request's `subject` until a heading names one.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_extract_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphExtractOut",
}
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 graph_extract_without_preload_content(
self,
graph_source_in: GraphSourceIn,
_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:
"""Read the relations a source states, without recording them
Reads a source and returns the relations it states, recording nothing. It is how a caller sees what a document would file before the plane — which has no update and no delete — has anything filed into it. A relation is stated as `relation:: value` on its own line; prose states none. A value written `[[key]]` names another entity, which makes the assertion an edge. The subject is the nearest heading above the line, or the request's `subject` until a heading names one.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_extract_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphExtractOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _graph_extract_serialize(
self,
graph_source_in,
_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 graph_source_in is not None:
_body_params = graph_source_in
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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='POST',
resource_path='/v1/graph/extract',
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 graph_ingest(
self,
graph_source_in: GraphSourceIn,
_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,
) -> GraphAssertOut:
"""Read a source and record what it states as assertions
Reads a source and records what it states into the calling organization's graph — the same store, the same admission and the same content address as POST /v1/graph, because this operation ends by calling that one. Every assertion carries the source it came from and, as its evidence, the section that stated it: `<source>#<section>`. Delivering the same source at the same `at` twice therefore records one set of rows and reports the rest as duplicates, which is the property a retrying importer depends on. A source that states no relation is refused rather than recorded as an empty success: a caller that wrote its document in prose has been told nothing by a 200 that filed nothing.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_ingest_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphAssertOut",
}
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 graph_ingest_with_http_info(
self,
graph_source_in: GraphSourceIn,
_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[GraphAssertOut]:
"""Read a source and record what it states as assertions
Reads a source and records what it states into the calling organization's graph — the same store, the same admission and the same content address as POST /v1/graph, because this operation ends by calling that one. Every assertion carries the source it came from and, as its evidence, the section that stated it: `<source>#<section>`. Delivering the same source at the same `at` twice therefore records one set of rows and reports the rest as duplicates, which is the property a retrying importer depends on. A source that states no relation is refused rather than recorded as an empty success: a caller that wrote its document in prose has been told nothing by a 200 that filed nothing.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_ingest_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphAssertOut",
}
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 graph_ingest_without_preload_content(
self,
graph_source_in: GraphSourceIn,
_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:
"""Read a source and record what it states as assertions
Reads a source and records what it states into the calling organization's graph — the same store, the same admission and the same content address as POST /v1/graph, because this operation ends by calling that one. Every assertion carries the source it came from and, as its evidence, the section that stated it: `<source>#<section>`. Delivering the same source at the same `at` twice therefore records one set of rows and reports the rest as duplicates, which is the property a retrying importer depends on. A source that states no relation is refused rather than recorded as an empty success: a caller that wrote its document in prose has been told nothing by a 200 that filed nothing.
:param graph_source_in: (required)
:type graph_source_in: GraphSourceIn
: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._graph_ingest_serialize(
graph_source_in=graph_source_in,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "GraphAssertOut",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _graph_ingest_serialize(
self,
graph_source_in,
_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 graph_source_in is not None:
_body_params = graph_source_in
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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='POST',
resource_path='/v1/graph/ingest',
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 graph_neighbors(
self,
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+274 -274
View File
@@ -5924,6 +5924,280 @@ class PlatformApi:
@validate_call
def post_build(
self,
runner_build_req: RunnerBuildReq,
_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,
) -> RunnerBuildResp:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_build_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def post_build_with_http_info(
self,
runner_build_req: RunnerBuildReq,
_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[RunnerBuildResp]:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_build_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def post_build_without_preload_content(
self,
runner_build_req: RunnerBuildReq,
_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:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_build_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_build_serialize(
self,
runner_build_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 runner_build_req is not None:
_body_params = runner_build_req
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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='POST',
resource_path='/v1/build',
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 post_platform_apps(
self,
@@ -9378,280 +9652,6 @@ class PlatformApi:
@validate_call
def post_platform_runner(
self,
runner_build_req: RunnerBuildReq,
_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,
) -> RunnerBuildResp:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_platform_runner_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def post_platform_runner_with_http_info(
self,
runner_build_req: RunnerBuildReq,
_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[RunnerBuildResp]:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_platform_runner_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def post_platform_runner_without_preload_content(
self,
runner_build_req: RunnerBuildReq,
_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:
"""Triggers a native build — an image, or the binaries a repo declares.
Triggers a native build — an image, or the binaries a repo declares. The fabric's own build trigger, and what `hanzo build` and git-push-to-deploy call. It answers 202 with the build job id: a queued build, not a pushed artifact. Two lanes, and a build is exactly one of them. The IMAGE lane takes `repo` and the output `image` and launches a BuildKit Job that pushes it. The ARTIFACT lane takes `binaries` — the same recipe the repo's hanzo.yml declares — and publishes to object storage instead; it must carry no `image`, because a build produces binaries or an image, never both. PRIVILEGED, and A BUILD BELONGS TO THE ORGANIZATION ITS CREDENTIAL NAMES. Two credentials, never a third: - one that NAMES an organization — a person who administers it (the `hanzo build` path, so one IAM login authorizes a build with no separate build token), or that organization's own machine identity (the pipeline path). The build is attributed to that org and confined to what it owns. - the shared build-callback token, compared in constant time. It names NO organization, which is both why the fabric's own release can publish across brands with it and why anything that CAN name one is read first. Both are bounded by the owned-registry allowlist. The org path is bounded again, by the org: the image's registry namespace must be one that organization owns, so it publishes into its own brand and can never overwrite another's through the shared push credential. The same confinement applies to the artifact lane's repo owner. There is no request field naming an organization — the attribution is read off the credential, so there is nothing for a caller to write it with. The output image is parsed and validated as a single well-formed OCI ref before any authorization decision reads it, so a crafted ref cannot smuggle a build-exporter attribute past the check.
:param runner_build_req: (required)
:type runner_build_req: RunnerBuildReq
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_platform_runner_serialize(
runner_build_req=runner_build_req,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'202': "RunnerBuildResp",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_platform_runner_serialize(
self,
runner_build_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 runner_build_req is not None:
_body_params = runner_build_req
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/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='POST',
resource_path='/v1/platform/runner',
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_platform_projects_by_project_apps_by_app_env(
self,
+253 -6
View File
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
from pydantic import Field, StrictStr
from typing import Any, Dict
from typing_extensions import Annotated
from hanzoai.cloud.models.card import Card
from hanzoai.cloud.models.enablement_board import EnablementBoard
from hanzoai.cloud.models.enablement_opt_ref import EnablementOptRef
from hanzoai.cloud.models.pricing_health import PricingHealth
@@ -5969,6 +5970,252 @@ class PricingApi:
@validate_call
def get_pricing_tariff(
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,
) -> Card:
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
: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_pricing_tariff_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Card",
}
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_pricing_tariff_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[Card]:
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
: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_pricing_tariff_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Card",
}
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_pricing_tariff_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:
"""Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for.
Returns the platform's rate card: what a bill is made of, what each part costs, and the completion windows a request may ask for. FOUR COMPONENTS, and every charge is one of them — model inference, computer, web tools and media generation. Two are quoted before they run, so an agent is refused before it breaches its budget; two are booked from what they used, because neither a provider's charge nor a render's cost is knowable in advance. EVERY AMOUNT IS INTEGER MICRO-USD (1 USD = 1,000,000), stated once in `unit`, and each rate says what one unit of it is in `per`. The compute rates are per HOUR because that is the unit a span is priced in — rate × seconds / 3600 — and because a GiB-second is four and a half micro-USD, which no integer holds. The rates are the ones the ledger books: each is resolved through the same authority the metering path reads, falling back to the same compiled floor. A rate of zero is a price and not an absence — a paused computer, a computer's creation, the interfaces and a seat all cost nothing by design.
: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_pricing_tariff_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Card",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_pricing_tariff_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'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v1/pricing/tariff',
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_pricing_tools(
self,
@@ -5985,9 +6232,9 @@ class PricingApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PricingToolList:
"""Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -6048,9 +6295,9 @@ class PricingApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[PricingToolList]:
"""Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
@@ -6111,9 +6358,9 @@ class PricingApi:
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
"""Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit.
Returns the per-use tool prices — web search, web fetch, code interpreter, file storage, image generation, speech-to-text and text-to-speech — each with the unit it is billed by and its price in that unit. The two WEB rows are priced from the rate card rather than from the catalog, because those are the rows the platform charges by the call and a published number that is also a charged one has exactly one home (see tariff.go). Read them as integer micro-USD at /v1/pricing/tariff; the decimal here is the display this list has always carried.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+522
View File
@@ -3476,6 +3476,528 @@ class SandboxApi:
@validate_call
def post_sandbox_by_id_pause(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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,
) -> Sandbox:
"""Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause.
Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause. The claim, the stop and the ship are ONE settlement for the same reason a retirement is — the snapshot that carries the advanced watermark has to carry the new state, or a successor hydrates a running row for a pod that is gone and bills for it until the reaper notices.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_pause_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def post_sandbox_by_id_pause_with_http_info(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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[Sandbox]:
"""Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause.
Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause. The claim, the stop and the ship are ONE settlement for the same reason a retirement is — the snapshot that carries the advanced watermark has to carry the new state, or a successor hydrates a running row for a pod that is gone and bills for it until the reaper notices.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_pause_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def post_sandbox_by_id_pause_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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:
"""Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause.
Stops the pod, keeps the row and the volume, and settles the tail: POST /v1/sandbox/:id/pause. The claim, the stop and the ship are ONE settlement for the same reason a retirement is — the snapshot that carries the advanced watermark has to carry the new state, or a successor hydrates a running row for a pod that is gone and bills for it until the reaper notices.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_pause_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_sandbox_by_id_pause_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/sandbox/{id}/pause',
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 post_sandbox_by_id_resume(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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,
) -> Sandbox:
"""Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume.
Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume. The pod is NEW. Its name is minted fresh because a pod name is never reused (store.go), the volume it mounts is the one the row already names, and the credential is the RESUMING caller's rather than the one that took the lease — a session is short-lived and the one that parked it is gone.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_resume_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def post_sandbox_by_id_resume_with_http_info(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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[Sandbox]:
"""Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume.
Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume. The pod is NEW. Its name is minted fresh because a pod name is never reused (store.go), the volume it mounts is the one the row already names, and the credential is the RESUMING caller's rather than the one that took the lease — a session is short-lived and the one that parked it is gone.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_resume_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def post_sandbox_by_id_resume_without_preload_content(
self,
id: Annotated[StrictStr, Field(description="ID is the sandbox to address, from the path.")],
_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:
"""Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume.
Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume. The pod is NEW. Its name is minted fresh because a pod name is never reused (store.go), the volume it mounts is the one the row already names, and the credential is the RESUMING caller's rather than the one that took the lease — a session is short-lived and the one that parked it is gone.
:param id: ID is the sandbox to address, from the path. (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._post_sandbox_by_id_resume_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Sandbox",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _post_sandbox_by_id_resume_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/v1/sandbox/{id}/resume',
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 post_sandbox_by_id_screen_ticket(
self,
+114 -12
View File
@@ -303,6 +303,7 @@ from hanzoai.cloud.models.capture_batch import CaptureBatch
from hanzoai.cloud.models.capture_event import CaptureEvent
from hanzoai.cloud.models.capture_result import CaptureResult
from hanzoai.cloud.models.captured_error import CapturedError
from hanzoai.cloud.models.card import Card
from hanzoai.cloud.models.cart import Cart
from hanzoai.cloud.models.cart_item import CartItem
from hanzoai.cloud.models.cart_item_set import CartItemSet
@@ -372,8 +373,8 @@ from hanzoai.cloud.models.commerce_overview import CommerceOverview
from hanzoai.cloud.models.commit_json import CommitJSON
from hanzoai.cloud.models.commits_json import CommitsJSON
from hanzoai.cloud.models.completion import Completion
from hanzoai.cloud.models.component import Component
from hanzoai.cloud.models.config import Config
from hanzoai.cloud.models.conn_view import ConnView
from hanzoai.cloud.models.connect_in import ConnectIn
from hanzoai.cloud.models.connect_out import ConnectOut
from hanzoai.cloud.models.connect_request import ConnectRequest
@@ -383,12 +384,8 @@ from hanzoai.cloud.models.connection_view import ConnectionView
from hanzoai.cloud.models.connector_action import ConnectorAction
from hanzoai.cloud.models.connector_auth import ConnectorAuth
from hanzoai.cloud.models.connector_metadata import ConnectorMetadata
from hanzoai.cloud.models.connector_provider_view import ConnectorProviderView
from hanzoai.cloud.models.connector_providers_out import ConnectorProvidersOut
from hanzoai.cloud.models.connector_token_out import ConnectorTokenOut
from hanzoai.cloud.models.connector_trigger import ConnectorTrigger
from hanzoai.cloud.models.connector_view import ConnectorView
from hanzoai.cloud.models.connectors_out import ConnectorsOut
from hanzoai.cloud.models.console_settings import ConsoleSettings
from hanzoai.cloud.models.console_settings_dex_config import ConsoleSettingsDexConfig
from hanzoai.cloud.models.console_settings_google_analytics import ConsoleSettingsGoogleAnalytics
@@ -424,8 +421,6 @@ from hanzoai.cloud.models.create_req import CreateReq
from hanzoai.cloud.models.create_server_req import CreateServerReq
from hanzoai.cloud.models.create_version_in import CreateVersionIn
from hanzoai.cloud.models.create_wallet_in import CreateWalletIn
from hanzoai.cloud.models.credential_in import CredentialIn
from hanzoai.cloud.models.credential_out import CredentialOut
from hanzoai.cloud.models.credit_balance import CreditBalance
from hanzoai.cloud.models.credit_entry import CreditEntry
from hanzoai.cloud.models.credit_grant import CreditGrant
@@ -492,9 +487,6 @@ from hanzoai.cloud.models.destination_list import DestinationList
from hanzoai.cloud.models.destination_status import DestinationStatus
from hanzoai.cloud.models.destination_test import DestinationTest
from hanzoai.cloud.models.detachment import Detachment
from hanzoai.cloud.models.device_poll_out import DevicePollOut
from hanzoai.cloud.models.device_start_in import DeviceStartIn
from hanzoai.cloud.models.device_start_out import DeviceStartOut
from hanzoai.cloud.models.device_view import DeviceView
from hanzoai.cloud.models.diagnostic import Diagnostic
from hanzoai.cloud.models.disconnect_out import DisconnectOut
@@ -532,6 +524,8 @@ from hanzoai.cloud.models.endpoint_list import EndpointList
from hanzoai.cloud.models.endpoint_req import EndpointReq
from hanzoai.cloud.models.endpoint_view import EndpointView
from hanzoai.cloud.models.engine_advertisement import EngineAdvertisement
from hanzoai.cloud.models.engine_replica import EngineReplica
from hanzoai.cloud.models.engine_replica_update import EngineReplicaUpdate
from hanzoai.cloud.models.engine_status import EngineStatus
from hanzoai.cloud.models.enroll_input import EnrollInput
from hanzoai.cloud.models.enroll_req import EnrollReq
@@ -724,6 +718,7 @@ from hanzoai.cloud.models.graph import Graph
from hanzoai.cloud.models.graph_assert_in import GraphAssertIn
from hanzoai.cloud.models.graph_assert_out import GraphAssertOut
from hanzoai.cloud.models.graph_edge import GraphEdge
from hanzoai.cloud.models.graph_extract_out import GraphExtractOut
from hanzoai.cloud.models.graph_fact import GraphFact
from hanzoai.cloud.models.graph_neighbors_in import GraphNeighborsIn
from hanzoai.cloud.models.graph_neighbors_out import GraphNeighborsOut
@@ -735,6 +730,8 @@ from hanzoai.cloud.models.graph_ql_out import GraphQLOut
from hanzoai.cloud.models.graph_read_out import GraphReadOut
from hanzoai.cloud.models.graph_resolve_in import GraphResolveIn
from hanzoai.cloud.models.graph_resolve_out import GraphResolveOut
from hanzoai.cloud.models.graph_source_in import GraphSourceIn
from hanzoai.cloud.models.graph_triple import GraphTriple
from hanzoai.cloud.models.graph_vocabulary_out import GraphVocabularyOut
from hanzoai.cloud.models.handle_request import HandleRequest
from hanzoai.cloud.models.handle_set import HandleSet
@@ -768,6 +765,7 @@ from hanzoai.cloud.models.iam_address import IamAddress
from hanzoai.cloud.models.iam_answer import IamAnswer
from hanzoai.cloud.models.iam_application import IamApplication
from hanzoai.cloud.models.iam_application_list_result import IamApplicationListResult
from hanzoai.cloud.models.iam_approval import IamApproval
from hanzoai.cloud.models.iam_assume_body import IamAssumeBody
from hanzoai.cloud.models.iam_audit_log import IamAuditLog
from hanzoai.cloud.models.iam_bulk import IamBulk
@@ -922,6 +920,7 @@ from hanzoai.cloud.models.item_view import ItemView
from hanzoai.cloud.models.job_cancel import JobCancel
from hanzoai.cloud.models.job_canceled import JobCanceled
from hanzoai.cloud.models.job_list import JobList
from hanzoai.cloud.models.job_view import JobView
from hanzoai.cloud.models.join_failure import JoinFailure
from hanzoai.cloud.models.journey_step import JourneyStep
from hanzoai.cloud.models.judge_spec import JudgeSpec
@@ -1101,6 +1100,7 @@ from hanzoai.cloud.models.o11y_ann_queue_deleted import O11yAnnQueueDeleted
from hanzoai.cloud.models.o11y_ann_queue_detail_view import O11yAnnQueueDetailView
from hanzoai.cloud.models.o11y_ann_queue_list import O11yAnnQueueList
from hanzoai.cloud.models.o11y_ann_queue_view import O11yAnnQueueView
from hanzoai.cloud.models.o11y_approval import O11yApproval
from hanzoai.cloud.models.o11y_associated_component import O11yAssociatedComponent
from hanzoai.cloud.models.o11y_attribute_key import O11yAttributeKey
from hanzoai.cloud.models.o11y_attributes_component_entry import O11yAttributesComponentEntry
@@ -1855,7 +1855,6 @@ from hanzoai.cloud.models.o11y_waterfall_span import O11yWaterfallSpan
from hanzoai.cloud.models.o11y_webex_config import O11yWebexConfig
from hanzoai.cloud.models.o11y_webhook_config import O11yWebhookConfig
from hanzoai.cloud.models.o11y_wechat_config import O11yWechatConfig
from hanzoai.cloud.models.oauth_bundle_in import OauthBundleIn
from hanzoai.cloud.models.object_item import ObjectItem
from hanzoai.cloud.models.object_list import ObjectList
from hanzoai.cloud.models.obligation import Obligation
@@ -1924,6 +1923,60 @@ from hanzoai.cloud.models.patch_session_in import PatchSessionIn
from hanzoai.cloud.models.patch_sync_in import PatchSyncIn
from hanzoai.cloud.models.patch_target_in import PatchTargetIn
from hanzoai.cloud.models.path_in import PathIn
from hanzoai.cloud.models.patrol_act import PatrolAct
from hanzoai.cloud.models.patrol_activation import PatrolActivation
from hanzoai.cloud.models.patrol_alarm_in import PatrolAlarmIn
from hanzoai.cloud.models.patrol_alarm_out import PatrolAlarmOut
from hanzoai.cloud.models.patrol_camera import PatrolCamera
from hanzoai.cloud.models.patrol_camera_list import PatrolCameraList
from hanzoai.cloud.models.patrol_checkpoint import PatrolCheckpoint
from hanzoai.cloud.models.patrol_checkpoint_out import PatrolCheckpointOut
from hanzoai.cloud.models.patrol_clock import PatrolClock
from hanzoai.cloud.models.patrol_confirm_in import PatrolConfirmIn
from hanzoai.cloud.models.patrol_estate import PatrolEstate
from hanzoai.cloud.models.patrol_event import PatrolEvent
from hanzoai.cloud.models.patrol_event_in import PatrolEventIn
from hanzoai.cloud.models.patrol_event_list import PatrolEventList
from hanzoai.cloud.models.patrol_event_out import PatrolEventOut
from hanzoai.cloud.models.patrol_fix import PatrolFix
from hanzoai.cloud.models.patrol_fix_in import PatrolFixIn
from hanzoai.cloud.models.patrol_fix_out import PatrolFixOut
from hanzoai.cloud.models.patrol_fixed import PatrolFixed
from hanzoai.cloud.models.patrol_incident import PatrolIncident
from hanzoai.cloud.models.patrol_incident_act import PatrolIncidentAct
from hanzoai.cloud.models.patrol_incident_in import PatrolIncidentIn
from hanzoai.cloud.models.patrol_incident_list import PatrolIncidentList
from hanzoai.cloud.models.patrol_incident_out import PatrolIncidentOut
from hanzoai.cloud.models.patrol_key import PatrolKey
from hanzoai.cloud.models.patrol_key_list import PatrolKeyList
from hanzoai.cloud.models.patrol_key_out import PatrolKeyOut
from hanzoai.cloud.models.patrol_move_in import PatrolMoveIn
from hanzoai.cloud.models.patrol_near_list import PatrolNearList
from hanzoai.cloud.models.patrol_nearest import PatrolNearest
from hanzoai.cloud.models.patrol_note import PatrolNote
from hanzoai.cloud.models.patrol_note_in import PatrolNoteIn
from hanzoai.cloud.models.patrol_note_list import PatrolNoteList
from hanzoai.cloud.models.patrol_note_out import PatrolNoteOut
from hanzoai.cloud.models.patrol_report import PatrolReport
from hanzoai.cloud.models.patrol_report_in import PatrolReportIn
from hanzoai.cloud.models.patrol_report_out import PatrolReportOut
from hanzoai.cloud.models.patrol_site import PatrolSite
from hanzoai.cloud.models.patrol_site_edit import PatrolSiteEdit
from hanzoai.cloud.models.patrol_site_list import PatrolSiteList
from hanzoai.cloud.models.patrol_site_out import PatrolSiteOut
from hanzoai.cloud.models.patrol_snapshot_out import PatrolSnapshotOut
from hanzoai.cloud.models.patrol_stream import PatrolStream
from hanzoai.cloud.models.patrol_stream_out import PatrolStreamOut
from hanzoai.cloud.models.patrol_tenant import PatrolTenant
from hanzoai.cloud.models.patrol_tenant_out import PatrolTenantOut
from hanzoai.cloud.models.patrol_ticket_out import PatrolTicketOut
from hanzoai.cloud.models.patrol_tour import PatrolTour
from hanzoai.cloud.models.patrol_tour_list import PatrolTourList
from hanzoai.cloud.models.patrol_unit import PatrolUnit
from hanzoai.cloud.models.patrol_unit_list import PatrolUnitList
from hanzoai.cloud.models.patrol_unit_out import PatrolUnitOut
from hanzoai.cloud.models.patrol_unit_state_in import PatrolUnitStateIn
from hanzoai.cloud.models.patrol_zone import PatrolZone
from hanzoai.cloud.models.payment_config import PaymentConfig
from hanzoai.cloud.models.payout import Payout
from hanzoai.cloud.models.period_earning_view import PeriodEarningView
@@ -1954,7 +2007,11 @@ from hanzoai.cloud.models.policy import Policy
from hanzoai.cloud.models.policy_list import PolicyList
from hanzoai.cloud.models.pool import Pool
from hanzoai.cloud.models.pool_create import PoolCreate
from hanzoai.cloud.models.pool_declare import PoolDeclare
from hanzoai.cloud.models.pool_declared import PoolDeclared
from hanzoai.cloud.models.pool_list import PoolList
from hanzoai.cloud.models.pool_scale import PoolScale
from hanzoai.cloud.models.pool_view import PoolView
from hanzoai.cloud.models.pools import Pools
from hanzoai.cloud.models.populated_flow import PopulatedFlow
from hanzoai.cloud.models.position import Position
@@ -2087,6 +2144,7 @@ from hanzoai.cloud.models.rag_embed_result import RagEmbedResult
from hanzoai.cloud.models.raise_in import RaiseIn
from hanzoai.cloud.models.ran import Ran
from hanzoai.cloud.models.range import Range
from hanzoai.cloud.models.rate import Rate
from hanzoai.cloud.models.rate_card import RateCard
from hanzoai.cloud.models.reach import Reach
from hanzoai.cloud.models.reachability import Reachability
@@ -2118,7 +2176,6 @@ from hanzoai.cloud.models.reference_sets_out import ReferenceSetsOut
from hanzoai.cloud.models.reference_source import ReferenceSource
from hanzoai.cloud.models.reference_taken import ReferenceTaken
from hanzoai.cloud.models.reference_version import ReferenceVersion
from hanzoai.cloud.models.refresh_out import RefreshOut
from hanzoai.cloud.models.refresh_reference_in import RefreshReferenceIn
from hanzoai.cloud.models.refresh_reference_out import RefreshReferenceOut
from hanzoai.cloud.models.refs_json import RefsJSON
@@ -2150,6 +2207,7 @@ from hanzoai.cloud.models.renew_req import RenewReq
from hanzoai.cloud.models.renew_result import RenewResult
from hanzoai.cloud.models.replace_kit_in import ReplaceKitIn
from hanzoai.cloud.models.replay_body import ReplayBody
from hanzoai.cloud.models.reply import Reply
from hanzoai.cloud.models.repo_list import RepoList
from hanzoai.cloud.models.repo_tree import RepoTree
from hanzoai.cloud.models.repo_view import RepoView
@@ -2255,10 +2313,31 @@ from hanzoai.cloud.models.run_record import RunRecord
from hanzoai.cloud.models.run_req import RunReq
from hanzoai.cloud.models.run_request import RunRequest
from hanzoai.cloud.models.run_resp import RunResp
from hanzoai.cloud.models.run_start import RunStart
from hanzoai.cloud.models.run_summary import RunSummary
from hanzoai.cloud.models.run_view import RunView
from hanzoai.cloud.models.runner_build_req import RunnerBuildReq
from hanzoai.cloud.models.runner_build_resp import RunnerBuildResp
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
from hanzoai.cloud.models.runner_identity import RunnerIdentity
from hanzoai.cloud.models.runner_line import RunnerLine
from hanzoai.cloud.models.runner_list import RunnerList
from hanzoai.cloud.models.runner_log_in import RunnerLogIn
from hanzoai.cloud.models.runner_log_out import RunnerLogOut
from hanzoai.cloud.models.runner_need import RunnerNeed
from hanzoai.cloud.models.runner_pair import RunnerPair
from hanzoai.cloud.models.runner_register_in import RunnerRegisterIn
from hanzoai.cloud.models.runner_register_out import RunnerRegisterOut
from hanzoai.cloud.models.runner_state import RunnerState
from hanzoai.cloud.models.runner_state_in import RunnerStateIn
from hanzoai.cloud.models.runner_state_out import RunnerStateOut
from hanzoai.cloud.models.runner_step import RunnerStep
from hanzoai.cloud.models.runner_task import RunnerTask
from hanzoai.cloud.models.runner_task_in import RunnerTaskIn
from hanzoai.cloud.models.runner_task_out import RunnerTaskOut
from hanzoai.cloud.models.runner_view import RunnerView
from hanzoai.cloud.models.runs import Runs
from hanzoai.cloud.models.s3_health import S3Health
from hanzoai.cloud.models.sms import SMS
@@ -2328,6 +2407,8 @@ from hanzoai.cloud.models.service_detail import ServiceDetail
from hanzoai.cloud.models.service_in import ServiceIn
from hanzoai.cloud.models.service_port import ServicePort
from hanzoai.cloud.models.session import Session
from hanzoai.cloud.models.session_budget_in import SessionBudgetIn
from hanzoai.cloud.models.session_budget_view import SessionBudgetView
from hanzoai.cloud.models.session_detail import SessionDetail
from hanzoai.cloud.models.session_ended import SessionEnded
from hanzoai.cloud.models.session_list import SessionList
@@ -2351,7 +2432,22 @@ from hanzoai.cloud.models.skill import Skill
from hanzoai.cloud.models.skill_deleted import SkillDeleted
from hanzoai.cloud.models.skill_in import SkillIn
from hanzoai.cloud.models.skill_written import SkillWritten
from hanzoai.cloud.models.slack_channels_out import SlackChannelsOut
from hanzoai.cloud.models.slack_conversation import SlackConversation
from hanzoai.cloud.models.slack_delete_message_out import SlackDeleteMessageOut
from hanzoai.cloud.models.slack_file import SlackFile
from hanzoai.cloud.models.slack_join_out import SlackJoinOut
from hanzoai.cloud.models.slack_message import SlackMessage
from hanzoai.cloud.models.slack_messages_out import SlackMessagesOut
from hanzoai.cloud.models.slack_react_in import SlackReactIn
from hanzoai.cloud.models.slack_react_out import SlackReactOut
from hanzoai.cloud.models.slack_search_hit import SlackSearchHit
from hanzoai.cloud.models.slack_search_in import SlackSearchIn
from hanzoai.cloud.models.slack_search_out import SlackSearchOut
from hanzoai.cloud.models.slack_send_message_in import SlackSendMessageIn
from hanzoai.cloud.models.slack_send_message_out import SlackSendMessageOut
from hanzoai.cloud.models.slack_update_message_in import SlackUpdateMessageIn
from hanzoai.cloud.models.slack_update_message_out import SlackUpdateMessageOut
from hanzoai.cloud.models.slot_view import SlotView
from hanzoai.cloud.models.social_account import SocialAccount
from hanzoai.cloud.models.social_account_body import SocialAccountBody
@@ -2376,8 +2472,10 @@ from hanzoai.cloud.models.space_list import SpaceList
from hanzoai.cloud.models.span import Span
from hanzoai.cloud.models.span_body import SpanBody
from hanzoai.cloud.models.spec import Spec
from hanzoai.cloud.models.speed import Speed
from hanzoai.cloud.models.spend import Spend
from hanzoai.cloud.models.spend_point import SpendPoint
from hanzoai.cloud.models.spend_view import SpendView
from hanzoai.cloud.models.starter_kit import StarterKit
from hanzoai.cloud.models.state import State
from hanzoai.cloud.models.state_graph import StateGraph
@@ -2582,6 +2680,10 @@ from hanzoai.cloud.models.wire_instructions import WireInstructions
from hanzoai.cloud.models.worker_list import WorkerList
from hanzoai.cloud.models.worker_script_put import WorkerScriptPut
from hanzoai.cloud.models.workflow import Workflow
from hanzoai.cloud.models.workflow_list import WorkflowList
from hanzoai.cloud.models.workflow_run import WorkflowRun
from hanzoai.cloud.models.workflow_runs import WorkflowRuns
from hanzoai.cloud.models.workflow_view import WorkflowView
from hanzoai.cloud.models.world_index import WorldIndex
from hanzoai.cloud.models.world_wire import WorldWire
from hanzoai.cloud.models.write_in import WriteIn
+9 -1
View File
@@ -28,15 +28,19 @@ class AgentDetail(BaseModel):
AgentDetail
""" # noqa: E501
avatar: Optional[StrictStr] = None
cap_micro_usd: Optional[StrictInt] = None
compute_ref: Optional[StrictStr] = Field(default=None, alias="computeRef")
consumed_micro_usd: Optional[StrictInt] = None
created_at: Optional[StrictStr] = Field(default=None, alias="createdAt")
description: Optional[StrictStr] = None
emoji: Optional[StrictStr] = None
execution_mode: Optional[StrictStr] = Field(default=None, alias="executionMode")
id: Optional[StrictStr] = None
instructions: Optional[StrictStr] = Field(default=None, description="Instructions is the agent's system prompt, verbatim, up to 32 KiB. It is the one field the list read withholds, because it is the agent's whole behaviour and a page of them would be a page of prompts.")
max_task_micro_usd: Optional[StrictInt] = None
model: Optional[StrictStr] = None
name: Optional[StrictStr] = None
period: Optional[StrictStr] = None
recent_runs: Optional[List[AgentRunView]] = Field(default=None, description="RecentRuns is the agent's 20 most recent executions, newest first. It is a window on the history, not the history: the count beside it is `runs`.", alias="recentRuns")
runs: Optional[StrictInt] = None
schedule: Optional[StrictStr] = None
@@ -44,7 +48,7 @@ class AgentDetail(BaseModel):
status: Optional[StrictStr] = None
tools: Optional[List[StrictStr]] = None
updated_at: Optional[StrictStr] = Field(default=None, alias="updatedAt")
__properties: ClassVar[List[str]] = ["avatar", "computeRef", "createdAt", "description", "emoji", "executionMode", "id", "instructions", "model", "name", "recentRuns", "runs", "schedule", "serviceAccountId", "status", "tools", "updatedAt"]
__properties: ClassVar[List[str]] = ["avatar", "cap_micro_usd", "computeRef", "consumed_micro_usd", "createdAt", "description", "emoji", "executionMode", "id", "instructions", "max_task_micro_usd", "model", "name", "period", "recentRuns", "runs", "schedule", "serviceAccountId", "status", "tools", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
@@ -105,15 +109,19 @@ class AgentDetail(BaseModel):
_obj = cls.model_validate({
"avatar": obj.get("avatar"),
"cap_micro_usd": obj.get("cap_micro_usd"),
"computeRef": obj.get("computeRef"),
"consumed_micro_usd": obj.get("consumed_micro_usd"),
"createdAt": obj.get("createdAt"),
"description": obj.get("description"),
"emoji": obj.get("emoji"),
"executionMode": obj.get("executionMode"),
"id": obj.get("id"),
"instructions": obj.get("instructions"),
"max_task_micro_usd": obj.get("max_task_micro_usd"),
"model": obj.get("model"),
"name": obj.get("name"),
"period": obj.get("period"),
"recentRuns": [AgentRunView.from_dict(_item) for _item in obj["recentRuns"]] if obj.get("recentRuns") is not None else None,
"runs": obj.get("runs"),
"schedule": obj.get("schedule"),
+3 -1
View File
@@ -34,13 +34,14 @@ class AgentRunView(BaseModel):
error: Optional[StrictStr] = Field(default=None, description="Error is why an \"ok\"-less run failed, as the failing call reported it. Empty on every successful run.")
id: Optional[StrictStr] = Field(default=None, description="ID is the run's handle, minted as \"run_\" + 32 hex characters. It is the key the metering ledger records this run's per-round token spend under, so it is how a bill and a run are joined.")
input: Optional[StrictStr] = Field(default=None, description="Input is the text the run was given, verbatim.")
micro_usd: Optional[StrictInt] = Field(default=None, description="MicroUSD is what the run spent, integer micro-USD. Absent when nothing was metered.")
model: Optional[StrictStr] = Field(default=None, description="Model is the model that actually SERVED this run, which is not always the one the agent is defined on — a failover records what answered. Normalized to our name on the way out; the stored row is left exactly as it happened, because a run is a record and rewriting it would be worse than the name it carries.")
output: Optional[StrictStr] = Field(default=None, description="Output is what the model produced. Empty on an error run, and empty is also a legitimate answer from a run that succeeded with nothing to say — Status is what separates those.")
prompt_tokens: Optional[StrictInt] = Field(default=None, description="PromptTokens is what the gateway reported for the run's FINAL completion, and only that one — a tool loop's earlier rounds are the metering ledger's account, joined by this run's id. Reading it as the run's total spend undercounts a loop.", alias="promptTokens")
status: Optional[StrictStr] = Field(default=None, description="Status is the run's outcome, and there are exactly two: \"ok\" when the model answered, \"error\" when it did not. It is written when the run ends, so no row here is in flight.")
tool_calls: Optional[StrictInt] = Field(default=None, description="ToolCalls is how many tool dispatches the run made — a count of ACTIONS, which is a different measurement from the token counts above and from the turns a build reports. Zero is a run that answered straight from the model.", alias="toolCalls")
trace_id: Optional[StrictStr] = Field(default=None, description="TraceID is the trace this run IS, so the record and its spans are one thing to move between: it opens the waterfall for THIS run rather than a search that lands near it. Empty when the process had no tracer, never a fabricated id.", alias="traceId")
__properties: ClassVar[List[str]] = ["actor", "agent", "completionTokens", "createdAt", "durationMs", "error", "id", "input", "model", "output", "promptTokens", "status", "toolCalls", "traceId"]
__properties: ClassVar[List[str]] = ["actor", "agent", "completionTokens", "createdAt", "durationMs", "error", "id", "input", "micro_usd", "model", "output", "promptTokens", "status", "toolCalls", "traceId"]
model_config = ConfigDict(
populate_by_name=True,
@@ -101,6 +102,7 @@ class AgentRunView(BaseModel):
"error": obj.get("error"),
"id": obj.get("id"),
"input": obj.get("input"),
"micro_usd": obj.get("micro_usd"),
"model": obj.get("model"),
"output": obj.get("output"),
"promptTokens": obj.get("promptTokens"),
+9 -1
View File
@@ -27,21 +27,25 @@ class AgentView(BaseModel):
AgentView
""" # noqa: E501
avatar: Optional[StrictStr] = Field(default=None, description="Avatar is an image the agent is drawn as — a link to one, or the bytes inline as a data URL, up to 96 KiB. Emoji is the one glyph a caller picked when they had no image. At most one is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is. Both are iam/pkg/schema's Mark, so a face means the same thing on an agent as it does on a person or an org. Avatar is the agent's picture: an image URL, or the image itself inline as a data URL up to 96 KiB. Empty when the agent has no image.")
cap_micro_usd: Optional[StrictInt] = Field(default=None, description="CapMicroUSD is the total this agent may spend within one Period, as an integer number of micro-USD (1,000,000 = $1). It is required at creation: a cap of zero would mean no limit and no per-agent spend record at all.")
compute_ref: Optional[StrictStr] = Field(default=None, description="ComputeRef is the visor machine this bot is bound to, opaque here: this package stores and echoes it, and the binding's lifecycle belongs elsewhere. Empty means unbound, which is what every one-shot agent is.", alias="computeRef")
consumed_micro_usd: Optional[StrictInt] = Field(default=None, description="ConsumedMicroUSD is what has been spent in the current period, in micro-USD. It is settled from what the gateway reported, not from the quote.")
created_at: Optional[StrictStr] = Field(default=None, description="CreatedAt is when the agent was defined, RFC 3339 in UTC to the second.", alias="createdAt")
description: Optional[StrictStr] = Field(default=None, description="Description is the one line another agent reads when deciding whether to call this one: the tool catalogue publishes it as the description of `agent_<name>`, falling back to \"agent <name>\" when it is empty. It is not part of the prompt — Instructions is — so writing the behaviour here reaches the caller and not the model.")
emoji: Optional[StrictStr] = Field(default=None, description="Emoji is the single glyph a caller picked when they had no image. At most one of avatar and emoji is ever set; neither means the agent is drawn as its initial, the same way a person with no photo is.")
execution_mode: Optional[StrictStr] = Field(default=None, description="ExecutionMode is one-shot or long-running, and it decides who may start this agent. one-shot runs only when something POSTs to it; long-running is additionally invoked by the scheduler on Schedule, once a minute against the cron. An org's long-running agents are capped, so a switch INTO it can be refused with 409.", alias="executionMode")
id: Optional[StrictStr] = Field(default=None, description="ID is the agent's stable handle, minted here as \"agent_\" + 32 hex characters of crypto/rand. A caller cannot choose it, and it never changes — unlike Name, which is the other way to address the same agent.")
max_task_micro_usd: Optional[StrictInt] = Field(default=None, description="MaxTaskMicroUSD is the ceiling for a single run, in micro-USD. A session cannot exceed it even when the period cap still has room, so one runaway task cannot consume a month.")
model: Optional[StrictStr] = Field(default=None, description="Model is the Zen model this agent runs on, and it is always OUR name for it: writes normalize through cloud.ZenModel and the read normalizes again, so an upstream family name never leaves here even from a row written before that rule existed. A create that named none took the deployment's configured default, so this is where a caller learns which model it actually got.")
name: Optional[StrictStr] = Field(default=None, description="Name is the agent's org-unique handle, matching ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. It addresses the agent everywhere ID does, it is what a run row records, and it is the suffix of the `agent_<name>` tool other agents call this one by. Set once at create; no update route moves it, because moving it would orphan that history.")
period: Optional[StrictStr] = Field(default=None, description="Period is the window the cap resets on: day, week or month.")
runs: Optional[StrictInt] = Field(default=None, description="Runs is how many executions the org has recorded against this agent, counted at read time. The list and update reads count the WHOLE history; the detail read reports the size of the RecentRuns page it carries, which stops at 20 — so a detail row saying 20 means \"at least 20\", not \"exactly 20\".")
schedule: Optional[StrictStr] = Field(default=None, description="Schedule is the 5-field cron the scheduler fires a long-running agent on, evaluated once a minute. Required for long-running and DROPPED for one-shot — a one-shot agent's schedule is not stored, so absence here is the mode's answer rather than a value nobody set.")
service_account_id: Optional[StrictStr] = Field(default=None, description="ServiceAccountID is the IAM agent service account (<org>-<agent>) a scheduled run is billed AS. It is what makes an autonomous run attributable to a principal rather than only to the org; empty means the org itself wears the spend.", alias="serviceAccountId")
status: Optional[StrictStr] = Field(default=None, description="Status is the agent's readiness, and today it is \"ready\" on every row: an agent is a definition rather than a provisioned thing, so nothing transitions it. Server-set at create; no route accepts it.")
tools: Optional[List[StrictStr]] = Field(default=None, description="Tools are the tool names this agent may call, and the list IS the authority: an agent that declares none gets none. The single entry \"*\" means whatever the fleet's MCP server serves at the moment of the run, resolved per run rather than frozen here, which is how the default assistant reaches subsystems that shipped after it was defined. Empty array, never null.")
updated_at: Optional[StrictStr] = Field(default=None, description="UpdatedAt is the last time any field above was written, same format. It moves on an update to the DEFINITION and never on a run, so a busy agent nobody has edited keeps an old one.", alias="updatedAt")
__properties: ClassVar[List[str]] = ["avatar", "computeRef", "createdAt", "description", "emoji", "executionMode", "id", "model", "name", "runs", "schedule", "serviceAccountId", "status", "tools", "updatedAt"]
__properties: ClassVar[List[str]] = ["avatar", "cap_micro_usd", "computeRef", "consumed_micro_usd", "createdAt", "description", "emoji", "executionMode", "id", "max_task_micro_usd", "model", "name", "period", "runs", "schedule", "serviceAccountId", "status", "tools", "updatedAt"]
model_config = ConfigDict(
populate_by_name=True,
@@ -95,14 +99,18 @@ class AgentView(BaseModel):
_obj = cls.model_validate({
"avatar": obj.get("avatar"),
"cap_micro_usd": obj.get("cap_micro_usd"),
"computeRef": obj.get("computeRef"),
"consumed_micro_usd": obj.get("consumed_micro_usd"),
"createdAt": obj.get("createdAt"),
"description": obj.get("description"),
"emoji": obj.get("emoji"),
"executionMode": obj.get("executionMode"),
"id": obj.get("id"),
"max_task_micro_usd": obj.get("max_task_micro_usd"),
"model": obj.get("model"),
"name": obj.get("name"),
"period": obj.get("period"),
"runs": obj.get("runs"),
"schedule": obj.get("schedule"),
"serviceAccountId": obj.get("serviceAccountId"),
+117
View File
@@ -0,0 +1,117 @@
# 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.component import Component
from hanzoai.cloud.models.rate import Rate
from hanzoai.cloud.models.speed import Speed
from typing import Optional, Set
from typing_extensions import Self
class Card(BaseModel):
"""
Card
""" # noqa: E501
components: Optional[List[Component]] = Field(default=None, description="Components are the four things a bill is made of.")
rates: Optional[List[Rate]] = Field(default=None, description="Rates are the priced lines, each in micro-USD per its own unit.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the unit every amount on this card is stated in.")
windows: Optional[List[Speed]] = Field(default=None, description="Speeds are the completion speeds, dearest first.")
__properties: ClassVar[List[str]] = ["components", "rates", "unit", "windows"]
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 Card 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 components (list)
_items = []
if self.components:
for _item_components in self.components:
if _item_components:
_items.append(_item_components.to_dict())
_dict['components'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in rates (list)
_items = []
if self.rates:
for _item_rates in self.rates:
if _item_rates:
_items.append(_item_rates.to_dict())
_dict['rates'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in windows (list)
_items = []
if self.windows:
for _item_windows in self.windows:
if _item_windows:
_items.append(_item_windows.to_dict())
_dict['windows'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Card from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"components": [Component.from_dict(_item) for _item in obj["components"]] if obj.get("components") is not None else None,
"rates": [Rate.from_dict(_item) for _item in obj["rates"]] if obj.get("rates") is not None else None,
"unit": obj.get("unit"),
"windows": [Speed.from_dict(_item) for _item in obj["windows"]] if obj.get("windows") is not None else None
})
return _obj
+7 -5
View File
@@ -19,6 +19,7 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.reply import Reply
from typing import Optional, Set
from typing_extensions import Self
@@ -32,13 +33,12 @@ class CodingStartIn(BaseModel):
desktop: Optional[StrictBool] = None
project: Optional[StrictStr] = None
prompt: Optional[StrictStr] = None
reply_channel: Optional[StrictStr] = Field(default=None, alias="replyChannel")
reply_thread: Optional[StrictStr] = Field(default=None, alias="replyThread")
reply: Optional[Reply] = None
repo: Optional[StrictStr] = None
target_id: Optional[StrictStr] = Field(default=None, alias="targetId")
timeout_seconds: Optional[StrictInt] = Field(default=None, alias="timeoutSeconds")
tool: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["after", "agentRef", "base", "desktop", "project", "prompt", "replyChannel", "replyThread", "repo", "targetId", "timeoutSeconds", "tool"]
__properties: ClassVar[List[str]] = ["after", "agentRef", "base", "desktop", "project", "prompt", "reply", "repo", "targetId", "timeoutSeconds", "tool"]
model_config = ConfigDict(
populate_by_name=True,
@@ -79,6 +79,9 @@ class CodingStartIn(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of reply
if self.reply:
_dict['reply'] = self.reply.to_dict()
return _dict
@classmethod
@@ -97,8 +100,7 @@ class CodingStartIn(BaseModel):
"desktop": obj.get("desktop"),
"project": obj.get("project"),
"prompt": obj.get("prompt"),
"replyChannel": obj.get("replyChannel"),
"replyThread": obj.get("replyThread"),
"reply": Reply.from_dict(obj["reply"]) if obj.get("reply") is not None else None,
"repo": obj.get("repo"),
"targetId": obj.get("targetId"),
"timeoutSeconds": obj.get("timeoutSeconds"),
+97
View File
@@ -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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Component(BaseModel):
"""
Component
""" # noqa: E501
basis: Optional[StrictStr] = Field(default=None, description="Basis is what it is metered by, in the fewest words that are true.")
name: Optional[StrictStr] = Field(default=None, description="Name is the component's name on the spend breakdown.")
note: Optional[StrictStr] = Field(default=None, description="Note is what the component means, in one sentence.")
quoted: Optional[StrictBool] = Field(default=None, description="Quoted says whether a call is priced BEFORE it runs. A quoted component can refuse a call that would breach a budget; a measured one is booked from what it used and is bounded by the headroom under the per-task cap instead.")
tiers: Optional[List[StrictStr]] = Field(default=None, description="Tiers are the disjoint tiers this component meters in, where it has them.")
title: Optional[StrictStr] = Field(default=None, description="Title is how it reads on a price list.")
__properties: ClassVar[List[str]] = ["basis", "name", "note", "quoted", "tiers", "title"]
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 Component 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 Component from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"basis": obj.get("basis"),
"name": obj.get("name"),
"note": obj.get("note"),
"quoted": obj.get("quoted"),
"tiers": obj.get("tiers"),
"title": obj.get("title")
})
return _obj
+9 -1
View File
@@ -28,9 +28,13 @@ class ConnectionView(BaseModel):
""" # noqa: E501
account: Optional[StrictStr] = Field(default=None, description="Account is the human label of the connected third-party account (the Slack team name, the GitHub org login). Provider-supplied and sanitized on ingest.")
connected_at: Optional[StrictStr] = Field(default=None, description="ConnectedAt is when the connection was last (re)established, RFC 3339 UTC.", alias="connectedAt")
expires_at: Optional[StrictStr] = Field(default=None, description="ExpiresAt is when the access token expires, RFC 3339 UTC; empty for a credential that does not expire. Reading the token rotates it inside the window, so a reader never sees an expired one.", alias="expiresAt")
external_id: Optional[StrictStr] = Field(default=None, description="ExternalID is the provider's own id for the account (Slack team.id, GitHub installation_id) — the value inbound webhooks are mapped back to this org by.", alias="externalId")
id: Optional[StrictStr] = Field(default=None, description="ID is provider + \":\" + label, the address every connection route takes. Empty on the org plane, where a provider's connection is addressed by the provider alone.")
label: Optional[StrictStr] = Field(default=None, description="Label is the caller's own name for this connection (\"default\", \"work\").")
provider: Optional[StrictStr] = Field(default=None, description="Provider is the connected provider's registry id. Empty where the reader already knows it, which is every org-plane card.")
scopes: Optional[List[StrictStr]] = Field(default=None, description="Scopes are the permissions the provider granted. Never null; [] when none.")
__properties: ClassVar[List[str]] = ["account", "connectedAt", "externalId", "scopes"]
__properties: ClassVar[List[str]] = ["account", "connectedAt", "expiresAt", "externalId", "id", "label", "provider", "scopes"]
model_config = ConfigDict(
populate_by_name=True,
@@ -85,7 +89,11 @@ class ConnectionView(BaseModel):
_obj = cls.model_validate({
"account": obj.get("account"),
"connectedAt": obj.get("connectedAt"),
"expiresAt": obj.get("expiresAt"),
"externalId": obj.get("externalId"),
"id": obj.get("id"),
"label": obj.get("label"),
"provider": obj.get("provider"),
"scopes": obj.get("scopes")
})
return _obj
+8 -2
View File
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
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
@@ -27,17 +27,20 @@ class CreateAgentIn(BaseModel):
CreateAgentIn
""" # noqa: E501
avatar: Optional[StrictStr] = Field(default=None, description="Avatar and Emoji are how the agent APPEARS. An image wins when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial. Validated by iam/pkg/schema, the same rule a person's avatar passes, so the 96 KiB bound and the accepted URL forms are stated once for every subject that has a face.")
cap_micro_usd: Optional[StrictInt] = Field(default=None, description="The budget, required. An agent is not creatable without one: a zero cap would mean no limit and no record of its spend, which is what a budget exists to remove. Integer micro-USD; the CLI converts dollars before sending.")
compute_ref: Optional[StrictStr] = Field(default=None, description="ComputeRef optionally binds this bot to a visor machine. Opaque here, bounded at 256 characters, and not resolved — this package stores the reference and the binding's lifecycle belongs elsewhere.", alias="computeRef")
description: Optional[StrictStr] = Field(default=None, description="Description is the one line published as the description of the `agent_<name>` tool, which is how another agent decides whether to call this one. Optional, and worth writing for exactly that reason.")
emoji: Optional[StrictStr] = Field(default=None, description="Emoji is the single glyph shown when there is no image. An image WINS when both are given — it is the thing somebody made — and both empty leaves the agent drawn as its initial.")
execution_mode: Optional[StrictStr] = Field(default=None, description="ExecutionMode is one-shot or long-running. Empty takes one-shot, which runs only when something POSTs to it. long-running additionally requires Schedule, and counts against a per-org cap that answers 409 when it is full.", alias="executionMode")
instructions: Optional[StrictStr] = Field(default=None, description="Instructions is the system prompt, up to 32 KiB, stored verbatim. This is what the model reads; Description is what other CALLERS read.")
max_task_micro_usd: Optional[StrictInt] = Field(default=None, description="MaxTaskMicroUSD is the ceiling for a single run, in micro-USD. A session cannot exceed it even when the period cap still has room, so one runaway task cannot consume a month.")
model: Optional[StrictStr] = Field(default=None, description="Model names the model to run on. Omit it to take the deployment's configured default; name one and it is checked against the gateway's served catalogue here, so a model this deployment cannot serve is refused now rather than at the first run. Stored under our own name for it, whatever spelling arrives.")
name: Optional[StrictStr] = Field(default=None, description="Name is the agent's org-unique handle and the only required field. It must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$, and a name already taken in this org is a 409 rather than an overwrite. It is permanent: no update route moves it.")
period: Optional[StrictStr] = Field(default=None, description="Period is the window the cap resets on: day, week or month.")
schedule: Optional[StrictStr] = Field(default=None, description="Schedule is the 5-field cron a long-running agent fires on, parsed here so a bad expression is a 400 and not an agent that silently never runs. Required with long-running; DISCARDED for one-shot rather than stored unused.")
service_account_id: Optional[StrictStr] = Field(default=None, description="ServiceAccountID optionally names the IAM agent service account (<org>-<agent>) a scheduled run should be billed AS, so an autonomous run is attributable to a principal rather than only to the org. Same 256-character bound, also unresolved here.", alias="serviceAccountId")
tools: Optional[List[StrictStr]] = Field(default=None, description="Tools are the tool names this agent may call. Omitted or empty grants NONE — that default is the agent's authority and is not widened anywhere. The single entry \"*\" means whatever the fleet's MCP server serves at the time of each run.")
__properties: ClassVar[List[str]] = ["avatar", "computeRef", "description", "emoji", "executionMode", "instructions", "model", "name", "schedule", "serviceAccountId", "tools"]
__properties: ClassVar[List[str]] = ["avatar", "cap_micro_usd", "computeRef", "description", "emoji", "executionMode", "instructions", "max_task_micro_usd", "model", "name", "period", "schedule", "serviceAccountId", "tools"]
model_config = ConfigDict(
populate_by_name=True,
@@ -91,13 +94,16 @@ class CreateAgentIn(BaseModel):
_obj = cls.model_validate({
"avatar": obj.get("avatar"),
"cap_micro_usd": obj.get("cap_micro_usd"),
"computeRef": obj.get("computeRef"),
"description": obj.get("description"),
"emoji": obj.get("emoji"),
"executionMode": obj.get("executionMode"),
"instructions": obj.get("instructions"),
"max_task_micro_usd": obj.get("max_task_micro_usd"),
"model": obj.get("model"),
"name": obj.get("name"),
"period": obj.get("period"),
"schedule": obj.get("schedule"),
"serviceAccountId": obj.get("serviceAccountId"),
"tools": obj.get("tools")
+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, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class EngineReplica(BaseModel):
"""
EngineReplica
""" # noqa: E501
capacity: Optional[StrictInt] = None
healthy: Optional[StrictBool] = None
id: Optional[StrictStr] = None
inflight: Optional[StrictInt] = None
roles: Optional[List[StrictStr]] = None
ttft_ewma_ms: Optional[Union[StrictFloat, StrictInt]] = None
upstream_model: Optional[StrictStr] = None
url: Optional[StrictStr] = None
weight: Optional[StrictInt] = None
__properties: ClassVar[List[str]] = ["capacity", "healthy", "id", "inflight", "roles", "ttft_ewma_ms", "upstream_model", "url", "weight"]
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 EngineReplica 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 EngineReplica from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"capacity": obj.get("capacity"),
"healthy": obj.get("healthy"),
"id": obj.get("id"),
"inflight": obj.get("inflight"),
"roles": obj.get("roles"),
"ttft_ewma_ms": obj.get("ttft_ewma_ms"),
"upstream_model": obj.get("upstream_model"),
"url": obj.get("url"),
"weight": obj.get("weight")
})
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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class EngineReplicaUpdate(BaseModel):
"""
EngineReplicaUpdate
""" # noqa: E501
capacity: Optional[StrictInt] = None
id: Optional[StrictStr] = None
model: Optional[StrictStr] = None
roles: Optional[List[StrictStr]] = None
weight: Optional[StrictInt] = None
__properties: ClassVar[List[str]] = ["capacity", "id", "model", "roles", "weight"]
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 EngineReplicaUpdate 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 EngineReplicaUpdate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"capacity": obj.get("capacity"),
"id": obj.get("id"),
"model": obj.get("model"),
"roles": obj.get("roles"),
"weight": obj.get("weight")
})
return _obj
@@ -19,16 +19,16 @@ import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.connector_provider_view import ConnectorProviderView
from hanzoai.cloud.models.graph_triple import GraphTriple
from typing import Optional, Set
from typing_extensions import Self
class ConnectorProvidersOut(BaseModel):
class GraphExtractOut(BaseModel):
"""
ConnectorProvidersOut
GraphExtractOut
""" # noqa: E501
providers: Optional[List[ConnectorProviderView]] = Field(default=None, description="Providers is every USER-scoped provider, sorted by id. Never null.")
__properties: ClassVar[List[str]] = ["providers"]
triples: Optional[List[GraphTriple]] = Field(default=None, description="Triples are the relations found, in the order the document states them.")
__properties: ClassVar[List[str]] = ["triples"]
model_config = ConfigDict(
populate_by_name=True,
@@ -48,7 +48,7 @@ class ConnectorProvidersOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ConnectorProvidersOut from a JSON string"""
"""Create an instance of GraphExtractOut from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -69,18 +69,18 @@ class ConnectorProvidersOut(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in providers (list)
# override the default output from pydantic by calling `to_dict()` of each item in triples (list)
_items = []
if self.providers:
for _item_providers in self.providers:
if _item_providers:
_items.append(_item_providers.to_dict())
_dict['providers'] = _items
if self.triples:
for _item_triples in self.triples:
if _item_triples:
_items.append(_item_triples.to_dict())
_dict['triples'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ConnectorProvidersOut from a dict"""
"""Create an instance of GraphExtractOut from a dict"""
if obj is None:
return None
@@ -88,7 +88,7 @@ class ConnectorProvidersOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"providers": [ConnectorProviderView.from_dict(_item) for _item in obj["providers"]] if obj.get("providers") is not None else None
"triples": [GraphTriple.from_dict(_item) for _item in obj["triples"]] if obj.get("triples") is not None else None
})
return _obj
@@ -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 GraphSourceIn(BaseModel):
"""
GraphSourceIn
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is when what the source says was so, RFC 3339. Required by ingest — which records — and read by nothing in extract, which records nothing. Required for the same reason /v1/graph requires it: it is part of the assertion's content address, so re-reading one source at one instant records one set of rows however many times it is delivered. A clock read here instead would append the whole document again on every re-read.")
source: Optional[StrictStr] = Field(default=None, description="Source names where the text came from — a URL, a document id, a page title. It is stamped on every assertion as its source, and with the section number as its evidence, so a claim can be traced back to the passage that made it. Required.")
subject: Optional[StrictStr] = Field(default=None, description="Subject is the entity the text is about before any heading names one. A document that states relations above its first heading needs it; one whose every section is headed does not.")
text: Optional[StrictStr] = Field(default=None, description="Text is the document. Relations are read from it and from nothing else: a line written `relation:: value` states one, and prose states none. Required.")
__properties: ClassVar[List[str]] = ["at", "source", "subject", "text"]
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 GraphSourceIn 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 GraphSourceIn 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"),
"source": obj.get("source"),
"subject": obj.get("subject"),
"text": obj.get("text")
})
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, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GraphTriple(BaseModel):
"""
GraphTriple
""" # noqa: E501
names: Optional[StrictBool] = Field(default=None, description="Names is the author's declaration that Object is an entity and the assertion is an EDGE, written `[[key]]`. Absent, the relation is a property of Subject. It is read from the notation and never guessed from the value's shape.")
object: Optional[StrictStr] = Field(default=None, description="Object is what the relation points at. When Names is true it has been unwrapped from its `[[…]]` and is another entity's key.")
predicate: Optional[StrictStr] = Field(default=None, description="Predicate is the relation, exactly as the line spells it before the `::`. This surface holds no vocabulary, so it renames nothing.")
section: Optional[StrictInt] = Field(default=None, description="Section is which section of the source stated it, counting from zero. It is the second half of every resulting assertion's evidence, `<source>#<section>`.")
subject: Optional[StrictStr] = Field(default=None, description="Subject is the entity the statement is about: the nearest heading above the line, or the request's own subject where no heading has appeared yet.")
__properties: ClassVar[List[str]] = ["names", "object", "predicate", "section", "subject"]
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 GraphTriple 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 GraphTriple from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"names": obj.get("names"),
"object": obj.get("object"),
"predicate": obj.get("predicate"),
"section": obj.get("section"),
"subject": obj.get("subject")
})
return _obj
+91
View File
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class IamApproval(BaseModel):
"""
IamApproval
""" # noqa: E501
clause: Optional[StrictStr] = None
reason: Optional[StrictStr] = None
status: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["clause", "reason", "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 IamApproval 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 IamApproval from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"clause": obj.get("clause"),
"reason": obj.get("reason"),
"status": obj.get("status")
})
return _obj
+4 -2
View File
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictInt
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.billing_invoice import BillingInvoice
from typing import Optional, Set
@@ -28,8 +28,9 @@ class Invoices(BaseModel):
Invoices
""" # noqa: E501
count: Optional[StrictInt] = None
cursor: Optional[StrictStr] = None
invoices: Optional[List[BillingInvoice]] = None
__properties: ClassVar[List[str]] = ["count", "invoices"]
__properties: ClassVar[List[str]] = ["count", "cursor", "invoices"]
model_config = ConfigDict(
populate_by_name=True,
@@ -90,6 +91,7 @@ class Invoices(BaseModel):
_obj = cls.model_validate({
"count": obj.get("count"),
"cursor": obj.get("cursor"),
"invoices": [BillingInvoice.from_dict(_item) for _item in obj["invoices"]] if obj.get("invoices") is not None else None
})
return _obj
+91
View File
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class JobView(BaseModel):
"""
JobView
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the job's id in the workflow document.")
pool: Optional[StrictStr] = Field(default=None, description="Pool is the declared pool carrying every one of those labels, or empty when no pool does — which is the answer to \"why is nothing running\".")
runs_on: Optional[List[StrictStr]] = Field(default=None, description="RunsOn is the labels the job asked for.", alias="runsOn")
__properties: ClassVar[List[str]] = ["name", "pool", "runsOn"]
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 JobView 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 JobView 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"),
"pool": obj.get("pool"),
"runsOn": obj.get("runsOn")
})
return _obj
+2 -2
View File
@@ -27,10 +27,10 @@ class LeaseIn(BaseModel):
LeaseIn
""" # noqa: E501
var_class: Optional[StrictStr] = Field(default=None, description="Class is what the sandbox is FOR: \"exec\" for a code-interpreter call, \"dev\" for a workspace bound to a project, \"desktop\" for one with a screen. It decides the image, the working directory and the isolation.", alias="class")
cluster: Optional[StrictStr] = Field(default=None, description="Cluster names one of the org's attached clusters to run the sandbox on — the fleet-local name it was registered under. Empty runs on the home cluster. The named cluster must carry the sandbox namespace and the gvisor runtime class; a name the org has not attached is 404.")
cluster: Optional[StrictStr] = Field(default=None, description="Cluster names one of the org's attached clusters to run the sandbox on — the fleet-local name it was registered under. Empty runs on the home cluster. The named cluster must carry the sandbox namespace and the visor runtime class; a name the org has not attached is 404.")
image: Optional[StrictStr] = Field(default=None, description="Image overrides the image the class would pick. Honoured only for a caller the policy admits, and the sandbox that comes back names the image it GOT.")
project: Optional[StrictStr] = Field(default=None, description="Project binds the sandbox to one of the org's projects. Required for a dev or desktop class, which are single-attach per project; an exec sandbox carries none.")
runtime: Optional[StrictStr] = Field(default=None, description="Runtime asks for an isolation: runc, gvisor, kata-clh or kata-fc. It is a REQUEST, not a guarantee — the sandbox that comes back carries the runtime it was actually given, which is the field to read.")
runtime: Optional[StrictStr] = Field(default=None, description="Runtime asks for an isolation: runc, visor, kata-clh or kata-fc. It is a REQUEST, not a guarantee — the sandbox that comes back carries the runtime it was actually given, which is the field to read.")
ttl_sec: Optional[StrictInt] = Field(default=None, description="TTLSec is how long the lease runs before the reaper may take it, in seconds. Zero takes the class's own default.", alias="ttlSec")
__properties: ClassVar[List[str]] = ["class", "cluster", "image", "project", "runtime", "ttlSec"]
+91
View File
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class O11yApproval(BaseModel):
"""
O11yApproval
""" # noqa: E501
clause: Optional[StrictStr] = None
reason: Optional[StrictStr] = None
status: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["clause", "reason", "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 O11yApproval 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 O11yApproval from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"clause": obj.get("clause"),
"reason": obj.get("reason"),
"status": obj.get("status")
})
return _obj
+97
View File
@@ -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 PatrolAct(BaseModel):
"""
PatrolAct
""" # noqa: E501
act: Optional[StrictStr] = Field(default=None, description="Act is the act performed.")
actor: Optional[StrictStr] = Field(default=None, description="Actor is who performed it.")
at: Optional[StrictStr] = Field(default=None, description="At is when it happened.")
detail: Optional[StrictStr] = Field(default=None, description="Detail is what they wrote with it.")
var_from: Optional[StrictStr] = Field(default=None, description="From is the state the incident left.", alias="from")
to: Optional[StrictStr] = Field(default=None, description="To is the state it landed in.")
__properties: ClassVar[List[str]] = ["act", "actor", "at", "detail", "from", "to"]
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 PatrolAct 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 PatrolAct from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"act": obj.get("act"),
"actor": obj.get("actor"),
"at": obj.get("at"),
"detail": obj.get("detail"),
"from": obj.get("from"),
"to": obj.get("to")
})
return _obj
@@ -17,20 +17,21 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.conn_view import ConnView
from hanzoai.cloud.models.patrol_incident import PatrolIncident
from typing import Optional, Set
from typing_extensions import Self
class DevicePollOut(BaseModel):
class PatrolActivation(BaseModel):
"""
DevicePollOut
PatrolActivation
""" # noqa: E501
connector: Optional[ConnView] = Field(default=None, description="Connection is the connected connector. Present only on \"connected\".")
interval: Optional[StrictInt] = Field(default=None, description="Interval is the seconds to wait before the next poll. Present only while pending, and it may rise when the provider asks the client to slow down.")
status: Optional[StrictStr] = Field(default=None, description="Status is the flow's state. \"pending\" means poll again after Interval.")
__properties: ClassVar[List[str]] = ["connector", "interval", "status"]
alarm: Optional[StrictStr] = Field(default=None, description="Alarm is the recorded activation's document name.")
incident: Optional[PatrolIncident] = Field(default=None, description="Incident is the incident it opened, or null when it matched no site.")
matched: Optional[StrictBool] = Field(default=None, description="Matched says whether a site was found for it.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site it matched, or empty.")
__properties: ClassVar[List[str]] = ["alarm", "incident", "matched", "site"]
model_config = ConfigDict(
populate_by_name=True,
@@ -50,7 +51,7 @@ class DevicePollOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DevicePollOut from a JSON string"""
"""Create an instance of PatrolActivation from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -71,14 +72,14 @@ class DevicePollOut(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of connector
if self.connector:
_dict['connector'] = self.connector.to_dict()
# override the default output from pydantic by calling `to_dict()` of incident
if self.incident:
_dict['incident'] = self.incident.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DevicePollOut from a dict"""
"""Create an instance of PatrolActivation from a dict"""
if obj is None:
return None
@@ -86,9 +87,10 @@ class DevicePollOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"connector": ConnView.from_dict(obj["connector"]) if obj.get("connector") is not None else None,
"interval": obj.get("interval"),
"status": obj.get("status")
"alarm": obj.get("alarm"),
"incident": PatrolIncident.from_dict(obj["incident"]) if obj.get("incident") is not None else None,
"matched": obj.get("matched"),
"site": obj.get("site")
})
return _obj
@@ -19,20 +19,21 @@ import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.oauth_bundle_in import OauthBundleIn
from typing import Optional, Set
from typing_extensions import Self
class CredentialIn(BaseModel):
class PatrolAlarmIn(BaseModel):
"""
CredentialIn
PatrolAlarmIn
""" # noqa: E501
account_id: Optional[StrictStr] = Field(default=None, description="AccountID scopes the credential where the provider's Verify needs one.", alias="accountId")
label: Optional[StrictStr] = Field(default=None, description="Label names this connection; empty means \"default\".")
oauth: Optional[OauthBundleIn] = Field(default=None, description="OAuth is a bundle the CLI already obtained through its own local PKCE flow. Present ⇒ the Adopt path; absent ⇒ the Token path.")
provider: Optional[StrictStr] = Field(default=None, description="Provider is the user-scoped provider's registry id, from the path.")
token: Optional[StrictStr] = Field(default=None, description="Token is the customer-held credential for the Verify path. Read on STDIN by the CLI, never argv; never logged, echoed, or stored outside KMS.")
__properties: ClassVar[List[str]] = ["accountId", "label", "oauth", "provider", "token"]
account: Optional[StrictStr] = Field(default=None, description="Account is the alarm-panel account number that reported. It is what an activation matches a site on when no site is named.")
raw: Optional[Any] = None
ref: Optional[StrictStr] = Field(default=None, description="Ref is the receiving centre's own reference for the activation.")
site: Optional[StrictStr] = Field(default=None, description="Site names the site directly, by document name, when the caller already knows it.")
source: Optional[StrictStr] = Field(default=None, description="Source is which receiver or operator the activation came through.")
trigger: Optional[StrictStr] = Field(default=None, description="Trigger is what the panel reported.")
zone: Optional[StrictStr] = Field(default=None, description="Zone is the panel zone that fired.")
__properties: ClassVar[List[str]] = ["account", "raw", "ref", "site", "source", "trigger", "zone"]
model_config = ConfigDict(
populate_by_name=True,
@@ -52,7 +53,7 @@ class CredentialIn(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CredentialIn from a JSON string"""
"""Create an instance of PatrolAlarmIn from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -73,14 +74,16 @@ class CredentialIn(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of oauth
if self.oauth:
_dict['oauth'] = self.oauth.to_dict()
# set to None if raw (nullable) is None
# and model_fields_set contains the field
if self.raw is None and "raw" in self.model_fields_set:
_dict['raw'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CredentialIn from a dict"""
"""Create an instance of PatrolAlarmIn from a dict"""
if obj is None:
return None
@@ -88,11 +91,13 @@ class CredentialIn(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"accountId": obj.get("accountId"),
"label": obj.get("label"),
"oauth": OauthBundleIn.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None,
"provider": obj.get("provider"),
"token": obj.get("token")
"account": obj.get("account"),
"raw": obj.get("raw"),
"ref": obj.get("ref"),
"site": obj.get("site"),
"source": obj.get("source"),
"trigger": obj.get("trigger"),
"zone": obj.get("zone")
})
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.patrol_activation import PatrolActivation
from typing import Optional, Set
from typing_extensions import Self
class PatrolAlarmOut(BaseModel):
"""
PatrolAlarmOut
""" # noqa: E501
data: Optional[PatrolActivation] = Field(default=None, description="Data is what became of the activation.")
__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 PatrolAlarmOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolAlarmOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolActivation.from_dict(obj["data"]) if obj.get("data") 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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolCamera(BaseModel):
"""
PatrolCamera
""" # noqa: E501
kind: Optional[StrictStr] = Field(default=None, description="Kind is the camera type.")
label: Optional[StrictStr] = Field(default=None, description="Label is what the camera is called on screen.")
name: Optional[StrictStr] = Field(default=None, description="Name is the camera's document name and the segment /v1/patrol/camera/{name}/stream addresses it by.")
online: Optional[StrictBool] = Field(default=None, description="Online says whether the camera last reported healthy.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site the camera watches.")
__properties: ClassVar[List[str]] = ["kind", "label", "name", "online", "site"]
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 PatrolCamera 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 PatrolCamera from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"kind": obj.get("kind"),
"label": obj.get("label"),
"name": obj.get("name"),
"online": obj.get("online"),
"site": obj.get("site")
})
return _obj
@@ -17,19 +17,18 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.conn_view import ConnView
from hanzoai.cloud.models.patrol_camera import PatrolCamera
from typing import Optional, Set
from typing_extensions import Self
class CredentialOut(BaseModel):
class PatrolCameraList(BaseModel):
"""
CredentialOut
PatrolCameraList
""" # noqa: E501
connected: Optional[StrictBool] = Field(default=None, description="Connected is always true — a failed verification is a 400 and stores nothing.")
connector: Optional[ConnView] = Field(default=None, description="Connection is the connector as it now stands.")
__properties: ClassVar[List[str]] = ["connected", "connector"]
data: Optional[List[PatrolCamera]] = Field(default=None, description="Data is the matching cameras, never their credentials.")
__properties: ClassVar[List[str]] = ["data"]
model_config = ConfigDict(
populate_by_name=True,
@@ -49,7 +48,7 @@ class CredentialOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CredentialOut from a JSON string"""
"""Create an instance of PatrolCameraList from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -70,14 +69,18 @@ class CredentialOut(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of connector
if self.connector:
_dict['connector'] = self.connector.to_dict()
# 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 CredentialOut from a dict"""
"""Create an instance of PatrolCameraList from a dict"""
if obj is None:
return None
@@ -85,8 +88,7 @@ class CredentialOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"connected": obj.get("connected"),
"connector": ConnView.from_dict(obj["connector"]) if obj.get("connector") is not None else None
"data": [PatrolCamera.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj
@@ -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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class PatrolCheckpoint(BaseModel):
"""
PatrolCheckpoint
""" # noqa: E501
actor: Optional[StrictStr] = Field(default=None, description="Actor is who confirmed it.")
at: Optional[StrictStr] = Field(default=None, description="At is when it was confirmed, or empty.")
close: Optional[StrictStr] = Field(default=None, description="Close is when that window shuts.")
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the latitude the confirmation was taken at.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the longitude the confirmation was taken at.")
method: Optional[StrictStr] = Field(default=None, description="Method is how it was confirmed: tag, scan, fence, manual or photo.")
name: Optional[StrictStr] = Field(default=None, description="Name is the checkpoint's document name and the segment /v1/patrol/point/{name}/confirm addresses it by.")
open: Optional[StrictStr] = Field(default=None, description="Open is when the window to confirm it opens.")
photo: Optional[StrictStr] = Field(default=None, description="Photo is the object key of the photo taken, or empty.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site to attend.")
state: Optional[StrictStr] = Field(default=None, description="State is pending, done, late or skipped.")
tag: Optional[StrictStr] = Field(default=None, description="Tag is the tag or marker to read there.")
tour: Optional[StrictStr] = Field(default=None, description="Tour is the round this checkpoint belongs to.")
__properties: ClassVar[List[str]] = ["actor", "at", "close", "lat", "lon", "method", "name", "open", "photo", "site", "state", "tag", "tour"]
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 PatrolCheckpoint 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 PatrolCheckpoint 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"),
"at": obj.get("at"),
"close": obj.get("close"),
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"method": obj.get("method"),
"name": obj.get("name"),
"open": obj.get("open"),
"photo": obj.get("photo"),
"site": obj.get("site"),
"state": obj.get("state"),
"tag": obj.get("tag"),
"tour": obj.get("tour")
})
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.patrol_checkpoint import PatrolCheckpoint
from typing import Optional, Set
from typing_extensions import Self
class PatrolCheckpointOut(BaseModel):
"""
PatrolCheckpointOut
""" # noqa: E501
data: Optional[PatrolCheckpoint] = Field(default=None, description="Data is the checkpoint as it now stands.")
__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 PatrolCheckpointOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolCheckpointOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolCheckpoint.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
@@ -17,20 +17,20 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
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 ConnectorTokenOut(BaseModel):
class PatrolClock(BaseModel):
"""
ConnectorTokenOut
PatrolClock
""" # noqa: E501
expires_at: Optional[StrictStr] = Field(default=None, description="ExpiresAt is when this token expires, RFC 3339 UTC; empty if non-expiring.", alias="expiresAt")
label: Optional[StrictStr] = Field(default=None, description="Label is the connector's label.")
provider: Optional[StrictStr] = Field(default=None, description="Provider is the connector's provider id.")
token: Optional[StrictStr] = Field(default=None, description="Token is the access token, rotated first if it was within the refresh window.")
__properties: ClassVar[List[str]] = ["expiresAt", "label", "provider", "token"]
elapsed: Optional[StrictInt] = Field(default=None, description="Elapsed is the seconds run so far, or the seconds it took when settled.")
label: Optional[StrictStr] = Field(default=None, description="Label names the clock: Verify, Dispatch or On site.")
settled: Optional[StrictInt] = Field(default=None, description="Settled is the seconds it took, or -1 while the clock is still running.")
target: Optional[StrictInt] = Field(default=None, description="Target is the contracted seconds.")
__properties: ClassVar[List[str]] = ["elapsed", "label", "settled", "target"]
model_config = ConfigDict(
populate_by_name=True,
@@ -50,7 +50,7 @@ class ConnectorTokenOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ConnectorTokenOut from a JSON string"""
"""Create an instance of PatrolClock from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -75,7 +75,7 @@ class ConnectorTokenOut(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ConnectorTokenOut from a dict"""
"""Create an instance of PatrolClock from a dict"""
if obj is None:
return None
@@ -83,10 +83,10 @@ class ConnectorTokenOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"expiresAt": obj.get("expiresAt"),
"elapsed": obj.get("elapsed"),
"label": obj.get("label"),
"provider": obj.get("provider"),
"token": obj.get("token")
"settled": obj.get("settled"),
"target": obj.get("target")
})
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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class PatrolConfirmIn(BaseModel):
"""
PatrolConfirmIn
""" # noqa: E501
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the latitude the confirmation was taken at.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the longitude the confirmation was taken at.")
method: Optional[StrictStr] = Field(default=None, description="Method is how presence was proved: tag, scan, fence, manual or photo.")
name: Optional[StrictStr] = Field(default=None, description="Name is the checkpoint's document name, from the path.")
photo: Optional[StrictStr] = Field(default=None, description="Photo is the object key of a photo taken there, never the bytes.")
__properties: ClassVar[List[str]] = ["lat", "lon", "method", "name", "photo"]
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 PatrolConfirmIn 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 PatrolConfirmIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"method": obj.get("method"),
"name": obj.get("name"),
"photo": obj.get("photo")
})
return _obj
+141
View File
@@ -0,0 +1,141 @@
# 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.patrol_event import PatrolEvent
from hanzoai.cloud.models.patrol_incident import PatrolIncident
from hanzoai.cloud.models.patrol_key import PatrolKey
from hanzoai.cloud.models.patrol_site import PatrolSite
from hanzoai.cloud.models.patrol_tour import PatrolTour
from hanzoai.cloud.models.patrol_unit import PatrolUnit
from typing import Optional, Set
from typing_extensions import Self
class PatrolEstate(BaseModel):
"""
PatrolEstate
""" # noqa: E501
events: Optional[List[PatrolEvent]] = Field(default=None, description="Events is the recent feed, newest first.")
incident: Optional[PatrolIncident] = Field(default=None, description="Incident is the incident currently running, or null when none is.")
keys: Optional[List[PatrolKey]] = Field(default=None, description="Keys is the key register, empty for a caller whose roles do not reach it.")
sites: Optional[List[PatrolSite]] = Field(default=None, description="Sites is the estate under contract.")
tours: Optional[List[PatrolTour]] = Field(default=None, description="Tours is today's rounds with their checkpoints.")
units: Optional[List[PatrolUnit]] = Field(default=None, description="Units is the fleet, each with the tail of its position trail.")
__properties: ClassVar[List[str]] = ["events", "incident", "keys", "sites", "tours", "units"]
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 PatrolEstate 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 events (list)
_items = []
if self.events:
for _item_events in self.events:
if _item_events:
_items.append(_item_events.to_dict())
_dict['events'] = _items
# override the default output from pydantic by calling `to_dict()` of incident
if self.incident:
_dict['incident'] = self.incident.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in keys (list)
_items = []
if self.keys:
for _item_keys in self.keys:
if _item_keys:
_items.append(_item_keys.to_dict())
_dict['keys'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in sites (list)
_items = []
if self.sites:
for _item_sites in self.sites:
if _item_sites:
_items.append(_item_sites.to_dict())
_dict['sites'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in tours (list)
_items = []
if self.tours:
for _item_tours in self.tours:
if _item_tours:
_items.append(_item_tours.to_dict())
_dict['tours'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in units (list)
_items = []
if self.units:
for _item_units in self.units:
if _item_units:
_items.append(_item_units.to_dict())
_dict['units'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolEstate from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"events": [PatrolEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None,
"incident": PatrolIncident.from_dict(obj["incident"]) if obj.get("incident") is not None else None,
"keys": [PatrolKey.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None,
"sites": [PatrolSite.from_dict(_item) for _item in obj["sites"]] if obj.get("sites") is not None else None,
"tours": [PatrolTour.from_dict(_item) for _item in obj["tours"]] if obj.get("tours") is not None else None,
"units": [PatrolUnit.from_dict(_item) for _item in obj["units"]] if obj.get("units") is not None else None
})
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, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolEvent(BaseModel):
"""
PatrolEvent
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is when it was raised.")
detail: Optional[StrictStr] = Field(default=None, description="Detail is the longer account, or empty.")
level: Optional[StrictStr] = Field(default=None, description="Level is red, amber, green or cyan.")
name: Optional[StrictStr] = Field(default=None, description="Name is the event's document name.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site the event is about, or empty.")
source: Optional[StrictStr] = Field(default=None, description="Source is what raised it.")
title: Optional[StrictStr] = Field(default=None, description="Title is the one line the feed shows.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the unit the event is about, or empty.")
__properties: ClassVar[List[str]] = ["at", "detail", "level", "name", "site", "source", "title", "unit"]
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 PatrolEvent 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 PatrolEvent 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"),
"detail": obj.get("detail"),
"level": obj.get("level"),
"name": obj.get("name"),
"site": obj.get("site"),
"source": obj.get("source"),
"title": obj.get("title"),
"unit": obj.get("unit")
})
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 PatrolEventIn(BaseModel):
"""
PatrolEventIn
""" # noqa: E501
detail: Optional[StrictStr] = Field(default=None, description="Detail is the longer account.")
level: Optional[StrictStr] = Field(default=None, description="Level is red, amber, green or cyan.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site it is about, by document name.")
source: Optional[StrictStr] = Field(default=None, description="Source is what raised it.")
title: Optional[StrictStr] = Field(default=None, description="Title is the one line the feed shows.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the unit it is about, by call sign.")
__properties: ClassVar[List[str]] = ["detail", "level", "site", "source", "title", "unit"]
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 PatrolEventIn 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 PatrolEventIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"detail": obj.get("detail"),
"level": obj.get("level"),
"site": obj.get("site"),
"source": obj.get("source"),
"title": obj.get("title"),
"unit": obj.get("unit")
})
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.patrol_event import PatrolEvent
from typing import Optional, Set
from typing_extensions import Self
class PatrolEventList(BaseModel):
"""
PatrolEventList
""" # noqa: E501
data: Optional[List[PatrolEvent]] = Field(default=None, description="Data is the matching rows, 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 PatrolEventList 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 PatrolEventList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolEvent.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_event import PatrolEvent
from typing import Optional, Set
from typing_extensions import Self
class PatrolEventOut(BaseModel):
"""
PatrolEventOut
""" # noqa: E501
data: Optional[PatrolEvent] = Field(default=None, description="Data is the row as recorded.")
__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 PatrolEventOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolEventOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolEvent.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
+91
View File
@@ -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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class PatrolFix(BaseModel):
"""
PatrolFix
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is when the position was recorded.")
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the latitude in degrees.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the longitude in degrees.")
__properties: ClassVar[List[str]] = ["at", "lat", "lon"]
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 PatrolFix 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 PatrolFix 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"),
"lat": obj.get("lat"),
"lon": obj.get("lon")
})
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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class PatrolFixIn(BaseModel):
"""
PatrolFixIn
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is not a caller's to fill. A position report is stamped by the server, and a body naming it is refused rather than silently restamped: the trail is the proof of where a unit was, so a report that thought it was dating itself must learn otherwise.")
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the latitude in degrees.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the longitude in degrees.")
name: Optional[StrictStr] = Field(default=None, description="Name is the unit's call sign, from the path.")
__properties: ClassVar[List[str]] = ["at", "lat", "lon", "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 PatrolFixIn 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 PatrolFixIn 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"),
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"name": obj.get("name")
})
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.patrol_fixed import PatrolFixed
from typing import Optional, Set
from typing_extensions import Self
class PatrolFixOut(BaseModel):
"""
PatrolFixOut
""" # noqa: E501
data: Optional[PatrolFixed] = Field(default=None, description="Data is the acknowledgement.")
__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 PatrolFixOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolFixOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolFixed.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
@@ -22,13 +22,12 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class DeviceStartIn(BaseModel):
class PatrolFixed(BaseModel):
"""
DeviceStartIn
PatrolFixed
""" # noqa: E501
label: Optional[StrictStr] = Field(default=None, description="Label names this connection so one user can hold several per provider (\"work\", \"personal\"). Empty means \"default\". 1-64 of [A-Za-z0-9._-].")
provider: Optional[StrictStr] = Field(default=None, description="Provider is the user-scoped provider's registry id, from the path.")
__properties: ClassVar[List[str]] = ["label", "provider"]
at: Optional[StrictStr] = Field(default=None, description="At is the moment the position was recorded under.")
__properties: ClassVar[List[str]] = ["at"]
model_config = ConfigDict(
populate_by_name=True,
@@ -48,7 +47,7 @@ class DeviceStartIn(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DeviceStartIn from a JSON string"""
"""Create an instance of PatrolFixed from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -73,7 +72,7 @@ class DeviceStartIn(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DeviceStartIn from a dict"""
"""Create an instance of PatrolFixed from a dict"""
if obj is None:
return None
@@ -81,8 +80,7 @@ class DeviceStartIn(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"label": obj.get("label"),
"provider": obj.get("provider")
"at": obj.get("at")
})
return _obj
+147
View File
@@ -0,0 +1,147 @@
# 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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.patrol_act import PatrolAct
from hanzoai.cloud.models.patrol_clock import PatrolClock
from typing import Optional, Set
from typing_extensions import Self
class PatrolIncident(BaseModel):
"""
PatrolIncident
""" # noqa: E501
checked: Optional[StrictStr] = Field(default=None, description="Checked is when the premises had been walked.")
clocks: Optional[List[PatrolClock]] = Field(default=None, description="Clocks is the SLA clocks, present on a single-incident read.")
closed: Optional[StrictStr] = Field(default=None, description="Closed is when the incident was closed.")
dispatched: Optional[StrictStr] = Field(default=None, description="Dispatched is when a unit was assigned.")
enroute: Optional[StrictStr] = Field(default=None, description="Enroute is when that unit started moving.")
escalated: Optional[StrictStr] = Field(default=None, description="Escalated is when it was escalated, or empty.")
var_false: Optional[StrictBool] = Field(default=None, description="False says the activation turned out to be nothing.", alias="false")
filed: Optional[StrictStr] = Field(default=None, description="Filed is when the report was written.")
name: Optional[StrictStr] = Field(default=None, description="Name is the incident's document name.")
onsite: Optional[StrictStr] = Field(default=None, description="Onsite is when it arrived.")
opened: Optional[StrictStr] = Field(default=None, description="Opened is when the activation landed.")
outcome: Optional[StrictStr] = Field(default=None, description="Outcome is what it came to.")
ref: Optional[StrictStr] = Field(default=None, description="Ref is the receiving centre's own reference.")
secured: Optional[StrictStr] = Field(default=None, description="Secured is when the site was made safe.")
site: Optional[StrictStr] = Field(default=None, description="Site is where it is happening.")
sla: Optional[StrictInt] = Field(default=None, description="SLA is the contracted response time in minutes.")
state: Optional[StrictStr] = Field(default=None, description="State is one of received, verified, dispatched, enroute, onsite, checked, secured, filed and closed.")
steps: Optional[List[PatrolAct]] = Field(default=None, description="Steps is the act trail, present on a single-incident read.")
tier: Optional[StrictStr] = Field(default=None, description="Tier is the site's contracted service tier.")
trigger: Optional[StrictStr] = Field(default=None, description="Trigger is what the panel reported.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the call sign attending, or empty.")
verified: Optional[StrictStr] = Field(default=None, description="Verified is when the activation was confirmed real.")
zone: Optional[StrictStr] = Field(default=None, description="Zone is the panel zone that reported.")
__properties: ClassVar[List[str]] = ["checked", "clocks", "closed", "dispatched", "enroute", "escalated", "false", "filed", "name", "onsite", "opened", "outcome", "ref", "secured", "site", "sla", "state", "steps", "tier", "trigger", "unit", "verified", "zone"]
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 PatrolIncident 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 clocks (list)
_items = []
if self.clocks:
for _item_clocks in self.clocks:
if _item_clocks:
_items.append(_item_clocks.to_dict())
_dict['clocks'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in steps (list)
_items = []
if self.steps:
for _item_steps in self.steps:
if _item_steps:
_items.append(_item_steps.to_dict())
_dict['steps'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolIncident from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"checked": obj.get("checked"),
"clocks": [PatrolClock.from_dict(_item) for _item in obj["clocks"]] if obj.get("clocks") is not None else None,
"closed": obj.get("closed"),
"dispatched": obj.get("dispatched"),
"enroute": obj.get("enroute"),
"escalated": obj.get("escalated"),
"false": obj.get("false"),
"filed": obj.get("filed"),
"name": obj.get("name"),
"onsite": obj.get("onsite"),
"opened": obj.get("opened"),
"outcome": obj.get("outcome"),
"ref": obj.get("ref"),
"secured": obj.get("secured"),
"site": obj.get("site"),
"sla": obj.get("sla"),
"state": obj.get("state"),
"steps": [PatrolAct.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None,
"tier": obj.get("tier"),
"trigger": obj.get("trigger"),
"unit": obj.get("unit"),
"verified": obj.get("verified"),
"zone": obj.get("zone")
})
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, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolIncidentAct(BaseModel):
"""
PatrolIncidentAct
""" # noqa: E501
act: Optional[StrictStr] = Field(default=None, description="Act is VERIFY, DISPATCH, ROLL, ARRIVE, CHECK, SECURE, FILE, CLOSE or ESCALATE.")
detail: Optional[StrictStr] = Field(default=None, description="Detail is what to write on the trail with this act.")
var_false: Optional[StrictBool] = Field(default=None, description="False says the activation turned out to be nothing, read by CLOSE.", alias="false")
name: Optional[StrictStr] = Field(default=None, description="Name is the incident's document name, from the path.")
outcome: Optional[StrictStr] = Field(default=None, description="Outcome is what the incident came to, read by CLOSE.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the call sign to send, read by DISPATCH.")
__properties: ClassVar[List[str]] = ["act", "detail", "false", "name", "outcome", "unit"]
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 PatrolIncidentAct 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 PatrolIncidentAct from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"act": obj.get("act"),
"detail": obj.get("detail"),
"false": obj.get("false"),
"name": obj.get("name"),
"outcome": obj.get("outcome"),
"unit": obj.get("unit")
})
return _obj
@@ -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 PatrolIncidentIn(BaseModel):
"""
PatrolIncidentIn
""" # noqa: E501
ref: Optional[StrictStr] = Field(default=None, description="Ref is the receiving centre's own reference.")
site: Optional[StrictStr] = Field(default=None, description="Site is where it is happening, by document name.")
trigger: Optional[StrictStr] = Field(default=None, description="Trigger is what was reported.")
zone: Optional[StrictStr] = Field(default=None, description="Zone is the panel zone that reported.")
__properties: ClassVar[List[str]] = ["ref", "site", "trigger", "zone"]
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 PatrolIncidentIn 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 PatrolIncidentIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ref": obj.get("ref"),
"site": obj.get("site"),
"trigger": obj.get("trigger"),
"zone": obj.get("zone")
})
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.patrol_incident import PatrolIncident
from typing import Optional, Set
from typing_extensions import Self
class PatrolIncidentList(BaseModel):
"""
PatrolIncidentList
""" # noqa: E501
data: Optional[List[PatrolIncident]] = Field(default=None, description="Data is the matching incidents, without their trails.")
__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 PatrolIncidentList 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 PatrolIncidentList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolIncident.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_incident import PatrolIncident
from typing import Optional, Set
from typing_extensions import Self
class PatrolIncidentOut(BaseModel):
"""
PatrolIncidentOut
""" # noqa: E501
data: Optional[PatrolIncident] = Field(default=None, description="Data is the incident with its act trail and SLA clocks.")
__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 PatrolIncidentOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolIncidentOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolIncident.from_dict(obj["data"]) if obj.get("data") 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 PatrolKey(BaseModel):
"""
PatrolKey
""" # noqa: E501
holder: Optional[StrictStr] = Field(default=None, description="Holder is who has it now.")
moved: Optional[StrictStr] = Field(default=None, description="Moved is when it last changed hands.")
name: Optional[StrictStr] = Field(default=None, description="Name is the key set's reference, which is its document name.")
site: Optional[StrictStr] = Field(default=None, description="Site is the site the keys open.")
where: Optional[StrictStr] = Field(default=None, description="Where is where the set is kept.")
__properties: ClassVar[List[str]] = ["holder", "moved", "name", "site", "where"]
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 PatrolKey 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 PatrolKey from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"holder": obj.get("holder"),
"moved": obj.get("moved"),
"name": obj.get("name"),
"site": obj.get("site"),
"where": obj.get("where")
})
return _obj
@@ -19,16 +19,16 @@ import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.conn_view import ConnView
from hanzoai.cloud.models.patrol_key import PatrolKey
from typing import Optional, Set
from typing_extensions import Self
class ConnectorsOut(BaseModel):
class PatrolKeyList(BaseModel):
"""
ConnectorsOut
PatrolKeyList
""" # noqa: E501
connectors: Optional[List[ConnView]] = Field(default=None, description="Connectors is the caller's own set. Never null; [] when they have none.")
__properties: ClassVar[List[str]] = ["connectors"]
data: Optional[List[PatrolKey]] = Field(default=None, description="Data is every key set held.")
__properties: ClassVar[List[str]] = ["data"]
model_config = ConfigDict(
populate_by_name=True,
@@ -48,7 +48,7 @@ class ConnectorsOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ConnectorsOut from a JSON string"""
"""Create an instance of PatrolKeyList from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -69,18 +69,18 @@ class ConnectorsOut(BaseModel):
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in connectors (list)
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
_items = []
if self.connectors:
for _item_connectors in self.connectors:
if _item_connectors:
_items.append(_item_connectors.to_dict())
_dict['connectors'] = _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 ConnectorsOut from a dict"""
"""Create an instance of PatrolKeyList from a dict"""
if obj is None:
return None
@@ -88,7 +88,7 @@ class ConnectorsOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"connectors": [ConnView.from_dict(_item) for _item in obj["connectors"]] if obj.get("connectors") is not None else None
"data": [PatrolKey.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_key import PatrolKey
from typing import Optional, Set
from typing_extensions import Self
class PatrolKeyOut(BaseModel):
"""
PatrolKeyOut
""" # noqa: E501
data: Optional[PatrolKey] = Field(default=None, description="Data is the key set.")
__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 PatrolKeyOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolKeyOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolKey.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
@@ -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 PatrolMoveIn(BaseModel):
"""
PatrolMoveIn
""" # noqa: E501
act: Optional[StrictStr] = Field(default=None, description="Act is out, in or audit.")
holder: Optional[StrictStr] = Field(default=None, description="Holder is who the keys went to. Who SIGNED for the move is the caller, and is stamped from the request rather than read from here.")
job: Optional[StrictStr] = Field(default=None, description="Job is the work the keys were drawn for.")
name: Optional[StrictStr] = Field(default=None, description="Name is the key set's reference, from the path.")
__properties: ClassVar[List[str]] = ["act", "holder", "job", "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 PatrolMoveIn 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 PatrolMoveIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"act": obj.get("act"),
"holder": obj.get("holder"),
"job": obj.get("job"),
"name": obj.get("name")
})
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.patrol_nearest import PatrolNearest
from typing import Optional, Set
from typing_extensions import Self
class PatrolNearList(BaseModel):
"""
PatrolNearList
""" # noqa: E501
data: Optional[List[PatrolNearest]] = Field(default=None, description="Data is the closest units, available ones first and then by distance.")
__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 PatrolNearList 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 PatrolNearList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolNearest.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class PatrolNearest(BaseModel):
"""
PatrolNearest
""" # noqa: E501
eta: Optional[StrictInt] = Field(default=None, description="Eta is the minutes the drive would take at the planning speed.")
km: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Km is the great-circle distance to the site in kilometres.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the unit's call sign.")
__properties: ClassVar[List[str]] = ["eta", "km", "unit"]
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 PatrolNearest 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 PatrolNearest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"eta": obj.get("eta"),
"km": obj.get("km"),
"unit": obj.get("unit")
})
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 PatrolNote(BaseModel):
"""
PatrolNote
""" # noqa: E501
actor: Optional[StrictStr] = Field(default=None, description="Actor is who wrote it.")
at: Optional[StrictStr] = Field(default=None, description="At is when it was written.")
body: Optional[StrictStr] = Field(default=None, description="Body is the remark.")
name: Optional[StrictStr] = Field(default=None, description="Name is the note's document name.")
subject: Optional[StrictStr] = Field(default=None, description="Subject is what the note is about.")
__properties: ClassVar[List[str]] = ["actor", "at", "body", "name", "subject"]
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 PatrolNote 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 PatrolNote 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"),
"at": obj.get("at"),
"body": obj.get("body"),
"name": obj.get("name"),
"subject": obj.get("subject")
})
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 PatrolNoteIn(BaseModel):
"""
PatrolNoteIn
""" # noqa: E501
body: Optional[StrictStr] = Field(default=None, description="Body is the remark.")
subject: Optional[StrictStr] = Field(default=None, description="Subject is what the note is about.")
__properties: ClassVar[List[str]] = ["body", "subject"]
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 PatrolNoteIn 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 PatrolNoteIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"body": obj.get("body"),
"subject": obj.get("subject")
})
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.patrol_note import PatrolNote
from typing import Optional, Set
from typing_extensions import Self
class PatrolNoteList(BaseModel):
"""
PatrolNoteList
""" # noqa: E501
data: Optional[List[PatrolNote]] = Field(default=None, description="Data is the matching notes in store order.")
__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 PatrolNoteList 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 PatrolNoteList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolNote.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_note import PatrolNote
from typing import Optional, Set
from typing_extensions import Self
class PatrolNoteOut(BaseModel):
"""
PatrolNoteOut
""" # noqa: E501
data: Optional[PatrolNote] = Field(default=None, description="Data is the note as written.")
__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 PatrolNoteOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolNoteOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolNote.from_dict(obj["data"]) if obj.get("data") is not None else None
})
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, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolReport(BaseModel):
"""
PatrolReport
""" # noqa: E501
at: Optional[StrictStr] = Field(default=None, description="At is when it was filed.")
body: Optional[StrictStr] = Field(default=None, description="Body is the report as text.")
client: Optional[StrictStr] = Field(default=None, description="Client is the customer it is about, or empty.")
var_from: Optional[StrictStr] = Field(default=None, description="From is the start of the window the report covers.", alias="from")
incident: Optional[StrictStr] = Field(default=None, description="Incident is the incident it is about, or empty.")
kind: Optional[StrictStr] = Field(default=None, description="Kind is shift, incident or client.")
name: Optional[StrictStr] = Field(default=None, description="Name is the report's document name and the segment /v1/patrol/report/{name} addresses it by.")
to: Optional[StrictStr] = Field(default=None, description="To is the end of that window.")
__properties: ClassVar[List[str]] = ["at", "body", "client", "from", "incident", "kind", "name", "to"]
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 PatrolReport 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 PatrolReport 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"),
"body": obj.get("body"),
"client": obj.get("client"),
"from": obj.get("from"),
"incident": obj.get("incident"),
"kind": obj.get("kind"),
"name": obj.get("name"),
"to": obj.get("to")
})
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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolReportIn(BaseModel):
"""
PatrolReportIn
""" # noqa: E501
client: Optional[StrictStr] = Field(default=None, description="Client is the customer to report on, read by kind client. Naming one files an account that customer may download; leaving it empty covers every customer, which is an account of the operation and stays with it.")
var_from: Optional[StrictStr] = Field(default=None, description="From is the start of the window to cover.", alias="from")
incident: Optional[StrictStr] = Field(default=None, description="Incident is the incident to report on, required for kind incident.")
kind: Optional[StrictStr] = Field(default=None, description="Kind is shift, incident or client.")
to: Optional[StrictStr] = Field(default=None, description="To is the end of that window.")
__properties: ClassVar[List[str]] = ["client", "from", "incident", "kind", "to"]
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 PatrolReportIn 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 PatrolReportIn from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"client": obj.get("client"),
"from": obj.get("from"),
"incident": obj.get("incident"),
"kind": obj.get("kind"),
"to": obj.get("to")
})
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.patrol_report import PatrolReport
from typing import Optional, Set
from typing_extensions import Self
class PatrolReportOut(BaseModel):
"""
PatrolReportOut
""" # noqa: E501
data: Optional[PatrolReport] = Field(default=None, description="Data is the report as filed.")
__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 PatrolReportOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolReportOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolReport.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
+137
View File
@@ -0,0 +1,137 @@
# 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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from hanzoai.cloud.models.patrol_zone import PatrolZone
from typing import Optional, Set
from typing_extensions import Self
class PatrolSite(BaseModel):
"""
PatrolSite
""" # noqa: E501
account: Optional[StrictStr] = Field(default=None, description="Account is the alarm-panel account number the receiving centre reports.")
cameras: Optional[StrictInt] = Field(default=None, description="Cameras is how many cameras are registered here.")
category: Optional[StrictStr] = Field(default=None, description="Category is what kind of premises this is.")
client: Optional[StrictStr] = Field(default=None, description="Client is the customer this site belongs to.")
contact: Optional[StrictStr] = Field(default=None, description="Contact is the keyholder to reach.")
eircode: Optional[StrictStr] = Field(default=None, description="Eircode is the postal code.")
hazards: Optional[List[StrictStr]] = Field(default=None, description="Hazards is the standing warnings, present on a single-site read.")
keys: Optional[StrictBool] = Field(default=None, description="Keys says whether the operation holds a key set for this site.")
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the site's latitude in degrees.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the site's longitude in degrees.")
name: Optional[StrictStr] = Field(default=None, description="Name is the site's document name and the segment /v1/patrol/site/{name} addresses it by.")
notes: Optional[StrictStr] = Field(default=None, description="Notes is the standing brief for the site.")
ref: Optional[StrictInt] = Field(default=None, description="Ref is the site's number in the register.")
risk: Optional[StrictInt] = Field(default=None, description="Risk is the assessed risk score.")
sector: Optional[StrictStr] = Field(default=None, description="Sector is the patrol sector the site sits in.")
sla: Optional[StrictInt] = Field(default=None, description="SLA is the contracted response time in minutes.")
status: Optional[StrictStr] = Field(default=None, description="Status is ok, fault, alarm or offline.")
tier: Optional[StrictStr] = Field(default=None, description="Tier is the contracted service tier.")
town: Optional[StrictStr] = Field(default=None, description="Town is the town the site is in.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the call sign of the unit that covers the site, or empty.")
visits: Optional[StrictInt] = Field(default=None, description="Visits is how many patrol visits the contract calls for.")
zones: Optional[List[PatrolZone]] = Field(default=None, description="Zones is the panel's detection zones, present on a single-site read.")
__properties: ClassVar[List[str]] = ["account", "cameras", "category", "client", "contact", "eircode", "hazards", "keys", "lat", "lon", "name", "notes", "ref", "risk", "sector", "sla", "status", "tier", "town", "unit", "visits", "zones"]
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 PatrolSite 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 zones (list)
_items = []
if self.zones:
for _item_zones in self.zones:
if _item_zones:
_items.append(_item_zones.to_dict())
_dict['zones'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolSite from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"account": obj.get("account"),
"cameras": obj.get("cameras"),
"category": obj.get("category"),
"client": obj.get("client"),
"contact": obj.get("contact"),
"eircode": obj.get("eircode"),
"hazards": obj.get("hazards"),
"keys": obj.get("keys"),
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"name": obj.get("name"),
"notes": obj.get("notes"),
"ref": obj.get("ref"),
"risk": obj.get("risk"),
"sector": obj.get("sector"),
"sla": obj.get("sla"),
"status": obj.get("status"),
"tier": obj.get("tier"),
"town": obj.get("town"),
"unit": obj.get("unit"),
"visits": obj.get("visits"),
"zones": [PatrolZone.from_dict(_item) for _item in obj["zones"]] if obj.get("zones") is not None else None
})
return _obj
@@ -0,0 +1,105 @@
# 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 PatrolSiteEdit(BaseModel):
"""
PatrolSiteEdit
""" # noqa: E501
category: Optional[StrictStr] = Field(default=None, description="Category is what kind of premises this is.")
contact: Optional[StrictStr] = Field(default=None, description="Contact is the keyholder to reach.")
eircode: Optional[StrictStr] = Field(default=None, description="Eircode is the postal code.")
name: Optional[StrictStr] = Field(default=None, description="Name is the site's document name, from the path.")
notes: Optional[StrictStr] = Field(default=None, description="Notes is the standing brief for the site.")
sector: Optional[StrictStr] = Field(default=None, description="Sector is the patrol sector the site sits in.")
sla: Optional[StrictInt] = Field(default=None, description="SLA is the contracted response time in minutes.")
status: Optional[StrictStr] = Field(default=None, description="Status is ok, fault, alarm or offline.")
tier: Optional[StrictStr] = Field(default=None, description="Tier is the contracted service tier.")
town: Optional[StrictStr] = Field(default=None, description="Town is the town the site is in.")
__properties: ClassVar[List[str]] = ["category", "contact", "eircode", "name", "notes", "sector", "sla", "status", "tier", "town"]
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 PatrolSiteEdit 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 PatrolSiteEdit from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"category": obj.get("category"),
"contact": obj.get("contact"),
"eircode": obj.get("eircode"),
"name": obj.get("name"),
"notes": obj.get("notes"),
"sector": obj.get("sector"),
"sla": obj.get("sla"),
"status": obj.get("status"),
"tier": obj.get("tier"),
"town": obj.get("town")
})
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.patrol_site import PatrolSite
from typing import Optional, Set
from typing_extensions import Self
class PatrolSiteList(BaseModel):
"""
PatrolSiteList
""" # noqa: E501
data: Optional[List[PatrolSite]] = Field(default=None, description="Data is the matching sites, without their zones and hazards.")
__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 PatrolSiteList 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 PatrolSiteList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolSite.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_site import PatrolSite
from typing import Optional, Set
from typing_extensions import Self
class PatrolSiteOut(BaseModel):
"""
PatrolSiteOut
""" # noqa: E501
data: Optional[PatrolSite] = Field(default=None, description="Data is the site with its zones and hazards.")
__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 PatrolSiteOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolSiteOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolSite.from_dict(obj["data"]) if obj.get("data") is not None else None
})
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.patrol_estate import PatrolEstate
from typing import Optional, Set
from typing_extensions import Self
class PatrolSnapshotOut(BaseModel):
"""
PatrolSnapshotOut
""" # noqa: E501
data: Optional[PatrolEstate] = Field(default=None, description="Data is the whole estate as one read.")
__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 PatrolSnapshotOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolSnapshotOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolEstate.from_dict(obj["data"]) if obj.get("data") 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 PatrolStream(BaseModel):
"""
PatrolStream
""" # noqa: E501
expires: Optional[StrictStr] = Field(default=None, description="Expires is when that address stops working.")
url: Optional[StrictStr] = Field(default=None, description="URL is the address to open the stream at.")
__properties: ClassVar[List[str]] = ["expires", "url"]
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 PatrolStream 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 PatrolStream from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"expires": obj.get("expires"),
"url": obj.get("url")
})
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.patrol_stream import PatrolStream
from typing import Optional, Set
from typing_extensions import Self
class PatrolStreamOut(BaseModel):
"""
PatrolStreamOut
""" # noqa: E501
data: Optional[PatrolStream] = Field(default=None, description="Data is the stream address and its expiry.")
__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 PatrolStreamOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolStreamOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolStream.from_dict(obj["data"]) if obj.get("data") is not None else None
})
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
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PatrolTenant(BaseModel):
"""
PatrolTenant
""" # noqa: E501
brand: Optional[Any] = None
company: Optional[Any] = None
features: Optional[Any] = None
operations: Optional[Any] = None
terminology: Optional[Any] = None
__properties: ClassVar[List[str]] = ["brand", "company", "features", "operations", "terminology"]
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 PatrolTenant 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 brand (nullable) is None
# and model_fields_set contains the field
if self.brand is None and "brand" in self.model_fields_set:
_dict['brand'] = None
# set to None if company (nullable) is None
# and model_fields_set contains the field
if self.company is None and "company" in self.model_fields_set:
_dict['company'] = None
# set to None if features (nullable) is None
# and model_fields_set contains the field
if self.features is None and "features" in self.model_fields_set:
_dict['features'] = None
# set to None if operations (nullable) is None
# and model_fields_set contains the field
if self.operations is None and "operations" in self.model_fields_set:
_dict['operations'] = None
# set to None if terminology (nullable) is None
# and model_fields_set contains the field
if self.terminology is None and "terminology" in self.model_fields_set:
_dict['terminology'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolTenant from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"brand": obj.get("brand"),
"company": obj.get("company"),
"features": obj.get("features"),
"operations": obj.get("operations"),
"terminology": obj.get("terminology")
})
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.patrol_tenant import PatrolTenant
from typing import Optional, Set
from typing_extensions import Self
class PatrolTenantOut(BaseModel):
"""
PatrolTenantOut
""" # noqa: E501
data: Optional[PatrolTenant] = Field(default=None, description="Data is the tenant's public configuration.")
__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 PatrolTenantOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolTenantOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolTenant.from_dict(obj["data"]) if obj.get("data") is not None else None
})
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.patrol_stream import PatrolStream
from typing import Optional, Set
from typing_extensions import Self
class PatrolTicketOut(BaseModel):
"""
PatrolTicketOut
""" # noqa: E501
data: Optional[PatrolStream] = Field(default=None, description="Data is the address that opens the camera and when the ticket stops working.")
__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 PatrolTicketOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolTicketOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolStream.from_dict(obj["data"]) if obj.get("data") is not None else None
})
return _obj
+105
View File
@@ -0,0 +1,105 @@
# 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.patrol_checkpoint import PatrolCheckpoint
from typing import Optional, Set
from typing_extensions import Self
class PatrolTour(BaseModel):
"""
PatrolTour
""" # noqa: E501
var_date: Optional[StrictStr] = Field(default=None, description="Date is the day the round belongs to.", alias="date")
end: Optional[StrictStr] = Field(default=None, description="End is when it finished.")
name: Optional[StrictStr] = Field(default=None, description="Name is the tour's document name.")
points: Optional[List[PatrolCheckpoint]] = Field(default=None, description="Points is the round's checkpoints in store order.")
start: Optional[StrictStr] = Field(default=None, description="Start is when the round began.")
unit: Optional[StrictStr] = Field(default=None, description="Unit is the call sign running the round.")
__properties: ClassVar[List[str]] = ["date", "end", "name", "points", "start", "unit"]
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 PatrolTour 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 points (list)
_items = []
if self.points:
for _item_points in self.points:
if _item_points:
_items.append(_item_points.to_dict())
_dict['points'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolTour from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"date": obj.get("date"),
"end": obj.get("end"),
"name": obj.get("name"),
"points": [PatrolCheckpoint.from_dict(_item) for _item in obj["points"]] if obj.get("points") is not None else None,
"start": obj.get("start"),
"unit": obj.get("unit")
})
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.patrol_tour import PatrolTour
from typing import Optional, Set
from typing_extensions import Self
class PatrolTourList(BaseModel):
"""
PatrolTourList
""" # noqa: E501
data: Optional[List[PatrolTour]] = Field(default=None, description="Data is the matching rounds, each with its checkpoints.")
__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 PatrolTourList 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 PatrolTourList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolTour.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
return _obj
+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, StrictFloat, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional, Union
from hanzoai.cloud.models.patrol_fix import PatrolFix
from typing import Optional, Set
from typing_extensions import Self
class PatrolUnit(BaseModel):
"""
PatrolUnit
""" # noqa: E501
due: Optional[StrictStr] = Field(default=None, description="Due is the lone-worker deadline, or empty when none is set.")
lat: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lat is the unit's last latitude in degrees.")
lon: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Lon is the unit's last longitude in degrees.")
name: Optional[StrictStr] = Field(default=None, description="Name is the unit's call sign, which is its document name and the segment /v1/patrol/unit/{name}/fix addresses it by.")
officer: Optional[StrictStr] = Field(default=None, description="Officer is who is crewing it.")
sector: Optional[StrictStr] = Field(default=None, description="Sector is the patrol sector it works.")
seen: Optional[StrictStr] = Field(default=None, description="Seen is when the unit last reported.")
state: Optional[StrictStr] = Field(default=None, description="State is available, assigned, enroute, onsite, offline, break or emergency.")
trail: Optional[List[PatrolFix]] = Field(default=None, description="Trail is the tail of the unit's recorded positions, oldest first.")
__properties: ClassVar[List[str]] = ["due", "lat", "lon", "name", "officer", "sector", "seen", "state", "trail"]
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 PatrolUnit 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 trail (list)
_items = []
if self.trail:
for _item_trail in self.trail:
if _item_trail:
_items.append(_item_trail.to_dict())
_dict['trail'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolUnit from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"due": obj.get("due"),
"lat": obj.get("lat"),
"lon": obj.get("lon"),
"name": obj.get("name"),
"officer": obj.get("officer"),
"sector": obj.get("sector"),
"seen": obj.get("seen"),
"state": obj.get("state"),
"trail": [PatrolFix.from_dict(_item) for _item in obj["trail"]] if obj.get("trail") 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.patrol_unit import PatrolUnit
from typing import Optional, Set
from typing_extensions import Self
class PatrolUnitList(BaseModel):
"""
PatrolUnitList
""" # noqa: E501
data: Optional[List[PatrolUnit]] = Field(default=None, description="Data is every unit in the org, each with its position trail.")
__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 PatrolUnitList 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 PatrolUnitList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PatrolUnit.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
})
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.patrol_unit import PatrolUnit
from typing import Optional, Set
from typing_extensions import Self
class PatrolUnitOut(BaseModel):
"""
PatrolUnitOut
""" # noqa: E501
data: Optional[PatrolUnit] = Field(default=None, description="Data is the unit as it now stands.")
__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 PatrolUnitOut 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()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PatrolUnitOut from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": PatrolUnit.from_dict(obj["data"]) if obj.get("data") is not None else None
})
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 PatrolUnitStateIn(BaseModel):
"""
PatrolUnitStateIn
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name is the unit's call sign, from the path.")
state: Optional[StrictStr] = Field(default=None, description="State is available, assigned, enroute, onsite, offline, break or emergency.")
__properties: ClassVar[List[str]] = ["name", "state"]
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 PatrolUnitStateIn 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 PatrolUnitStateIn 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"),
"state": obj.get("state")
})
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 PatrolZone(BaseModel):
"""
PatrolZone
""" # noqa: E501
device: Optional[StrictStr] = Field(default=None, description="Device is the detector type.")
location: Optional[StrictStr] = Field(default=None, description="Location is where in the building the zone is.")
ref: Optional[StrictStr] = Field(default=None, description="Ref is the zone number the panel reports.")
state: Optional[StrictStr] = Field(default=None, description="State is the zone's last known condition.")
__properties: ClassVar[List[str]] = ["device", "location", "ref", "state"]
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 PatrolZone 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 PatrolZone from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"device": obj.get("device"),
"location": obj.get("location"),
"ref": obj.get("ref"),
"state": obj.get("state")
})
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 PoolDeclare(BaseModel):
"""
PoolDeclare
""" # noqa: E501
labels: Optional[List[StrictStr]] = Field(default=None, description="Labels are what a workflow's `runs-on:` selects this pool by. A job is assigned to a pool that carries EVERY label it asked for.")
name: Optional[StrictStr] = Field(default=None, description="Name is the pool's handle in this org, e.g. \"evo\" or \"spark\".")
__properties: ClassVar[List[str]] = ["labels", "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 PoolDeclare 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 PoolDeclare from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"labels": obj.get("labels"),
"name": obj.get("name")
})
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 hanzoai.cloud.models.pool_view import PoolView
from typing import Optional, Set
from typing_extensions import Self
class PoolDeclared(BaseModel):
"""
PoolDeclared
""" # noqa: E501
pool: Optional[PoolView] = Field(default=None, description="Pool is the capacity that now exists.")
secret: Optional[StrictStr] = Field(default=None, description="Secret is what a runner daemon presents to enter the pool. It is answered HERE AND NOWHERE ELSE — only a digest is stored — so a lost one is replaced by declaring the pool again.")
__properties: ClassVar[List[str]] = ["pool", "secret"]
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 PoolDeclared 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 pool
if self.pool:
_dict['pool'] = self.pool.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PoolDeclared from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"pool": PoolView.from_dict(obj["pool"]) if obj.get("pool") is not None else None,
"secret": obj.get("secret")
})
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
from typing import Any, ClassVar, Dict, List, Optional
from hanzoai.cloud.models.pool_view import PoolView
from typing import Optional, Set
from typing_extensions import Self
class PoolList(BaseModel):
"""
PoolList
""" # noqa: E501
data: Optional[List[PoolView]] = Field(default=None, description="Data is the org's declared pools, by name.")
__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 PoolList 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 PoolList from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"data": [PoolView.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, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class PoolView(BaseModel):
"""
PoolView
""" # noqa: E501
created_at: Optional[StrictInt] = Field(default=None, description="CreatedAt is when the pool was declared, in unix seconds.", alias="createdAt")
labels: Optional[List[StrictStr]] = Field(default=None, description="Labels are what a workflow's `runs-on:` selects this pool by.")
name: Optional[StrictStr] = Field(default=None, description="Name is the pool's handle in this org.")
runners: Optional[StrictInt] = Field(default=None, description="Runners is how many daemons have entered the pool. Zero means the capacity is declared and nothing has turned up to provide it.")
__properties: ClassVar[List[str]] = ["createdAt", "labels", "name", "runners"]
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 PoolView 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 PoolView 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"),
"labels": obj.get("labels"),
"name": obj.get("name"),
"runners": obj.get("runners")
})
return _obj
+6 -2
View File
@@ -33,8 +33,10 @@ class ProviderView(BaseModel):
connection: Optional[ConnectionView] = Field(default=None, description="Connection is the connected account's non-secret detail. Absent when the org has no connection; tokens NEVER appear here (they live only in KMS).")
description: Optional[StrictStr] = Field(default=None, description="Description is the one-line pitch the console card shows.")
id: Optional[StrictStr] = Field(default=None, description="ID is the provider's registry id and the :provider path segment (\"slack\").")
modes: Optional[List[StrictStr]] = Field(default=None, description="Modes are the ways this provider can be connected, derived from what it actually declares — \"managed\", \"oauth\", \"apikey\", \"device\", \"mcp\". One console page renders every card from this field rather than carrying a table of its own, which is how a provider added here shows up there without a second edit.")
name: Optional[StrictStr] = Field(default=None, description="Name is the provider's display name (\"Slack\").")
__properties: ClassVar[List[str]] = ["available", "category", "connected", "connection", "description", "id", "name"]
scopes: Optional[List[StrictStr]] = Field(default=None, description="Scopes are the permissions a connection will ask for. Never null.")
__properties: ClassVar[List[str]] = ["available", "category", "connected", "connection", "description", "id", "modes", "name", "scopes"]
model_config = ConfigDict(
populate_by_name=True,
@@ -96,7 +98,9 @@ class ProviderView(BaseModel):
"connection": ConnectionView.from_dict(obj["connection"]) if obj.get("connection") is not None else None,
"description": obj.get("description"),
"id": obj.get("id"),
"name": obj.get("name")
"modes": obj.get("modes"),
"name": obj.get("name"),
"scopes": obj.get("scopes")
})
return _obj
@@ -22,16 +22,17 @@ from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class DeviceStartOut(BaseModel):
class Rate(BaseModel):
"""
DeviceStartOut
Rate
""" # noqa: E501
expires_at: Optional[StrictStr] = Field(default=None, description="ExpiresAt is when the flow dies, RFC 3339 UTC.", alias="expiresAt")
flow: Optional[StrictStr] = Field(default=None, description="Flow is the id to poll with.")
interval: Optional[StrictInt] = Field(default=None, description="Interval is the seconds to wait between polls.")
user_code: Optional[StrictStr] = Field(default=None, description="UserCode is the short code the user types at VerifyURL.", alias="userCode")
verify_url: Optional[StrictStr] = Field(default=None, description="VerifyURL is the page the user opens to enter UserCode.", alias="verifyUrl")
__properties: ClassVar[List[str]] = ["expiresAt", "flow", "interval", "userCode", "verifyUrl"]
component: Optional[StrictStr] = Field(default=None, description="Component is which of the four this line bills under.")
name: Optional[StrictStr] = Field(default=None, description="Name addresses the rate.")
note: Optional[StrictStr] = Field(default=None, description="Note is what the line covers.")
per: Optional[StrictStr] = Field(default=None, description="Per names one unit, so a reader never has to guess what the number is per.")
rate_micro_usd: Optional[StrictInt] = Field(default=None, description="Micros is the price of ONE unit, in micro-USD. It is the number the ledger books, resolved through the same authority the metering path reads.")
title: Optional[StrictStr] = Field(default=None, description="Title is how the line reads on a price list.")
__properties: ClassVar[List[str]] = ["component", "name", "note", "per", "rate_micro_usd", "title"]
model_config = ConfigDict(
populate_by_name=True,
@@ -51,7 +52,7 @@ class DeviceStartOut(BaseModel):
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of DeviceStartOut from a JSON string"""
"""Create an instance of Rate from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
@@ -76,7 +77,7 @@ class DeviceStartOut(BaseModel):
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of DeviceStartOut from a dict"""
"""Create an instance of Rate from a dict"""
if obj is None:
return None
@@ -84,11 +85,12 @@ class DeviceStartOut(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"expiresAt": obj.get("expiresAt"),
"flow": obj.get("flow"),
"interval": obj.get("interval"),
"userCode": obj.get("userCode"),
"verifyUrl": obj.get("verifyUrl")
"component": obj.get("component"),
"name": obj.get("name"),
"note": obj.get("note"),
"per": obj.get("per"),
"rate_micro_usd": obj.get("rate_micro_usd"),
"title": obj.get("title")
})
return _obj
+4 -2
View File
@@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, 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
@@ -29,6 +29,7 @@ class RegisterReq(BaseModel):
account: Optional[StrictStr] = Field(default=None, description="Account is which subscription or API account under that provider served the run, up to 256 characters. It is what lets a revoke of that login stop exactly the sessions it was paying for.")
actor: Optional[StrictStr] = Field(default=None, description="Actor is the \"org/sub\" identity to record the session under, up to 256 characters. Omit it and the calling principal is used, which is almost always what you want: it is what a login revoke matches on to stop this session.")
agent: Optional[StrictStr] = Field(default=None, description="Agent is the label the surface opening this session calls itself by (\"hanzo-dev\"). REQUIRED, up to 128 characters, and free text — nothing resolves it against a defined agent.")
budget_micro_usd: Optional[StrictInt] = Field(default=None, description="BudgetMicroUSD caps what this session may spend, integer micro-USD. Zero means no cap; a cap can be raised or removed later, never added.")
cwd: Optional[StrictStr] = Field(default=None, description="Cwd is the directory the session starts in, up to 1024 characters. It can be moved later, because a linked shell walks around.")
host: Optional[StrictStr] = Field(default=None, description="Execution context — where this session runs (all optional).")
parent_session_id: Optional[StrictStr] = Field(default=None, description="ParentSessionID makes this a subagent of that session: it inherits the parent's root, so one flow stays one tree. The parent must exist IN THE SAME ORG — a foreign or unknown id is a 400, never a tree across tenants. Empty opens a root session.", alias="parentSessionId")
@@ -43,7 +44,7 @@ class RegisterReq(BaseModel):
task_workflow_id: Optional[StrictStr] = Field(default=None, description="TaskWorkflowID links this session to the hanzoai/tasks workflow that executes it, up to 256 characters. Set it and control commands are forwarded to that engine; leave it and the running surface polls for them instead.", alias="taskWorkflowId")
terminal: Optional[StrictStr] = Field(default=None, description="Terminal is the URL this session's live terminal is published at, so the console can watch it. Optional — a session that publishes nothing is still a session.")
title: Optional[StrictStr] = Field(default=None, description="Title is the human line a card shows, up to 512 characters. Optional, and changeable later.")
__properties: ClassVar[List[str]] = ["account", "actor", "agent", "cwd", "host", "parentSessionId", "project", "provider", "published", "repo", "room", "status", "target", "taskRunId", "taskWorkflowId", "terminal", "title"]
__properties: ClassVar[List[str]] = ["account", "actor", "agent", "budget_micro_usd", "cwd", "host", "parentSessionId", "project", "provider", "published", "repo", "room", "status", "target", "taskRunId", "taskWorkflowId", "terminal", "title"]
model_config = ConfigDict(
populate_by_name=True,
@@ -99,6 +100,7 @@ class RegisterReq(BaseModel):
"account": obj.get("account"),
"actor": obj.get("actor"),
"agent": obj.get("agent"),
"budget_micro_usd": obj.get("budget_micro_usd"),
"cwd": obj.get("cwd"),
"host": obj.get("host"),
"parentSessionId": obj.get("parentSessionId"),
+91
View File
@@ -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, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Reply(BaseModel):
"""
Reply
""" # noqa: E501
channel: Optional[StrictStr] = None
provider: Optional[StrictStr] = None
thread: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["channel", "provider", "thread"]
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 Reply 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 Reply from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"channel": obj.get("channel"),
"provider": obj.get("provider"),
"thread": obj.get("thread")
})
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 RunStart(BaseModel):
"""
RunStart
""" # noqa: E501
ref: Optional[StrictStr] = Field(default=None, description="Ref is the branch to run; empty means the repository's default.")
repo: Optional[StrictStr] = Field(default=None, description="Repo is the repository to run.")
__properties: ClassVar[List[str]] = ["ref", "repo"]
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 RunStart 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 RunStart from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ref": obj.get("ref"),
"repo": obj.get("repo")
})
return _obj

Some files were not shown because too many files have changed in this diff Show More