Skip to content

Commit cb4c22d

Browse files
SDK regeneration
1 parent 71d7690 commit cb4c22d

File tree

78 files changed

+1065
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1065
-29
lines changed

.fern/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"generatorConfig": {
66
"package_name": "truefoundry_sdk",
77
"pydantic_config": {
8-
"enum_type": "python_enums",
8+
"enum_type": "forward_compatible_python_enums",
99
"use_provided_defaults": true,
1010
"frozen": false
1111
},

src/truefoundry_sdk/applications/types/applications_list_request_device_type_filter.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ class ApplicationsListRequestDeviceTypeFilter(enum.StrEnum):
1414
NVIDIA_MIG_GPU = "nvidia_mig_gpu"
1515
NVIDIA_TIMESLICING_GPU = "nvidia_timeslicing_gpu"
1616
GCP_TPU = "gcp_tpu"
17+
_UNKNOWN = "__APPLICATIONSLISTREQUESTDEVICETYPEFILTER_UNKNOWN__"
18+
"""
19+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
20+
"""
21+
22+
@classmethod
23+
def _missing_(cls, value: typing.Any) -> "ApplicationsListRequestDeviceTypeFilter":
24+
unknown = cls._UNKNOWN
25+
unknown._value_ = value
26+
return unknown
1727

1828
def visit(
1929
self,
@@ -23,6 +33,7 @@ def visit(
2333
nvidia_mig_gpu: typing.Callable[[], T_Result],
2434
nvidia_timeslicing_gpu: typing.Callable[[], T_Result],
2535
gcp_tpu: typing.Callable[[], T_Result],
36+
_unknown_member: typing.Callable[[str], T_Result],
2637
) -> T_Result:
2738
if self is ApplicationsListRequestDeviceTypeFilter.CPU:
2839
return cpu()
@@ -36,3 +47,4 @@ def visit(
3647
return nvidia_timeslicing_gpu()
3748
if self is ApplicationsListRequestDeviceTypeFilter.GCP_TPU:
3849
return gcp_tpu()
50+
return _unknown_member(self._value_)

src/truefoundry_sdk/applications/types/applications_list_request_lifecycle_stage.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,28 @@ class ApplicationsListRequestLifecycleStage(enum.StrEnum):
1111
ACTIVE = "active"
1212
DELETING = "deleting"
1313
DELETION_FAILED = "deletion_failed"
14+
_UNKNOWN = "__APPLICATIONSLISTREQUESTLIFECYCLESTAGE_UNKNOWN__"
15+
"""
16+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
17+
"""
18+
19+
@classmethod
20+
def _missing_(cls, value: typing.Any) -> "ApplicationsListRequestLifecycleStage":
21+
unknown = cls._UNKNOWN
22+
unknown._value_ = value
23+
return unknown
1424

1525
def visit(
1626
self,
1727
active: typing.Callable[[], T_Result],
1828
deleting: typing.Callable[[], T_Result],
1929
deletion_failed: typing.Callable[[], T_Result],
30+
_unknown_member: typing.Callable[[str], T_Result],
2031
) -> T_Result:
2132
if self is ApplicationsListRequestLifecycleStage.ACTIVE:
2233
return active()
2334
if self is ApplicationsListRequestLifecycleStage.DELETING:
2435
return deleting()
2536
if self is ApplicationsListRequestLifecycleStage.DELETION_FAILED:
2637
return deletion_failed()
38+
return _unknown_member(self._value_)

src/truefoundry_sdk/internal/ai_gateway/types/ai_gateway_get_gateway_config_request_type.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ class AiGatewayGetGatewayConfigRequestType(enum.StrEnum):
1414
GATEWAY_GUARDRAILS_CONFIG = "gateway-guardrails-config"
1515
GATEWAY_BUDGET_CONFIG = "gateway-budget-config"
1616
GATEWAY_OTEL_CONFIG = "gateway-otel-config"
17+
_UNKNOWN = "__AIGATEWAYGETGATEWAYCONFIGREQUESTTYPE_UNKNOWN__"
18+
"""
19+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
20+
"""
21+
22+
@classmethod
23+
def _missing_(cls, value: typing.Any) -> "AiGatewayGetGatewayConfigRequestType":
24+
unknown = cls._UNKNOWN
25+
unknown._value_ = value
26+
return unknown
1727

1828
def visit(
1929
self,
@@ -23,6 +33,7 @@ def visit(
2333
gateway_guardrails_config: typing.Callable[[], T_Result],
2434
gateway_budget_config: typing.Callable[[], T_Result],
2535
gateway_otel_config: typing.Callable[[], T_Result],
36+
_unknown_member: typing.Callable[[str], T_Result],
2637
) -> T_Result:
2738
if self is AiGatewayGetGatewayConfigRequestType.GATEWAY_RATE_LIMITING_CONFIG:
2839
return gateway_rate_limiting_config()
@@ -36,3 +47,4 @@ def visit(
3647
return gateway_budget_config()
3748
if self is AiGatewayGetGatewayConfigRequestType.GATEWAY_OTEL_CONFIG:
3849
return gateway_otel_config()
50+
return _unknown_member(self._value_)

src/truefoundry_sdk/internal/metrics/types/metrics_get_charts_request_filter_entity.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ class MetricsGetChartsRequestFilterEntity(enum.StrEnum):
1313
JOB_RUN = "job-run"
1414
EVENT = "event"
1515
CLUSTER = "cluster"
16+
_UNKNOWN = "__METRICSGETCHARTSREQUESTFILTERENTITY_UNKNOWN__"
17+
"""
18+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
19+
"""
20+
21+
@classmethod
22+
def _missing_(cls, value: typing.Any) -> "MetricsGetChartsRequestFilterEntity":
23+
unknown = cls._UNKNOWN
24+
unknown._value_ = value
25+
return unknown
1626

1727
def visit(
1828
self,
@@ -21,6 +31,7 @@ def visit(
2131
job_run: typing.Callable[[], T_Result],
2232
event: typing.Callable[[], T_Result],
2333
cluster: typing.Callable[[], T_Result],
34+
_unknown_member: typing.Callable[[str], T_Result],
2435
) -> T_Result:
2536
if self is MetricsGetChartsRequestFilterEntity.APPLICATION:
2637
return application()
@@ -32,3 +43,4 @@ def visit(
3243
return event()
3344
if self is MetricsGetChartsRequestFilterEntity.CLUSTER:
3445
return cluster()
46+
return _unknown_member(self._value_)

src/truefoundry_sdk/teams/types/teams_list_request_type.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,25 @@
1010
class TeamsListRequestType(enum.StrEnum):
1111
TEAM = "team"
1212
SSO_TEAM = "sso-team"
13+
_UNKNOWN = "__TEAMSLISTREQUESTTYPE_UNKNOWN__"
14+
"""
15+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
16+
"""
1317

14-
def visit(self, team: typing.Callable[[], T_Result], sso_team: typing.Callable[[], T_Result]) -> T_Result:
18+
@classmethod
19+
def _missing_(cls, value: typing.Any) -> "TeamsListRequestType":
20+
unknown = cls._UNKNOWN
21+
unknown._value_ = value
22+
return unknown
23+
24+
def visit(
25+
self,
26+
team: typing.Callable[[], T_Result],
27+
sso_team: typing.Callable[[], T_Result],
28+
_unknown_member: typing.Callable[[str], T_Result],
29+
) -> T_Result:
1530
if self is TeamsListRequestType.TEAM:
1631
return team()
1732
if self is TeamsListRequestType.SSO_TEAM:
1833
return sso_team()
34+
return _unknown_member(self._value_)

src/truefoundry_sdk/types/addon_component_name.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ class AddonComponentName(enum.StrEnum):
3434
TFY_PROMETHEUS_CONFIG = "TFY_PROMETHEUS_CONFIG"
3535
SPARK_OPERATOR = "SPARK_OPERATOR"
3636
TFY_LOGS = "TFY_LOGS"
37+
_UNKNOWN = "__ADDONCOMPONENTNAME_UNKNOWN__"
38+
"""
39+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
40+
"""
41+
42+
@classmethod
43+
def _missing_(cls, value: typing.Any) -> "AddonComponentName":
44+
unknown = cls._UNKNOWN
45+
unknown._value_ = value
46+
return unknown
3747

3848
def visit(
3949
self,
@@ -63,6 +73,7 @@ def visit(
6373
tfy_prometheus_config: typing.Callable[[], T_Result],
6474
spark_operator: typing.Callable[[], T_Result],
6575
tfy_logs: typing.Callable[[], T_Result],
76+
_unknown_member: typing.Callable[[str], T_Result],
6677
) -> T_Result:
6778
if self is AddonComponentName.ARGOCD:
6879
return argocd()
@@ -116,3 +127,4 @@ def visit(
116127
return spark_operator()
117128
if self is AddonComponentName.TFY_LOGS:
118129
return tfy_logs()
130+
return _unknown_member(self._value_)

src/truefoundry_sdk/types/alert_config_resource_type.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,25 @@ class AlertConfigResourceType(enum.StrEnum):
1414

1515
APPLICATION = "application"
1616
CLUSTER = "cluster"
17+
_UNKNOWN = "__ALERTCONFIGRESOURCETYPE_UNKNOWN__"
18+
"""
19+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
20+
"""
21+
22+
@classmethod
23+
def _missing_(cls, value: typing.Any) -> "AlertConfigResourceType":
24+
unknown = cls._UNKNOWN
25+
unknown._value_ = value
26+
return unknown
1727

18-
def visit(self, application: typing.Callable[[], T_Result], cluster: typing.Callable[[], T_Result]) -> T_Result:
28+
def visit(
29+
self,
30+
application: typing.Callable[[], T_Result],
31+
cluster: typing.Callable[[], T_Result],
32+
_unknown_member: typing.Callable[[str], T_Result],
33+
) -> T_Result:
1934
if self is AlertConfigResourceType.APPLICATION:
2035
return application()
2136
if self is AlertConfigResourceType.CLUSTER:
2237
return cluster()
38+
return _unknown_member(self._value_)

src/truefoundry_sdk/types/alert_severity.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,25 @@
1010
class AlertSeverity(enum.StrEnum):
1111
WARNING = "warning"
1212
CRITICAL = "critical"
13+
_UNKNOWN = "__ALERTSEVERITY_UNKNOWN__"
14+
"""
15+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
16+
"""
1317

14-
def visit(self, warning: typing.Callable[[], T_Result], critical: typing.Callable[[], T_Result]) -> T_Result:
18+
@classmethod
19+
def _missing_(cls, value: typing.Any) -> "AlertSeverity":
20+
unknown = cls._UNKNOWN
21+
unknown._value_ = value
22+
return unknown
23+
24+
def visit(
25+
self,
26+
warning: typing.Callable[[], T_Result],
27+
critical: typing.Callable[[], T_Result],
28+
_unknown_member: typing.Callable[[str], T_Result],
29+
) -> T_Result:
1530
if self is AlertSeverity.WARNING:
1631
return warning()
1732
if self is AlertSeverity.CRITICAL:
1833
return critical()
34+
return _unknown_member(self._value_)

src/truefoundry_sdk/types/alert_status.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,25 @@
1010
class AlertStatus(enum.StrEnum):
1111
FIRING = "firing"
1212
RESOLVED = "resolved"
13+
_UNKNOWN = "__ALERTSTATUS_UNKNOWN__"
14+
"""
15+
This member is used for forward compatibility. If the value is not recognized by the enum, it will be stored here, and the raw value is accessible through `.value`.
16+
"""
1317

14-
def visit(self, firing: typing.Callable[[], T_Result], resolved: typing.Callable[[], T_Result]) -> T_Result:
18+
@classmethod
19+
def _missing_(cls, value: typing.Any) -> "AlertStatus":
20+
unknown = cls._UNKNOWN
21+
unknown._value_ = value
22+
return unknown
23+
24+
def visit(
25+
self,
26+
firing: typing.Callable[[], T_Result],
27+
resolved: typing.Callable[[], T_Result],
28+
_unknown_member: typing.Callable[[str], T_Result],
29+
) -> T_Result:
1530
if self is AlertStatus.FIRING:
1631
return firing()
1732
if self is AlertStatus.RESOLVED:
1833
return resolved()
34+
return _unknown_member(self._value_)

0 commit comments

Comments
 (0)