diff --git a/.circleci/config.yml b/.circleci/config.yml index 60d973a4..432861bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,7 +113,7 @@ workflows: name: python-<< matrix.python_version>> matrix: parameters: - python_version: ["3.10", "3.11", "3.12", "3.13"] + python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"] pydantic_version: ["2.12"] httpx_version: ["0.28"] - test: @@ -129,7 +129,7 @@ workflows: name: httpx-<< matrix.httpx_version >> matrix: parameters: - python_version: ["3.13"] + python_version: ["3.14"] pydantic_version: ["2.12"] httpx_version: ["0.25", "0.26", "0.27", "0.28"] - black: @@ -141,6 +141,7 @@ workflows: - python-3.11 - python-3.12 - python-3.13 + - python-3.14 - pydantic-2.6 - pydantic-2.7 diff --git a/.gitignore b/.gitignore index 4702d129..bba40af7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ tmp test.py venv +.idea diff --git a/foundry_sdk/_core/__init__.py b/foundry_sdk/_core/__init__.py index 85bbd466..4231b607 100644 --- a/foundry_sdk/_core/__init__.py +++ b/foundry_sdk/_core/__init__.py @@ -59,3 +59,6 @@ from foundry_sdk._core.utils import Timeout as Timeout from foundry_sdk._core.utils import maybe_ignore_preview as maybe_ignore_preview from foundry_sdk._core.utils import resolve_forward_references as resolve_forward_references # NOQA +from foundry_sdk._core.utils import ( + resolve_forward_references_in_module as resolve_forward_references_in_module, +) # NOQA diff --git a/foundry_sdk/_core/utils.py b/foundry_sdk/_core/utils.py index d6dc62bf..e29669f6 100644 --- a/foundry_sdk/_core/utils.py +++ b/foundry_sdk/_core/utils.py @@ -27,7 +27,7 @@ import pydantic from typing_extensions import Annotated -RID = Annotated[ +RID: typing.TypeAlias = Annotated[ str, pydantic.StringConstraints( pattern=r"^ri\.[a-z][a-z0-9-]*\.([a-z0-9][a-z0-9\-]*)?\.[a-z][a-z0-9-]*\.[a-zA-Z0-9._-]+$", @@ -35,7 +35,7 @@ ] -UUID = Annotated[ +UUID: typing.TypeAlias = Annotated[ str, pydantic.StringConstraints( pattern=r"^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$", @@ -43,7 +43,7 @@ ] -Long = Annotated[ +Long: typing.TypeAlias = Annotated[ int, pydantic.PlainSerializer( lambda value: str(value), @@ -56,7 +56,7 @@ """A long integer that is serialized to a string in JSON.""" -AwareDatetime = Annotated[ +AwareDatetime: typing.TypeAlias = Annotated[ pydantic.AwareDatetime, pydantic.PlainSerializer( lambda value: value.astimezone(timezone.utc).isoformat(), @@ -69,7 +69,7 @@ """A datetime object that enforces timezones and is always serialized to UTC.""" -Timeout = Annotated[int, pydantic.Field(gt=0)] +Timeout: typing.TypeAlias = Annotated[int, pydantic.Field(gt=0)] def remove_prefixes(text: str, prefixes: List[str]): @@ -111,8 +111,25 @@ def resolve_forward_references(type_obj: Any, globalns: dict, localns: dict) -> for arg in typing.get_args(type_obj) # type: ignore ) - setattr(type_obj, "__args__", args) - return type_obj + # Always reconstruct rather than mutating __args__ in place: on Python 3.14+ + # setattr silently succeeds for Annotated types but typing.get_args() reads + # from __origin__ / __metadata__ and ignores the mutated __args__ field. + return typing.get_origin(type_obj)[args] + + +def resolve_forward_references_in_module(module_name: str) -> None: + """Resolve forward references in all generic type aliases in a module. + + Call as ``core.resolve_forward_references_in_module(__name__)`` at the end + of a models.py after all classes are defined. Updates the module namespace + in place so pyright's view of each TypeAlias is undisturbed. + """ + import sys + + ns = vars(sys.modules[module_name]) + for name, obj in list(ns.items()): + if typing.get_origin(obj) is not None: + ns[name] = resolve_forward_references(obj, ns, ns) def assert_non_empty_string(value: str, name: str) -> None: diff --git a/foundry_sdk/v1/core/models.py b/foundry_sdk/v1/core/models.py index a4129c7f..78d03789 100644 --- a/foundry_sdk/v1/core/models.py +++ b/foundry_sdk/v1/core/models.py @@ -18,6 +18,7 @@ import typing import pydantic +import typing_extensions from foundry_sdk import _core as core @@ -34,7 +35,7 @@ class AttachmentType(core.ModelBase): type: typing.Literal["attachment"] = "attachment" -Attribution = str +Attribution: typing_extensions.TypeAlias = str """Attribution for a request""" @@ -65,11 +66,11 @@ class CipherTextType(core.ModelBase): type: typing.Literal["cipherText"] = "cipherText" -ContentLength = core.Long +ContentLength: typing_extensions.TypeAlias = core.Long """ContentLength""" -ContentType = str +ContentType: typing_extensions.TypeAlias = str """ContentType""" @@ -91,11 +92,11 @@ class DecimalType(core.ModelBase): type: typing.Literal["decimal"] = "decimal" -DisplayName = str +DisplayName: typing_extensions.TypeAlias = str """The display name of the entity.""" -DistanceUnit = typing.Literal[ +DistanceUnit: typing_extensions.TypeAlias = typing.Literal[ "MILLIMETERS", "CENTIMETERS", "METERS", @@ -115,14 +116,14 @@ class DoubleType(core.ModelBase): type: typing.Literal["double"] = "double" -FilePath = str +FilePath: typing_extensions.TypeAlias = str """ The path to a File within Foundry. Paths are relative and must not start with a leading slash. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. """ -Filename = str +Filename: typing_extensions.TypeAlias = str """The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" @@ -132,11 +133,11 @@ class FloatType(core.ModelBase): type: typing.Literal["float"] = "float" -FolderRid = core.RID +FolderRid: typing_extensions.TypeAlias = core.RID """FolderRid""" -FoundryBranch = str +FoundryBranch: typing_extensions.TypeAlias = str """The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" @@ -159,7 +160,7 @@ class MarkingType(core.ModelBase): type: typing.Literal["marking"] = "marking" -MarkingTypeValue = typing.Literal["CBAC", "MANDATORY"] +MarkingTypeValue: typing_extensions.TypeAlias = typing.Literal["CBAC", "MANDATORY"] """ The kind of marking applied by a marking property type. - `CBAC`: Classification-based access control markings. @@ -173,7 +174,7 @@ class MediaReferenceType(core.ModelBase): type: typing.Literal["mediaReference"] = "mediaReference" -MediaType = str +MediaType: typing_extensions.TypeAlias = str """ The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` @@ -186,15 +187,15 @@ class NullType(core.ModelBase): type: typing.Literal["null"] = "null" -OperationScope = str +OperationScope: typing_extensions.TypeAlias = str """OperationScope""" -PageSize = int +PageSize: typing_extensions.TypeAlias = int """The page size to use for the endpoint.""" -PageToken = str +PageToken: typing_extensions.TypeAlias = str """ The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response @@ -202,11 +203,13 @@ class NullType(core.ModelBase): """ -PreviewMode = bool +PreviewMode: typing_extensions.TypeAlias = bool """Enables the use of preview functionality.""" -ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] +ReleaseStatus: typing_extensions.TypeAlias = typing.Literal[ + "ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED" +] """The release status of the entity.""" @@ -216,7 +219,7 @@ class ShortType(core.ModelBase): type: typing.Literal["short"] = "short" -SizeBytes = core.Long +SizeBytes: typing_extensions.TypeAlias = core.Long """The size of the file or attachment in bytes.""" @@ -226,7 +229,7 @@ class StringType(core.ModelBase): type: typing.Literal["string"] = "string" -StructFieldName = str +StructFieldName: typing_extensions.TypeAlias = str """The name of a field in a `Struct`.""" @@ -236,15 +239,15 @@ class TimestampType(core.ModelBase): type: typing.Literal["timestamp"] = "timestamp" -TotalCount = core.Long +TotalCount: typing_extensions.TypeAlias = core.Long """The total number of items across all pages.""" -TraceParent = str +TraceParent: typing_extensions.TypeAlias = str """The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" -TraceState = str +TraceState: typing_extensions.TypeAlias = str """The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" @@ -256,11 +259,11 @@ class UnsupportedType(core.ModelBase): type: typing.Literal["unsupported"] = "unsupported" -UnsupportedTypeParamKey = str +UnsupportedTypeParamKey: typing_extensions.TypeAlias = str """UnsupportedTypeParamKey""" -UnsupportedTypeParamValue = str +UnsupportedTypeParamValue: typing_extensions.TypeAlias = str """UnsupportedTypeParamValue""" diff --git a/foundry_sdk/v1/datasets/models.py b/foundry_sdk/v1/datasets/models.py index f62556c9..79f86dc2 100644 --- a/foundry_sdk/v1/datasets/models.py +++ b/foundry_sdk/v1/datasets/models.py @@ -18,6 +18,7 @@ import typing import pydantic +import typing_extensions from foundry_sdk import _core as core from foundry_sdk.v1.core import models as core_models @@ -30,7 +31,7 @@ class Branch(core.ModelBase): transaction_rid: typing.Optional[TransactionRid] = pydantic.Field(alias=str("transactionRid"), default=None) # type: ignore[literal-required] -BranchId = str +BranchId: typing_extensions.TypeAlias = str """The identifier (name) of a Branch.""" @@ -62,11 +63,11 @@ class Dataset(core.ModelBase): parent_folder_rid: core_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] -DatasetName = str +DatasetName: typing_extensions.TypeAlias = str """DatasetName""" -DatasetRid = core.RID +DatasetRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Dataset.""" @@ -94,7 +95,7 @@ class ListFilesResponse(core.ModelBase): data: typing.List[File] -TableExportFormat = typing.Literal["ARROW", "CSV"] +TableExportFormat: typing_extensions.TypeAlias = typing.Literal["ARROW", "CSV"] """Format for tabular dataset export.""" @@ -111,15 +112,17 @@ class Transaction(core.ModelBase): """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" -TransactionRid = core.RID +TransactionRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Transaction.""" -TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] +TransactionStatus: typing_extensions.TypeAlias = typing.Literal["ABORTED", "COMMITTED", "OPEN"] """The status of a Transaction.""" -TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] +TransactionType: typing_extensions.TypeAlias = typing.Literal[ + "APPEND", "UPDATE", "SNAPSHOT", "DELETE" +] """The type of a Transaction.""" diff --git a/foundry_sdk/v1/ontologies/models.py b/foundry_sdk/v1/ontologies/models.py index 7191ef23..f5ebb870 100644 --- a/foundry_sdk/v1/ontologies/models.py +++ b/foundry_sdk/v1/ontologies/models.py @@ -23,7 +23,7 @@ from foundry_sdk import _core as core from foundry_sdk.v1.core import models as core_models -ActionRid = core.RID +ActionRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier for an action.""" @@ -39,14 +39,14 @@ class ActionType(core.ModelBase): operations: typing.List[LogicRule] -ActionTypeApiName = str +ActionTypeApiName: typing_extensions.TypeAlias = str """ The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. """ -ActionTypeRid = core.RID +ActionTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" @@ -73,7 +73,7 @@ class AggregateObjectsResponseItem(core.ModelBase): metrics: typing.List[AggregationMetricResult] -Aggregation = typing_extensions.Annotated[ +Aggregation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ApproximateDistinctAggregation", "MinAggregation", @@ -114,7 +114,7 @@ class AggregationFixedWidthGrouping(core.ModelBase): type: typing.Literal["fixedWidth"] = "fixedWidth" -AggregationGroupBy = typing_extensions.Annotated[ +AggregationGroupBy: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AggregationDurationGrouping", "AggregationFixedWidthGrouping", @@ -126,15 +126,15 @@ class AggregationFixedWidthGrouping(core.ModelBase): """Specifies a grouping for aggregation results.""" -AggregationGroupKey = str +AggregationGroupKey: typing_extensions.TypeAlias = str """AggregationGroupKey""" -AggregationGroupValue = typing.Any +AggregationGroupValue: typing_extensions.TypeAlias = typing.Any """AggregationGroupValue""" -AggregationMetricName = str +AggregationMetricName: typing_extensions.TypeAlias = str """A user-specified alias for an aggregation metric name.""" @@ -201,7 +201,9 @@ class AnyTermQuery(core.ModelBase): type: typing.Literal["anyTerm"] = "anyTerm" -ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] +ApplyActionMode: typing_extensions.TypeAlias = typing.Literal[ + "VALIDATE_ONLY", "VALIDATE_AND_EXECUTE" +] """If not specified, defaults to `VALIDATE_AND_EXECUTE`.""" @@ -272,7 +274,7 @@ class ArraySizeConstraint(core.ModelBase): type: typing.Literal["arraySize"] = "arraySize" -ArtifactRepositoryRid = core.RID +ArtifactRepositoryRid: typing_extensions.TypeAlias = core.RID """ArtifactRepositoryRid""" @@ -285,7 +287,7 @@ class Attachment(core.ModelBase): media_type: core_models.MediaType = pydantic.Field(alias=str("mediaType")) # type: ignore[literal-required] -AttachmentRid = core.RID +AttachmentRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an attachment.""" @@ -346,7 +348,7 @@ class CreateObjectRule(core.ModelBase): type: typing.Literal["createObject"] = "createObject" -DataValue = typing.Any +DataValue: typing_extensions.TypeAlias = typing.Any """ Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | @@ -404,11 +406,11 @@ class DeleteObjectRule(core.ModelBase): type: typing.Literal["deleteObject"] = "deleteObject" -DerivedPropertyApiName = str +DerivedPropertyApiName: typing_extensions.TypeAlias = str """The name of the derived property that will be returned.""" -Duration = str +Duration: typing_extensions.TypeAlias = str """An ISO 8601 formatted duration.""" @@ -444,29 +446,29 @@ class ExecuteQueryResponse(core.ModelBase): value: DataValue -FieldNameV1 = str +FieldNameV1: typing_extensions.TypeAlias = str """A reference to an Ontology object property with the form `properties.{propertyApiName}`.""" -FilterValue = str +FilterValue: typing_extensions.TypeAlias = str """ Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. """ -FunctionRid = core.RID +FunctionRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" -FunctionVersion = str +FunctionVersion: typing_extensions.TypeAlias = str """ The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. """ -Fuzzy = bool +Fuzzy: typing_extensions.TypeAlias = bool """Setting fuzzy to `true` allows approximate matching in search queries that support it.""" @@ -492,18 +494,18 @@ class GteQuery(core.ModelBase): type: typing.Literal["gte"] = "gte" -InterfaceLinkTypeApiName = str +InterfaceLinkTypeApiName: typing_extensions.TypeAlias = str """ The name of the interface link type in the API. To find the API name for your Interface Link Type, check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). """ -InterfaceLinkTypeRid = core.RID +InterfaceLinkTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" -InterfacePropertyApiName = str +InterfacePropertyApiName: typing_extensions.TypeAlias = str """ The name of the interface property type in the API in lowerCamelCase format. To find the API name for your interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check @@ -511,14 +513,14 @@ class GteQuery(core.ModelBase): """ -InterfaceTypeApiName = str +InterfaceTypeApiName: typing_extensions.TypeAlias = str """ The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface type, use the `List interface types` endpoint or check the **Ontology Manager**. """ -InterfaceTypeRid = core.RID +InterfaceTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" @@ -530,28 +532,28 @@ class IsNullQuery(core.ModelBase): type: typing.Literal["isNull"] = "isNull" -LegacyObjectTypeId = str +LegacyObjectTypeId: typing_extensions.TypeAlias = str """ The unique ID of an object type. This is a legacy identifier and is not recommended for use in new applications. To find the ID for your Object Type, check the **Ontology Manager**. """ -LegacyPropertyId = str +LegacyPropertyId: typing_extensions.TypeAlias = str """ The unique ID of a property. This is a legacy identifier and is not recommended for use in new applications. To find the ID for your property, check the **Ontology Manager**. """ -LinkTypeApiName = str +LinkTypeApiName: typing_extensions.TypeAlias = str """ The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. """ -LinkTypeId = str +LinkTypeId: typing_extensions.TypeAlias = str """The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" @@ -566,7 +568,7 @@ class LinkTypeSide(core.ModelBase): foreign_key_property_api_name: typing.Optional[PropertyApiName] = pydantic.Field(alias=str("foreignKeyPropertyApiName"), default=None) # type: ignore[literal-required] -LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] +LinkTypeSideCardinality: typing_extensions.TypeAlias = typing.Literal["ONE", "MANY"] """LinkTypeSideCardinality""" @@ -624,7 +626,7 @@ class ListQueryTypesResponse(core.ModelBase): data: typing.List[QueryType] -LogicRule = typing_extensions.Annotated[ +LogicRule: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DeleteInterfaceObjectRule", "ModifyInterfaceObjectRule", @@ -706,11 +708,11 @@ class ObjectQueryResultConstraint(core.ModelBase): type: typing.Literal["objectQueryResult"] = "objectQueryResult" -ObjectRid = core.RID +ObjectRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" -ObjectSetRid = core.RID +ObjectSetRid: typing_extensions.TypeAlias = core.RID """ObjectSetRid""" @@ -734,7 +736,7 @@ class ObjectType(core.ModelBase): rid: ObjectTypeRid -ObjectTypeApiName = str +ObjectTypeApiName: typing_extensions.TypeAlias = str """ The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. @@ -752,11 +754,11 @@ class ObjectTypeLinkTypeApiNameMapping(core.ModelBase): """The list of link type API names scoped by the object type.""" -ObjectTypeRid = core.RID +ObjectTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" -ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +ObjectTypeVisibility: typing_extensions.TypeAlias = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] """The suggested visibility of the object type.""" @@ -779,7 +781,7 @@ class Ontology(core.ModelBase): rid: OntologyRid -OntologyApiName = str +OntologyApiName: typing_extensions.TypeAlias = str """OntologyApiName""" @@ -790,7 +792,7 @@ class OntologyArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -OntologyDataType = typing_extensions.Annotated[ +OntologyDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "OntologyStructType", @@ -868,7 +870,7 @@ class OntologyObjectType(core.ModelBase): type: typing.Literal["object"] = "object" -OntologyRid = core.RID +OntologyRid: typing_extensions.TypeAlias = core.RID """ The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. @@ -904,7 +906,7 @@ class OrQuery(core.ModelBase): type: typing.Literal["or"] = "or" -OrderBy = str +OrderBy: typing_extensions.TypeAlias = str """ A command representing the list of properties to order by. Properties should be delimited by commas and prefixed by `p` or `properties`. The format expected format is @@ -928,7 +930,7 @@ class Parameter(core.ModelBase): required: bool -ParameterEvaluatedConstraint = typing_extensions.Annotated[ +ParameterEvaluatedConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StructEvaluatedConstraint", "OneOfConstraint", @@ -974,7 +976,7 @@ class ParameterEvaluationResult(core.ModelBase): """Represents whether the parameter is a required input to the action.""" -ParameterId = str +ParameterId: typing_extensions.TypeAlias = str """ The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. @@ -1005,7 +1007,7 @@ class PrefixQuery(core.ModelBase): type: typing.Literal["prefix"] = "prefix" -PrimaryKeyValue = typing.Any +PrimaryKeyValue: typing_extensions.TypeAlias = typing.Any """Represents the primary key value that is used as a unique identifier for an object.""" @@ -1018,14 +1020,14 @@ class Property(core.ModelBase): legacy_property_id: typing.Optional[LegacyPropertyId] = pydantic.Field(alias=str("legacyPropertyId"), default=None) # type: ignore[literal-required] -PropertyApiName = str +PropertyApiName: typing_extensions.TypeAlias = str """ The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. """ -PropertyFilter = str +PropertyFilter: typing_extensions.TypeAlias = str """ Represents a filter used on properties. @@ -1055,18 +1057,18 @@ class Property(core.ModelBase): """ -PropertyId = str +PropertyId: typing_extensions.TypeAlias = str """ The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. """ -PropertyTypeRid = core.RID +PropertyTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a property.""" -PropertyValue = typing.Any +PropertyValue: typing_extensions.TypeAlias = typing.Any """ Represents the value of a property in the following format. @@ -1098,11 +1100,11 @@ class Property(core.ModelBase): """ -PropertyValueEscapedString = str +PropertyValueEscapedString: typing_extensions.TypeAlias = str """Represents the value of a property in string format. This is used in URL parameters.""" -QueryAggregationKeyType = typing_extensions.Annotated[ +QueryAggregationKeyType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.BooleanType, @@ -1117,7 +1119,7 @@ class Property(core.ModelBase): """A union of all the types supported by query aggregation keys.""" -QueryAggregationRangeSubType = typing_extensions.Annotated[ +QueryAggregationRangeSubType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.DoubleType, @@ -1136,14 +1138,14 @@ class QueryAggregationRangeType(core.ModelBase): type: typing.Literal["range"] = "range" -QueryAggregationValueType = typing_extensions.Annotated[ +QueryAggregationValueType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], pydantic.Field(discriminator="type"), ] """A union of all the types supported by query aggregation keys.""" -QueryApiName = str +QueryApiName: typing_extensions.TypeAlias = str """The name of the Query in the API.""" @@ -1154,7 +1156,7 @@ class QueryArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -QueryDataType = typing_extensions.Annotated[ +QueryDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "OntologyInterfaceObjectType", @@ -1187,7 +1189,7 @@ class QueryArrayType(core.ModelBase): """A union of all the types supported by Ontology Query parameters or outputs.""" -QueryRuntimeErrorParameter = str +QueryRuntimeErrorParameter: typing_extensions.TypeAlias = str """QueryRuntimeErrorParameter""" @@ -1259,23 +1261,25 @@ class RangeConstraint(core.ModelBase): type: typing.Literal["range"] = "range" -ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] +ReturnEditsMode: typing_extensions.TypeAlias = typing.Literal[ + "ALL", "ALL_V2_WITH_DELETIONS", "NONE" +] """If not specified, defaults to `NONE`.""" -SdkPackageName = str +SdkPackageName: typing_extensions.TypeAlias = str """SdkPackageName""" -SdkPackageRid = core.RID +SdkPackageRid: typing_extensions.TypeAlias = core.RID """SdkPackageRid""" -SdkVersion = str +SdkVersion: typing_extensions.TypeAlias = str """SdkVersion""" -SearchJsonQuery = typing_extensions.Annotated[ +SearchJsonQuery: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "OrQuery", "PrefixQuery", @@ -1322,7 +1326,7 @@ class SearchOrderBy(core.ModelBase): fields: typing.List[SearchOrdering] -SearchOrderByType = typing.Literal["fields", "relevance"] +SearchOrderByType: typing_extensions.TypeAlias = typing.Literal["fields", "relevance"] """SearchOrderByType""" @@ -1334,7 +1338,7 @@ class SearchOrdering(core.ModelBase): """Specifies the ordering direction (can be either `asc` or `desc`)""" -SelectedPropertyApiName = str +SelectedPropertyApiName: typing_extensions.TypeAlias = str """ By default, whenever an object is requested, all of its properties are returned, except for properties of the following types: @@ -1358,14 +1362,14 @@ class SearchOrdering(core.ModelBase): """ -SharedPropertyTypeApiName = str +SharedPropertyTypeApiName: typing_extensions.TypeAlias = str """ The name of the shared property type in the API in lowerCamelCase format. To find the API name for your shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. """ -SharedPropertyTypeRid = core.RID +SharedPropertyTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" @@ -1412,7 +1416,7 @@ class StructEvaluatedConstraint(core.ModelBase): type: typing.Literal["struct"] = "struct" -StructFieldEvaluatedConstraint = typing_extensions.Annotated[ +StructFieldEvaluatedConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "OneOfConstraint", "RangeConstraint", @@ -1448,7 +1452,7 @@ class StructFieldEvaluationResult(core.ModelBase): """Represents whether the parameter is a required input to the action.""" -StructParameterFieldApiName = str +StructParameterFieldApiName: typing_extensions.TypeAlias = str """The unique identifier of the struct parameter field.""" @@ -1492,7 +1496,7 @@ class TwoDimensionalAggregation(core.ModelBase): type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" -TypeReferenceIdentifier = str +TypeReferenceIdentifier: typing_extensions.TypeAlias = str """ The unique identifier of a type reference. This identifier is used to look up the type definition in the `typeReferences` map of the enclosing Query. @@ -1508,7 +1512,7 @@ class UnevaluableConstraint(core.ModelBase): type: typing.Literal["unevaluable"] = "unevaluable" -UniqueIdentifierLinkId = core.UUID +UniqueIdentifierLinkId: typing_extensions.TypeAlias = core.UUID """A reference to a UniqueIdentifierArgument linkId defined for this action type.""" @@ -1526,11 +1530,11 @@ class ValidateActionResponse(core.ModelBase): parameters: typing.Dict[ParameterId, ParameterEvaluationResult] -ValidationResult = typing.Literal["VALID", "INVALID"] +ValidationResult: typing_extensions.TypeAlias = typing.Literal["VALID", "INVALID"] """Represents the state of a validation.""" -ValueType = str +ValueType: typing_extensions.TypeAlias = str """ A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. @@ -1558,31 +1562,19 @@ class ValidateActionResponse(core.ModelBase): """ -ValueTypeApiName = str +ValueTypeApiName: typing_extensions.TypeAlias = str """The name of the value type in the API in camelCase format.""" -ValueTypeRid = core.RID +ValueTypeRid: typing_extensions.TypeAlias = core.RID """ValueTypeRid""" -ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint +ArrayEntryEvaluatedConstraint: typing_extensions.TypeAlias = StructEvaluatedConstraint """Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" -core.resolve_forward_references(Aggregation, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationGroupBy, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchJsonQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references( - StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() -) +core.resolve_forward_references_in_module(__name__) __all__ = [ "ActionRid", diff --git a/foundry_sdk/v2/admin/models.py b/foundry_sdk/v2/admin/models.py index eda07f8d..0b59f1b1 100644 --- a/foundry_sdk/v2/admin/models.py +++ b/foundry_sdk/v2/admin/models.py @@ -61,19 +61,19 @@ class AddOrganizationRoleAssignmentsRequest(core.ModelBase): role_assignments: typing.List[core_models.RoleAssignmentUpdate] = pydantic.Field(alias=str("roleAssignments")) # type: ignore[literal-required] -AttributeName = str +AttributeName: typing_extensions.TypeAlias = str """AttributeName""" -AttributeValue = str +AttributeValue: typing_extensions.TypeAlias = str """AttributeValue""" -AttributeValues = typing.List["AttributeValue"] +AttributeValues: typing_extensions.TypeAlias = typing.List["AttributeValue"] """AttributeValues""" -AuthenticationProtocol = typing_extensions.Annotated[ +AuthenticationProtocol: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SamlAuthenticationProtocol", "OidcAuthenticationProtocol"], pydantic.Field(discriminator="type"), ] @@ -98,15 +98,15 @@ class AuthenticationProvider(core.ModelBase): protocol: AuthenticationProtocol -AuthenticationProviderEnabled = bool +AuthenticationProviderEnabled: typing_extensions.TypeAlias = bool """Whether users can log in using this provider.""" -AuthenticationProviderName = str +AuthenticationProviderName: typing_extensions.TypeAlias = str """AuthenticationProviderName""" -AuthenticationProviderRid = core.RID +AuthenticationProviderRid: typing_extensions.TypeAlias = core.RID """AuthenticationProviderRid""" @@ -119,7 +119,7 @@ class CbacBanner(core.ModelBase): background_colors: typing.List[core_models.Color] = pydantic.Field(alias=str("backgroundColors")) # type: ignore[literal-required] -CbacBannerClassificationString = str +CbacBannerClassificationString: typing_extensions.TypeAlias = str """CbacBannerClassificationString""" @@ -142,11 +142,11 @@ class CbacMarkingRestrictions(core.ModelBase): """True if the provided markings constitute a valid classification, containing no disallowed markings and satisfying all required marking constraints.""" -CbacMarkingRestrictionsIsValid = bool +CbacMarkingRestrictionsIsValid: typing_extensions.TypeAlias = bool """True if the provided markings constitute a valid classification, containing no disallowed markings and satisfying all required marking constraints.""" -CbacMarkingRestrictionsUserSatisfiesMarkings = bool +CbacMarkingRestrictionsUserSatisfiesMarkings: typing_extensions.TypeAlias = bool """True if the current user satisfies the provided markings. The user must be a member of all conjunctive markings. The provided disjunctive markings are grouped by category, and the user must be a member of at least one marking in each group.""" @@ -161,11 +161,15 @@ class CertificateInfo(core.ModelBase): usage_type: CertificateUsageType = pydantic.Field(alias=str("usageType")) # type: ignore[literal-required] -CertificateUsageType = typing.Literal["ENCRYPTION", "SIGNING", "UNSPECIFIED"] +CertificateUsageType: typing_extensions.TypeAlias = typing.Literal[ + "ENCRYPTION", "SIGNING", "UNSPECIFIED" +] """CertificateUsageType""" -ClassificationBannerDisplayType = typing.Literal["BANNER_LINE", "PORTION_MARKING"] +ClassificationBannerDisplayType: typing_extensions.TypeAlias = typing.Literal[ + "BANNER_LINE", "PORTION_MARKING" +] """The display type of the classification banner. BANNER_LINE is the long classification string used in the header of a document; PORTION_MARKING is a short classification string used for individual paragraphs""" @@ -248,7 +252,7 @@ class Enrollment(core.ModelBase): created_time: typing.Optional[core_models.CreatedTime] = pydantic.Field(alias=str("createdTime"), default=None) # type: ignore[literal-required] -EnrollmentName = str +EnrollmentName: typing_extensions.TypeAlias = str """EnrollmentName""" @@ -355,7 +359,7 @@ class GroupMembership(core.ModelBase): group_id: core_models.GroupId = pydantic.Field(alias=str("groupId")) # type: ignore[literal-required] -GroupMembershipExpiration = core.AwareDatetime +GroupMembershipExpiration: typing_extensions.TypeAlias = core.AwareDatetime """GroupMembershipExpiration""" @@ -369,7 +373,7 @@ class GroupMembershipExpirationPolicy(core.ModelBase): """Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.""" -GroupName = str +GroupName: typing_extensions.TypeAlias = str """The name of the Group.""" @@ -396,7 +400,7 @@ class Host(core.ModelBase): host_name: HostName = pydantic.Field(alias=str("hostName")) # type: ignore[literal-required] -HostName = str +HostName: typing_extensions.TypeAlias = str """HostName""" @@ -530,18 +534,18 @@ class MarkingCategory(core.ModelBase): created_by: typing.Optional[core_models.CreatedBy] = pydantic.Field(alias=str("createdBy"), default=None) # type: ignore[literal-required] -MarkingCategoryDescription = str +MarkingCategoryDescription: typing_extensions.TypeAlias = str """MarkingCategoryDescription""" -MarkingCategoryId = str +MarkingCategoryId: typing_extensions.TypeAlias = str """ The ID of a marking category. For user-created categories, this will be a UUID. Markings associated with Organizations are placed in a category with ID "Organization". """ -MarkingCategoryName = str +MarkingCategoryName: typing_extensions.TypeAlias = str """MarkingCategoryName""" @@ -556,11 +560,11 @@ class MarkingCategoryPermissions(core.ModelBase): """If true, all users who are members of at least one of the Organizations from organizationRids can view the Markings in the category. If false, only users who are explicitly granted the VIEW role can view the Markings in the category.""" -MarkingCategoryPermissionsIsPublic = bool +MarkingCategoryPermissionsIsPublic: typing_extensions.TypeAlias = bool """If true, all users who are members of at least one of the Organizations from organizationRids can view the Markings in the category. If false, only users who are explicitly granted the VIEW role can view the Markings in the category.""" -MarkingCategoryRole = typing.Literal["ADMINISTER", "VIEW"] +MarkingCategoryRole: typing_extensions.TypeAlias = typing.Literal["ADMINISTER", "VIEW"] """ Represents the operations that a user can perform with regards to a Marking Category. * ADMINISTER: The user can update a Marking Category's metadata and permissions @@ -577,7 +581,7 @@ class MarkingCategoryRoleAssignment(core.ModelBase): principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] -MarkingCategoryType = typing.Literal["CONJUNCTIVE", "DISJUNCTIVE"] +MarkingCategoryType: typing_extensions.TypeAlias = typing.Literal["CONJUNCTIVE", "DISJUNCTIVE"] """MarkingCategoryType""" @@ -588,11 +592,11 @@ class MarkingMember(core.ModelBase): principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] -MarkingName = str +MarkingName: typing_extensions.TypeAlias = str """MarkingName""" -MarkingRole = typing.Literal["ADMINISTER", "DECLASSIFY", "USE"] +MarkingRole: typing_extensions.TypeAlias = typing.Literal["ADMINISTER", "DECLASSIFY", "USE"] """ Represents the operations that a user can perform with regards to a Marking. * ADMINISTER: The user can add and remove members from the Marking, update Marking Role Assignments, and change Marking metadata. @@ -616,7 +620,7 @@ class MarkingRoleUpdate(core.ModelBase): principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] -MarkingType = typing.Literal["MANDATORY", "CBAC"] +MarkingType: typing_extensions.TypeAlias = typing.Literal["MANDATORY", "CBAC"] """MarkingType""" @@ -652,7 +656,7 @@ class OrganizationGuestMember(core.ModelBase): principal_id: core_models.PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] -OrganizationName = str +OrganizationName: typing_extensions.TypeAlias = str """OrganizationName""" @@ -690,11 +694,11 @@ class PreregisterUserRequest(core.ModelBase): attributes: typing.Optional[typing.Dict[AttributeName, AttributeValues]] = None -PrincipalFilterType = typing.Literal["queryString"] +PrincipalFilterType: typing_extensions.TypeAlias = typing.Literal["queryString"] """PrincipalFilterType""" -ProviderId = str +ProviderId: typing_extensions.TypeAlias = str """A value that uniquely identifies a User or Group in an external authentication provider. This value is determined by the external authentication provider and must be unique per Realm.""" @@ -820,11 +824,11 @@ class Role(core.ModelBase): """A list of roles that this role inherits.""" -RoleDescription = str +RoleDescription: typing_extensions.TypeAlias = str """RoleDescription""" -RoleDisplayName = str +RoleDisplayName: typing_extensions.TypeAlias = str """RoleDisplayName""" @@ -934,12 +938,11 @@ class UserSearchFilter(core.ModelBase): value: str -UserUsername = str +UserUsername: typing_extensions.TypeAlias = str """The Foundry username of the User. This is unique within the realm.""" -core.resolve_forward_references(AttributeValues, globalns=globals(), localns=locals()) -core.resolve_forward_references(AuthenticationProtocol, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AddEnrollmentRoleAssignmentsRequest", diff --git a/foundry_sdk/v2/aip_agents/models.py b/foundry_sdk/v2/aip_agents/models.py index e93593e7..5b1e45f3 100644 --- a/foundry_sdk/v2/aip_agents/models.py +++ b/foundry_sdk/v2/aip_agents/models.py @@ -43,7 +43,7 @@ class Agent(core.ModelBase): """ -AgentMarkdownResponse = str +AgentMarkdownResponse: typing_extensions.TypeAlias = str """The final answer for an exchange. Responses are formatted using markdown.""" @@ -63,7 +63,7 @@ class AgentMetadata(core.ModelBase): """Prompts to show to the user as example messages to start a conversation with the Agent.""" -AgentRid = core.RID +AgentRid: typing_extensions.TypeAlias = core.RID """An RID identifying an Agent created in [AIP Chatbot Studio](https://palantir.com/docs/foundry/chatbot-studio/overview/).""" @@ -94,7 +94,7 @@ class AgentVersionDetails(core.ModelBase): """The minor version of the Agent. Incremented every time the Agent is saved.""" -AgentVersionString = str +AgentVersionString: typing_extensions.TypeAlias = str """The semantic version of the Agent, formatted as "majorVersion.minorVersion".""" @@ -219,7 +219,7 @@ class GetRagContextForSessionRequest(core.ModelBase): """Any values for [application variables](https://palantir.com/docs/foundry/chatbot-studio/application-state/) to use for the context retrieval.""" -InputContext = typing_extensions.Annotated[ +InputContext: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["FunctionRetrievedContext", "ObjectContext"], pydantic.Field(discriminator="type") ] """Custom retrieved [context](https://palantir.com/docs/foundry/chatbot-studio/retrieval-context/) to provide to an Agent for continuing a session.""" @@ -239,7 +239,7 @@ class ListSessionsResponse(core.ModelBase): next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] -MessageId = core.UUID +MessageId: typing_extensions.TypeAlias = core.UUID """ An ephemeral client-generated Universally Unique Identifier (UUID) to identify a message for streamed session responses. This can be used by clients to cancel a streamed exchange. @@ -303,31 +303,31 @@ class Parameter(core.ModelBase): """ -ParameterAccessMode = typing.Literal["READ_ONLY", "READ_WRITE"] +ParameterAccessMode: typing_extensions.TypeAlias = typing.Literal["READ_ONLY", "READ_WRITE"] """ READ_ONLY: Allows the variable to be read by the Agent, but the Agent cannot generate updates for it. READ_WRITE: Allows the variable to be read and updated by the Agent. """ -ParameterId = str +ParameterId: typing_extensions.TypeAlias = str """The unique identifier for a variable configured in the application state of an Agent in [AIP Chatbot Studio](https://palantir.com/docs/foundry/chatbot-studio/overview/).""" -ParameterType = typing_extensions.Annotated[ +ParameterType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringParameter", "ObjectSetParameter"], pydantic.Field(discriminator="type") ] """ParameterType""" -ParameterValue = typing_extensions.Annotated[ +ParameterValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringParameterValue", "ObjectSetParameterValue"], pydantic.Field(discriminator="type"), ] """The value provided for a variable configured in the [application state](https://palantir.com/docs/foundry/chatbot-studio/application-state/) of an Agent.""" -ParameterValueUpdate = typing_extensions.Annotated[ +ParameterValueUpdate: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringParameterValue", "ObjectSetParameterValueUpdate"], pydantic.Field(discriminator="type"), ] @@ -453,7 +453,7 @@ class SessionMetadata(core.ModelBase): """ -SessionRid = core.RID +SessionRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of the conversation session.""" @@ -485,14 +485,14 @@ class SessionTrace(core.ModelBase): """ -SessionTraceId = core.UUID +SessionTraceId: typing_extensions.TypeAlias = core.UUID """ The unique identifier for a trace. The trace lists the sequence of steps that an Agent took to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. """ -SessionTraceStatus = typing.Literal["IN_PROGRESS", "COMPLETE"] +SessionTraceStatus: typing_extensions.TypeAlias = typing.Literal["IN_PROGRESS", "COMPLETE"] """SessionTraceStatus""" @@ -587,18 +587,18 @@ class ToolCallInput(core.ModelBase): inputs: typing.Dict[ToolInputName, ToolInputValue] -ToolCallOutput = typing_extensions.Annotated[ +ToolCallOutput: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SuccessToolCallOutput", "FailureToolCallOutput"], pydantic.Field(discriminator="type"), ] """The output of a tool call.""" -ToolInputName = str +ToolInputName: typing_extensions.TypeAlias = str """The name of a tool input parameter.""" -ToolInputValue = typing_extensions.Annotated[ +ToolInputValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringToolInputValue", "RidToolInputValue"], pydantic.Field(discriminator="type") ] """A tool input value, which can be either a string or a Resource Identifier (RID).""" @@ -614,14 +614,14 @@ class ToolMetadata(core.ModelBase): """The type of the tool that was called.""" -ToolOutputValue = typing_extensions.Annotated[ +ToolOutputValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringToolOutputValue", "RidToolOutputValue"], pydantic.Field(discriminator="type"), ] """A tool output value, which can be either a string or a Resource Identifier (RID).""" -ToolType = typing.Literal[ +ToolType: typing_extensions.TypeAlias = typing.Literal[ "FUNCTION", "ACTION", "ONTOLOGY_SEMANTIC_SEARCH", @@ -651,13 +651,7 @@ class UserTextInput(core.ModelBase): """The user message text.""" -core.resolve_forward_references(InputContext, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValueUpdate, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolCallOutput, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolInputValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ToolOutputValue, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "Agent", diff --git a/foundry_sdk/v2/audit/models.py b/foundry_sdk/v2/audit/models.py index 2a84da4c..646eaa5e 100644 --- a/foundry_sdk/v2/audit/models.py +++ b/foundry_sdk/v2/audit/models.py @@ -18,11 +18,12 @@ import typing import pydantic +import typing_extensions from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models -FileId = str +FileId: typing_extensions.TypeAlias = str """The ID of an audit log file""" diff --git a/foundry_sdk/v2/checkpoints/models.py b/foundry_sdk/v2/checkpoints/models.py index f66fbcc5..090e3316 100644 --- a/foundry_sdk/v2/checkpoints/models.py +++ b/foundry_sdk/v2/checkpoints/models.py @@ -54,15 +54,15 @@ class ApprovalsMetadata(core.ModelBase): approvals_subtask_ids: typing.List[ApprovalsSubtaskId] = pydantic.Field(alias=str("approvalsSubtaskIds")) # type: ignore[literal-required] -ApprovalsSubtaskId = str +ApprovalsSubtaskId: typing_extensions.TypeAlias = str """Identifier of an Approvals subtask tied to the checkpoint.""" -ApprovalsTaskId = str +ApprovalsTaskId: typing_extensions.TypeAlias = str """Identifier of an Approvals task tied to the checkpoint.""" -CheckpointType = typing.Literal[ +CheckpointType: typing_extensions.TypeAlias = typing.Literal[ "CONTOUR_CREATE", "CONTOUR_EXPORT", "HUBBLE_EXPORT", @@ -211,7 +211,7 @@ class CheckpointedIssueRid(core.ModelBase): type: typing.Literal["checkpointedIssueRid"] = "checkpointedIssueRid" -CheckpointedItem = typing_extensions.Annotated[ +CheckpointedItem: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "CheckpointedIssue", "CheckpointedJob", @@ -238,7 +238,7 @@ class CheckpointedIssueRid(core.ModelBase): """Snapshot of the entity that was captured in a checkpoint.""" -CheckpointedItemId = typing_extensions.Annotated[ +CheckpointedItemId: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "CheckpointedJobRid", "CheckpointedMarkingId", @@ -439,7 +439,7 @@ class CheckpointedPrincipalId(core.ModelBase): type: typing.Literal["checkpointedPrincipalId"] = "checkpointedPrincipalId" -CheckpointedPrincipalRole = typing.Literal[ +CheckpointedPrincipalRole: typing_extensions.TypeAlias = typing.Literal[ "SOURCE_SHARE_RECIPIENT", "TARGET_GROUP", "GROUP_MEMBER", @@ -471,7 +471,7 @@ class CheckpointedResourceRid(core.ModelBase): type: typing.Literal["checkpointedResourceRid"] = "checkpointedResourceRid" -CheckpointedResourceType = typing.Literal[ +CheckpointedResourceType: typing_extensions.TypeAlias = typing.Literal[ "CONTOUR_ANALYSIS", "CONTOUR_SOURCE_DATASET", "DATA_CONNECTION_SYNC", @@ -553,7 +553,7 @@ class CheckpointedTokenId(core.ModelBase): type: typing.Literal["checkpointedTokenId"] = "checkpointedTokenId" -CheckpointedTokenType = typing.Literal["USER_TOKEN"] +CheckpointedTokenType: typing_extensions.TypeAlias = typing.Literal["USER_TOKEN"] """The type of token that was captured as part of a checkpoint.""" @@ -595,7 +595,7 @@ class CheckpointedVersionedObjectSet(core.ModelBase): object_types: typing.List[CheckpointedOntologyWithObjectTypes] = pydantic.Field(alias=str("objectTypes")) # type: ignore[literal-required] -ConfigRid = core.RID +ConfigRid: typing_extensions.TypeAlias = core.RID """Identifier of the checkpoint configuration that produced a record.""" @@ -639,11 +639,11 @@ class GetRecordsBatchResponse(core.ModelBase): data: typing.Dict[RecordRid, Record] -InteractionRid = core.RID +InteractionRid: typing_extensions.TypeAlias = core.RID """Identifier of the interaction associated with a record.""" -Justification = typing_extensions.Annotated[ +Justification: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ResponseJustification", "DropdownJustification", @@ -655,19 +655,19 @@ class GetRecordsBatchResponse(core.ModelBase): """Justification submitted by the user to pass a checkpoint.""" -JustificationMatchType = typing.Literal["EXACT", "CONTAINS"] +JustificationMatchType: typing_extensions.TypeAlias = typing.Literal["EXACT", "CONTAINS"] """Determines how free-text justification input should be matched.""" -NamespaceRid = core.RID +NamespaceRid: typing_extensions.TypeAlias = core.RID """Identifier of the namespace associated with a checkpoint.""" -OrganizationRid = core.RID +OrganizationRid: typing_extensions.TypeAlias = core.RID """Identifier of the organization associated with a checkpoint.""" -ProjectRid = core.RID +ProjectRid: typing_extensions.TypeAlias = core.RID """Identifier of the project that scoped a checkpoint.""" @@ -708,11 +708,11 @@ class Record(core.ModelBase): approvals_metadata: typing.Optional[ApprovalsMetadata] = pydantic.Field(alias=str("approvalsMetadata"), default=None) # type: ignore[literal-required] -RecordCreatedAt = core.AwareDatetime +RecordCreatedAt: typing_extensions.TypeAlias = core.AwareDatetime """The time at which the checkpoint record was created.""" -RecordRid = core.RID +RecordRid: typing_extensions.TypeAlias = core.RID """Identifier of a checkpoint record.""" @@ -723,7 +723,7 @@ class RedactableString(core.ModelBase): redaction_type: typing.Optional[RedactionType] = pydantic.Field(alias=str("redactionType"), default=None) # type: ignore[literal-required] -RedactionType = typing.Literal["USER_REDACTED", "RESOURCE_REDACTED"] +RedactionType: typing_extensions.TypeAlias = typing.Literal["USER_REDACTED", "RESOURCE_REDACTED"] """Indicates why a string value was redacted.""" @@ -745,7 +745,7 @@ class ResponseJustification(core.ModelBase): type: typing.Literal["responseJustification"] = "responseJustification" -Scope = typing.Literal["USER_SCOPED", "RESOURCE_SCOPED"] +Scope: typing_extensions.TypeAlias = typing.Literal["USER_SCOPED", "RESOURCE_SCOPED"] """Indicates whether the checkpoint was scoped to a user or resource.""" @@ -771,7 +771,7 @@ class SearchCheckpointRecordsEqualsFilter(core.ModelBase): type: typing.Literal["eq"] = "eq" -SearchCheckpointRecordsEqualsFilterField = typing.Literal[ +SearchCheckpointRecordsEqualsFilterField: typing_extensions.TypeAlias = typing.Literal[ "recordRid", "configRid", "checkpointType", @@ -785,7 +785,7 @@ class SearchCheckpointRecordsEqualsFilter(core.ModelBase): """Fields that support equality filtering.""" -SearchCheckpointRecordsFilter = typing_extensions.Annotated[ +SearchCheckpointRecordsFilter: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "SearchCheckpointRecordsNotFilter", "SearchCheckpointRecordsOrFilter", @@ -809,7 +809,7 @@ class SearchCheckpointRecordsGteFilter(core.ModelBase): type: typing.Literal["gte"] = "gte" -SearchCheckpointRecordsGteFilterField = typing.Literal["createdAt"] +SearchCheckpointRecordsGteFilterField: typing_extensions.TypeAlias = typing.Literal["createdAt"] """Fields that support greater-than-or-equal filtering.""" @@ -821,7 +821,7 @@ class SearchCheckpointRecordsLtFilter(core.ModelBase): type: typing.Literal["lt"] = "lt" -SearchCheckpointRecordsLtFilterField = typing.Literal["createdAt"] +SearchCheckpointRecordsLtFilterField: typing_extensions.TypeAlias = typing.Literal["createdAt"] """Fields that support less-than filtering.""" @@ -861,7 +861,7 @@ class SearchCheckpointRecordsTextSearchFilter(core.ModelBase): type: typing.Literal["textSearch"] = "textSearch" -SearchCheckpointRecordsTextSearchFilterField = typing.Literal[ +SearchCheckpointRecordsTextSearchFilterField: typing_extensions.TypeAlias = typing.Literal[ "justificationResponse", "justificationSelectedOption", "justificationAdditionalResponse" ] """Fields that support text search filtering.""" @@ -879,14 +879,11 @@ class SearchRecordsRequest(core.ModelBase): """Chronological order of creation time for records to be returned in. Defaults to reverse chronological order (DESC).""" -SortDirection = typing.Literal["ASC", "DESC"] +SortDirection: typing_extensions.TypeAlias = typing.Literal["ASC", "DESC"] """SortDirection""" -core.resolve_forward_references(CheckpointedItem, globalns=globals(), localns=locals()) -core.resolve_forward_references(CheckpointedItemId, globalns=globals(), localns=locals()) -core.resolve_forward_references(Justification, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchCheckpointRecordsFilter, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AcknowledgementJustification", diff --git a/foundry_sdk/v2/connectivity/models.py b/foundry_sdk/v2/connectivity/models.py index 23881509..dc1e60d4 100644 --- a/foundry_sdk/v2/connectivity/models.py +++ b/foundry_sdk/v2/connectivity/models.py @@ -128,7 +128,7 @@ class CloudIdentity(core.ModelBase): type: typing.Literal["cloudIdentity"] = "cloudIdentity" -CloudIdentityRid = core.RID +CloudIdentityRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Cloud Identity.""" @@ -145,7 +145,7 @@ class Connection(core.ModelBase): configuration: ConnectionConfiguration -ConnectionConfiguration = typing_extensions.Annotated[ +ConnectionConfiguration: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "S3ConnectionConfiguration", "RestConnectionConfiguration", @@ -159,7 +159,7 @@ class Connection(core.ModelBase): """ConnectionConfiguration""" -ConnectionDisplayName = str +ConnectionDisplayName: typing_extensions.TypeAlias = str """The display name of the Connection. The display name must not be blank.""" @@ -178,11 +178,11 @@ class ConnectionExportSettings(core.ModelBase): """ -ConnectionRid = core.RID +ConnectionRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Connection (also known as a source).""" -ConnectionWorker = typing_extensions.Annotated[ +ConnectionWorker: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["UnknownWorker", "FoundryWorker"], pydantic.Field(discriminator="type") ] """ @@ -224,21 +224,23 @@ class CreateConnectionRequestBasicCredentials(core.ModelBase): type: typing.Literal["basic"] = "basic" -CreateConnectionRequestConnectionConfiguration = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestS3ConnectionConfiguration", - "CreateConnectionRequestRestConnectionConfiguration", - "CreateConnectionRequestSnowflakeConnectionConfiguration", - "CreateConnectionRequestDatabricksConnectionConfiguration", - "CreateConnectionRequestSmbConnectionConfiguration", - "CreateConnectionRequestJdbcConnectionConfiguration", - ], - pydantic.Field(discriminator="type"), -] +CreateConnectionRequestConnectionConfiguration: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestS3ConnectionConfiguration", + "CreateConnectionRequestRestConnectionConfiguration", + "CreateConnectionRequestSnowflakeConnectionConfiguration", + "CreateConnectionRequestDatabricksConnectionConfiguration", + "CreateConnectionRequestSmbConnectionConfiguration", + "CreateConnectionRequestJdbcConnectionConfiguration", + ], + pydantic.Field(discriminator="type"), + ] +) """CreateConnectionRequestConnectionConfiguration""" -CreateConnectionRequestConnectionWorker = typing_extensions.Annotated[ +CreateConnectionRequestConnectionWorker: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["CreateConnectionRequestUnknownWorker", "CreateConnectionRequestFoundryWorker"], pydantic.Field(discriminator="type"), ] @@ -248,15 +250,17 @@ class CreateConnectionRequestBasicCredentials(core.ModelBase): """ -CreateConnectionRequestDatabricksAuthenticationMode = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestWorkflowIdentityFederation", - "CreateConnectionRequestOauthMachineToMachineAuth", - "CreateConnectionRequestPersonalAccessToken", - "CreateConnectionRequestBasicCredentials", - ], - pydantic.Field(discriminator="type"), -] +CreateConnectionRequestDatabricksAuthenticationMode: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestWorkflowIdentityFederation", + "CreateConnectionRequestOauthMachineToMachineAuth", + "CreateConnectionRequestPersonalAccessToken", + "CreateConnectionRequestBasicCredentials", + ], + pydantic.Field(discriminator="type"), + ] +) """The method of authentication for connecting to an external Databricks system.""" @@ -276,7 +280,7 @@ class CreateConnectionRequestDatabricksConnectionConfiguration(core.ModelBase): type: typing.Literal["databricks"] = "databricks" -CreateConnectionRequestEncryptedProperty = typing_extensions.Annotated[ +CreateConnectionRequestEncryptedProperty: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["CreateConnectionRequestAsSecretName", "CreateConnectionRequestAsPlaintextValue"], pydantic.Field(discriminator="type"), ] @@ -485,14 +489,16 @@ class CreateConnectionRequestSmbUsernamePasswordAuth(core.ModelBase): type: typing.Literal["usernamePassword"] = "usernamePassword" -CreateConnectionRequestSnowflakeAuthenticationMode = typing_extensions.Annotated[ - typing.Union[ - "CreateConnectionRequestSnowflakeExternalOauth", - "CreateConnectionRequestSnowflakeKeyPairAuthentication", - "CreateConnectionRequestBasicCredentials", - ], - pydantic.Field(discriminator="type"), -] +CreateConnectionRequestSnowflakeAuthenticationMode: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "CreateConnectionRequestSnowflakeExternalOauth", + "CreateConnectionRequestSnowflakeKeyPairAuthentication", + "CreateConnectionRequestBasicCredentials", + ], + pydantic.Field(discriminator="type"), + ] +) """CreateConnectionRequestSnowflakeAuthenticationMode""" @@ -684,18 +690,20 @@ class CreateTableImportRequestSnowflakeTableImportConfig(core.ModelBase): type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" -CreateTableImportRequestTableImportConfig = typing_extensions.Annotated[ - typing.Union[ - "CreateTableImportRequestDatabricksTableImportConfig", - "CreateTableImportRequestJdbcTableImportConfig", - "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", - "CreateTableImportRequestPostgreSqlTableImportConfig", - "CreateTableImportRequestMicrosoftAccessTableImportConfig", - "CreateTableImportRequestSnowflakeTableImportConfig", - "CreateTableImportRequestOracleTableImportConfig", - ], - pydantic.Field(discriminator="type"), -] +CreateTableImportRequestTableImportConfig: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "CreateTableImportRequestDatabricksTableImportConfig", + "CreateTableImportRequestJdbcTableImportConfig", + "CreateTableImportRequestMicrosoftSqlServerTableImportConfig", + "CreateTableImportRequestPostgreSqlTableImportConfig", + "CreateTableImportRequestMicrosoftAccessTableImportConfig", + "CreateTableImportRequestSnowflakeTableImportConfig", + "CreateTableImportRequestOracleTableImportConfig", + ], + pydantic.Field(discriminator="type"), + ] +) """The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" @@ -708,7 +716,7 @@ class CreateVirtualTableRequest(core.ModelBase): config: VirtualTableConfig -DatabricksAuthenticationMode = typing_extensions.Annotated[ +DatabricksAuthenticationMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "WorkflowIdentityFederation", "OauthMachineToMachineAuth", @@ -801,7 +809,7 @@ class Domain(core.ModelBase): """ -EncryptedProperty = typing_extensions.Annotated[ +EncryptedProperty: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AsSecretName", "AsPlaintextValue"], pydantic.Field(discriminator="type") ] """ @@ -854,7 +862,7 @@ class FileChangedSinceLastUploadFilter(core.ModelBase): type: typing.Literal["changedSinceLastUploadFilter"] = "changedSinceLastUploadFilter" -FileFormat = typing.Literal["AVRO", "CSV", "PARQUET"] +FileFormat: typing_extensions.TypeAlias = typing.Literal["AVRO", "CSV", "PARQUET"] """The format of files in the upstream source.""" @@ -890,11 +898,11 @@ class FileImportCustomFilter(core.ModelBase): type: typing.Literal["customFilter"] = "customFilter" -FileImportDisplayName = str +FileImportDisplayName: typing_extensions.TypeAlias = str """FileImportDisplayName""" -FileImportFilter = typing_extensions.Annotated[ +FileImportFilter: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "FilePathNotMatchesFilter", "FileAnyPathMatchesFilter", @@ -914,7 +922,7 @@ class FileImportCustomFilter(core.ModelBase): """ -FileImportMode = typing.Literal["SNAPSHOT", "APPEND", "UPDATE"] +FileImportMode: typing_extensions.TypeAlias = typing.Literal["SNAPSHOT", "APPEND", "UPDATE"] """ Import mode governs how raw files are read from an external system, and written into a Foundry dataset. @@ -924,7 +932,7 @@ class FileImportCustomFilter(core.ModelBase): """ -FileImportRid = core.RID +FileImportRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a FileImport (also known as a batch sync).""" @@ -981,7 +989,7 @@ class FilePathNotMatchesFilter(core.ModelBase): type: typing.Literal["pathNotMatchesFilter"] = "pathNotMatchesFilter" -FileProperty = typing.Literal["LAST_MODIFIED", "SIZE"] +FileProperty: typing_extensions.TypeAlias = typing.Literal["LAST_MODIFIED", "SIZE"] """FileProperty""" @@ -1106,7 +1114,7 @@ class IntegerColumnInitialIncrementalState(core.ModelBase): ) -InvalidConnectionReason = typing.Literal[ +InvalidConnectionReason: typing_extensions.TypeAlias = typing.Literal[ "CONNECTION_NOT_FOUND", "INVALID_CREDENTIALS", "NETWORK_POLICY_VIOLATION", @@ -1192,11 +1200,11 @@ class JdbcConnectionConfiguration(core.ModelBase): type: typing.Literal["jdbc"] = "jdbc" -JdbcDriverArtifactName = str +JdbcDriverArtifactName: typing_extensions.TypeAlias = str """The name of the uploaded JDBC artifact.""" -JdbcProperties = typing.Dict[str, str] +JdbcProperties: typing_extensions.TypeAlias = typing.Dict[str, str] """ A map of [properties](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Properties.html) passed to the JDBC driver to configure behavior. Refer to the documentation of your specific connection type for additional @@ -1287,7 +1295,7 @@ class PersonalAccessToken(core.ModelBase): type: typing.Literal["personalAccessToken"] = "personalAccessToken" -PlaintextValue = str +PlaintextValue: typing_extensions.TypeAlias = str """PlaintextValue""" @@ -1299,7 +1307,7 @@ class PostgreSqlTableImportConfig(core.ModelBase): type: typing.Literal["postgreSqlImportConfig"] = "postgreSqlImportConfig" -Protocol = typing.Literal["HTTP", "HTTPS"] +Protocol: typing_extensions.TypeAlias = typing.Literal["HTTP", "HTTPS"] """Protocol to establish a connection with another system.""" @@ -1312,7 +1320,7 @@ class QueryParameterApiKey(core.ModelBase): type: typing.Literal["queryParameter"] = "queryParameter" -Region = str +Region: typing_extensions.TypeAlias = str """The region of the external system.""" @@ -1395,29 +1403,31 @@ class ReplaceTableImportRequestSnowflakeTableImportConfig(core.ModelBase): type: typing.Literal["snowflakeImportConfig"] = "snowflakeImportConfig" -ReplaceTableImportRequestTableImportConfig = typing_extensions.Annotated[ - typing.Union[ - "ReplaceTableImportRequestDatabricksTableImportConfig", - "ReplaceTableImportRequestJdbcTableImportConfig", - "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", - "ReplaceTableImportRequestPostgreSqlTableImportConfig", - "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", - "ReplaceTableImportRequestSnowflakeTableImportConfig", - "ReplaceTableImportRequestOracleTableImportConfig", - ], - pydantic.Field(discriminator="type"), -] +ReplaceTableImportRequestTableImportConfig: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "ReplaceTableImportRequestDatabricksTableImportConfig", + "ReplaceTableImportRequestJdbcTableImportConfig", + "ReplaceTableImportRequestMicrosoftSqlServerTableImportConfig", + "ReplaceTableImportRequestPostgreSqlTableImportConfig", + "ReplaceTableImportRequestMicrosoftAccessTableImportConfig", + "ReplaceTableImportRequestSnowflakeTableImportConfig", + "ReplaceTableImportRequestOracleTableImportConfig", + ], + pydantic.Field(discriminator="type"), + ] +) """The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" -RestAuthenticationMode = typing_extensions.Annotated[ +RestAuthenticationMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["BearerToken", "ApiKeyAuthentication", "BasicCredentials", "RestConnectionOAuth2"], pydantic.Field(discriminator="type"), ] """The method of authentication for connecting to an external REST system.""" -RestConnectionAdditionalSecrets = typing_extensions.Annotated[ +RestConnectionAdditionalSecrets: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SecretsWithPlaintextValues", "SecretsNames"], pydantic.Field(discriminator="type") ] """ @@ -1460,13 +1470,13 @@ class RestConnectionOAuth2(core.ModelBase): type: typing.Literal["oauth2"] = "oauth2" -RestRequestApiKeyLocation = typing_extensions.Annotated[ +RestRequestApiKeyLocation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["HeaderApiKey", "QueryParameterApiKey"], pydantic.Field(discriminator="type") ] """The location of the API key in the request.""" -S3AuthenticationMode = typing_extensions.Annotated[ +S3AuthenticationMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AwsAccessKey", "CloudIdentity", "AwsOidcAuthentication"], pydantic.Field(discriminator="type"), ] @@ -1596,7 +1606,7 @@ class S3ProxyConfiguration(core.ModelBase): credentials: typing.Optional[BasicCredentials] = None -SecretName = str +SecretName: typing_extensions.TypeAlias = str """SecretName""" @@ -1664,7 +1674,7 @@ class SmbProxyConfiguration(core.ModelBase): protocol: SmbProxyType -SmbProxyType = typing.Literal["HTTP", "SOCKS"] +SmbProxyType: typing_extensions.TypeAlias = typing.Literal["HTTP", "SOCKS"] """SmbProxyType""" @@ -1682,7 +1692,7 @@ class SmbUsernamePasswordAuth(core.ModelBase): type: typing.Literal["usernamePassword"] = "usernamePassword" -SnowflakeAuthenticationMode = typing_extensions.Annotated[ +SnowflakeAuthenticationMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SnowflakeExternalOauth", "SnowflakeKeyPairAuthentication", "BasicCredentials"], pydantic.Field(discriminator="type"), ] @@ -1869,11 +1879,11 @@ class TableImport(core.ModelBase): config: TableImportConfig -TableImportAllowSchemaChanges = bool +TableImportAllowSchemaChanges: typing_extensions.TypeAlias = bool """Allow the TableImport to succeed if the schema of imported rows does not match the existing dataset's schema. Defaults to false for new table imports.""" -TableImportConfig = typing_extensions.Annotated[ +TableImportConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DatabricksTableImportConfig", "JdbcTableImportConfig", @@ -1888,11 +1898,11 @@ class TableImport(core.ModelBase): """The import configuration for a specific [connector type](https://palantir.com/docs/foundry/data-integration/source-type-overview).""" -TableImportDisplayName = str +TableImportDisplayName: typing_extensions.TypeAlias = str """TableImportDisplayName""" -TableImportInitialIncrementalState = typing_extensions.Annotated[ +TableImportInitialIncrementalState: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StringColumnInitialIncrementalState", "DateColumnInitialIncrementalState", @@ -1914,7 +1924,7 @@ class TableImport(core.ModelBase): """ -TableImportMode = typing.Literal["SNAPSHOT", "APPEND"] +TableImportMode: typing_extensions.TypeAlias = typing.Literal["SNAPSHOT", "APPEND"] """ Import mode governs how data is read from an external system, and written into a Foundry dataset. @@ -1923,7 +1933,7 @@ class TableImport(core.ModelBase): """ -TableImportQuery = str +TableImportQuery: typing_extensions.TypeAlias = str """ A single SQL query can be executed per sync, which should output a data table and avoid operations like invoking stored procedures. @@ -1931,15 +1941,15 @@ class TableImport(core.ModelBase): """ -TableImportRid = core.RID +TableImportRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a TableImport (also known as a batch sync).""" -TableName = str +TableName: typing_extensions.TypeAlias = str """The name of a VirtualTable.""" -TableRid = core.RID +TableRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a registered VirtualTable.""" @@ -1994,7 +2004,7 @@ class UpdateSecretsForConnectionRequest(core.ModelBase): """The secrets to be updated. The specified secret names must already be configured on the connection.""" -UriScheme = typing.Literal["HTTP", "HTTPS"] +UriScheme: typing_extensions.TypeAlias = typing.Literal["HTTP", "HTTPS"] """Defines supported URI schemes to be used for external connections.""" @@ -2008,7 +2018,7 @@ class VirtualTable(core.ModelBase): markings: typing.Optional[typing.List[core_models.MarkingId]] = None -VirtualTableConfig = typing_extensions.Annotated[ +VirtualTableConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "SnowflakeVirtualTableConfig", "UnityVirtualTableConfig", @@ -2055,53 +2065,17 @@ class WorkflowIdentityFederation(core.ModelBase): type: typing.Literal["workflowIdentityFederation"] = "workflowIdentityFederation" -CreateConnectionRequestSmbAuth = CreateConnectionRequestSmbUsernamePasswordAuth +CreateConnectionRequestSmbAuth: typing_extensions.TypeAlias = ( + CreateConnectionRequestSmbUsernamePasswordAuth +) """CreateConnectionRequestSmbAuth""" -SmbAuth = SmbUsernamePasswordAuth +SmbAuth: typing_extensions.TypeAlias = SmbUsernamePasswordAuth """SmbAuth""" -core.resolve_forward_references(ConnectionConfiguration, globalns=globals(), localns=locals()) -core.resolve_forward_references(ConnectionWorker, globalns=globals(), localns=locals()) -core.resolve_forward_references( - CreateConnectionRequestConnectionConfiguration, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestConnectionWorker, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestDatabricksAuthenticationMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestEncryptedProperty, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateConnectionRequestSnowflakeAuthenticationMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateTableImportRequestTableImportConfig, globalns=globals(), localns=locals() -) -core.resolve_forward_references(DatabricksAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(EncryptedProperty, globalns=globals(), localns=locals()) -core.resolve_forward_references(FileImportFilter, globalns=globals(), localns=locals()) -core.resolve_forward_references(JdbcProperties, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ReplaceTableImportRequestTableImportConfig, globalns=globals(), localns=locals() -) -core.resolve_forward_references(RestAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references( - RestConnectionAdditionalSecrets, globalns=globals(), localns=locals() -) -core.resolve_forward_references(RestRequestApiKeyLocation, globalns=globals(), localns=locals()) -core.resolve_forward_references(S3AuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(SnowflakeAuthenticationMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(TableImportConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references( - TableImportInitialIncrementalState, globalns=globals(), localns=locals() -) -core.resolve_forward_references(VirtualTableConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "ApiKeyAuthentication", diff --git a/foundry_sdk/v2/core/models.py b/foundry_sdk/v2/core/models.py index 70a797e4..264e0e92 100644 --- a/foundry_sdk/v2/core/models.py +++ b/foundry_sdk/v2/core/models.py @@ -42,7 +42,7 @@ class AttachmentType(core.ModelBase): type: typing.Literal["attachment"] = "attachment" -Attribution = str +Attribution: typing_extensions.TypeAlias = str """Attribution for a request""" @@ -64,11 +64,11 @@ class BranchMetadata(core.ModelBase): rid: FoundryBranch -BranchName = str +BranchName: typing_extensions.TypeAlias = str """The name of a Branch.""" -BuildRid = core.RID +BuildRid: typing_extensions.TypeAlias = core.RID """The RID of a Build.""" @@ -78,11 +78,11 @@ class ByteType(core.ModelBase): type: typing.Literal["byte"] = "byte" -CheckReportRid = core.RID +CheckReportRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Data Health Check Report.""" -CheckRid = core.RID +CheckRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Data Health Check.""" @@ -95,31 +95,31 @@ class CipherTextType(core.ModelBase): type: typing.Literal["cipherText"] = "cipherText" -Color = str +Color: typing_extensions.TypeAlias = str """The hex value of a color.""" -ColumnName = str +ColumnName: typing_extensions.TypeAlias = str """The name of a column in a dataset.""" -ComputeSeconds = float +ComputeSeconds: typing_extensions.TypeAlias = float """A measurement of compute usage expressed in [compute-seconds](https://palantir.com/docs/foundry/resource-management/usage-types#compute-second). For more information, please refer to the [Usage types](https://palantir.com/docs/foundry/resource-management/usage-types) documentation.""" -ContentLength = core.Long +ContentLength: typing_extensions.TypeAlias = core.Long """ContentLength""" -ContentType = str +ContentType: typing_extensions.TypeAlias = str """ContentType""" -CreatedTime = core.AwareDatetime +CreatedTime: typing_extensions.TypeAlias = core.AwareDatetime """The time at which the resource was created.""" -CustomMetadata = typing.Dict[str, typing.Any] +CustomMetadata: typing_extensions.TypeAlias = typing.Dict[str, typing.Any] """CustomMetadata""" @@ -158,7 +158,7 @@ class DatasetFieldSchema(core.ModelBase): """Only used when field type is struct.""" -DatasetRid = core.RID +DatasetRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Dataset.""" @@ -186,7 +186,7 @@ class DecimalType(core.ModelBase): type: typing.Literal["decimal"] = "decimal" -DisplayName = str +DisplayName: typing_extensions.TypeAlias = str """The display name of the entity.""" @@ -197,7 +197,7 @@ class Distance(core.ModelBase): unit: DistanceUnit -DistanceUnit = typing.Literal[ +DistanceUnit: typing_extensions.TypeAlias = typing.Literal[ "MILLIMETERS", "CENTIMETERS", "METERS", @@ -227,17 +227,17 @@ class Duration(core.ModelBase): """The unit of duration.""" -DurationSeconds = core.Long +DurationSeconds: typing_extensions.TypeAlias = core.Long """A duration of time measured in seconds.""" -EmbeddingModel = typing_extensions.Annotated[ +EmbeddingModel: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["LmsEmbeddingModel", "FoundryLiveDeployment"], pydantic.Field(discriminator="type") ] """EmbeddingModel""" -EnrollmentRid = core.RID +EnrollmentRid: typing_extensions.TypeAlias = core.RID """EnrollmentRid""" @@ -251,7 +251,7 @@ class Field(core.ModelBase): schema_: FieldSchema = pydantic.Field(alias=str("schema")) # type: ignore[literal-required] -FieldDataType = typing_extensions.Annotated[ +FieldDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StructFieldType", "DateType", @@ -274,7 +274,7 @@ class Field(core.ModelBase): """FieldDataType""" -FieldName = str +FieldName: typing_extensions.TypeAlias = str """FieldName""" @@ -286,14 +286,14 @@ class FieldSchema(core.ModelBase): data_type: FieldDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] -FilePath = str +FilePath: typing_extensions.TypeAlias = str """ The path to a File within Foundry. Paths are relative and must not start with a leading slash. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. """ -Filename = str +Filename: typing_extensions.TypeAlias = str """The name of a File within Foundry. Examples: `my-file.txt`, `my-file.jpg`, `dataframe.snappy.parquet`.""" @@ -366,7 +366,7 @@ class FilterStringType(core.ModelBase): type: typing.Literal["string"] = "string" -FilterType = typing_extensions.Annotated[ +FilterType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "FilterDateTimeType", "FilterDateType", @@ -398,11 +398,11 @@ class FloatType(core.ModelBase): type: typing.Literal["float"] = "float" -FolderRid = core.RID +FolderRid: typing_extensions.TypeAlias = core.RID """FolderRid""" -FoundryBranch = str +FoundryBranch: typing_extensions.TypeAlias = str """The Foundry branch identifier, specifically its rid. Different identifier types may be used in the future as values.""" @@ -473,19 +473,19 @@ class GeotimeSeriesReferenceType(core.ModelBase): type: typing.Literal["geotimeSeriesReference"] = "geotimeSeriesReference" -GroupId = core.UUID +GroupId: typing_extensions.TypeAlias = core.UUID """A Foundry Group ID.""" -GroupName = str +GroupName: typing_extensions.TypeAlias = str """The display name of a multipass group.""" -GroupRid = core.RID +GroupRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a multipass group.""" -IncludeComputeUsage = bool +IncludeComputeUsage: typing_extensions.TypeAlias = bool """ Indicates whether the response should include compute usage details for the request. This feature is currently only available for OSDK applications. @@ -499,7 +499,7 @@ class IntegerType(core.ModelBase): type: typing.Literal["integer"] = "integer" -JobRid = core.RID +JobRid: typing_extensions.TypeAlias = core.RID """The RID of a Job.""" @@ -510,7 +510,7 @@ class LmsEmbeddingModel(core.ModelBase): type: typing.Literal["lms"] = "lms" -LmsEmbeddingModelValue = typing.Literal[ +LmsEmbeddingModelValue: typing_extensions.TypeAlias = typing.Literal[ "OPENAI_TEXT_EMBEDDING_ADA_002", "TEXT_EMBEDDING_3_LARGE", "TEXT_EMBEDDING_3_SMALL", @@ -535,7 +535,7 @@ class MapFieldType(core.ModelBase): type: typing.Literal["map"] = "map" -MarkingId = str +MarkingId: typing_extensions.TypeAlias = str """The ID of a security marking.""" @@ -546,7 +546,7 @@ class MarkingType(core.ModelBase): type: typing.Literal["marking"] = "marking" -MarkingTypeValue = typing.Literal["CBAC", "MANDATORY"] +MarkingTypeValue: typing_extensions.TypeAlias = typing.Literal["CBAC", "MANDATORY"] """ The kind of marking applied by a marking property type. - `CBAC`: Classification-based access control markings. @@ -554,7 +554,7 @@ class MarkingType(core.ModelBase): """ -MediaItemPath = str +MediaItemPath: typing_extensions.TypeAlias = str """ A user-specified identifier for a media item within a media set. Paths must be less than 256 characters long. @@ -563,11 +563,11 @@ class MarkingType(core.ModelBase): """ -MediaItemReadToken = str +MediaItemReadToken: typing_extensions.TypeAlias = str """A token that grants access to read specific media items.""" -MediaItemRid = core.RID +MediaItemRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of an individual Media Item within a Media Set in Foundry.""" @@ -584,7 +584,7 @@ class MediaReferenceType(core.ModelBase): type: typing.Literal["mediaReference"] = "mediaReference" -MediaSetRid = core.RID +MediaSetRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Media Set in Foundry.""" @@ -604,18 +604,18 @@ class MediaSetViewItemWrapper(core.ModelBase): type: typing.Literal["mediaSetViewItem"] = "mediaSetViewItem" -MediaSetViewRid = core.RID +MediaSetViewRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a single View of a Media Set. A Media Set View is an independent collection of Media Items.""" -MediaType = str +MediaType: typing_extensions.TypeAlias = str """ The [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) of the file or attachment. Examples: `application/json`, `application/pdf`, `application/octet-stream`, `image/jpeg` """ -NetworkEgressPolicyRid = core.RID +NetworkEgressPolicyRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Network Egress Policy.""" @@ -642,30 +642,30 @@ class NumericOrNonNumericType(core.ModelBase): type: typing.Literal["numericOrNonNumeric"] = "numericOrNonNumeric" -Operation = str +Operation: typing_extensions.TypeAlias = str """ An operation that can be performed on a resource. Operations are used to define the permissions that a Role has. Operations are typically in the format `service:action`, where `service` is related to the type of resource and `action` is the action being performed. """ -OperationScope = str +OperationScope: typing_extensions.TypeAlias = str """OperationScope""" -OrderByDirection = typing.Literal["ASC", "DESC"] +OrderByDirection: typing_extensions.TypeAlias = typing.Literal["ASC", "DESC"] """Specifies the ordering direction (can be either `ASC` or `DESC`)""" -OrganizationRid = core.RID +OrganizationRid: typing_extensions.TypeAlias = core.RID """OrganizationRid""" -PageSize = int +PageSize: typing_extensions.TypeAlias = int """The page size to use for the endpoint.""" -PageToken = str +PageToken: typing_extensions.TypeAlias = str """ The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response @@ -673,26 +673,28 @@ class NumericOrNonNumericType(core.ModelBase): """ -PreviewMode = bool +PreviewMode: typing_extensions.TypeAlias = bool """Enables the use of preview functionality.""" -PrincipalId = core.UUID +PrincipalId: typing_extensions.TypeAlias = core.UUID """The ID of a Foundry Group or User.""" -PrincipalType = typing.Literal["USER", "GROUP"] +PrincipalType: typing_extensions.TypeAlias = typing.Literal["USER", "GROUP"] """PrincipalType""" -Realm = str +Realm: typing_extensions.TypeAlias = str """ Identifies which Realm a User or Group is a member of. The `palantir-internal-realm` is used for Users or Groups that are created in Foundry by administrators and not associated with any SSO provider. """ -ReleaseStatus = typing.Literal["ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED"] +ReleaseStatus: typing_extensions.TypeAlias = typing.Literal[ + "ACTIVE", "ENDORSED", "EXPERIMENTAL", "DEPRECATED" +] """The release status of the entity.""" @@ -720,11 +722,11 @@ class RoleAssignmentUpdate(core.ModelBase): principal_id: PrincipalId = pydantic.Field(alias=str("principalId")) # type: ignore[literal-required] -RoleContext = typing.Literal["ORGANIZATION"] +RoleContext: typing_extensions.TypeAlias = typing.Literal["ORGANIZATION"] """RoleContext""" -RoleId = str +RoleId: typing_extensions.TypeAlias = str """ The unique ID for a Role. Roles are sets of permissions that grant different levels of access to resources. The default roles in Foundry are: Owner, Editor, Viewer, and Discoverer. See more about @@ -732,7 +734,7 @@ class RoleAssignmentUpdate(core.ModelBase): """ -RoleSetId = str +RoleSetId: typing_extensions.TypeAlias = str """RoleSetId""" @@ -742,11 +744,11 @@ class ScenarioReferenceType(core.ModelBase): type: typing.Literal["scenarioReference"] = "scenarioReference" -ScheduleRid = core.RID +ScheduleRid: typing_extensions.TypeAlias = core.RID """The RID of a Schedule.""" -SchemaFieldType = typing.Literal[ +SchemaFieldType: typing_extensions.TypeAlias = typing.Literal[ "ARRAY", "BINARY", "BOOLEAN", @@ -772,7 +774,7 @@ class ShortType(core.ModelBase): type: typing.Literal["short"] = "short" -SizeBytes = core.Long +SizeBytes: typing_extensions.TypeAlias = core.Long """The size of the file or attachment in bytes.""" @@ -811,7 +813,7 @@ class StringType(core.ModelBase): type: typing.Literal["string"] = "string" -StructFieldName = str +StructFieldName: typing_extensions.TypeAlias = str """The name of a field in a `Struct`.""" @@ -822,18 +824,18 @@ class StructFieldType(core.ModelBase): type: typing.Literal["struct"] = "struct" -TableRid = core.RID +TableRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Table.""" -TimeSeriesItemType = typing_extensions.Annotated[ +TimeSeriesItemType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringType", "DoubleType", "NumericOrNonNumericType"], pydantic.Field(discriminator="type"), ] """A union of the types supported by time series properties.""" -TimeUnit = typing.Literal[ +TimeUnit: typing_extensions.TypeAlias = typing.Literal[ "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" ] """TimeUnit""" @@ -852,15 +854,15 @@ class TimestampType(core.ModelBase): type: typing.Literal["timestamp"] = "timestamp" -TotalCount = core.Long +TotalCount: typing_extensions.TypeAlias = core.Long """The total number of items across all pages.""" -TraceParent = str +TraceParent: typing_extensions.TypeAlias = str """The W3C Trace Context `traceparent` header value used to propagate distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#traceparent-header for more details. Note the 16 byte trace ID encoded in the header must be derived from a time based uuid to be used within Foundry.""" -TraceState = str +TraceState: typing_extensions.TypeAlias = str """The W3C Trace Context `tracestate` header value, which is used to propagate vendor specific distributed tracing information for Foundry telemetry. See https://www.w3.org/TR/trace-context/#tracestate-header for more details.""" @@ -872,23 +874,23 @@ class UnsupportedType(core.ModelBase): type: typing.Literal["unsupported"] = "unsupported" -UnsupportedTypeParamKey = str +UnsupportedTypeParamKey: typing_extensions.TypeAlias = str """UnsupportedTypeParamKey""" -UnsupportedTypeParamValue = str +UnsupportedTypeParamValue: typing_extensions.TypeAlias = str """UnsupportedTypeParamValue""" -UpdatedTime = core.AwareDatetime +UpdatedTime: typing_extensions.TypeAlias = core.AwareDatetime """The time at which the resource was most recently updated.""" -UserId = core.UUID +UserId: typing_extensions.TypeAlias = core.UUID """A Foundry User ID.""" -UserStatus = typing.Literal["ACTIVE", "DELETED"] +UserStatus: typing_extensions.TypeAlias = typing.Literal["ACTIVE", "DELETED"] """Present status of user.""" @@ -901,7 +903,7 @@ class VectorSimilarityFunction(core.ModelBase): value: typing.Optional[VectorSimilarityFunctionValue] = None -VectorSimilarityFunctionValue = typing.Literal[ +VectorSimilarityFunctionValue: typing_extensions.TypeAlias = typing.Literal[ "COSINE_SIMILARITY", "DOT_PRODUCT", "EUCLIDEAN_DISTANCE" ] """VectorSimilarityFunctionValue""" @@ -918,7 +920,7 @@ class VectorType(core.ModelBase): type: typing.Literal["vector"] = "vector" -VersionId = core.UUID +VersionId: typing_extensions.TypeAlias = core.UUID """The version identifier of a dataset schema.""" @@ -928,11 +930,11 @@ class VoidType(core.ModelBase): type: typing.Literal["void"] = "void" -ZoneId = str +ZoneId: typing_extensions.TypeAlias = str """A string representation of a java.time.ZoneId""" -ChangeDataCaptureConfiguration = FullRowChangeDataCaptureConfiguration +ChangeDataCaptureConfiguration: typing_extensions.TypeAlias = FullRowChangeDataCaptureConfiguration """ Configuration for utilizing the stream as a change data capture (CDC) dataset. To configure CDC on a stream, at least one key needs to be provided. @@ -942,23 +944,19 @@ class VoidType(core.ModelBase): """ -CreatedBy = PrincipalId +CreatedBy: typing_extensions.TypeAlias = PrincipalId """The Foundry user who created this resource""" -Reference = MediaSetViewItemWrapper +Reference: typing_extensions.TypeAlias = MediaSetViewItemWrapper """A union of the types supported by media reference properties.""" -UpdatedBy = UserId +UpdatedBy: typing_extensions.TypeAlias = UserId """The Foundry user who last updated this resource""" -core.resolve_forward_references(CustomMetadata, globalns=globals(), localns=locals()) -core.resolve_forward_references(EmbeddingModel, globalns=globals(), localns=locals()) -core.resolve_forward_references(FieldDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(FilterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(TimeSeriesItemType, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AnyType", diff --git a/foundry_sdk/v2/data_health/models.py b/foundry_sdk/v2/data_health/models.py index 2dd8d229..85c11e82 100644 --- a/foundry_sdk/v2/data_health/models.py +++ b/foundry_sdk/v2/data_health/models.py @@ -80,7 +80,7 @@ class Check(core.ModelBase): """The timestamp when the Check was last updated.""" -CheckConfig = typing_extensions.Annotated[ +CheckConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "NumericColumnRangeCheckConfig", "JobStatusCheckConfig", @@ -104,11 +104,11 @@ class Check(core.ModelBase): """Configuration of a check.""" -CheckGroupRid = core.RID +CheckGroupRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a CheckGroup.""" -CheckIntent = str +CheckIntent: typing_extensions.TypeAlias = str """A note about why the Check was set up.""" @@ -123,7 +123,7 @@ class CheckReport(core.ModelBase): created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] -CheckReportLimit = int +CheckReportLimit: typing_extensions.TypeAlias = int """ The maximum number of check reports to return in a single request. @@ -142,7 +142,7 @@ class CheckResult(core.ModelBase): """Further details about the result of the check.""" -CheckResultStatus = typing.Literal[ +CheckResultStatus: typing_extensions.TypeAlias = typing.Literal[ "PASSED", "FAILED", "WARNING", "ERROR", "NOT_APPLICABLE", "NOT_COMPUTABLE" ] """The status of a check report execution.""" @@ -162,7 +162,7 @@ class ColumnInfo(core.ModelBase): column_type: typing.Optional[core_models.SchemaFieldType] = pydantic.Field(alias=str("columnType"), default=None) # type: ignore[literal-required] -ColumnName = str +ColumnName: typing_extensions.TypeAlias = str """ColumnName""" @@ -182,7 +182,7 @@ class ColumnTypeConfig(core.ModelBase): severity: SeverityLevel -ColumnValue = typing_extensions.Annotated[ +ColumnValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DateColumnValue", "BooleanColumnValue", "StringColumnValue", "NumericColumnValue" ], @@ -249,7 +249,7 @@ class GetLatestCheckReportsResponse(core.ModelBase): """The list of check reports.""" -IgnoreEmptyTransactions = bool +IgnoreEmptyTransactions: typing_extensions.TypeAlias = bool """Whether empty transactions should be ignored when calculating time since last updated. If true (default), only transactions with actual data changes are considered.""" @@ -277,7 +277,9 @@ class MedianDeviation(core.ModelBase): deviation_threshold: float = pydantic.Field(alias=str("deviationThreshold")) # type: ignore[literal-required] -MedianDeviationBoundsType = typing.Literal["LOWER_BOUND", "UPPER_BOUND", "TWO_TAILED"] +MedianDeviationBoundsType: typing_extensions.TypeAlias = typing.Literal[ + "LOWER_BOUND", "UPPER_BOUND", "TWO_TAILED" +] """The three types of median deviations a bounds type can have: - LOWER_BOUND – Tests for significant deviations below the median value, - UPPER_BOUND – Tests for significant deviations above the median value, - TWO_TAILED – Tests for significant deviations in either direction from the median value.""" @@ -372,7 +374,7 @@ class PercentageCheckConfig(core.ModelBase): median_deviation: typing.Optional[MedianDeviationConfig] = pydantic.Field(alias=str("medianDeviation"), default=None) # type: ignore[literal-required] -PercentageValue = float +PercentageValue: typing_extensions.TypeAlias = float """ A percentage value in the range 0.0 to 100.0. @@ -427,7 +429,7 @@ class ReplaceBuildStatusCheckConfig(core.ModelBase): type: typing.Literal["buildStatus"] = "buildStatus" -ReplaceCheckConfig = typing_extensions.Annotated[ +ReplaceCheckConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ReplaceNumericColumnRangeCheckConfig", "ReplaceJobStatusCheckConfig", @@ -585,7 +587,7 @@ class SchemaComparisonConfig(core.ModelBase): severity: SeverityLevel -SchemaComparisonType = typing.Literal[ +SchemaComparisonType: typing_extensions.TypeAlias = typing.Literal[ "EXACT_MATCH_ORDERED_COLUMNS", "EXACT_MATCH_UNORDERED_COLUMNS", "COLUMN_ADDITIONS_ALLOWED", @@ -608,7 +610,7 @@ class SchemaInfo(core.ModelBase): columns: typing.List[ColumnInfo] -SeverityLevel = typing.Literal["MODERATE", "CRITICAL"] +SeverityLevel: typing_extensions.TypeAlias = typing.Literal["MODERATE", "CRITICAL"] """The severity level of the check. Possible values are MODERATE or CRITICAL.""" @@ -679,7 +681,7 @@ class TrendConfig(core.ModelBase): severity: SeverityLevel -TrendType = typing.Literal[ +TrendType: typing_extensions.TypeAlias = typing.Literal[ "NON_INCREASING", "NON_DECREASING", "STRICTLY_INCREASING", "STRICTLY_DECREASING", "CONSTANT" ] """ @@ -692,9 +694,7 @@ class TrendConfig(core.ModelBase): """ -core.resolve_forward_references(CheckConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references(ColumnValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(ReplaceCheckConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AllowedColumnValuesCheckConfig", diff --git a/foundry_sdk/v2/datasets/models.py b/foundry_sdk/v2/datasets/models.py index d2108916..05fcd18f 100644 --- a/foundry_sdk/v2/datasets/models.py +++ b/foundry_sdk/v2/datasets/models.py @@ -82,7 +82,9 @@ class CreateViewRequest(core.ModelBase): primary_key: typing.Optional[ViewPrimaryKey] = pydantic.Field(alias=str("primaryKey"), default=None) # type: ignore[literal-required] -DataframeReader = typing.Literal["AVRO", "CSV", "PARQUET", "DATASOURCE"] +DataframeReader: typing_extensions.TypeAlias = typing.Literal[ + "AVRO", "CSV", "PARQUET", "DATASOURCE" +] """The dataframe reader used for reading the dataset schema.""" @@ -94,7 +96,7 @@ class Dataset(core.ModelBase): parent_folder_rid: filesystem_models.FolderRid = pydantic.Field(alias=str("parentFolderRid")) # type: ignore[literal-required] -DatasetName = str +DatasetName: typing_extensions.TypeAlias = str """DatasetName""" @@ -107,7 +109,7 @@ class File(core.ModelBase): updated_time: FileUpdatedTime = pydantic.Field(alias=str("updatedTime")) # type: ignore[literal-required] -FileUpdatedTime = core.AwareDatetime +FileUpdatedTime: typing_extensions.TypeAlias = core.AwareDatetime """FileUpdatedTime""" @@ -118,7 +120,7 @@ class GetDatasetJobsAndFilter(core.ModelBase): type: typing.Literal["and"] = "and" -GetDatasetJobsComparisonType = typing.Literal["GTE", "LT"] +GetDatasetJobsComparisonType: typing_extensions.TypeAlias = typing.Literal["GTE", "LT"] """GetDatasetJobsComparisonType""" @@ -129,7 +131,7 @@ class GetDatasetJobsOrFilter(core.ModelBase): type: typing.Literal["or"] = "or" -GetDatasetJobsQuery = typing_extensions.Annotated[ +GetDatasetJobsQuery: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["GetDatasetJobsOrFilter", "GetDatasetJobsAndFilter", "GetDatasetJobsTimeFilter"], pydantic.Field(discriminator="type"), ] @@ -150,11 +152,13 @@ class GetDatasetJobsSort(core.ModelBase): sort_direction: GetDatasetJobsSortDirection = pydantic.Field(alias=str("sortDirection")) # type: ignore[literal-required] -GetDatasetJobsSortDirection = typing.Literal["ASCENDING", "DESCENDING"] +GetDatasetJobsSortDirection: typing_extensions.TypeAlias = typing.Literal["ASCENDING", "DESCENDING"] """GetDatasetJobsSortDirection""" -GetDatasetJobsSortType = typing.Literal["BY_STARTED_TIME", "BY_FINISHED_TIME"] +GetDatasetJobsSortType: typing_extensions.TypeAlias = typing.Literal[ + "BY_STARTED_TIME", "BY_FINISHED_TIME" +] """GetDatasetJobsSortType""" @@ -167,7 +171,9 @@ class GetDatasetJobsTimeFilter(core.ModelBase): type: typing.Literal["timeFilter"] = "timeFilter" -GetDatasetJobsTimeFilterField = typing.Literal["SUBMITTED_TIME", "FINISHED_TIME"] +GetDatasetJobsTimeFilterField: typing_extensions.TypeAlias = typing.Literal[ + "SUBMITTED_TIME", "FINISHED_TIME" +] """GetDatasetJobsTimeFilterField""" @@ -318,7 +324,7 @@ class ReplaceBackingDatasetsRequest(core.ModelBase): backing_datasets: typing.List[ViewBackingDataset] = pydantic.Field(alias=str("backingDatasets")) # type: ignore[literal-required] -TableExportFormat = typing.Literal["ARROW", "CSV"] +TableExportFormat: typing_extensions.TypeAlias = typing.Literal["ARROW", "CSV"] """Format for tabular dataset export.""" @@ -335,19 +341,21 @@ class Transaction(core.ModelBase): """The timestamp when the transaction was closed, in ISO 8601 timestamp format.""" -TransactionCreatedTime = core.AwareDatetime +TransactionCreatedTime: typing_extensions.TypeAlias = core.AwareDatetime """The timestamp when the transaction was created, in ISO 8601 timestamp format.""" -TransactionRid = core.RID +TransactionRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Transaction.""" -TransactionStatus = typing.Literal["ABORTED", "COMMITTED", "OPEN"] +TransactionStatus: typing_extensions.TypeAlias = typing.Literal["ABORTED", "COMMITTED", "OPEN"] """The status of a Transaction.""" -TransactionType = typing.Literal["APPEND", "UPDATE", "SNAPSHOT", "DELETE"] +TransactionType: typing_extensions.TypeAlias = typing.Literal[ + "APPEND", "UPDATE", "SNAPSHOT", "DELETE" +] """The type of a Transaction.""" @@ -407,19 +415,18 @@ class ViewPrimaryKey(core.ModelBase): """ -ViewPrimaryKeyResolution = typing_extensions.Annotated[ +ViewPrimaryKeyResolution: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PrimaryKeyResolutionUnique", "PrimaryKeyResolutionDuplicate"], pydantic.Field(discriminator="type"), ] """Specifies how primary key conflicts are resolved within the view.""" -PrimaryKeyResolutionStrategy = PrimaryKeyLatestWinsResolutionStrategy +PrimaryKeyResolutionStrategy: typing_extensions.TypeAlias = PrimaryKeyLatestWinsResolutionStrategy """PrimaryKeyResolutionStrategy""" -core.resolve_forward_references(GetDatasetJobsQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references(ViewPrimaryKeyResolution, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AddBackingDatasetsRequest", diff --git a/foundry_sdk/v2/filesystem/models.py b/foundry_sdk/v2/filesystem/models.py index 82aff0a9..55e7e87e 100644 --- a/foundry_sdk/v2/filesystem/models.py +++ b/foundry_sdk/v2/filesystem/models.py @@ -71,7 +71,7 @@ class AddProjectResourceReferencesRequest(core.ModelBase): resources: typing.List[AddResourceReferenceRequest] -AddResourceReferenceRequest = typing_extensions.Annotated[ +AddResourceReferenceRequest: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AddExternalResourceReferenceRequest", "AddFilesystemResourceReferenceRequest"], pydantic.Field(discriminator="type"), ] @@ -154,7 +154,7 @@ class Everyone(core.ModelBase): type: typing.Literal["everyone"] = "everyone" -FileSystemId = str +FileSystemId: typing_extensions.TypeAlias = str """The ID of the filesystem that will be used for all projects in the Space.""" @@ -200,11 +200,11 @@ class Folder(core.ModelBase): """ -FolderRid = core.RID +FolderRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Folder.""" -FolderType = typing.Literal["FOLDER", "SPACE", "PROJECT"] +FolderType: typing_extensions.TypeAlias = typing.Literal["FOLDER", "SPACE", "PROJECT"] """ A folder can be a regular Folder, a [Project](https://palantir.com/docs/foundry/getting-started/projects-and-resources/#projects) or a @@ -249,7 +249,7 @@ class GetResourcesBatchResponse(core.ModelBase): data: typing.Dict[ResourceRid, Resource] -IsDirectlyApplied = bool +IsDirectlyApplied: typing_extensions.TypeAlias = bool """ Boolean flag to indicate if the marking is directly applied to the resource, or if it's applied to a parent resource and inherited by the current resource. @@ -393,7 +393,7 @@ class ProjectFilesystemResourceReference(core.ModelBase): type: typing.Literal["filesystem"] = "filesystem" -ProjectResourceLevelRoleGrantsAllowed = bool +ProjectResourceLevelRoleGrantsAllowed: typing_extensions.TypeAlias = bool """Whether role grants are allowed on individual resources within the Project.""" @@ -403,7 +403,7 @@ class ProjectResourceReference(core.ModelBase): reference: ProjectResourceReferenceUnion -ProjectResourceReferenceType = typing.Literal["EXTERNAL", "FILESYSTEM"] +ProjectResourceReferenceType: typing_extensions.TypeAlias = typing.Literal["EXTERNAL", "FILESYSTEM"] """ A type of resource that has been referenced. A FILESYSTEM resource is anything that you can find in a Foundry file tree within a project. An EXTERNAL resource exists outside of the Foundry filesystem, such as a spark @@ -411,7 +411,7 @@ class ProjectResourceReference(core.ModelBase): """ -ProjectResourceReferenceUnion = typing_extensions.Annotated[ +ProjectResourceReferenceUnion: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ProjectExternalResourceReference", "ProjectFilesystemResourceReference"], pydantic.Field(discriminator="type"), ] @@ -421,19 +421,19 @@ class ProjectResourceReference(core.ModelBase): """ -ProjectRid = core.RID +ProjectRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Project.""" -ProjectTemplateRid = core.RID +ProjectTemplateRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a project template.""" -ProjectTemplateVariableId = str +ProjectTemplateVariableId: typing_extensions.TypeAlias = str """An identifier for a variable used in a project template.""" -ProjectTemplateVariableValue = str +ProjectTemplateVariableValue: typing_extensions.TypeAlias = str """The value assigned to a variable used in a project template.""" @@ -551,15 +551,15 @@ class Resource(core.ModelBase): """The Space Resource Identifier (RID) that the Resource lives in.""" -ResourceDisplayName = str +ResourceDisplayName: typing_extensions.TypeAlias = str """The display name of the Resource""" -ResourcePath = str +ResourcePath: typing_extensions.TypeAlias = str """The full path to the resource, including the resource name itself""" -ResourceRid = core.RID +ResourceRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Resource.""" @@ -577,19 +577,19 @@ class ResourceRoleIdentifier(core.ModelBase): role_id: core_models.RoleId = pydantic.Field(alias=str("roleId")) # type: ignore[literal-required] -ResourceRolePrincipal = typing_extensions.Annotated[ +ResourceRolePrincipal: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PrincipalWithId", "Everyone"], pydantic.Field(discriminator="type") ] """ResourceRolePrincipal""" -ResourceRolePrincipalIdentifier = typing_extensions.Annotated[ +ResourceRolePrincipalIdentifier: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PrincipalIdOnly", "Everyone"], pydantic.Field(discriminator="type") ] """A principal for resource role operations that doesn't require specifying the principal type.""" -ResourceType = pydantic.SkipValidation[ +ResourceType: typing_extensions.TypeAlias = pydantic.SkipValidation[ typing.Literal[ "AIP_PROFILE", "AIP_AGENTS_AGENT", @@ -710,15 +710,17 @@ class Space(core.ModelBase): """The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space. This is only present if configured in control panel in the space settings.""" -SpaceMavenIdentifier = str +SpaceMavenIdentifier: typing_extensions.TypeAlias = str """The maven identifier used as the prefix to the maven coordinate that uniquely identifies resources published from this space.""" -SpaceRid = core.RID +SpaceRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of a Space.""" -TrashStatus = typing.Literal["DIRECTLY_TRASHED", "ANCESTOR_TRASHED", "NOT_TRASHED"] +TrashStatus: typing_extensions.TypeAlias = typing.Literal[ + "DIRECTLY_TRASHED", "ANCESTOR_TRASHED", "NOT_TRASHED" +] """ Values: - **DIRECTLY_TRASHED**: The resource was specifically trashed by a user. It can be restored directly. @@ -727,16 +729,11 @@ class Space(core.ModelBase): """ -UsageAccountRid = core.RID +UsageAccountRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier (RID) of the usage account that will be used as a default on project creation.""" -core.resolve_forward_references(AddResourceReferenceRequest, globalns=globals(), localns=locals()) -core.resolve_forward_references(ProjectResourceReferenceUnion, globalns=globals(), localns=locals()) -core.resolve_forward_references(ResourceRolePrincipal, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ResourceRolePrincipalIdentifier, globalns=globals(), localns=locals() -) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AccessRequirements", diff --git a/foundry_sdk/v2/functions/models.py b/foundry_sdk/v2/functions/models.py index 21385bc0..e975a8e5 100644 --- a/foundry_sdk/v2/functions/models.py +++ b/foundry_sdk/v2/functions/models.py @@ -41,7 +41,7 @@ class CancelExecutionResponse(core.ModelBase): id: ExecutionId -DataValue = typing.Any +DataValue: typing_extensions.TypeAlias = typing.Any """ Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | @@ -96,7 +96,7 @@ class ExecuteAsyncQueryRequest(core.ModelBase): """ -ExecuteQueryAsyncResponse = typing_extensions.Annotated[ +ExecuteQueryAsyncResponse: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ExecutionSubmitted", "ExecutionCompleted"], pydantic.Field(discriminator="type") ] """Response from submitting a query for async execution.""" @@ -130,7 +130,7 @@ class ExecutionCompleted(core.ModelBase): type: typing.Literal["completed"] = "completed" -ExecutionId = str +ExecutionId: typing_extensions.TypeAlias = str """Unique identifier for an async query execution.""" @@ -144,11 +144,11 @@ class ExecutionSubmitted(core.ModelBase): type: typing.Literal["submitted"] = "submitted" -FunctionRid = core.RID +FunctionRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" -FunctionVersion = str +FunctionVersion: typing_extensions.TypeAlias = str """ The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. @@ -177,7 +177,7 @@ class GetByRidQueriesBatchResponse(core.ModelBase): data: typing.List[Query] -GetExecutionResultResponse = typing_extensions.Annotated[ +GetExecutionResultResponse: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["RunningExecution", "SucceededExecution"], pydantic.Field(discriminator="type") ] """Poll response for an async query execution.""" @@ -218,7 +218,7 @@ class NullableConstraint(core.ModelBase): type: typing.Literal["nullable"] = "nullable" -NullableConstraintValue = typing.Literal["NULLABLE", "NOT_NULLABLE"] +NullableConstraintValue: typing_extensions.TypeAlias = typing.Literal["NULLABLE", "NOT_NULLABLE"] """NullableConstraintValue""" @@ -230,7 +230,7 @@ class Parameter(core.ModelBase): required: bool -ParameterId = str +ParameterId: typing_extensions.TypeAlias = str """ The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. @@ -250,7 +250,7 @@ class Query(core.ModelBase): type_references: typing.Optional[typing.Dict[TypeReferenceIdentifier, QueryDataType]] = pydantic.Field(alias=str("typeReferences"), default=None) # type: ignore[literal-required] -QueryAggregationKeyType = typing_extensions.Annotated[ +QueryAggregationKeyType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.BooleanType, @@ -265,7 +265,7 @@ class Query(core.ModelBase): """A union of all the types supported by query aggregation keys.""" -QueryAggregationRangeSubType = typing_extensions.Annotated[ +QueryAggregationRangeSubType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.DoubleType, @@ -284,14 +284,14 @@ class QueryAggregationRangeType(core.ModelBase): type: typing.Literal["range"] = "range" -QueryAggregationValueType = typing_extensions.Annotated[ +QueryAggregationValueType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], pydantic.Field(discriminator="type"), ] """A union of all the types supported by query aggregation keys.""" -QueryApiName = str +QueryApiName: typing_extensions.TypeAlias = str """The name of the Query in the API.""" @@ -302,7 +302,7 @@ class QueryArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -QueryDataType = typing_extensions.Annotated[ +QueryDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "QueryStructType", @@ -331,7 +331,7 @@ class QueryArrayType(core.ModelBase): """A union of all the types supported by Query parameters or outputs.""" -QueryRuntimeErrorParameter = str +QueryRuntimeErrorParameter: typing_extensions.TypeAlias = str """QueryRuntimeErrorParameter""" @@ -429,11 +429,11 @@ class StructConstraint(core.ModelBase): type: typing.Literal["struct"] = "struct" -StructFieldApiName = str +StructFieldApiName: typing_extensions.TypeAlias = str """StructFieldApiName""" -StructFieldName = str +StructFieldName: typing_extensions.TypeAlias = str """The name of a field in a `Struct`.""" @@ -459,7 +459,7 @@ class ThreeDimensionalAggregation(core.ModelBase): type: typing.Literal["threeDimensionalAggregation"] = "threeDimensionalAggregation" -TransactionId = str +TransactionId: typing_extensions.TypeAlias = str """The ID identifying a transaction.""" @@ -471,7 +471,7 @@ class TwoDimensionalAggregation(core.ModelBase): type: typing.Literal["twoDimensionalAggregation"] = "twoDimensionalAggregation" -TypeReferenceIdentifier = str +TypeReferenceIdentifier: typing_extensions.TypeAlias = str """ The unique identifier of a type reference. This identifier is used to look up the type definition in the `typeReferences` map of the enclosing Query. @@ -497,11 +497,11 @@ class ValueType(core.ModelBase): constraints: typing.List[ValueTypeConstraint] -ValueTypeApiName = str +ValueTypeApiName: typing_extensions.TypeAlias = str """The registered API name for the value type.""" -ValueTypeConstraint = typing_extensions.Annotated[ +ValueTypeConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StructConstraint", "StructV1Constraint", @@ -520,7 +520,7 @@ class ValueType(core.ModelBase): """ValueTypeConstraint""" -ValueTypeDataType = typing_extensions.Annotated[ +ValueTypeDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ValueTypeDataTypeDateType", "ValueTypeDataTypeStructType", @@ -641,7 +641,7 @@ class ValueTypeDataTypeStructElement(core.ModelBase): field_type: ValueTypeDataType = pydantic.Field(alias=str("fieldType")) # type: ignore[literal-required] -ValueTypeDataTypeStructFieldIdentifier = str +ValueTypeDataTypeStructFieldIdentifier: typing_extensions.TypeAlias = str """ValueTypeDataTypeStructFieldIdentifier""" @@ -673,7 +673,7 @@ class ValueTypeDataTypeValueTypeReference(core.ModelBase): type: typing.Literal["valueTypeReference"] = "valueTypeReference" -ValueTypeDescription = str +ValueTypeDescription: typing_extensions.TypeAlias = str """A description of the value type.""" @@ -685,15 +685,15 @@ class ValueTypeReference(core.ModelBase): type: typing.Literal["valueTypeReference"] = "valueTypeReference" -ValueTypeRid = core.RID +ValueTypeRid: typing_extensions.TypeAlias = core.RID """The RID of a value type that has been registered in the Ontology.""" -ValueTypeVersion = str +ValueTypeVersion: typing_extensions.TypeAlias = str """The version of a value type that has been registered in the Ontology.""" -ValueTypeVersionId = core.UUID +ValueTypeVersionId: typing_extensions.TypeAlias = core.UUID """The version ID of a value type that has been registered in the Ontology.""" @@ -710,14 +710,7 @@ class VersionId(core.ModelBase): constraints: typing.List[ValueTypeConstraint] -core.resolve_forward_references(ExecuteQueryAsyncResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(GetExecutionResultResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeDataType, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "ArrayConstraint", diff --git a/foundry_sdk/v2/geo/models.py b/foundry_sdk/v2/geo/models.py index 0dc7bfb5..4cea55bd 100644 --- a/foundry_sdk/v2/geo/models.py +++ b/foundry_sdk/v2/geo/models.py @@ -23,7 +23,7 @@ from foundry_sdk import _core as core -BBox = typing.List["Coordinate"] +BBox: typing_extensions.TypeAlias = typing.List["Coordinate"] """ A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or @@ -35,7 +35,7 @@ """ -Coordinate = float +Coordinate: typing_extensions.TypeAlias = float """Coordinate""" @@ -70,7 +70,7 @@ class FeatureCollection(core.ModelBase): type: typing.Literal["FeatureCollection"] = "FeatureCollection" -FeaturePropertyKey = str +FeaturePropertyKey: typing_extensions.TypeAlias = str """FeaturePropertyKey""" @@ -82,7 +82,7 @@ class GeoPoint(core.ModelBase): type: typing.Literal["Point"] = "Point" -Geometry = typing_extensions.Annotated[ +Geometry: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "MultiPoint", "GeometryCollection", @@ -120,13 +120,15 @@ class LineString(core.ModelBase): type: typing.Literal["LineString"] = "LineString" -LineStringCoordinates = typing_extensions.Annotated[ +LineStringCoordinates: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.List["Position"], annotated_types.Len(min_length=2) ] """GeoJSon fundamental geometry construct, array of two or more positions.""" -LinearRing = typing_extensions.Annotated[typing.List["Position"], annotated_types.Len(min_length=4)] +LinearRing: typing_extensions.TypeAlias = typing_extensions.Annotated[ + typing.List["Position"], annotated_types.Len(min_length=4) +] """ A linear ring is a closed LineString with four or more positions. @@ -174,7 +176,7 @@ class Polygon(core.ModelBase): type: typing.Literal["Polygon"] = "Polygon" -Position = typing_extensions.Annotated[ +Position: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.List["Coordinate"], annotated_types.Len(min_length=2, max_length=3) ] """ @@ -195,15 +197,11 @@ class Polygon(core.ModelBase): """ -FeatureCollectionTypes = Feature +FeatureCollectionTypes: typing_extensions.TypeAlias = Feature """FeatureCollectionTypes""" -core.resolve_forward_references(BBox, globalns=globals(), localns=locals()) -core.resolve_forward_references(Geometry, globalns=globals(), localns=locals()) -core.resolve_forward_references(LineStringCoordinates, globalns=globals(), localns=locals()) -core.resolve_forward_references(LinearRing, globalns=globals(), localns=locals()) -core.resolve_forward_references(Position, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "BBox", diff --git a/foundry_sdk/v2/language_models/models.py b/foundry_sdk/v2/language_models/models.py index 00c5d2c1..da74b35f 100644 --- a/foundry_sdk/v2/language_models/models.py +++ b/foundry_sdk/v2/language_models/models.py @@ -55,7 +55,7 @@ class AnthropicCharacterLocationCitation(core.ModelBase): type: typing.Literal["charLocation"] = "charLocation" -AnthropicCompletionContent = typing_extensions.Annotated[ +AnthropicCompletionContent: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AnthropicCompletionToolUse", "AnthropicCompletionText", @@ -108,7 +108,7 @@ class AnthropicCustomTool(core.ModelBase): type: typing.Literal["custom"] = "custom" -AnthropicDisableParallelToolUse = bool +AnthropicDisableParallelToolUse: typing_extensions.TypeAlias = bool """ Whether to disable parallel tool use. Defaults to false. If set to true, the model will output exactly one tool use. @@ -138,14 +138,14 @@ class AnthropicDocumentCitations(core.ModelBase): enabled: bool -AnthropicDocumentSource = typing_extensions.Annotated[ +AnthropicDocumentSource: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AnthropicBase64PdfDocumentSource", "AnthropicTextDocumentSource"], pydantic.Field(discriminator="type"), ] """AnthropicDocumentSource""" -AnthropicEffort = typing.Literal["LOW", "MEDIUM", "HIGH", "MAX"] +AnthropicEffort: typing_extensions.TypeAlias = typing.Literal["LOW", "MEDIUM", "HIGH", "MAX"] """ https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#effort @@ -195,7 +195,9 @@ class AnthropicJsonSchemaOutputFormat(core.ModelBase): type: typing.Literal["jsonSchema"] = "jsonSchema" -AnthropicMediaType = typing.Literal["IMAGE_JPEG", "IMAGE_PNG", "IMAGE_GIF", "IMAGE_WEBP"] +AnthropicMediaType: typing_extensions.TypeAlias = typing.Literal[ + "IMAGE_JPEG", "IMAGE_PNG", "IMAGE_GIF", "IMAGE_WEBP" +] """AnthropicMediaType""" @@ -206,7 +208,7 @@ class AnthropicMessage(core.ModelBase): role: AnthropicMessageRole -AnthropicMessageContent = typing_extensions.Annotated[ +AnthropicMessageContent: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AnthropicImage", "AnthropicToolUse", @@ -221,7 +223,7 @@ class AnthropicMessage(core.ModelBase): """AnthropicMessageContent""" -AnthropicMessageRole = typing.Literal["USER", "ASSISTANT"] +AnthropicMessageRole: typing_extensions.TypeAlias = typing.Literal["USER", "ASSISTANT"] """AnthropicMessageRole""" @@ -327,7 +329,7 @@ class AnthropicThinking(core.ModelBase): type: typing.Literal["thinking"] = "thinking" -AnthropicThinkingConfig = typing_extensions.Annotated[ +AnthropicThinkingConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AnthropicDisabledThinking", "AnthropicEnabledThinking"], pydantic.Field(discriminator="type"), ] @@ -343,7 +345,7 @@ class AnthropicTokenUsage(core.ModelBase): output_tokens: int = pydantic.Field(alias=str("outputTokens")) # type: ignore[literal-required] -AnthropicToolChoice = typing_extensions.Annotated[ +AnthropicToolChoice: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AnthropicAutoToolChoice", "AnthropicNoneToolChoice", @@ -383,15 +385,15 @@ class AnthropicToolUse(core.ModelBase): type: typing.Literal["toolUse"] = "toolUse" -JsonSchema = typing.Dict[str, typing.Any] +JsonSchema: typing_extensions.TypeAlias = typing.Dict[str, typing.Any] """JsonSchema""" -LanguageModelApiName = str +LanguageModelApiName: typing_extensions.TypeAlias = str """The name of the LanguageModel in the API.""" -OpenAiEmbeddingInput = typing.List[str] +OpenAiEmbeddingInput: typing_extensions.TypeAlias = typing.List[str] """OpenAiEmbeddingInput""" @@ -434,45 +436,39 @@ class OpenAiEmbeddingsResponse(core.ModelBase): """Usage statistics for the request""" -OpenAiEncodingFormat = typing.Literal["FLOAT", "BASE64"] +OpenAiEncodingFormat: typing_extensions.TypeAlias = typing.Literal["FLOAT", "BASE64"] """OpenAiEncodingFormat""" -AnthropicCacheControl = AnthropicEphemeralCacheControl +AnthropicCacheControl: typing_extensions.TypeAlias = AnthropicEphemeralCacheControl """AnthropicCacheControl""" -AnthropicCompletionCitation = AnthropicCharacterLocationCitation +AnthropicCompletionCitation: typing_extensions.TypeAlias = AnthropicCharacterLocationCitation """AnthropicCompletionCitation""" -AnthropicImageSource = AnthropicImageBase64Source +AnthropicImageSource: typing_extensions.TypeAlias = AnthropicImageBase64Source """AnthropicImageSource""" -AnthropicOutputFormat = AnthropicJsonSchemaOutputFormat +AnthropicOutputFormat: typing_extensions.TypeAlias = AnthropicJsonSchemaOutputFormat """AnthropicOutputFormat""" -AnthropicSystemMessage = AnthropicText +AnthropicSystemMessage: typing_extensions.TypeAlias = AnthropicText """AnthropicSystemMessage""" -AnthropicTool = AnthropicCustomTool +AnthropicTool: typing_extensions.TypeAlias = AnthropicCustomTool """AnthropicTool""" -AnthropicToolResultContent = AnthropicText +AnthropicToolResultContent: typing_extensions.TypeAlias = AnthropicText """AnthropicToolResultContent""" -core.resolve_forward_references(AnthropicCompletionContent, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicDocumentSource, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicMessageContent, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicThinkingConfig, globalns=globals(), localns=locals()) -core.resolve_forward_references(AnthropicToolChoice, globalns=globals(), localns=locals()) -core.resolve_forward_references(JsonSchema, globalns=globals(), localns=locals()) -core.resolve_forward_references(OpenAiEmbeddingInput, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AnthropicAnyToolChoice", diff --git a/foundry_sdk/v2/media_sets/models.py b/foundry_sdk/v2/media_sets/models.py index cc1bc9ec..06c51425 100644 --- a/foundry_sdk/v2/media_sets/models.py +++ b/foundry_sdk/v2/media_sets/models.py @@ -91,11 +91,13 @@ class AudioChunkOperation(core.ModelBase): type: typing.Literal["chunk"] = "chunk" -AudioDecodeFormat = typing.Literal["FLAC", "MP2", "MP3", "MP4", "NIST_SPHERE", "OGG", "WAV", "WEBM"] +AudioDecodeFormat: typing_extensions.TypeAlias = typing.Literal[ + "FLAC", "MP2", "MP3", "MP4", "NIST_SPHERE", "OGG", "WAV", "WEBM" +] """The format of an audio media item.""" -AudioEncodeFormat = typing_extensions.Annotated[ +AudioEncodeFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["Mp3Format", "WavEncodeFormat", "TsAudioContainerFormat"], pydantic.Field(discriminator="type"), ] @@ -113,7 +115,7 @@ class AudioMediaItemMetadata(core.ModelBase): type: typing.Literal["audio"] = "audio" -AudioOperation = typing_extensions.Annotated[ +AudioOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AudioChannelOperation", "AudioChunkOperation", "ConvertAudioOperation"], pydantic.Field(discriminator="type"), ] @@ -133,7 +135,7 @@ class AudioSpecification(core.ModelBase): """Number of audio channels in the audio stream.""" -AudioToTextOperation = typing_extensions.Annotated[ +AudioToTextOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["TranscribeOperation", "WaveformOperation"], pydantic.Field(discriminator="type") ] """The operation to perform for audio to text conversion.""" @@ -153,7 +155,7 @@ class AudioTransformation(core.ModelBase): type: typing.Literal["audio"] = "audio" -AvailableEmbeddingModelIds = typing.Literal["GOOGLE_SIGLIP_2"] +AvailableEmbeddingModelIds: typing_extensions.TypeAlias = typing.Literal["GOOGLE_SIGLIP_2"] """Available embedding models that can be used with the service.""" @@ -198,14 +200,14 @@ class BoundingBoxGeometry(core.ModelBase): type: typing.Literal["boundingBox"] = "boundingBox" -BranchName = str +BranchName: typing_extensions.TypeAlias = str """ A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and (c) not a valid ResourceIdentifier. """ -BranchRid = core.RID +BranchRid: typing_extensions.TypeAlias = core.RID """A resource identifier that identifies a branch of a media set.""" @@ -246,7 +248,7 @@ class Color(core.ModelBase): """Alpha component (0-1, where 0 is transparent and 1 is opaque).""" -ColorInterpretation = typing.Literal[ +ColorInterpretation: typing_extensions.TypeAlias = typing.Literal[ "UNDEFINED", "GRAY", "PALETTE_INDEX", @@ -328,7 +330,7 @@ class ContrastRayleigh(core.ModelBase): type: typing.Literal["rayleigh"] = "rayleigh" -ContrastType = typing_extensions.Annotated[ +ContrastType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ContrastEqualize", "ContrastRayleigh", "ContrastBinarize"], pydantic.Field(discriminator="type"), ] @@ -395,7 +397,7 @@ class CropImageOperation(core.ModelBase): type: typing.Literal["crop"] = "crop" -DataType = typing.Literal[ +DataType: typing_extensions.TypeAlias = typing.Literal[ "UNDEFINED", "BYTE", "UINT16", @@ -427,7 +429,7 @@ class DecryptImageOperation(core.ModelBase): type: typing.Literal["decrypt"] = "decrypt" -DicomDataElementKey = str +DicomDataElementKey: typing_extensions.TypeAlias = str """The key of a DICOM data element.""" @@ -449,7 +451,9 @@ class DicomMediaItemMetadata(core.ModelBase): type: typing.Literal["dicom"] = "dicom" -DicomMediaType = typing.Literal["IMAGE", "MULTI_FRAME_IMAGE", "VIDEO", "STRUCTURED_REPORT"] +DicomMediaType: typing_extensions.TypeAlias = typing.Literal[ + "IMAGE", "MULTI_FRAME_IMAGE", "VIDEO", "STRUCTURED_REPORT" +] """The type of DICOM media.""" @@ -492,7 +496,9 @@ class Dimensions(core.ModelBase): """The height of the image in pixels.""" -DocumentDecodeFormat = typing.Literal["PDF", "DOC", "DOCX", "TXT", "PPTX", "RTF"] +DocumentDecodeFormat: typing_extensions.TypeAlias = typing.Literal[ + "PDF", "DOC", "DOCX", "TXT", "PPTX", "RTF" +] """The format of a document media item.""" @@ -522,7 +528,7 @@ class DocumentMediaItemMetadata(core.ModelBase): type: typing.Literal["document"] = "document" -DocumentToDocumentOperation = typing_extensions.Annotated[ +DocumentToDocumentOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SlicePdfRangeOperation", "ConvertDocumentOperation"], pydantic.Field(discriminator="type"), ] @@ -537,7 +543,7 @@ class DocumentToDocumentTransformation(core.ModelBase): type: typing.Literal["documentToDocument"] = "documentToDocument" -DocumentToImageOperation = typing_extensions.Annotated[ +DocumentToImageOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["RenderPageToFitBoundingBoxOperation", "RenderPageOperation"], pydantic.Field(discriminator="type"), ] @@ -552,7 +558,7 @@ class DocumentToImageTransformation(core.ModelBase): type: typing.Literal["documentToImage"] = "documentToImage" -DocumentToTextOperation = typing_extensions.Annotated[ +DocumentToTextOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ExtractTableOfContentsOperation", "GetPdfPageDimensionsOperation", @@ -592,7 +598,7 @@ class EmailAttachment(core.ModelBase): """The verified MIME type of the attachment.""" -EmailDecodeFormat = typing.Literal["EML"] +EmailDecodeFormat: typing_extensions.TypeAlias = typing.Literal["EML"] """The format of an email media item.""" @@ -634,7 +640,7 @@ class EmailToAttachmentTransformation(core.ModelBase): type: typing.Literal["emailToAttachment"] = "emailToAttachment" -EmailToTextEncodeFormat = typing.Literal["TEXT", "HTML"] +EmailToTextEncodeFormat: typing_extensions.TypeAlias = typing.Literal["TEXT", "HTML"] """The output format for email body extraction.""" @@ -808,7 +814,7 @@ class ExtractVlmTextOperation(core.ModelBase): type: typing.Literal["extractVlmText"] = "extractVlmText" -FlipAxis = typing.Literal["HORIZONTAL", "VERTICAL", "UNKNOWN"] +FlipAxis: typing_extensions.TypeAlias = typing.Literal["HORIZONTAL", "VERTICAL", "UNKNOWN"] """The flip axis from EXIF orientation.""" @@ -953,11 +959,11 @@ class GroupWrapper(core.ModelBase): type: typing.Literal["group"] = "group" -ImageAttributeDomain = str +ImageAttributeDomain: typing_extensions.TypeAlias = str """The domain of an image attribute.""" -ImageAttributeKey = str +ImageAttributeKey: typing_extensions.TypeAlias = str """The key of an image attribute within a domain.""" @@ -975,7 +981,7 @@ class ImageOcrOperation(core.ModelBase): type: typing.Literal["ocr"] = "ocr" -ImageOperation = typing_extensions.Annotated[ +ImageOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "RotateImageOperation", "ResizeToFitBoundingBoxOperation", @@ -1003,7 +1009,7 @@ class ImagePixelCoordinate(core.ModelBase): """Coordinate on the y-axis (height).""" -ImageRegionPolygon = typing.List["ImagePixelCoordinate"] +ImageRegionPolygon: typing_extensions.TypeAlias = typing.List["ImagePixelCoordinate"] """ Polygon drawn by connecting adjacent coordinates in the list with straight lines. A line is drawn between the last and first coordinates in the list to create a closed shape. @@ -1041,7 +1047,7 @@ class ImageToEmbeddingTransformation(core.ModelBase): type: typing.Literal["imageToEmbedding"] = "imageToEmbedding" -ImageToTextOperation = typing_extensions.Annotated[ +ImageToTextOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ImageExtractLayoutAwareContentOperation", "ImageOcrOperation"], pydantic.Field(discriminator="type"), ] @@ -1068,11 +1074,13 @@ class ImageTransformation(core.ModelBase): type: typing.Literal["image"] = "image" -ImageryDecodeFormat = typing.Literal["BMP", "TIFF", "NITF", "JP2K", "JPG", "PNG", "WEBP"] +ImageryDecodeFormat: typing_extensions.TypeAlias = typing.Literal[ + "BMP", "TIFF", "NITF", "JP2K", "JPG", "PNG", "WEBP" +] """The format of an imagery media item.""" -ImageryEncodeFormat = typing_extensions.Annotated[ +ImageryEncodeFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["JpgFormat", "TiffFormat", "PngFormat", "WebpFormat"], pydantic.Field(discriminator="type"), ] @@ -1137,7 +1145,7 @@ class LayoutAwarePreprocessingWrapper(core.ModelBase): type: typing.Literal["layoutAware"] = "layoutAware" -LogicalTimestamp = core.Long +LogicalTimestamp: typing_extensions.TypeAlias = core.Long """ A number representing a logical ordering to be used for transactions, etc. This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due @@ -1157,7 +1165,7 @@ class Mailbox(core.ModelBase): """The email address of the mailbox.""" -MailboxOrGroup = typing_extensions.Annotated[ +MailboxOrGroup: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["MailboxWrapper", "GroupWrapper"], pydantic.Field(discriminator="type") ] """Either a mailbox or a group of mailboxes.""" @@ -1178,7 +1186,7 @@ class MediaAttribution(core.ModelBase): """The timestamp when the media item was created, in ISO 8601 timestamp format.""" -MediaItemMetadata = typing_extensions.Annotated[ +MediaItemMetadata: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DocumentMediaItemMetadata", "ImageryMediaItemMetadata", @@ -1198,11 +1206,11 @@ class MediaAttribution(core.ModelBase): """ -MediaItemXmlFormat = typing.Literal["DOCX", "XLSX", "PPTX"] +MediaItemXmlFormat: typing_extensions.TypeAlias = typing.Literal["DOCX", "XLSX", "PPTX"] """Format of the media item attempted to be decoded based on the XML structure.""" -MediaSchema = typing.Literal[ +MediaSchema: typing_extensions.TypeAlias = typing.Literal[ "AUDIO", "DICOM", "DOCUMENT", @@ -1223,7 +1231,7 @@ class MkvVideoContainerFormat(core.ModelBase): type: typing.Literal["mkv"] = "mkv" -Modality = typing.Literal[ +Modality: typing_extensions.TypeAlias = typing.Literal[ "AR", "ASMT", "AU", @@ -1319,7 +1327,7 @@ class MkvVideoContainerFormat(core.ModelBase): """ -Model3dDecodeFormat = typing.Literal["LAS", "PLY", "OBJ"] +Model3dDecodeFormat: typing_extensions.TypeAlias = typing.Literal["LAS", "PLY", "OBJ"] """The format of a 3D model media item.""" @@ -1334,7 +1342,7 @@ class Model3dMediaItemMetadata(core.ModelBase): type: typing.Literal["model3d"] = "model3d" -Model3dType = typing.Literal["POINT_CLOUD", "MESH"] +Model3dType: typing_extensions.TypeAlias = typing.Literal["POINT_CLOUD", "MESH"] """The type of 3D model representation.""" @@ -1380,7 +1388,7 @@ class OcrHocrOutputFormat(core.ModelBase): type: typing.Literal["hocr"] = "hocr" -OcrLanguage = typing.Literal[ +OcrLanguage: typing_extensions.TypeAlias = typing.Literal[ "AFR", "AMH", "ARA", @@ -1508,7 +1516,7 @@ class OcrHocrOutputFormat(core.ModelBase): """Language codes for OCR.""" -OcrLanguageOrScript = typing_extensions.Annotated[ +OcrLanguageOrScript: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["OcrLanguageWrapper", "OcrScriptWrapper"], pydantic.Field(discriminator="type") ] """Either a specific language or a script for OCR.""" @@ -1521,7 +1529,7 @@ class OcrLanguageWrapper(core.ModelBase): type: typing.Literal["language"] = "language" -OcrMode = typing.Literal["AUTO", "ELECTRONIC", "SCAN"] +OcrMode: typing_extensions.TypeAlias = typing.Literal["AUTO", "ELECTRONIC", "SCAN"] """OCR mode for document extraction.""" @@ -1545,7 +1553,7 @@ class OcrOnPagesOperation(core.ModelBase): type: typing.Literal["ocrOnPages"] = "ocrOnPages" -OcrOutputFormat = typing_extensions.Annotated[ +OcrOutputFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["OcrHocrOutputFormat", "OcrTextOutputFormat"], pydantic.Field(discriminator="type") ] """The output format for OCR results.""" @@ -1559,7 +1567,7 @@ class OcrParameters(core.ModelBase): """The languages or scripts to use for OCR.""" -OcrScript = typing.Literal[ +OcrScript: typing_extensions.TypeAlias = typing.Literal[ "ARABIC", "ARMENIAN", "BENGALI", @@ -1631,7 +1639,9 @@ class PageRange(core.ModelBase): """End page index (0-based, exclusive). If not provided, defaults to end of document.""" -PaletteInterpretation = typing.Literal["GRAY", "RGB", "RGBA", "CMYK", "HLS"] +PaletteInterpretation: typing_extensions.TypeAlias = typing.Literal[ + "GRAY", "RGB", "RGBA", "CMYK", "HLS" +] """The palette interpretation of a band.""" @@ -1641,7 +1651,7 @@ class PdfFormat(core.ModelBase): type: typing.Literal["pdf"] = "pdf" -PerformanceMode = typing.Literal["MORE_ECONOMICAL", "MORE_PERFORMANT"] +PerformanceMode: typing_extensions.TypeAlias = typing.Literal["MORE_ECONOMICAL", "MORE_PERFORMANT"] """The performance mode for transcription.""" @@ -1770,7 +1780,7 @@ class ResizeToFitBoundingBoxOperation(core.ModelBase): type: typing.Literal["resizeToFitBoundingBox"] = "resizeToFitBoundingBox" -ResizingMode = typing.Literal["RESIZING", "FIT_INTO_BOUNDING_BOX"] +ResizingMode: typing_extensions.TypeAlias = typing.Literal["RESIZING", "FIT_INTO_BOUNDING_BOX"] """Image resizing strategy.""" @@ -1781,11 +1791,15 @@ class RotateImageOperation(core.ModelBase): type: typing.Literal["rotate"] = "rotate" -RotationAngle = typing.Literal["DEGREE_90", "DEGREE_180", "DEGREE_270", "UNKNOWN"] +RotationAngle: typing_extensions.TypeAlias = typing.Literal[ + "DEGREE_90", "DEGREE_180", "DEGREE_270", "UNKNOWN" +] """The rotation angle from EXIF orientation.""" -SceneScore = typing.Literal["MORE_SENSITIVE", "STANDARD", "LESS_SENSITIVE"] +SceneScore: typing_extensions.TypeAlias = typing.Literal[ + "MORE_SENSITIVE", "STANDARD", "LESS_SENSITIVE" +] """The sensitivity threshold for scene detection.""" @@ -1807,7 +1821,7 @@ class SlicePdfRangeOperation(core.ModelBase): type: typing.Literal["slicePdfRange"] = "slicePdfRange" -SpreadsheetDecodeFormat = typing.Literal["XLSX"] +SpreadsheetDecodeFormat: typing_extensions.TypeAlias = typing.Literal["XLSX"] """The format of a spreadsheet media item.""" @@ -1843,7 +1857,7 @@ class TarFormat(core.ModelBase): type: typing.Literal["tar"] = "tar" -TextOutputFormat = typing.Literal["TEXT", "MARKDOWN", "HTML"] +TextOutputFormat: typing_extensions.TypeAlias = typing.Literal["TEXT", "MARKDOWN", "HTML"] """Format in which to return extracted text.""" @@ -1883,7 +1897,7 @@ class TrackedTransformationPendingResponse(core.ModelBase): type: typing.Literal["pending"] = "pending" -TrackedTransformationResponse = typing_extensions.Annotated[ +TrackedTransformationResponse: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "TrackedTransformationPendingResponse", "TrackedTransformationFailedResponse", @@ -1900,11 +1914,11 @@ class TrackedTransformationSuccessfulResponse(core.ModelBase): type: typing.Literal["successful"] = "successful" -TransactionId = core.UUID +TransactionId: typing_extensions.TypeAlias = core.UUID """An identifier which represents a transaction on a media set.""" -TransactionPolicy = typing_extensions.Annotated[ +TransactionPolicy: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["BatchTransactionsTransactionPolicy", "NoTransactionsTransactionPolicy"], pydantic.Field(discriminator="type"), ] @@ -1938,14 +1952,14 @@ class TranscribeOperation(core.ModelBase): type: typing.Literal["transcribe"] = "transcribe" -TranscribeTextEncodeFormat = typing_extensions.Annotated[ +TranscribeTextEncodeFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PlainTextNoSegmentData", "TranscribeJson", "Pttml"], pydantic.Field(discriminator="type"), ] """The output format for transcription results.""" -TranscriptionLanguage = typing.Literal[ +TranscriptionLanguage: typing_extensions.TypeAlias = typing.Literal[ "AF", "AM", "AR", @@ -2178,7 +2192,7 @@ class TransformMediaItemResponse(core.ModelBase): job_id: TransformationJobId = pydantic.Field(alias=str("jobId")) # type: ignore[literal-required] -Transformation = typing_extensions.Annotated[ +Transformation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "EmailToTextTransformation", "ImageTransformation", @@ -2207,11 +2221,13 @@ class TransformMediaItemResponse(core.ModelBase): """ -TransformationJobId = str +TransformationJobId: typing_extensions.TypeAlias = str """An identifier for a media item transformation job.""" -TransformationJobStatus = typing.Literal["PENDING", "FAILED", "SUCCESSFUL"] +TransformationJobStatus: typing_extensions.TypeAlias = typing.Literal[ + "PENDING", "FAILED", "SUCCESSFUL" +] """The status of a transformation job.""" @@ -2259,11 +2275,11 @@ class VideoChunkOperation(core.ModelBase): type: typing.Literal["chunk"] = "chunk" -VideoDecodeFormat = typing.Literal["MP4", "MKV", "MOV", "TS"] +VideoDecodeFormat: typing_extensions.TypeAlias = typing.Literal["MP4", "MKV", "MOV", "TS"] """The format of a video media item.""" -VideoEncodeFormat = typing_extensions.Annotated[ +VideoEncodeFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "Mp4VideoContainerFormat", "MovVideoContainerFormat", @@ -2286,7 +2302,7 @@ class VideoMediaItemMetadata(core.ModelBase): type: typing.Literal["video"] = "video" -VideoOperation = typing_extensions.Annotated[ +VideoOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["TranscodeOperation", "VideoChunkOperation"], pydantic.Field(discriminator="type") ] """The operation to perform on the video.""" @@ -2318,7 +2334,7 @@ class VideoToAudioTransformation(core.ModelBase): type: typing.Literal["videoToAudio"] = "videoToAudio" -VideoToImageOperation = typing_extensions.Annotated[ +VideoToImageOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ExtractFirstFrameOperation", "ExtractFramesAtTimestampsOperation"], pydantic.Field(discriminator="type"), ] @@ -2348,7 +2364,7 @@ class VideoTransformation(core.ModelBase): type: typing.Literal["video"] = "video" -VlmPreprocessingConfig = typing_extensions.Annotated[ +VlmPreprocessingConfig: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["LayoutAwarePreprocessingWrapper", "ExtractTextPreprocessingWrapper"], pydantic.Field(discriminator="type"), ] @@ -2383,93 +2399,71 @@ class WebpFormat(core.ModelBase): type: typing.Literal["webp"] = "webp" -AnnotateGeometry = BoundingBoxGeometry +AnnotateGeometry: typing_extensions.TypeAlias = BoundingBoxGeometry """The geometry for an annotation.""" -ArchiveEncodeFormat = TarFormat +ArchiveEncodeFormat: typing_extensions.TypeAlias = TarFormat """The output format for encoding archives.""" -AudioChannelLayout = NumberOfChannels +AudioChannelLayout: typing_extensions.TypeAlias = NumberOfChannels """The audio channel layout configuration.""" -DicomMetaInformation = DicomMetaInformationV1 +DicomMetaInformation: typing_extensions.TypeAlias = DicomMetaInformationV1 """DICOM meta information.""" -DicomToImageOperation = RenderImageLayerOperation +DicomToImageOperation: typing_extensions.TypeAlias = RenderImageLayerOperation """The operation to perform for DICOM to image conversion.""" -DocumentEncodeFormat = PdfFormat +DocumentEncodeFormat: typing_extensions.TypeAlias = PdfFormat """The output format for encoding documents.""" -EmailToAttachmentOperation = GetEmailAttachmentOperation +EmailToAttachmentOperation: typing_extensions.TypeAlias = GetEmailAttachmentOperation """The operation to perform for email to attachment extraction.""" -EmailToTextOperation = GetEmailBodyOperation +EmailToTextOperation: typing_extensions.TypeAlias = GetEmailBodyOperation """The operation to perform for email to text extraction.""" -ImageToDocumentOperation = CreatePdfOperation +ImageToDocumentOperation: typing_extensions.TypeAlias = CreatePdfOperation """The operation to perform for image to document conversion.""" -ImageToEmbeddingOperation = GenerateEmbeddingOperation +ImageToEmbeddingOperation: typing_extensions.TypeAlias = GenerateEmbeddingOperation """The operation to perform for image to embedding conversion.""" -LanguageModelLocator = ApiNameLocatorWrapper +LanguageModelLocator: typing_extensions.TypeAlias = ApiNameLocatorWrapper """Locator for identifying a language model.""" -LlmSpec = ChatLlmSpecWrapper +LlmSpec: typing_extensions.TypeAlias = ChatLlmSpecWrapper """Specification for language model requests.""" -SpreadsheetToTextOperation = ConvertSheetToJsonOperation +SpreadsheetToTextOperation: typing_extensions.TypeAlias = ConvertSheetToJsonOperation """The operation to perform for spreadsheet to text conversion.""" -VideoToArchiveOperation = ExtractSceneFramesOperation +VideoToArchiveOperation: typing_extensions.TypeAlias = ExtractSceneFramesOperation """The operation to perform for video to archive conversion.""" -VideoToAudioOperation = ExtractAudioOperation +VideoToAudioOperation: typing_extensions.TypeAlias = ExtractAudioOperation """The operation to perform for video to audio conversion.""" -VideoToTextOperation = GetTimestampsForSceneFramesOperation +VideoToTextOperation: typing_extensions.TypeAlias = GetTimestampsForSceneFramesOperation """The operation to perform for video to text conversion.""" -core.resolve_forward_references(AudioEncodeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(AudioOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(AudioToTextOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(ContrastType, globalns=globals(), localns=locals()) -core.resolve_forward_references(DocumentToDocumentOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(DocumentToImageOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(DocumentToTextOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(ImageOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(ImageRegionPolygon, globalns=globals(), localns=locals()) -core.resolve_forward_references(ImageToTextOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(ImageryEncodeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(MailboxOrGroup, globalns=globals(), localns=locals()) -core.resolve_forward_references(MediaItemMetadata, globalns=globals(), localns=locals()) -core.resolve_forward_references(OcrLanguageOrScript, globalns=globals(), localns=locals()) -core.resolve_forward_references(OcrOutputFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(TrackedTransformationResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(TransactionPolicy, globalns=globals(), localns=locals()) -core.resolve_forward_references(TranscribeTextEncodeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(Transformation, globalns=globals(), localns=locals()) -core.resolve_forward_references(VideoEncodeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(VideoOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(VideoToImageOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(VlmPreprocessingConfig, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AffineTransform", diff --git a/foundry_sdk/v2/models/models.py b/foundry_sdk/v2/models/models.py index 368f58f5..b1fdac57 100644 --- a/foundry_sdk/v2/models/models.py +++ b/foundry_sdk/v2/models/models.py @@ -46,11 +46,11 @@ class ChangelogTooLongError(core.ModelBase): type: typing.Literal["changelogTooLong"] = "changelogTooLong" -ColumnTypeSpecId = str +ColumnTypeSpecId: typing_extensions.TypeAlias = str """An identifier for a column type specification.""" -CreateConfigValidationFailureReason = typing_extensions.Annotated[ +CreateConfigValidationFailureReason: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "JsonSchemaValidationError", "OutputResourceInDifferentProjectError", @@ -228,7 +228,7 @@ class DoubleSeriesValueV1(core.ModelBase): step: core.Long -EpochMillis = core.Long +EpochMillis: typing_extensions.TypeAlias = core.Long """ Milliseconds since unix time zero. This representation is used to maintain consistency with the Parquet format. @@ -264,7 +264,7 @@ class ExperimentArtifactMetadata(core.ModelBase): details: ExperimentArtifactDetails -ExperimentArtifactName = str +ExperimentArtifactName: typing_extensions.TypeAlias = str """The name of an experiment artifact.""" @@ -275,7 +275,7 @@ class ExperimentAuthoringSource(core.ModelBase): type: typing.Literal["authoring"] = "authoring" -ExperimentBranch = str +ExperimentBranch: typing_extensions.TypeAlias = str """ExperimentBranch""" @@ -287,7 +287,7 @@ class ExperimentCodeWorkspaceSource(core.ModelBase): type: typing.Literal["codeWorkspace"] = "codeWorkspace" -ExperimentRid = core.RID +ExperimentRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of an Experiment.""" @@ -297,7 +297,7 @@ class ExperimentSdkSource(core.ModelBase): type: typing.Literal["sdk"] = "sdk" -ExperimentSource = typing_extensions.Annotated[ +ExperimentSource: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ExperimentCodeWorkspaceSource", "ExperimentAuthoringSource", "ExperimentSdkSource" ], @@ -306,11 +306,11 @@ class ExperimentSdkSource(core.ModelBase): """The source from which the experiment was created.""" -ExperimentStatus = typing.Literal["RUNNING", "SUCCEEDED", "FAILED"] +ExperimentStatus: typing_extensions.TypeAlias = typing.Literal["RUNNING", "SUCCEEDED", "FAILED"] """The current status of an experiment.""" -ExperimentTagText = str +ExperimentTagText: typing_extensions.TypeAlias = str """A tag associated with an experiment.""" @@ -329,7 +329,9 @@ class FieldValidationError(core.ModelBase): type: typing.Literal["fieldValidationFailure"] = "fieldValidationFailure" -GpuType = typing.Literal["A100", "A10G", "A16", "H100", "H200", "L4", "L40S", "T4", "V100"] +GpuType: typing_extensions.TypeAlias = typing.Literal[ + "A100", "A10G", "A16", "H100", "H200", "L4", "L40S", "T4", "V100" +] """The specific type of GPU hardware to use.""" @@ -345,7 +347,7 @@ class InconsistentArrayDimensionsError(core.ModelBase): type: typing.Literal["inconsistentArrayDimensions"] = "inconsistentArrayDimensions" -InferenceInputErrorType = typing_extensions.Annotated[ +InferenceInputErrorType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "InvalidArrayShapeError", "TypeMismatchError", @@ -364,7 +366,7 @@ class InconsistentArrayDimensionsError(core.ModelBase): """ -InputAlias = str +InputAlias: typing_extensions.TypeAlias = str """A string alias used to identify inputs in a Model Studio configuration.""" @@ -485,7 +487,7 @@ class LiveDeploymentModelVersion(core.ModelBase): model_version_rid: ModelVersionRid = pydantic.Field(alias=str("modelVersionRid")) # type: ignore[literal-required] -LiveDeploymentRid = core.RID +LiveDeploymentRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Live Deployment.""" @@ -527,7 +529,9 @@ class LiveDeploymentScalingConfiguration(core.ModelBase): """The duration that load must be below the scale-down threshold before scaling down.""" -LiveDeploymentState = typing.Literal["ACTIVE", "STARTING", "DEGRADED", "DISABLED", "FAILED"] +LiveDeploymentState: typing_extensions.TypeAlias = typing.Literal[ + "ACTIVE", "STARTING", "DEGRADED", "DISABLED", "FAILED" +] """ The operational state of a live deployment. @@ -648,7 +652,7 @@ class ModelApiColumn(core.ModelBase): data_type: ModelApiDataType = pydantic.Field(alias=str("dataType")) # type: ignore[literal-required] -ModelApiDataType = typing_extensions.Annotated[ +ModelApiDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.BooleanType, @@ -668,7 +672,7 @@ class ModelApiColumn(core.ModelBase): """ModelApiDataType""" -ModelApiInput = typing_extensions.Annotated[ +ModelApiInput: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], pydantic.Field(discriminator="type"), ] @@ -683,7 +687,7 @@ class ModelApiMapType(core.ModelBase): type: typing.Literal["map"] = "map" -ModelApiOutput = typing_extensions.Annotated[ +ModelApiOutput: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[core_models.UnsupportedType, "ModelApiParameterType", "ModelApiTabularType"], pydantic.Field(discriminator="type"), ] @@ -701,7 +705,7 @@ class ModelApiParameterType(core.ModelBase): type: typing.Literal["parameter"] = "parameter" -ModelApiTabularFormat = typing.Literal["PANDAS", "SPARK"] +ModelApiTabularFormat: typing_extensions.TypeAlias = typing.Literal["PANDAS", "SPARK"] """ModelApiTabularFormat""" @@ -730,27 +734,27 @@ class ModelFunction(core.ModelBase): ontology_binding: typing.Optional[ontologies_models.OntologyRid] = pydantic.Field(alias=str("ontologyBinding"), default=None) # type: ignore[literal-required] -ModelFunctionApiName = str +ModelFunctionApiName: typing_extensions.TypeAlias = str """ModelFunctionApiName""" -ModelFunctionDisplayName = str +ModelFunctionDisplayName: typing_extensions.TypeAlias = str """ModelFunctionDisplayName""" -ModelFunctionFunctionRid = core.RID +ModelFunctionFunctionRid: typing_extensions.TypeAlias = core.RID """ModelFunctionFunctionRid""" -ModelFunctionFunctionVersion = str +ModelFunctionFunctionVersion: typing_extensions.TypeAlias = str """ModelFunctionFunctionVersion""" -ModelFunctionIsRowWise = bool +ModelFunctionIsRowWise: typing_extensions.TypeAlias = bool """ModelFunctionIsRowWise""" -ModelName = str +ModelName: typing_extensions.TypeAlias = str """ModelName""" @@ -763,7 +767,7 @@ class ModelOutput(core.ModelBase): type: typing.Literal["model"] = "model" -ModelRid = core.RID +ModelRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Model.""" @@ -805,15 +809,15 @@ class ModelStudioConfigVersion(core.ModelBase): created_time: core_models.CreatedTime = pydantic.Field(alias=str("createdTime")) # type: ignore[literal-required] -ModelStudioConfigVersionName = str +ModelStudioConfigVersionName: typing_extensions.TypeAlias = str """Human readable name of the configuration version and experiment.""" -ModelStudioConfigVersionNumber = int +ModelStudioConfigVersionNumber: typing_extensions.TypeAlias = int """The version number of a Model Studio Configuration.""" -ModelStudioRid = core.RID +ModelStudioRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Model Studio.""" @@ -845,11 +849,11 @@ class ModelStudioRun(core.ModelBase): """Map of alias to resolved output details (e.g., for models, contains the version RID and experiment).""" -ModelStudioRunBuildRid = core.RID +ModelStudioRunBuildRid: typing_extensions.TypeAlias = core.RID """The RID of the build associated with this run.""" -ModelStudioRunJobRid = core.RID +ModelStudioRunJobRid: typing_extensions.TypeAlias = core.RID """The RID of the job associated with this run.""" @@ -897,7 +901,7 @@ class ModelStudioTrainer(core.ModelBase): """Whether this trainer is experimental and may have breaking changes.""" -ModelStudioTrainerExperimental = bool +ModelStudioTrainerExperimental: typing_extensions.TypeAlias = bool """Whether this trainer is experimental and may have breaking changes.""" @@ -970,7 +974,7 @@ class ModelVersionPromotedSource(core.ModelBase): type: typing.Literal["promoted"] = "promoted" -ModelVersionRid = core.RID +ModelVersionRid: typing_extensions.TypeAlias = core.RID """The Resource Identifier (RID) of a Model Version.""" @@ -980,7 +984,7 @@ class ModelVersionSdkSource(core.ModelBase): type: typing.Literal["sdk"] = "sdk" -ModelVersionSource = typing_extensions.Annotated[ +ModelVersionSource: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ModelVersionContainerizedSource", "ModelVersionExternalSource", @@ -1032,7 +1036,7 @@ class OtherValidationError(core.ModelBase): type: typing.Literal["other"] = "other" -OutputAlias = str +OutputAlias: typing_extensions.TypeAlias = str """A string alias used to identify outputs in a Model Studio configuration.""" @@ -1070,11 +1074,11 @@ class Parameter(core.ModelBase): """The parameter value""" -ParameterName = str +ParameterName: typing_extensions.TypeAlias = str """The name of an experiment parameter.""" -ParameterValue = typing_extensions.Annotated[ +ParameterValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DatetimeParameter", "BooleanParameter", @@ -1132,7 +1136,7 @@ class ResourceConfiguration(core.ModelBase): """GPU allocation (must be available in the project's resource queue).""" -RunId = str +RunId: typing_extensions.TypeAlias = str """A unique identifier for a Model Studio run, derived from the studio, config, and build.""" @@ -1151,7 +1155,7 @@ class SearchExperimentsContainsFilter(core.ModelBase): type: typing.Literal["contains"] = "contains" -SearchExperimentsContainsFilterField = typing.Literal[ +SearchExperimentsContainsFilterField: typing_extensions.TypeAlias = typing.Literal[ "EXPERIMENT_NAME", "PARAMETER_NAME", "SERIES_NAME" ] """Fields that support substring containment filtering.""" @@ -1165,7 +1169,7 @@ class SearchExperimentsEqualsFilter(core.ModelBase): type: typing.Literal["eq"] = "eq" -SearchExperimentsEqualsFilterField = typing.Literal[ +SearchExperimentsEqualsFilterField: typing_extensions.TypeAlias = typing.Literal[ "STATUS", "BRANCH", "EXPERIMENT_NAME", @@ -1178,7 +1182,7 @@ class SearchExperimentsEqualsFilter(core.ModelBase): """Fields that support equality filtering.""" -SearchExperimentsFilter = typing_extensions.Annotated[ +SearchExperimentsFilter: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "SearchExperimentsSeriesFilter", "SearchExperimentsContainsFilter", @@ -1215,7 +1219,9 @@ class SearchExperimentsNotFilter(core.ModelBase): type: typing.Literal["not"] = "not" -SearchExperimentsNumericFilterOperator = typing.Literal["EQ", "GT", "LT"] +SearchExperimentsNumericFilterOperator: typing_extensions.TypeAlias = typing.Literal[ + "EQ", "GT", "LT" +] """Comparison operator for numeric filter predicates (series and summary metrics).""" @@ -1233,7 +1239,9 @@ class SearchExperimentsOrderBy(core.ModelBase): direction: core_models.OrderByDirection -SearchExperimentsOrderByField = typing.Literal["EXPERIMENT_NAME", "CREATED_TIME"] +SearchExperimentsOrderByField: typing_extensions.TypeAlias = typing.Literal[ + "EXPERIMENT_NAME", "CREATED_TIME" +] """Fields to order experiment search results by.""" @@ -1259,7 +1267,9 @@ class SearchExperimentsParameterFilter(core.ModelBase): type: typing.Literal["parameterFilter"] = "parameterFilter" -SearchExperimentsParameterFilterOperator = typing.Literal["EQ", "GT", "LT", "CONTAINS"] +SearchExperimentsParameterFilterOperator: typing_extensions.TypeAlias = typing.Literal[ + "EQ", "GT", "LT", "CONTAINS" +] """Comparison operator for parameter filter predicates.""" @@ -1310,7 +1320,7 @@ class SearchExperimentsSeriesFilter(core.ModelBase): type: typing.Literal["seriesFilter"] = "seriesFilter" -SearchExperimentsSeriesFilterField = typing.Literal[ +SearchExperimentsSeriesFilterField: typing_extensions.TypeAlias = typing.Literal[ "LENGTH", "AGGREGATION_MIN", "AGGREGATION_MAX", "AGGREGATION_LAST" ] """The series metric to filter on.""" @@ -1324,7 +1334,7 @@ class SearchExperimentsStartsWithFilter(core.ModelBase): type: typing.Literal["startsWith"] = "startsWith" -SearchExperimentsStartsWithFilterField = typing.Literal[ +SearchExperimentsStartsWithFilterField: typing_extensions.TypeAlias = typing.Literal[ "EXPERIMENT_NAME", "PARAMETER_NAME", "SERIES_NAME" ] """Fields that support prefix filtering.""" @@ -1364,7 +1374,7 @@ class SeriesAggregations(core.ModelBase): """Aggregated values for this series""" -SeriesName = str +SeriesName: typing_extensions.TypeAlias = str """The name of a series (metrics tracked over time).""" @@ -1388,7 +1398,7 @@ class SummaryMetric(core.ModelBase): """The computed value""" -SummaryMetricAggregation = typing.Literal["MIN", "MAX", "LAST"] +SummaryMetricAggregation: typing_extensions.TypeAlias = typing.Literal["MIN", "MAX", "LAST"] """The type of aggregation computed for a summary metric.""" @@ -1399,35 +1409,35 @@ class TableArtifactDetails(core.ModelBase): type: typing.Literal["table"] = "table" -TrainerDescription = str +TrainerDescription: typing_extensions.TypeAlias = str """Description of what a trainer does and its capabilities.""" -TrainerId = str +TrainerId: typing_extensions.TypeAlias = str """The identifier for a trainer.""" -TrainerInputsSpecification = typing.Any +TrainerInputsSpecification: typing_extensions.TypeAlias = typing.Any """Specification of the inputs required by a trainer. When creating a ModelStudioConfigVersion, the workerConfig.inputs must conform to this specification, providing entries for each required input defined here.""" -TrainerName = str +TrainerName: typing_extensions.TypeAlias = str """Human-readable name of a trainer.""" -TrainerOutputsSpecification = typing.Any +TrainerOutputsSpecification: typing_extensions.TypeAlias = typing.Any """Specification of the outputs produced by a trainer. When creating a ModelStudioConfigVersion, the workerConfig.outputs must conform to this specification, providing entries for each required output defined here.""" -TrainerSchemaDefinition = typing.Any +TrainerSchemaDefinition: typing_extensions.TypeAlias = typing.Any """JSON schema defining the custom configuration parameters for a trainer.""" -TrainerType = str +TrainerType: typing_extensions.TypeAlias = str """The type/category of a trainer.""" -TrainerVersion = str +TrainerVersion: typing_extensions.TypeAlias = str """A specific version identifier for a trainer.""" @@ -1496,52 +1506,42 @@ class UnsupportedTypeError(core.ModelBase): type: typing.Literal["unsupportedType"] = "unsupportedType" -CreateLiveDeploymentTarget = DirectCreateLiveDeploymentTarget +CreateLiveDeploymentTarget: typing_extensions.TypeAlias = DirectCreateLiveDeploymentTarget """The target model source for the live deployment. Determines which model and version selection strategy to use when creating the deployment.""" -ExperimentArtifactDetails = TableArtifactDetails +ExperimentArtifactDetails: typing_extensions.TypeAlias = TableArtifactDetails """Details about an experiment artifact.""" -ModelFiles = DillModelFiles +ModelFiles: typing_extensions.TypeAlias = DillModelFiles """ The serialized data of a machine learning model. This can include the model's parameters, architecture, and any other relevant information needed to reconstruct the model. Must be a base64-encoded string of a dill-serialized model function. """ -ModelStudioInput = DatasetInput +ModelStudioInput: typing_extensions.TypeAlias = DatasetInput """Input specification for a Model Studio configuration.""" -ModelStudioOutput = ModelOutput +ModelStudioOutput: typing_extensions.TypeAlias = ModelOutput """Output specification for a Model Studio configuration.""" -ModelStudioRunOutput = ModelStudioRunModelOutput +ModelStudioRunOutput: typing_extensions.TypeAlias = ModelStudioRunModelOutput """Resolved output details for a Model Studio run.""" -Series = DoubleSeriesV1 +Series: typing_extensions.TypeAlias = DoubleSeriesV1 """A series of values logged over time.""" -SeriesAggregationsValue = DoubleSeriesAggregations +SeriesAggregationsValue: typing_extensions.TypeAlias = DoubleSeriesAggregations """Union of aggregation values by series type.""" -core.resolve_forward_references( - CreateConfigValidationFailureReason, globalns=globals(), localns=locals() -) -core.resolve_forward_references(ExperimentSource, globalns=globals(), localns=locals()) -core.resolve_forward_references(InferenceInputErrorType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelApiDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelApiInput, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelApiOutput, globalns=globals(), localns=locals()) -core.resolve_forward_references(ModelVersionSource, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchExperimentsFilter, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "BooleanParameter", diff --git a/foundry_sdk/v2/ontologies/models.py b/foundry_sdk/v2/ontologies/models.py index e26245d2..a02d9e44 100644 --- a/foundry_sdk/v2/ontologies/models.py +++ b/foundry_sdk/v2/ontologies/models.py @@ -42,11 +42,11 @@ class AbsoluteValuePropertyExpression(core.ModelBase): type: typing.Literal["absoluteValue"] = "absoluteValue" -ActionExecutionTime = core.AwareDatetime +ActionExecutionTime: typing_extensions.TypeAlias = core.AwareDatetime """An ISO 8601 timestamp.""" -ActionLogicRule = typing_extensions.Annotated[ +ActionLogicRule: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ModifyInterfaceLogicRule", "CreateOrModifyObjectLogicRule", @@ -75,7 +75,7 @@ class ActionParameterArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -ActionParameterType = typing_extensions.Annotated[ +ActionParameterType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "OntologyInterfaceObjectType", @@ -113,17 +113,17 @@ class ActionParameterV2(core.ModelBase): type_classes: typing.Optional[typing.List[TypeClass]] = pydantic.Field(alias=str("typeClasses"), default=None) # type: ignore[literal-required] -ActionResults = typing_extensions.Annotated[ +ActionResults: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") ] """ActionResults""" -ActionRid = core.RID +ActionRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier for an action.""" -ActionTypeApiName = str +ActionTypeApiName: typing_extensions.TypeAlias = str """ The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. @@ -137,7 +137,7 @@ class ActionTypeFullMetadata(core.ModelBase): full_logic_rules: typing.List[ActionLogicRule] = pydantic.Field(alias=str("fullLogicRules")) # type: ignore[literal-required] -ActionTypeRid = core.RID +ActionTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an action type, useful for interacting with other Foundry APIs.""" @@ -264,11 +264,13 @@ class AggregateTimeSeries(core.ModelBase): strategy: TimeSeriesAggregationStrategy -AggregationAccuracy = typing.Literal["ACCURATE", "APPROXIMATE"] +AggregationAccuracy: typing_extensions.TypeAlias = typing.Literal["ACCURATE", "APPROXIMATE"] """AggregationAccuracy""" -AggregationAccuracyRequest = typing.Literal["REQUIRE_ACCURATE", "ALLOW_APPROXIMATE"] +AggregationAccuracyRequest: typing_extensions.TypeAlias = typing.Literal[ + "REQUIRE_ACCURATE", "ALLOW_APPROXIMATE" +] """ Specifies the accuracy requirement for aggregation results. @@ -344,7 +346,7 @@ class AggregationFixedWidthGroupingV2(core.ModelBase): type: typing.Literal["fixedWidth"] = "fixedWidth" -AggregationGroupByV2 = typing_extensions.Annotated[ +AggregationGroupByV2: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AggregationDurationGroupingV2", "AggregationFixedWidthGroupingV2", @@ -356,15 +358,15 @@ class AggregationFixedWidthGroupingV2(core.ModelBase): """Specifies a grouping for aggregation results.""" -AggregationGroupKeyV2 = str +AggregationGroupKeyV2: typing_extensions.TypeAlias = str """AggregationGroupKeyV2""" -AggregationGroupValueV2 = typing.Any +AggregationGroupValueV2: typing_extensions.TypeAlias = typing.Any """AggregationGroupValueV2""" -AggregationMetricName = str +AggregationMetricName: typing_extensions.TypeAlias = str """A user-specified alias for an aggregation metric name.""" @@ -401,7 +403,7 @@ class AggregationRangesGroupingV2(core.ModelBase): type: typing.Literal["ranges"] = "ranges" -AggregationV2 = typing_extensions.Annotated[ +AggregationV2: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ApproximateDistinctAggregationV2", "MinAggregationV2", @@ -444,7 +446,9 @@ class AnyOfRule(core.ModelBase): type: typing.Literal["anyOf"] = "anyOf" -ApplyActionMode = typing.Literal["VALIDATE_ONLY", "VALIDATE_AND_EXECUTE"] +ApplyActionMode: typing_extensions.TypeAlias = typing.Literal[ + "VALIDATE_ONLY", "VALIDATE_AND_EXECUTE" +] """If not specified, defaults to `VALIDATE_AND_EXECUTE`.""" @@ -590,17 +594,17 @@ class ArraySizeConstraint(core.ModelBase): type: typing.Literal["arraySize"] = "arraySize" -ArtifactRepositoryRid = core.RID +ArtifactRepositoryRid: typing_extensions.TypeAlias = core.RID """ArtifactRepositoryRid""" -AttachmentMetadataResponse = typing_extensions.Annotated[ +AttachmentMetadataResponse: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AttachmentV2", "ListAttachmentsResponseV2"], pydantic.Field(discriminator="type") ] """The attachment metadata response""" -AttachmentRid = core.RID +AttachmentRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an attachment.""" @@ -627,7 +631,7 @@ class AvgAggregationV2(core.ModelBase): type: typing.Literal["avg"] = "avg" -BatchActionObjectEdit = typing_extensions.Annotated[ +BatchActionObjectEdit: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ModifyObject", "AddObject", "AddLink"], pydantic.Field(discriminator="type") ] """BatchActionObjectEdit""" @@ -645,7 +649,7 @@ class BatchActionObjectEdits(core.ModelBase): type: typing.Literal["edits"] = "edits" -BatchActionResults = typing_extensions.Annotated[ +BatchActionResults: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["BatchActionObjectEdits", "ObjectTypeEdits"], pydantic.Field(discriminator="type") ] """BatchActionResults""" @@ -690,7 +694,7 @@ class BatchApplyActionWithOverridesRequest(core.ModelBase): requests: typing.List[BatchApplyActionRequestItemWithOverrides] -BatchReturnEditsMode = typing.Literal["ALL", "NONE"] +BatchReturnEditsMode: typing_extensions.TypeAlias = typing.Literal["ALL", "NONE"] """If not specified, defaults to `NONE`.""" @@ -739,14 +743,14 @@ class CenterPoint(core.ModelBase): distance: core_models.Distance -ConjunctiveMarkingSummary = typing.List["MarkingId"] +ConjunctiveMarkingSummary: typing_extensions.TypeAlias = typing.List["MarkingId"] """ The conjunctive set of markings required to access the property value. All markings from a conjunctive set must be met for access. """ -ContainerConjunctiveMarkingSummary = typing.List["MarkingId"] +ContainerConjunctiveMarkingSummary: typing_extensions.TypeAlias = typing.List["MarkingId"] """ The conjunctive set of markings for the container of this property value, such as the project of a dataset. These markings may differ from the marking @@ -756,7 +760,9 @@ class CenterPoint(core.ModelBase): """ -ContainerDisjunctiveMarkingSummary = typing.List[typing.List["MarkingId"]] +ContainerDisjunctiveMarkingSummary: typing_extensions.TypeAlias = typing.List[ + typing.List["MarkingId"] +] """ The disjunctive set of markings for the container of this property value, such as the project of a dataset. These markings may differ from the marking @@ -981,7 +987,7 @@ class CurrentUserArgument(core.ModelBase): type: typing.Literal["currentUser"] = "currentUser" -DataValue = typing.Any +DataValue: typing_extensions.TypeAlias = typing.Any """ Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | @@ -1022,7 +1028,7 @@ class DateValue(core.ModelBase): type: typing.Literal["dateValue"] = "dateValue" -DatetimeFormat = typing_extensions.Annotated[ +DatetimeFormat: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["DatetimeStringFormat", "DatetimeLocalizedFormat"], pydantic.Field(discriminator="type"), ] @@ -1036,7 +1042,7 @@ class DatetimeLocalizedFormat(core.ModelBase): type: typing.Literal["localizedFormat"] = "localizedFormat" -DatetimeLocalizedFormatType = typing.Literal[ +DatetimeLocalizedFormatType: typing_extensions.TypeAlias = typing.Literal[ "DATE_FORMAT_RELATIVE_TO_NOW", "DATE_FORMAT_DATE", "DATE_FORMAT_YEAR_AND_MONTH", @@ -1057,7 +1063,7 @@ class DatetimeStringFormat(core.ModelBase): type: typing.Literal["stringFormat"] = "stringFormat" -DatetimeTimezone = typing_extensions.Annotated[ +DatetimeTimezone: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["DatetimeTimezoneStatic", "DatetimeTimezoneUser"], pydantic.Field(discriminator="type"), ] @@ -1188,11 +1194,11 @@ class DeprecatedPropertyTypeStatus(core.ModelBase): type: typing.Literal["deprecated"] = "deprecated" -DerivedPropertyApiName = str +DerivedPropertyApiName: typing_extensions.TypeAlias = str """The name of the derived property that will be returned.""" -DerivedPropertyDefinition = typing_extensions.Annotated[ +DerivedPropertyDefinition: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "AddPropertyExpression", "AbsoluteValuePropertyExpression", @@ -1211,7 +1217,7 @@ class DeprecatedPropertyTypeStatus(core.ModelBase): """Definition of a derived property.""" -DisjunctiveMarkingSummary = typing.List[typing.List["MarkingId"]] +DisjunctiveMarkingSummary: typing_extensions.TypeAlias = typing.List[typing.List["MarkingId"]] """ The disjunctive set of markings required to access the property value. Disjunctive markings are represented as a conjunctive list of disjunctive sets. @@ -1272,27 +1278,29 @@ class DoubleVector(core.ModelBase): type: typing.Literal["vector"] = "vector" -DurationBaseValue = typing.Literal["SECONDS", "MILLISECONDS"] +DurationBaseValue: typing_extensions.TypeAlias = typing.Literal["SECONDS", "MILLISECONDS"] """Specifies the unit of the input duration value.""" -DurationFormatStyle = typing_extensions.Annotated[ +DurationFormatStyle: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["HumanReadableFormat", "TimeCodeFormat"], pydantic.Field(discriminator="type") ] """DurationFormatStyle""" -DurationPrecision = typing.Literal["DAYS", "HOURS", "MINUTES", "SECONDS", "AUTO"] +DurationPrecision: typing_extensions.TypeAlias = typing.Literal[ + "DAYS", "HOURS", "MINUTES", "SECONDS", "AUTO" +] """Specifies the maximum precision to apply when formatting a duration.""" -EditHistoryEdit = typing_extensions.Annotated[ +EditHistoryEdit: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["CreateEdit", "DeleteEdit", "ModifyEdit"], pydantic.Field(discriminator="type") ] """EditHistoryEdit""" -EditsHistoryFilter = typing_extensions.Annotated[ +EditsHistoryFilter: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["EditsHistoryTimestampFilter", "EditsHistoryOperationIdsFilter"], pydantic.Field(discriminator="type"), ] @@ -1306,7 +1314,7 @@ class EditsHistoryOperationIdsFilter(core.ModelBase): type: typing.Literal["operationIdsFilter"] = "operationIdsFilter" -EditsHistorySortOrder = typing.Literal["newest_first", "oldest_first"] +EditsHistorySortOrder: typing_extensions.TypeAlias = typing.Literal["newest_first", "oldest_first"] """EditsHistorySortOrder""" @@ -1371,7 +1379,7 @@ class ErrorComputingSecurity(core.ModelBase): type: typing.Literal["errorComputingSecurity"] = "errorComputingSecurity" -ErrorName = str +ErrorName: typing_extensions.TypeAlias = str """ErrorName""" @@ -1416,7 +1424,7 @@ class ExperimentalPropertyTypeStatus(core.ModelBase): type: typing.Literal["experimental"] = "experimental" -ExtractDatePart = typing.Literal["DAYS", "MONTHS", "QUARTERS", "YEARS"] +ExtractDatePart: typing_extensions.TypeAlias = typing.Literal["DAYS", "MONTHS", "QUARTERS", "YEARS"] """ExtractDatePart""" @@ -1434,14 +1442,14 @@ class ExtractPropertyExpression(core.ModelBase): type: typing.Literal["extract"] = "extract" -FilterValue = str +FilterValue: typing_extensions.TypeAlias = str """ Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. """ -FixedValuesMapKey = int +FixedValuesMapKey: typing_extensions.TypeAlias = int """Integer key for fixed value mapping.""" @@ -1454,15 +1462,15 @@ class FunctionLogicRule(core.ModelBase): type: typing.Literal["function"] = "function" -FunctionParameterName = str +FunctionParameterName: typing_extensions.TypeAlias = str """The name of an input to a function.""" -FunctionRid = core.RID +FunctionRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a Function, useful for interacting with other Foundry APIs.""" -FunctionVersion = str +FunctionVersion: typing_extensions.TypeAlias = str """ The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. @@ -1485,7 +1493,7 @@ class FuzzyRule(core.ModelBase): type: typing.Literal["fuzzy"] = "fuzzy" -FuzzyV2 = bool +FuzzyV2: typing_extensions.TypeAlias = bool """Setting fuzzy to `true` allows approximate matching in search queries that support it.""" @@ -1501,7 +1509,7 @@ class GeoJsonString(core.ModelBase): type: typing.Literal["geoJson"] = "geoJson" -GeoShapeV2Geometry = typing_extensions.Annotated[ +GeoShapeV2Geometry: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["BoundingBoxValue", "GeoJsonString"], pydantic.Field(discriminator="type") ] """Geometry specification for a GeoShapeV2Query. Supports bounding box envelopes and arbitrary GeoJSON geometries.""" @@ -1521,7 +1529,9 @@ class GeoShapeV2Query(core.ModelBase): type: typing.Literal["geoShapeV2"] = "geoShapeV2" -GeotemporalSeriesEntry = typing.Dict["PropertyApiName", "PropertyValue"] +GeotemporalSeriesEntry: typing_extensions.TypeAlias = typing.Dict[ + "PropertyApiName", "PropertyValue" +] """ A single geotemporal data point. Each entry is a map from property API names to property values. Standard entries include "time" (ISO 8601 timestamp) and "position" (GeoPoint), and may include additional geotemporal @@ -1724,28 +1734,28 @@ class InterfaceLinkType(core.ModelBase): """Whether each implementing object type must declare at least one implementation of this link.""" -InterfaceLinkTypeApiName = str +InterfaceLinkTypeApiName: typing_extensions.TypeAlias = str """ The name of the interface link type in the API. To find the API name for your Interface Link Type, check the [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/). """ -InterfaceLinkTypeCardinality = typing.Literal["ONE", "MANY"] +InterfaceLinkTypeCardinality: typing_extensions.TypeAlias = typing.Literal["ONE", "MANY"] """ The cardinality of the link in the given direction. Cardinality can be "ONE", meaning an object can link to zero or one other objects, or "MANY", meaning an object can link to any number of other objects. """ -InterfaceLinkTypeLinkedEntityApiName = typing_extensions.Annotated[ +InterfaceLinkTypeLinkedEntityApiName: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["LinkedObjectTypeApiName", "LinkedInterfaceTypeApiName"], pydantic.Field(discriminator="type"), ] """A reference to the linked entity. This can either be an object or an interface type.""" -InterfaceLinkTypeRid = core.RID +InterfaceLinkTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an interface link type, useful for interacting with other Foundry APIs.""" @@ -1757,7 +1767,7 @@ class InterfaceParameterPropertyArgument(core.ModelBase): type: typing.Literal["interfaceParameterPropertyValue"] = "interfaceParameterPropertyValue" -InterfacePropertyApiName = str +InterfacePropertyApiName: typing_extensions.TypeAlias = str """ The name of the interface property type in the API in lowerCamelCase format. To find the API name for your interface property type, use the `List interface types` endpoint and check the `allPropertiesV2` field or check @@ -1796,7 +1806,7 @@ class InterfacePropertyStructImplementation(core.ModelBase): type: typing.Literal["structImplementation"] = "structImplementation" -InterfacePropertyStructImplementationMapping = typing.Dict[ +InterfacePropertyStructImplementationMapping: typing_extensions.TypeAlias = typing.Dict[ "StructFieldApiName", "PropertyOrStructFieldOfPropertyImplementation" ] """ @@ -1805,7 +1815,7 @@ class InterfacePropertyStructImplementation(core.ModelBase): """ -InterfacePropertyType = typing_extensions.Annotated[ +InterfacePropertyType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["InterfaceDefinedPropertyType", "InterfaceSharedPropertyType"], pydantic.Field(discriminator="type"), ] @@ -1815,7 +1825,7 @@ class InterfacePropertyStructImplementation(core.ModelBase): """ -InterfacePropertyTypeImplementation = typing_extensions.Annotated[ +InterfacePropertyTypeImplementation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "InterfacePropertyStructFieldImplementation", "InterfacePropertyStructImplementation", @@ -1827,7 +1837,7 @@ class InterfacePropertyStructImplementation(core.ModelBase): """Describes how an object type implements an interface property.""" -InterfacePropertyTypeRid = core.RID +InterfacePropertyTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an interface property type, useful for interacting with other Foundry APIs.""" @@ -1853,21 +1863,27 @@ class InterfaceSharedPropertyType(core.ModelBase): type: typing.Literal["interfaceSharedPropertyType"] = "interfaceSharedPropertyType" -InterfaceToObjectTypeMapping = typing.Dict["SharedPropertyTypeApiName", "PropertyApiName"] +InterfaceToObjectTypeMapping: typing_extensions.TypeAlias = typing.Dict[ + "SharedPropertyTypeApiName", "PropertyApiName" +] """Represents an implementation of an interface (the mapping of interface property to local property).""" -InterfaceToObjectTypeMappingV2 = typing.Dict[ +InterfaceToObjectTypeMappingV2: typing_extensions.TypeAlias = typing.Dict[ "InterfacePropertyApiName", "InterfacePropertyTypeImplementation" ] """Represents an implementation of an interface (the mapping of interface property to how it is implemented.""" -InterfaceToObjectTypeMappings = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMapping"] +InterfaceToObjectTypeMappings: typing_extensions.TypeAlias = typing.Dict[ + "ObjectTypeApiName", "InterfaceToObjectTypeMapping" +] """Map from object type to the interface-to-object-type mapping for that object type.""" -InterfaceToObjectTypeMappingsV2 = typing.Dict["ObjectTypeApiName", "InterfaceToObjectTypeMappingV2"] +InterfaceToObjectTypeMappingsV2: typing_extensions.TypeAlias = typing.Dict[ + "ObjectTypeApiName", "InterfaceToObjectTypeMappingV2" +] """Map from object type to the interface property implementations of that object type.""" @@ -1934,14 +1950,14 @@ class InterfaceType(core.ModelBase): """ -InterfaceTypeApiName = str +InterfaceTypeApiName: typing_extensions.TypeAlias = str """ The name of the interface type in the API in UpperCamelCase format. To find the API name for your interface type, use the `List interface types` endpoint or check the **Ontology Manager**. """ -InterfaceTypeRid = core.RID +InterfaceTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an interface, useful for interacting with other Foundry APIs.""" @@ -1981,7 +1997,7 @@ class IntervalQuery(core.ModelBase): type: typing.Literal["interval"] = "interval" -IntervalQueryRule = typing_extensions.Annotated[ +IntervalQueryRule: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AllOfRule", "MatchRule", "AnyOfRule", "PrefixOnLastTokenRule", "FuzzyRule"], pydantic.Field(discriminator="type"), ] @@ -2000,7 +2016,9 @@ class IsNullQueryV2(core.ModelBase): type: typing.Literal["isNull"] = "isNull" -KnownType = typing.Literal["USER_OR_GROUP_ID", "RESOURCE_RID", "ARTIFACT_GID"] +KnownType: typing_extensions.TypeAlias = typing.Literal[ + "USER_OR_GROUP_ID", "RESOURCE_RID", "ARTIFACT_GID" +] """ Known Foundry types for specialized formatting: - userOrGroupRid: Format as user or group @@ -2031,22 +2049,22 @@ class LinkSideObject(core.ModelBase): object_type: ObjectTypeApiName = pydantic.Field(alias=str("objectType")) # type: ignore[literal-required] -LinkTypeApiName = str +LinkTypeApiName: typing_extensions.TypeAlias = str """ The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. """ -LinkTypeId = str +LinkTypeId: typing_extensions.TypeAlias = str """The unique ID of a link type. To find the ID for your link type, check the **Ontology Manager** application.""" -LinkTypeRid = core.RID +LinkTypeRid: typing_extensions.TypeAlias = core.RID """LinkTypeRid""" -LinkTypeSideCardinality = typing.Literal["ONE", "MANY"] +LinkTypeSideCardinality: typing_extensions.TypeAlias = typing.Literal["ONE", "MANY"] """LinkTypeSideCardinality""" @@ -2504,7 +2522,7 @@ class LoadOntologyMetadataRequest(core.ModelBase): interface_types: typing.List[InterfaceTypeApiName] = pydantic.Field(alias=str("interfaceTypes")) # type: ignore[literal-required] -LogicRule = typing_extensions.Annotated[ +LogicRule: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DeleteInterfaceObjectRule", "ModifyInterfaceObjectRule", @@ -2521,7 +2539,7 @@ class LoadOntologyMetadataRequest(core.ModelBase): """LogicRule""" -LogicRuleArgument = typing_extensions.Annotated[ +LogicRuleArgument: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "CurrentTimeArgument", "StaticArgument", @@ -2568,7 +2586,7 @@ class LteQueryV2(core.ModelBase): type: typing.Literal["lte"] = "lte" -MarkingId = str +MarkingId: typing_extensions.TypeAlias = str """The id of a classification or mandatory marking.""" @@ -2693,7 +2711,7 @@ class MultiplyPropertyExpression(core.ModelBase): type: typing.Literal["multiply"] = "multiply" -NearestNeighborsQuery = typing_extensions.Annotated[ +NearestNeighborsQuery: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["DoubleVector", "NearestNeighborsQueryText"], pydantic.Field(discriminator="type") ] """ @@ -2716,14 +2734,16 @@ class NegatePropertyExpression(core.ModelBase): type: typing.Literal["negate"] = "negate" -NestedInterfacePropertyTypeImplementation = typing_extensions.Annotated[ - typing.Union[ - "InterfacePropertyStructFieldImplementation", - "InterfacePropertyStructImplementation", - "InterfacePropertyLocalPropertyImplementation", - ], - pydantic.Field(discriminator="type"), -] +NestedInterfacePropertyTypeImplementation: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union[ + "InterfacePropertyStructFieldImplementation", + "InterfacePropertyStructImplementation", + "InterfacePropertyLocalPropertyImplementation", + ], + pydantic.Field(discriminator="type"), + ] +) """ Describes how an object type implements an interface property when a reducer is applied to it. Is missing a reduced property implementation to prevent arbitrarily nested implementations. @@ -2767,7 +2787,7 @@ class NumberFormatCurrency(core.ModelBase): type: typing.Literal["currency"] = "currency" -NumberFormatCurrencyStyle = typing.Literal["STANDARD", "COMPACT"] +NumberFormatCurrencyStyle: typing_extensions.TypeAlias = typing.Literal["STANDARD", "COMPACT"] """ Currency rendering style options: - STANDARD: Full currency formatting (e.g., "USD 1,234.56") @@ -2810,7 +2830,9 @@ class NumberFormatFixedValues(core.ModelBase): type: typing.Literal["fixedValues"] = "fixedValues" -NumberFormatNotation = typing.Literal["STANDARD", "SCIENTIFIC", "ENGINEERING", "COMPACT"] +NumberFormatNotation: typing_extensions.TypeAlias = typing.Literal[ + "STANDARD", "SCIENTIFIC", "ENGINEERING", "COMPACT" +] """ Number notation style options: - STANDARD: Regular number display ("1,234") @@ -2894,7 +2916,9 @@ class NumberFormatStandardUnit(core.ModelBase): type: typing.Literal["standardUnit"] = "standardUnit" -NumberRatioType = typing.Literal["PERCENTAGE", "PER_MILLE", "BASIS_POINTS"] +NumberRatioType: typing_extensions.TypeAlias = typing.Literal[ + "PERCENTAGE", "PER_MILLE", "BASIS_POINTS" +] """ Ratio format options for displaying proportional values: - PERCENTAGE: Multiply by 100 and add "%" suffix @@ -2903,7 +2927,7 @@ class NumberFormatStandardUnit(core.ModelBase): """ -NumberRoundingMode = typing.Literal["CEIL", "FLOOR", "ROUND_CLOSEST"] +NumberRoundingMode: typing_extensions.TypeAlias = typing.Literal["CEIL", "FLOOR", "ROUND_CLOSEST"] """ Number rounding behavior: - CEIL: Always round up (3.1 becomes 4) @@ -2912,7 +2936,7 @@ class NumberFormatStandardUnit(core.ModelBase): """ -NumberScaleType = typing.Literal["THOUSANDS", "MILLIONS", "BILLIONS"] +NumberScaleType: typing_extensions.TypeAlias = typing.Literal["THOUSANDS", "MILLIONS", "BILLIONS"] """ Scale factor options for large numbers: - THOUSANDS: Divide by 1,000 and add "K" suffix @@ -2921,7 +2945,7 @@ class NumberFormatStandardUnit(core.ModelBase): """ -ObjectEdit = typing_extensions.Annotated[ +ObjectEdit: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ModifyObject", "DeleteObject", "AddObject", "DeleteLink", "AddLink"], pydantic.Field(discriminator="type"), ] @@ -2976,15 +3000,17 @@ class ObjectParameterPropertyArgument(core.ModelBase): type: typing.Literal["objectParameterPropertyValue"] = "objectParameterPropertyValue" -ObjectPrimaryKey = typing.Dict["PropertyApiName", "PropertyValue"] +ObjectPrimaryKey: typing_extensions.TypeAlias = typing.Dict["PropertyApiName", "PropertyValue"] """ObjectPrimaryKey""" -ObjectPrimaryKeyV2 = typing.Dict["PropertyApiName", "PrimaryKeyValueV2"] +ObjectPrimaryKeyV2: typing_extensions.TypeAlias = typing.Dict[ + "PropertyApiName", "PrimaryKeyValueV2" +] """ObjectPrimaryKeyV2""" -ObjectPropertyType = typing_extensions.Annotated[ +ObjectPropertyType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "StructType", @@ -3026,11 +3052,11 @@ class ObjectQueryResultConstraint(core.ModelBase): type: typing.Literal["objectQueryResult"] = "objectQueryResult" -ObjectRid = core.RID +ObjectRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an object, useful for interacting with other Foundry APIs.""" -ObjectSet = typing_extensions.Annotated[ +ObjectSet: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ObjectSetSearchAroundType", "ObjectSetStaticType", @@ -3175,7 +3201,7 @@ class ObjectSetReferenceType(core.ModelBase): type: typing.Literal["reference"] = "reference" -ObjectSetRid = core.RID +ObjectSetRid: typing_extensions.TypeAlias = core.RID """ObjectSetRid""" @@ -3213,7 +3239,7 @@ class ObjectSetStreamSubscribeRequests(core.ModelBase): requests: typing.List[ObjectSetStreamSubscribeRequest] -ObjectSetSubscribeResponse = typing_extensions.Annotated[ +ObjectSetSubscribeResponse: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["QosError", "SubscriptionSuccess", "SubscriptionError"], pydantic.Field(discriminator="type"), ] @@ -3242,7 +3268,7 @@ class ObjectSetUnionType(core.ModelBase): type: typing.Literal["union"] = "union" -ObjectSetUpdate = typing_extensions.Annotated[ +ObjectSetUpdate: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ReferenceUpdate", "ObjectUpdate"], pydantic.Field(discriminator="type") ] """ObjectSetUpdate""" @@ -3270,7 +3296,7 @@ class ObjectSetWithPropertiesType(core.ModelBase): type: typing.Literal["withProperties"] = "withProperties" -ObjectState = typing.Literal["ADDED_OR_UPDATED", "REMOVED"] +ObjectState: typing_extensions.TypeAlias = typing.Literal["ADDED_OR_UPDATED", "REMOVED"] """ Represents the state of the object within the object set. ADDED_OR_UPDATED indicates that the object was added to the set or the object has updated and was previously in the set. REMOVED indicates that the object @@ -3279,7 +3305,7 @@ class ObjectSetWithPropertiesType(core.ModelBase): """ -ObjectTypeApiName = str +ObjectTypeApiName: typing_extensions.TypeAlias = str """ The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. @@ -3346,7 +3372,7 @@ class ObjectTypeFullMetadata(core.ModelBase): """ -ObjectTypeId = str +ObjectTypeId: typing_extensions.TypeAlias = str """The unique identifier (ID) for an object type. This can be viewed in [Ontology Manager](https://palantir.com/docs/foundry/ontology-manager/overview/).""" @@ -3371,7 +3397,7 @@ class ObjectTypeLinkTypeApiNameMapping(core.ModelBase): """The list of link type API names scoped by the object type.""" -ObjectTypeRid = core.RID +ObjectTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an object type, useful for interacting with other Foundry APIs.""" @@ -3397,7 +3423,7 @@ class ObjectTypeV2(core.ModelBase): visibility: typing.Optional[ObjectTypeVisibility] = None -ObjectTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +ObjectTypeVisibility: typing_extensions.TypeAlias = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] """The suggested visibility of the object type.""" @@ -3419,7 +3445,7 @@ class OneOfConstraint(core.ModelBase): type: typing.Literal["oneOf"] = "oneOf" -OntologyApiName = str +OntologyApiName: typing_extensions.TypeAlias = str """OntologyApiName""" @@ -3437,7 +3463,7 @@ class OntologyBaseBranch(core.ModelBase): type: typing.Literal["branch"] = "branch" -OntologyDataType = typing_extensions.Annotated[ +OntologyDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "OntologyStructType", @@ -3481,7 +3507,7 @@ class OntologyFullMetadata(core.ModelBase): value_types: typing.Dict[ValueTypeApiName, OntologyValueType] = pydantic.Field(alias=str("valueTypes")) # type: ignore[literal-required] -OntologyIdentifier = str +OntologyIdentifier: typing_extensions.TypeAlias = str """ The API name or RID of the Ontology. To find the API name or RID, use the **List Ontologies** endpoint or check the **Ontology Manager**. @@ -3531,7 +3557,7 @@ class OntologyObjectArrayTypeReducer(core.ModelBase): field: typing.Optional[StructFieldApiName] = None -OntologyObjectArrayTypeReducerSortDirection = typing.Literal[ +OntologyObjectArrayTypeReducerSortDirection: typing_extensions.TypeAlias = typing.Literal[ "ASCENDING_NULLS_LAST", "DESCENDING_NULLS_LAST" ] """OntologyObjectArrayTypeReducerSortDirection""" @@ -3559,18 +3585,18 @@ class OntologyObjectTypeReferenceType(core.ModelBase): type: typing.Literal["objectType"] = "objectType" -OntologyObjectV2 = typing.Dict["PropertyApiName", "PropertyValue"] +OntologyObjectV2: typing_extensions.TypeAlias = typing.Dict["PropertyApiName", "PropertyValue"] """Represents an object in the Ontology.""" -OntologyRid = core.RID +OntologyRid: typing_extensions.TypeAlias = core.RID """ The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. """ -OntologyScenarioRid = core.RID +OntologyScenarioRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an ontology scenario.""" @@ -3596,7 +3622,7 @@ class OntologyStructType(core.ModelBase): type: typing.Literal["struct"] = "struct" -OntologyTransactionId = str +OntologyTransactionId: typing_extensions.TypeAlias = str """The ID identifying a transaction.""" @@ -3629,7 +3655,7 @@ class OrQueryV2(core.ModelBase): type: typing.Literal["or"] = "or" -OrderBy = str +OrderBy: typing_extensions.TypeAlias = str """ A command representing the list of properties to order by. Properties should be delimited by commas and prefixed by `p` or `properties`. The format expected format is @@ -3644,11 +3670,11 @@ class OrQueryV2(core.ModelBase): """ -OrderByDirection = typing.Literal["ASC", "DESC"] +OrderByDirection: typing_extensions.TypeAlias = typing.Literal["ASC", "DESC"] """OrderByDirection""" -ParameterEvaluatedConstraint = typing_extensions.Annotated[ +ParameterEvaluatedConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StructEvaluatedConstraint", "OneOfConstraint", @@ -3694,7 +3720,7 @@ class ParameterEvaluationResult(core.ModelBase): """Represents whether the parameter is a required input to the action.""" -ParameterId = str +ParameterId: typing_extensions.TypeAlias = str """ The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. @@ -3716,7 +3742,7 @@ class ParameterOption(core.ModelBase): """An allowed configured value for a parameter within an action.""" -Plaintext = str +Plaintext: typing_extensions.TypeAlias = str """Plaintext""" @@ -3740,7 +3766,9 @@ class PreciseDuration(core.ModelBase): type: typing.Literal["duration"] = "duration" -PreciseTimeUnit = typing.Literal["NANOSECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS"] +PreciseTimeUnit: typing_extensions.TypeAlias = typing.Literal[ + "NANOSECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS" +] """The unit of a fixed-width duration. Each day is 24 hours and each week is 7 days.""" @@ -3760,11 +3788,11 @@ class PrimaryKeyPropertySelector(core.ModelBase): type: typing.Literal["primaryKeyProperty"] = "primaryKeyProperty" -PrimaryKeyValue = typing.Any +PrimaryKeyValue: typing_extensions.TypeAlias = typing.Any """Represents the primary key value that is used as a unique identifier for an object.""" -PrimaryKeyValueV2 = typing_extensions.Annotated[ +PrimaryKeyValueV2: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DateValue", "StringValue", @@ -3779,7 +3807,7 @@ class PrimaryKeyPropertySelector(core.ModelBase): """PrimaryKeyValueV2""" -PropertyApiName = str +PropertyApiName: typing_extensions.TypeAlias = str """ The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. @@ -3812,7 +3840,7 @@ class PropertyDateFormattingRule(core.ModelBase): type: typing.Literal["date"] = "date" -PropertyFilter = str +PropertyFilter: typing_extensions.TypeAlias = str """ Represents a filter used on properties. @@ -3842,14 +3870,14 @@ class PropertyDateFormattingRule(core.ModelBase): """ -PropertyId = str +PropertyId: typing_extensions.TypeAlias = str """ The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. """ -PropertyIdentifier = typing_extensions.Annotated[ +PropertyIdentifier: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "PropertyApiNameSelector", "StructFieldSelector", @@ -3876,7 +3904,7 @@ class PropertyKnownTypeFormattingRule(core.ModelBase): type: typing.Literal["knownType"] = "knownType" -PropertyLoadLevel = typing_extensions.Annotated[ +PropertyLoadLevel: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ApplyReducersAndExtractMainValueLoadLevel", "ApplyReducersLoadLevel", @@ -3909,7 +3937,7 @@ class PropertyNumberFormattingRule(core.ModelBase): type: typing.Literal["number"] = "number" -PropertyNumberFormattingRuleType = typing_extensions.Annotated[ +PropertyNumberFormattingRuleType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "NumberFormatStandard", "NumberFormatDuration", @@ -3926,10 +3954,12 @@ class PropertyNumberFormattingRule(core.ModelBase): """PropertyNumberFormattingRuleType""" -PropertyOrStructFieldOfPropertyImplementation = typing_extensions.Annotated[ - typing.Union["StructFieldOfPropertyImplementation", "PropertyImplementation"], - pydantic.Field(discriminator="type"), -] +PropertyOrStructFieldOfPropertyImplementation: typing_extensions.TypeAlias = ( + typing_extensions.Annotated[ + typing.Union["StructFieldOfPropertyImplementation", "PropertyImplementation"], + pydantic.Field(discriminator="type"), + ] +) """PropertyOrStructFieldOfPropertyImplementation""" @@ -3939,7 +3969,7 @@ class PropertySecurities(core.ModelBase): disjunction: typing.List[PropertySecurity] -PropertySecurity = typing_extensions.Annotated[ +PropertySecurity: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PropertyMarkingSummary", "UnsupportedPolicy", "ErrorComputingSecurity"], pydantic.Field(discriminator="type"), ] @@ -3954,7 +3984,7 @@ class PropertyTimestampFormattingRule(core.ModelBase): type: typing.Literal["timestamp"] = "timestamp" -PropertyTypeApiName = str +PropertyTypeApiName: typing_extensions.TypeAlias = str """PropertyTypeApiName""" @@ -3967,17 +3997,17 @@ class PropertyTypeReference(core.ModelBase): type: typing.Literal["propertyType"] = "propertyType" -PropertyTypeReferenceOrStringConstant = typing_extensions.Annotated[ +PropertyTypeReferenceOrStringConstant: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StringConstant", "PropertyTypeReference"], pydantic.Field(discriminator="type") ] """PropertyTypeReferenceOrStringConstant""" -PropertyTypeRid = core.RID +PropertyTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a property.""" -PropertyTypeStatus = typing_extensions.Annotated[ +PropertyTypeStatus: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "DeprecatedPropertyTypeStatus", "ActivePropertyTypeStatus", @@ -3989,7 +4019,9 @@ class PropertyTypeReference(core.ModelBase): """The status to indicate whether the PropertyType is either Experimental, Active, Deprecated, or Example.""" -PropertyTypeVisibility = typing.Literal["NORMAL", "PROMINENT", "HIDDEN"] +PropertyTypeVisibility: typing_extensions.TypeAlias = typing.Literal[ + "NORMAL", "PROMINENT", "HIDDEN" +] """PropertyTypeVisibility""" @@ -4007,7 +4039,7 @@ class PropertyV2(core.ModelBase): type_classes: typing.Optional[typing.List[TypeClass]] = pydantic.Field(alias=str("typeClasses"), default=None) # type: ignore[literal-required] -PropertyValue = typing.Any +PropertyValue: typing_extensions.TypeAlias = typing.Any """ Represents the value of a property in the following format. @@ -4039,11 +4071,11 @@ class PropertyV2(core.ModelBase): """ -PropertyValueEscapedString = str +PropertyValueEscapedString: typing_extensions.TypeAlias = str """Represents the value of a property in string format. This is used in URL parameters.""" -PropertyValueFormattingRule = typing_extensions.Annotated[ +PropertyValueFormattingRule: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "PropertyDateFormattingRule", "PropertyNumberFormattingRule", @@ -4091,7 +4123,7 @@ class QueryAggregation(core.ModelBase): value: typing.Any -QueryAggregationKeyType = typing_extensions.Annotated[ +QueryAggregationKeyType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.BooleanType, @@ -4106,7 +4138,7 @@ class QueryAggregation(core.ModelBase): """A union of all the types supported by query aggregation keys.""" -QueryAggregationRangeSubType = typing_extensions.Annotated[ +QueryAggregationRangeSubType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, core_models.DoubleType, @@ -4125,14 +4157,14 @@ class QueryAggregationRangeType(core.ModelBase): type: typing.Literal["range"] = "range" -QueryAggregationValueType = typing_extensions.Annotated[ +QueryAggregationValueType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[core_models.DateType, core_models.DoubleType, core_models.TimestampType], pydantic.Field(discriminator="type"), ] """A union of all the types supported by query aggregation keys.""" -QueryApiName = str +QueryApiName: typing_extensions.TypeAlias = str """The name of the Query in the API.""" @@ -4143,7 +4175,7 @@ class QueryArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -QueryDataType = typing_extensions.Annotated[ +QueryDataType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "OntologyInterfaceObjectType", @@ -4184,7 +4216,7 @@ class QueryParameterV2(core.ModelBase): required: bool -QueryRuntimeErrorParameter = str +QueryRuntimeErrorParameter: typing_extensions.TypeAlias = str """QueryRuntimeErrorParameter""" @@ -4284,7 +4316,7 @@ class Reason(core.ModelBase): type: typing.Literal["reason"] = "reason" -ReasonType = typing.Literal["USER_CLOSED", "CHANNEL_CLOSED"] +ReasonType: typing_extensions.TypeAlias = typing.Literal["USER_CLOSED", "CHANNEL_CLOSED"] """Represents the reason a subscription was closed.""" @@ -4411,21 +4443,21 @@ class RelativeTimeRange(core.ModelBase): type: typing.Literal["relative"] = "relative" -RelativeTimeRelation = typing.Literal["BEFORE", "AFTER"] +RelativeTimeRelation: typing_extensions.TypeAlias = typing.Literal["BEFORE", "AFTER"] """RelativeTimeRelation""" -RelativeTimeSeriesTimeUnit = typing.Literal[ +RelativeTimeSeriesTimeUnit: typing_extensions.TypeAlias = typing.Literal[ "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS" ] """RelativeTimeSeriesTimeUnit""" -RelativeTimeUnit = typing.Literal["DAY", "WEEK", "MONTH", "YEAR"] +RelativeTimeUnit: typing_extensions.TypeAlias = typing.Literal["DAY", "WEEK", "MONTH", "YEAR"] """Units for relative time calculations.""" -RequestId = core.UUID +RequestId: typing_extensions.TypeAlias = core.UUID """Unique request id""" @@ -4448,7 +4480,9 @@ class ResolvedInterfacePropertyType(core.ModelBase): """Whether each implementing object type must declare an implementation for this property.""" -ReturnEditsMode = typing.Literal["ALL", "ALL_V2_WITH_DELETIONS", "NONE"] +ReturnEditsMode: typing_extensions.TypeAlias = typing.Literal[ + "ALL", "ALL_V2_WITH_DELETIONS", "NONE" +] """If not specified, defaults to `NONE`.""" @@ -4465,19 +4499,19 @@ class RollingAggregateWindowPoints(core.ModelBase): type: typing.Literal["pointsCount"] = "pointsCount" -SdkPackageName = str +SdkPackageName: typing_extensions.TypeAlias = str """SdkPackageName""" -SdkPackageRid = core.RID +SdkPackageRid: typing_extensions.TypeAlias = core.RID """SdkPackageRid""" -SdkVersion = str +SdkVersion: typing_extensions.TypeAlias = str """SdkVersion""" -SearchJsonQueryV2 = typing_extensions.Annotated[ +SearchJsonQueryV2: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "LtQueryV2", "DoesNotIntersectBoundingBoxQuery", @@ -4616,7 +4650,7 @@ class SearchObjectsResponseV2(core.ModelBase): total_count: core_models.TotalCount = pydantic.Field(alias=str("totalCount")) # type: ignore[literal-required] -SearchOrderByType = typing.Literal["fields", "relevance"] +SearchOrderByType: typing_extensions.TypeAlias = typing.Literal["fields", "relevance"] """SearchOrderByType""" @@ -4635,7 +4669,7 @@ class SearchOrderingV2(core.ModelBase): """Specifies the ordering direction (can be either `asc` or `desc`)""" -SelectedPropertyApiName = str +SelectedPropertyApiName: typing_extensions.TypeAlias = str """ By default, whenever an object is requested, all of its properties are returned, except for properties of the following types: @@ -4752,7 +4786,7 @@ class SelectedPropertyMinAggregation(core.ModelBase): type: typing.Literal["min"] = "min" -SelectedPropertyOperation = typing_extensions.Annotated[ +SelectedPropertyOperation: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "SelectedPropertyApproximateDistinctAggregation", "SelectedPropertyMinAggregation", @@ -4793,18 +4827,20 @@ class SharedPropertyType(core.ModelBase): type_classes: typing.Optional[typing.List[TypeClass]] = pydantic.Field(alias=str("typeClasses"), default=None) # type: ignore[literal-required] -SharedPropertyTypeApiName = str +SharedPropertyTypeApiName: typing_extensions.TypeAlias = str """ The name of the shared property type in the API in lowerCamelCase format. To find the API name for your shared property type, use the `List shared property types` endpoint or check the **Ontology Manager**. """ -SharedPropertyTypeRid = core.RID +SharedPropertyTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of an shared property type, useful for interacting with other Foundry APIs.""" -SpatialFilterMode = typing.Literal["INTERSECTS", "DISJOINT", "WITHIN", "CONTAINS"] +SpatialFilterMode: typing_extensions.TypeAlias = typing.Literal[ + "INTERSECTS", "DISJOINT", "WITHIN", "CONTAINS" +] """ The spatial relation operator for a GeoShapeV2Query. INTERSECTS matches objects that intersect the provided geometry, DISJOINT matches objects that do not intersect the provided geometry, WITHIN matches objects that @@ -4832,7 +4868,7 @@ class StaticArgument(core.ModelBase): type: typing.Literal["staticValue"] = "staticValue" -StreamMessage = typing_extensions.Annotated[ +StreamMessage: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ObjectSetUpdates", "RefreshObjectSet", "SubscriptionClosed", "ObjectSetSubscribeResponses" ], @@ -4854,7 +4890,7 @@ class StreamTimeSeriesValuesRequest(core.ModelBase): range: typing.Optional[TimeRange] = None -StreamingOutputFormat = typing.Literal["JSON", "ARROW"] +StreamingOutputFormat: typing_extensions.TypeAlias = typing.Literal["JSON", "ARROW"] """ Which format to serialize the binary stream in. ARROW is more efficient for streaming a large sized response. @@ -4927,18 +4963,18 @@ class StructEvaluatedConstraint(core.ModelBase): type: typing.Literal["struct"] = "struct" -StructFieldApiName = str +StructFieldApiName: typing_extensions.TypeAlias = str """The name of a struct field in the Ontology.""" -StructFieldArgument = typing_extensions.Annotated[ +StructFieldArgument: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StructListParameterFieldArgument", "StructParameterFieldArgument"], pydantic.Field(discriminator="type"), ] """Represents an argument used for an individual struct field.""" -StructFieldEvaluatedConstraint = typing_extensions.Annotated[ +StructFieldEvaluatedConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "OneOfConstraint", "RangeConstraint", @@ -5003,7 +5039,7 @@ class StructFieldType(core.ModelBase): type_classes: typing.Optional[typing.List[TypeClass]] = pydantic.Field(alias=str("typeClasses"), default=None) # type: ignore[literal-required] -StructFieldTypeRid = core.RID +StructFieldTypeRid: typing_extensions.TypeAlias = core.RID """The unique resource identifier of a struct field, useful for interacting with other Foundry APIs.""" @@ -5015,7 +5051,7 @@ class StructListParameterFieldArgument(core.ModelBase): type: typing.Literal["structListParameterFieldValue"] = "structListParameterFieldValue" -StructParameterFieldApiName = str +StructParameterFieldApiName: typing_extensions.TypeAlias = str """The unique identifier of the struct parameter field.""" @@ -5067,7 +5103,7 @@ class SubscriptionClosed(core.ModelBase): type: typing.Literal["subscriptionClosed"] = "subscriptionClosed" -SubscriptionClosureCause = typing_extensions.Annotated[ +SubscriptionClosureCause: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["Reason", "Error"], pydantic.Field(discriminator="type") ] """SubscriptionClosureCause""" @@ -5080,7 +5116,7 @@ class SubscriptionError(core.ModelBase): type: typing.Literal["error"] = "error" -SubscriptionId = core.UUID +SubscriptionId: typing_extensions.TypeAlias = core.UUID """A unique identifier used to associate subscription requests with responses.""" @@ -5143,13 +5179,13 @@ class TimeCodeFormat(core.ModelBase): type: typing.Literal["timecode"] = "timecode" -TimeRange = typing_extensions.Annotated[ +TimeRange: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["AbsoluteTimeRange", "RelativeTimeRange"], pydantic.Field(discriminator="type") ] """An absolute or relative range for a time series query.""" -TimeSeriesAggregationMethod = typing.Literal[ +TimeSeriesAggregationMethod: typing_extensions.TypeAlias = typing.Literal[ "SUM", "MEAN", "STANDARD_DEVIATION", @@ -5165,7 +5201,7 @@ class TimeCodeFormat(core.ModelBase): """The aggregation function to use for aggregating time series data.""" -TimeSeriesAggregationStrategy = typing_extensions.Annotated[ +TimeSeriesAggregationStrategy: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "TimeSeriesRollingAggregate", "TimeSeriesPeriodicAggregate", "TimeSeriesCumulativeAggregate" ], @@ -5235,7 +5271,7 @@ class TimeSeriesRollingAggregate(core.ModelBase): type: typing.Literal["rolling"] = "rolling" -TimeSeriesRollingAggregateWindow = typing_extensions.Annotated[ +TimeSeriesRollingAggregateWindow: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["PreciseDuration", "RollingAggregateWindowPoints"], pydantic.Field(discriminator="type"), ] @@ -5249,11 +5285,11 @@ class TimeSeriesRollingAggregate(core.ModelBase): """ -TimeSeriesWindowType = typing.Literal["START", "END"] +TimeSeriesWindowType: typing_extensions.TypeAlias = typing.Literal["START", "END"] """TimeSeriesWindowType""" -TimeUnit = typing.Literal[ +TimeUnit: typing_extensions.TypeAlias = typing.Literal[ "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "WEEKS", "MONTHS", "YEARS", "QUARTERS" ] """TimeUnit""" @@ -5282,7 +5318,7 @@ class TitlePropertySelector(core.ModelBase): type: typing.Literal["titleProperty"] = "titleProperty" -TransactionEdit = typing_extensions.Annotated[ +TransactionEdit: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ModifyObjectEdit", "DeleteObjectEdit", "AddObjectEdit", "DeleteLinkEdit", "AddLinkEdit" ], @@ -5309,7 +5345,7 @@ class TypeClass(core.ModelBase): """The value of the type class.""" -TypeReferenceIdentifier = str +TypeReferenceIdentifier: typing_extensions.TypeAlias = str """ The unique identifier of a type reference. This identifier is used to look up the type definition in the `typeReferences` map of the enclosing Query. @@ -5337,11 +5373,11 @@ class UniqueIdentifierArgument(core.ModelBase): type: typing.Literal["uniqueIdentifier"] = "uniqueIdentifier" -UniqueIdentifierLinkId = core.UUID +UniqueIdentifierLinkId: typing_extensions.TypeAlias = core.UUID """A reference to a UniqueIdentifierArgument linkId defined for this action type.""" -UniqueIdentifierValue = core.UUID +UniqueIdentifierValue: typing_extensions.TypeAlias = core.UUID """ An override value to be used for a UniqueIdentifier action parameter, instead of the value being automatically generated. @@ -5368,11 +5404,11 @@ class ValidateActionResponseV2(core.ModelBase): parameters: typing.Dict[ParameterId, ParameterEvaluationResult] -ValidationResult = typing.Literal["VALID", "INVALID"] +ValidationResult: typing_extensions.TypeAlias = typing.Literal["VALID", "INVALID"] """Represents the state of a validation.""" -ValueType = str +ValueType: typing_extensions.TypeAlias = str """ A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. @@ -5400,7 +5436,7 @@ class ValidateActionResponseV2(core.ModelBase): """ -ValueTypeApiName = str +ValueTypeApiName: typing_extensions.TypeAlias = str """The name of the value type in the API in camelCase format.""" @@ -5411,7 +5447,7 @@ class ValueTypeArrayType(core.ModelBase): type: typing.Literal["array"] = "array" -ValueTypeConstraint = typing_extensions.Annotated[ +ValueTypeConstraint: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "StructConstraint", "RegexConstraint", @@ -5434,7 +5470,7 @@ class ValueTypeDecimalType(core.ModelBase): type: typing.Literal["decimal"] = "decimal" -ValueTypeFieldType = typing_extensions.Annotated[ +ValueTypeFieldType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "ValueTypeStructType", @@ -5481,11 +5517,11 @@ class ValueTypeReferenceType(core.ModelBase): type: typing.Literal["reference"] = "reference" -ValueTypeRid = core.RID +ValueTypeRid: typing_extensions.TypeAlias = core.RID """ValueTypeRid""" -ValueTypeStatus = typing.Literal["ACTIVE", "DEPRECATED"] +ValueTypeStatus: typing_extensions.TypeAlias = typing.Literal["ACTIVE", "DEPRECATED"] """ValueTypeStatus""" @@ -5510,7 +5546,7 @@ class ValueTypeUnionType(core.ModelBase): type: typing.Literal["union"] = "union" -VersionedQueryTypeApiName = str +VersionedQueryTypeApiName: typing_extensions.TypeAlias = str """ The name of the Query in the API and an optional version identifier separated by a colon. If the API name contains a colon, then a version identifier of either "latest" or a semantic version must @@ -5572,136 +5608,43 @@ class WithinPolygonQuery(core.ModelBase): type: typing.Literal["withinPolygon"] = "withinPolygon" -ArrayEntryEvaluatedConstraint = StructEvaluatedConstraint +ArrayEntryEvaluatedConstraint: typing_extensions.TypeAlias = StructEvaluatedConstraint """Evaluated constraints for entries of array parameters for which per-entry evaluation is supported.""" -CenterPointTypes = geo_models.GeoPoint +CenterPointTypes: typing_extensions.TypeAlias = geo_models.GeoPoint """CenterPointTypes""" -Icon = BlueprintIcon +Icon: typing_extensions.TypeAlias = BlueprintIcon """A union currently only consisting of the BlueprintIcon (more icon types may be added in the future).""" -MethodObjectSet = ObjectSet +MethodObjectSet: typing_extensions.TypeAlias = ObjectSet """MethodObjectSet""" -OntologyBase = OntologyBaseBranch +OntologyBase: typing_extensions.TypeAlias = OntologyBaseBranch """The base used to initialize a scenario.""" -PolygonValue = geo_models.Polygon +PolygonValue: typing_extensions.TypeAlias = geo_models.Polygon """PolygonValue""" -ReferenceValue = GeotimeSeriesValue +ReferenceValue: typing_extensions.TypeAlias = GeotimeSeriesValue """Resolved data values pointed to by a reference.""" -RelativeDateRangeBound = RelativePointInTime +RelativeDateRangeBound: typing_extensions.TypeAlias = RelativePointInTime """Specifies a bound for a relative date range query.""" -WithinBoundingBoxPoint = geo_models.GeoPoint +WithinBoundingBoxPoint: typing_extensions.TypeAlias = geo_models.GeoPoint """WithinBoundingBoxPoint""" -core.resolve_forward_references(ActionLogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(ActionParameterType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ActionResults, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationGroupByV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(AggregationV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(AttachmentMetadataResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(BatchActionObjectEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(BatchActionResults, globalns=globals(), localns=locals()) -core.resolve_forward_references(ConjunctiveMarkingSummary, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ContainerConjunctiveMarkingSummary, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - ContainerDisjunctiveMarkingSummary, globalns=globals(), localns=locals() -) -core.resolve_forward_references(DatetimeFormat, globalns=globals(), localns=locals()) -core.resolve_forward_references(DatetimeTimezone, globalns=globals(), localns=locals()) -core.resolve_forward_references(DerivedPropertyDefinition, globalns=globals(), localns=locals()) -core.resolve_forward_references(DisjunctiveMarkingSummary, globalns=globals(), localns=locals()) -core.resolve_forward_references(DurationFormatStyle, globalns=globals(), localns=locals()) -core.resolve_forward_references(EditHistoryEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(EditsHistoryFilter, globalns=globals(), localns=locals()) -core.resolve_forward_references(GeoShapeV2Geometry, globalns=globals(), localns=locals()) -core.resolve_forward_references(GeotemporalSeriesEntry, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceLinkTypeLinkedEntityApiName, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - InterfacePropertyStructImplementationMapping, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfacePropertyType, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfacePropertyTypeImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfaceToObjectTypeMapping, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceToObjectTypeMappingV2, globalns=globals(), localns=locals() -) -core.resolve_forward_references(InterfaceToObjectTypeMappings, globalns=globals(), localns=locals()) -core.resolve_forward_references( - InterfaceToObjectTypeMappingsV2, globalns=globals(), localns=locals() -) -core.resolve_forward_references(IntervalQueryRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(LogicRuleArgument, globalns=globals(), localns=locals()) -core.resolve_forward_references(NearestNeighborsQuery, globalns=globals(), localns=locals()) -core.resolve_forward_references( - NestedInterfacePropertyTypeImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references(ObjectEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectPrimaryKey, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectPrimaryKeyV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectPropertyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectSet, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectSetSubscribeResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(ObjectSetUpdate, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(OntologyObjectV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterEvaluatedConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(PrimaryKeyValueV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyIdentifier, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyLoadLevel, globalns=globals(), localns=locals()) -core.resolve_forward_references( - PropertyNumberFormattingRuleType, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - PropertyOrStructFieldOfPropertyImplementation, globalns=globals(), localns=locals() -) -core.resolve_forward_references(PropertySecurity, globalns=globals(), localns=locals()) -core.resolve_forward_references( - PropertyTypeReferenceOrStringConstant, globalns=globals(), localns=locals() -) -core.resolve_forward_references(PropertyTypeStatus, globalns=globals(), localns=locals()) -core.resolve_forward_references(PropertyValueFormattingRule, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationKeyType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationRangeSubType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryAggregationValueType, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryDataType, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchJsonQueryV2, globalns=globals(), localns=locals()) -core.resolve_forward_references(SelectedPropertyOperation, globalns=globals(), localns=locals()) -core.resolve_forward_references(StreamMessage, globalns=globals(), localns=locals()) -core.resolve_forward_references(StructFieldArgument, globalns=globals(), localns=locals()) -core.resolve_forward_references( - StructFieldEvaluatedConstraint, globalns=globals(), localns=locals() -) -core.resolve_forward_references(SubscriptionClosureCause, globalns=globals(), localns=locals()) -core.resolve_forward_references(TimeRange, globalns=globals(), localns=locals()) -core.resolve_forward_references(TimeSeriesAggregationStrategy, globalns=globals(), localns=locals()) -core.resolve_forward_references( - TimeSeriesRollingAggregateWindow, globalns=globals(), localns=locals() -) -core.resolve_forward_references(TransactionEdit, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeConstraint, globalns=globals(), localns=locals()) -core.resolve_forward_references(ValueTypeFieldType, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AbsoluteTimeRange", diff --git a/foundry_sdk/v2/orchestration/models.py b/foundry_sdk/v2/orchestration/models.py index 1651661f..161329bd 100644 --- a/foundry_sdk/v2/orchestration/models.py +++ b/foundry_sdk/v2/orchestration/models.py @@ -25,7 +25,7 @@ from foundry_sdk.v2.datasets import models as datasets_models from foundry_sdk.v2.filesystem import models as filesystem_models -AbortOnFailure = bool +AbortOnFailure: typing_extensions.TypeAlias = bool """ If any job in the build is unsuccessful, immediately finish the build by cancelling all other jobs. @@ -88,18 +88,20 @@ class Build(core.ModelBase): """Schedule RID of the Schedule that triggered this build. If a user triggered the build, Schedule RID will be empty.""" -BuildStatus = typing.Literal["RUNNING", "SUCCEEDED", "FAILED", "CANCELED"] +BuildStatus: typing_extensions.TypeAlias = typing.Literal[ + "RUNNING", "SUCCEEDED", "FAILED", "CANCELED" +] """The status of the build.""" -BuildTarget = typing_extensions.Annotated[ +BuildTarget: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["UpstreamTarget", "ManualTarget", "ConnectingTarget"], pydantic.Field(discriminator="type"), ] """The targets of the build.""" -BuildableRid = core.RID +BuildableRid: typing_extensions.TypeAlias = core.RID """ The Resource Identifier (RID) of a Resource that can be built. For example, this is a Dataset RID, Media Set RID or Restricted View RID. @@ -173,7 +175,7 @@ class CreateScheduleRequestAction(core.ModelBase): target: CreateScheduleRequestBuildTarget -CreateScheduleRequestBuildTarget = typing_extensions.Annotated[ +CreateScheduleRequestBuildTarget: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "CreateScheduleRequestUpstreamTarget", "CreateScheduleRequestManualTarget", @@ -213,7 +215,7 @@ class CreateScheduleRequestProjectScope(core.ModelBase): type: typing.Literal["project"] = "project" -CreateScheduleRequestScopeMode = typing_extensions.Annotated[ +CreateScheduleRequestScopeMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["CreateScheduleRequestProjectScope", "CreateScheduleRequestUserScope"], pydantic.Field(discriminator="type"), ] @@ -238,7 +240,7 @@ class CreateScheduleRequestUserScope(core.ModelBase): type: typing.Literal["user"] = "user" -CronExpression = str +CronExpression: typing_extensions.TypeAlias = str """ A standard CRON expression with minute, hour, day, month and day of week. @@ -264,14 +266,14 @@ class DatasetUpdatedTrigger(core.ModelBase): type: typing.Literal["datasetUpdated"] = "datasetUpdated" -FallbackBranches = typing.List[core_models.BranchName] +FallbackBranches: typing_extensions.TypeAlias = typing.List[core_models.BranchName] """ The branches to retrieve JobSpecs from if no JobSpec is found on the target branch. """ -ForceBuild = bool +ForceBuild: typing_extensions.TypeAlias = bool """Whether to ignore staleness information when running the build.""" @@ -339,18 +341,20 @@ class Job(core.ModelBase): """ -JobOutput = typing_extensions.Annotated[ +JobOutput: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["DatasetJobOutput", "TransactionalMediaSetJobOutput"], pydantic.Field(discriminator="type"), ] """Other types of Job Outputs exist in Foundry. Currently, only Dataset and Media Set are supported by the API.""" -JobStartedTime = core.AwareDatetime +JobStartedTime: typing_extensions.TypeAlias = core.AwareDatetime """The time this job started waiting for the dependencies to be resolved.""" -JobStatus = typing.Literal["WAITING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", "DID_NOT_RUN"] +JobStatus: typing_extensions.TypeAlias = typing.Literal[ + "WAITING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", "DID_NOT_RUN" +] """The status of the job.""" @@ -416,7 +420,7 @@ class NewLogicTrigger(core.ModelBase): type: typing.Literal["newLogic"] = "newLogic" -NotificationsEnabled = bool +NotificationsEnabled: typing_extensions.TypeAlias = bool """ Whether to receive a notification at the end of the build. The notification will be sent to the user that has most recently edited the schedule. @@ -468,7 +472,7 @@ class ReplaceScheduleRequestAction(core.ModelBase): target: ReplaceScheduleRequestBuildTarget -ReplaceScheduleRequestBuildTarget = typing_extensions.Annotated[ +ReplaceScheduleRequestBuildTarget: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ReplaceScheduleRequestUpstreamTarget", "ReplaceScheduleRequestManualTarget", @@ -508,7 +512,7 @@ class ReplaceScheduleRequestProjectScope(core.ModelBase): type: typing.Literal["project"] = "project" -ReplaceScheduleRequestScopeMode = typing_extensions.Annotated[ +ReplaceScheduleRequestScopeMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ReplaceScheduleRequestProjectScope", "ReplaceScheduleRequestUserScope"], pydantic.Field(discriminator="type"), ] @@ -533,7 +537,7 @@ class ReplaceScheduleRequestUserScope(core.ModelBase): type: typing.Literal["user"] = "user" -RetryCount = int +RetryCount: typing_extensions.TypeAlias = int """ The number of retry attempts for failed Jobs within the Build. A Job's failure is not considered final until all retries have been attempted or an error occurs indicating that retries cannot be performed. Be aware, @@ -565,7 +569,7 @@ class Schedule(core.ModelBase): scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] -SchedulePaused = bool +SchedulePaused: typing_extensions.TypeAlias = bool """SchedulePaused""" @@ -601,7 +605,7 @@ class ScheduleRunError(core.ModelBase): type: typing.Literal["error"] = "error" -ScheduleRunErrorName = typing.Literal[ +ScheduleRunErrorName: typing_extensions.TypeAlias = typing.Literal[ "TARGETRESOLUTIONFAILURE", "CYCLICDEPENDENCY", "INCOMPATIBLETARGETS", @@ -619,7 +623,7 @@ class ScheduleRunIgnored(core.ModelBase): type: typing.Literal["ignored"] = "ignored" -ScheduleRunResult = typing_extensions.Annotated[ +ScheduleRunResult: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ScheduleRunIgnored", "ScheduleRunSubmitted", "ScheduleRunError"], pydantic.Field(discriminator="type"), ] @@ -629,7 +633,7 @@ class ScheduleRunIgnored(core.ModelBase): """ -ScheduleRunRid = core.RID +ScheduleRunRid: typing_extensions.TypeAlias = core.RID """The RID of a schedule run""" @@ -668,11 +672,11 @@ class ScheduleVersion(core.ModelBase): scope_mode: ScopeMode = pydantic.Field(alias=str("scopeMode")) # type: ignore[literal-required] -ScheduleVersionRid = core.RID +ScheduleVersionRid: typing_extensions.TypeAlias = core.RID """The RID of a schedule version""" -ScopeMode = typing_extensions.Annotated[ +ScopeMode: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["ProjectScope", "UserScope"], pydantic.Field(discriminator="type") ] """The boundaries for the schedule build.""" @@ -693,11 +697,13 @@ class SearchBuildsEqualsFilter(core.ModelBase): type: typing.Literal["eq"] = "eq" -SearchBuildsEqualsFilterField = typing.Literal["CREATED_BY", "BRANCH_NAME", "STATUS", "RID"] +SearchBuildsEqualsFilterField: typing_extensions.TypeAlias = typing.Literal[ + "CREATED_BY", "BRANCH_NAME", "STATUS", "RID" +] """SearchBuildsEqualsFilterField""" -SearchBuildsFilter = typing_extensions.Annotated[ +SearchBuildsFilter: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "SearchBuildsNotFilter", "SearchBuildsOrFilter", @@ -719,7 +725,9 @@ class SearchBuildsGteFilter(core.ModelBase): type: typing.Literal["gte"] = "gte" -SearchBuildsGteFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +SearchBuildsGteFilterField: typing_extensions.TypeAlias = typing.Literal[ + "STARTED_TIME", "FINISHED_TIME" +] """SearchBuildsGteFilterField""" @@ -731,7 +739,9 @@ class SearchBuildsLtFilter(core.ModelBase): type: typing.Literal["lt"] = "lt" -SearchBuildsLtFilterField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +SearchBuildsLtFilterField: typing_extensions.TypeAlias = typing.Literal[ + "STARTED_TIME", "FINISHED_TIME" +] """SearchBuildsLtFilterField""" @@ -755,7 +765,9 @@ class SearchBuildsOrderBy(core.ModelBase): fields: typing.List[SearchBuildsOrderByItem] -SearchBuildsOrderByField = typing.Literal["STARTED_TIME", "FINISHED_TIME"] +SearchBuildsOrderByField: typing_extensions.TypeAlias = typing.Literal[ + "STARTED_TIME", "FINISHED_TIME" +] """SearchBuildsOrderByField""" @@ -810,7 +822,7 @@ class TransactionalMediaSetJobOutput(core.ModelBase): type: typing.Literal["transactionalMediaSetJobOutput"] = "transactionalMediaSetJobOutput" -Trigger = typing_extensions.Annotated[ +Trigger: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "JobSucceededTrigger", "OrTrigger", @@ -849,29 +861,11 @@ class UserScope(core.ModelBase): type: typing.Literal["user"] = "user" -RetryBackoffDuration = core_models.Duration +RetryBackoffDuration: typing_extensions.TypeAlias = core_models.Duration """The duration to wait before retrying after a Job fails.""" -core.resolve_forward_references(BuildTarget, globalns=globals(), localns=locals()) -core.resolve_forward_references( - CreateScheduleRequestBuildTarget, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - CreateScheduleRequestScopeMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references(FallbackBranches, globalns=globals(), localns=locals()) -core.resolve_forward_references(JobOutput, globalns=globals(), localns=locals()) -core.resolve_forward_references( - ReplaceScheduleRequestBuildTarget, globalns=globals(), localns=locals() -) -core.resolve_forward_references( - ReplaceScheduleRequestScopeMode, globalns=globals(), localns=locals() -) -core.resolve_forward_references(ScheduleRunResult, globalns=globals(), localns=locals()) -core.resolve_forward_references(ScopeMode, globalns=globals(), localns=locals()) -core.resolve_forward_references(SearchBuildsFilter, globalns=globals(), localns=locals()) -core.resolve_forward_references(Trigger, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AbortOnFailure", diff --git a/foundry_sdk/v2/sql_queries/models.py b/foundry_sdk/v2/sql_queries/models.py index 443f0e7e..9cbf5c81 100644 --- a/foundry_sdk/v2/sql_queries/models.py +++ b/foundry_sdk/v2/sql_queries/models.py @@ -38,7 +38,7 @@ class CanceledQueryStatus(core.ModelBase): type: typing.Literal["canceled"] = "canceled" -ColumnType = typing_extensions.Annotated[ +ColumnType: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ core_models.DateType, "StructColumnType", @@ -136,7 +136,7 @@ class MapColumnType(core.ModelBase): type: typing.Literal["map"] = "map" -MapParameterKey = str +MapParameterKey: typing_extensions.TypeAlias = str """A key for a map parameter value.""" @@ -218,11 +218,11 @@ class ParameterMapValue(core.ModelBase): type: typing.Literal["map"] = "map" -ParameterMapping = typing.Dict["ParameterName", "ParameterValue"] +ParameterMapping: typing_extensions.TypeAlias = typing.Dict["ParameterName", "ParameterValue"] """A mapping of named parameters to their values.""" -ParameterName = str +ParameterName: typing_extensions.TypeAlias = str """The name of a SQL query parameter.""" @@ -260,7 +260,7 @@ class ParameterTimestampValue(core.ModelBase): type: typing.Literal["timestamp"] = "timestamp" -ParameterValue = typing_extensions.Annotated[ +ParameterValue: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "ParameterDateValue", "ParameterStructValue", @@ -283,7 +283,7 @@ class ParameterTimestampValue(core.ModelBase): """A typed parameter value for SQL query execution.""" -Parameters = typing_extensions.Annotated[ +Parameters: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["UnnamedParameterValues", "NamedParameterMapping"], pydantic.Field(discriminator="type"), ] @@ -293,7 +293,7 @@ class ParameterTimestampValue(core.ModelBase): """ -QueryStatus = typing_extensions.Annotated[ +QueryStatus: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union[ "RunningQueryStatus", "CanceledQueryStatus", "FailedQueryStatus", "SucceededQueryStatus" ], @@ -309,11 +309,11 @@ class RunningQueryStatus(core.ModelBase): type: typing.Literal["running"] = "running" -SerializationFormat = typing.Literal["ARROW", "CSV"] +SerializationFormat: typing_extensions.TypeAlias = typing.Literal["ARROW", "CSV"] """Format for SQL query result serialization.""" -SqlQueryId = str +SqlQueryId: typing_extensions.TypeAlias = str """The identifier of a SQL Query.""" @@ -338,7 +338,7 @@ class StructElement(core.ModelBase): struct_element_value: ParameterValue = pydantic.Field(alias=str("structElementValue")) # type: ignore[literal-required] -StructElementName = typing_extensions.Annotated[ +StructElementName: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["StructFieldRid", "StructFieldKeyValue"], pydantic.Field(discriminator="type") ] """The name of a struct element.""" @@ -372,12 +372,7 @@ class UnnamedParameterValues(core.ModelBase): type: typing.Literal["unnamedParameterValues"] = "unnamedParameterValues" -core.resolve_forward_references(ColumnType, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterMapping, globalns=globals(), localns=locals()) -core.resolve_forward_references(ParameterValue, globalns=globals(), localns=locals()) -core.resolve_forward_references(Parameters, globalns=globals(), localns=locals()) -core.resolve_forward_references(QueryStatus, globalns=globals(), localns=locals()) -core.resolve_forward_references(StructElementName, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "AnyColumnType", diff --git a/foundry_sdk/v2/streams/models.py b/foundry_sdk/v2/streams/models.py index ca692573..740e7c4b 100644 --- a/foundry_sdk/v2/streams/models.py +++ b/foundry_sdk/v2/streams/models.py @@ -42,7 +42,7 @@ class CommitSubscriberOffsetsRequest(core.ModelBase): """ -Compressed = bool +Compressed: typing_extensions.TypeAlias = bool """ Compression helps reduce the size of the data being sent, resulting in lower network usage and storage, at the cost of some additional CPU usage for compression and decompression. This stream type @@ -176,11 +176,11 @@ class EarliestPosition(core.ModelBase): type: typing.Literal["earliest"] = "earliest" -GetEndOffsetsResponse = typing.Dict["PartitionId", core.Long] +GetEndOffsetsResponse: typing_extensions.TypeAlias = typing.Dict["PartitionId", core.Long] """The end offsets for each partition of a stream.""" -GetRecordsResponse = typing.List["RecordWithOffset"] +GetRecordsResponse: typing_extensions.TypeAlias = typing.List["RecordWithOffset"] """A list of records from a stream with their offsets.""" @@ -194,19 +194,19 @@ class LatestPosition(core.ModelBase): type: typing.Literal["latest"] = "latest" -PartitionId = str +PartitionId: typing_extensions.TypeAlias = str """The identifier for a partition of a Foundry stream.""" -PartitionOffsets = typing.Dict["PartitionId", core.Long] +PartitionOffsets: typing_extensions.TypeAlias = typing.Dict["PartitionId", core.Long] """A map of partition IDs to offsets.""" -PartitionRecords = typing.List["RecordWithOffset"] +PartitionRecords: typing_extensions.TypeAlias = typing.List["RecordWithOffset"] """Records from a single partition with their offsets.""" -PartitionsCount = int +PartitionsCount: typing_extensions.TypeAlias = int """The number of partitions for a Foundry stream.""" @@ -242,7 +242,7 @@ class PublishRecordsToStreamRequest(core.ModelBase): """ -ReadPosition = typing_extensions.Annotated[ +ReadPosition: typing_extensions.TypeAlias = typing_extensions.Annotated[ typing.Union["SpecificPosition", "EarliestPosition", "LatestPosition"], pydantic.Field(discriminator="type"), ] @@ -292,7 +292,7 @@ class ReadSubscriberRecordsResponse(core.ModelBase): """Records grouped by partition ID.""" -Record = typing.Dict[str, typing.Optional[typing.Any]] +Record: typing_extensions.TypeAlias = typing.Dict[str, typing.Optional[typing.Any]] """A record to be published to a stream.""" @@ -391,7 +391,7 @@ class Stream(core.ModelBase): """Whether or not compression is enabled for the stream. Defaults to false.""" -StreamType = typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"] +StreamType: typing_extensions.TypeAlias = typing.Literal["LOW_LATENCY", "HIGH_THROUGHPUT"] """ LOW_LATENCY: The default stream type. Recommended for most use cases. @@ -443,20 +443,15 @@ class Subscriber(core.ModelBase): """Timestamp when the subscriber was registered.""" -SubscriberId = str +SubscriberId: typing_extensions.TypeAlias = str """A unique identifier for a stream subscriber. Must be unique within the scope of a stream.""" -ViewRid = core.RID +ViewRid: typing_extensions.TypeAlias = core.RID """The resource identifier (RID) of the view that represents a stream.""" -core.resolve_forward_references(GetEndOffsetsResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(GetRecordsResponse, globalns=globals(), localns=locals()) -core.resolve_forward_references(PartitionOffsets, globalns=globals(), localns=locals()) -core.resolve_forward_references(PartitionRecords, globalns=globals(), localns=locals()) -core.resolve_forward_references(ReadPosition, globalns=globals(), localns=locals()) -core.resolve_forward_references(Record, globalns=globals(), localns=locals()) +core.resolve_forward_references_in_module(__name__) __all__ = [ "CommitSubscriberOffsetsRequest", diff --git a/foundry_sdk/v2/third_party_applications/models.py b/foundry_sdk/v2/third_party_applications/models.py index a37e952d..45919ecf 100644 --- a/foundry_sdk/v2/third_party_applications/models.py +++ b/foundry_sdk/v2/third_party_applications/models.py @@ -18,6 +18,7 @@ import typing import pydantic +import typing_extensions from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models @@ -36,7 +37,7 @@ class ListVersionsResponse(core.ModelBase): next_page_token: typing.Optional[core_models.PageToken] = pydantic.Field(alias=str("nextPageToken"), default=None) # type: ignore[literal-required] -Subdomain = str +Subdomain: typing_extensions.TypeAlias = str """A subdomain from which a website is served.""" @@ -47,7 +48,7 @@ class ThirdPartyApplication(core.ModelBase): """An RID identifying a third-party application created in Developer Console.""" -ThirdPartyApplicationRid = core.RID +ThirdPartyApplicationRid: typing_extensions.TypeAlias = core.RID """An RID identifying a third-party application created in Developer Console.""" @@ -58,7 +59,7 @@ class Version(core.ModelBase): """The semantic version of the Website.""" -VersionVersion = str +VersionVersion: typing_extensions.TypeAlias = str """The semantic version of the Website.""" diff --git a/foundry_sdk/v2/widgets/models.py b/foundry_sdk/v2/widgets/models.py index 3ea2c4e7..ca679124 100644 --- a/foundry_sdk/v2/widgets/models.py +++ b/foundry_sdk/v2/widgets/models.py @@ -18,6 +18,7 @@ import typing import pydantic +import typing_extensions from foundry_sdk import _core as core from foundry_sdk.v2.core import models as core_models @@ -52,15 +53,15 @@ class DevModeSnapshot(core.ModelBase): """The dev mode settings for each widget set, keyed by widget set RID.""" -DevModeSnapshotId = str +DevModeSnapshotId: typing_extensions.TypeAlias = str """A content-addressed identifier for a dev mode settings snapshot.""" -DevModeStatus = typing.Literal["ENABLED", "PAUSED", "DISABLED"] +DevModeStatus: typing_extensions.TypeAlias = typing.Literal["ENABLED", "PAUSED", "DISABLED"] """The user's global development mode status for widget sets.""" -FilePath = str +FilePath: typing_extensions.TypeAlias = str """A locator for a specific file in a widget set's release directory.""" @@ -81,11 +82,11 @@ class OntologySdkInputSpec(core.ModelBase): """The version of the Ontology SDK.""" -OntologySdkPackageRid = core.RID +OntologySdkPackageRid: typing_extensions.TypeAlias = core.RID """A Resource Identifier (RID) identifying an Ontology SDK package.""" -OntologySdkVersion = str +OntologySdkVersion: typing_extensions.TypeAlias = str """A limited semver version string of the format major.minor.patch.""" @@ -113,7 +114,7 @@ class ReleaseLocator(core.ModelBase): """The version of the repository storing the backing files.""" -ReleaseVersion = str +ReleaseVersion: typing_extensions.TypeAlias = str """The semantic version of the widget set.""" @@ -130,11 +131,11 @@ class Repository(core.ModelBase): """ -RepositoryRid = core.RID +RepositoryRid: typing_extensions.TypeAlias = core.RID """A Resource Identifier (RID) identifying a repository.""" -RepositoryVersion = str +RepositoryVersion: typing_extensions.TypeAlias = str """A semantic version of a repository storing backing files.""" @@ -158,7 +159,7 @@ class ScriptEntrypoint(core.ModelBase): """ -ScriptType = typing.Literal["DEFAULT", "MODULE"] +ScriptType: typing_extensions.TypeAlias = typing.Literal["DEFAULT", "MODULE"] """ScriptType""" @@ -215,7 +216,7 @@ class WidgetDevModeSettingsV2(core.ModelBase): """The entrypoint CSS files for the widget.""" -WidgetId = str +WidgetId: typing_extensions.TypeAlias = str """ Human readable ID for a widget. Must be unique within a widget set. Considered unsafe as it may contain user defined data. @@ -227,7 +228,7 @@ class WidgetDevModeSettingsV2(core.ModelBase): """ -WidgetRid = core.RID +WidgetRid: typing_extensions.TypeAlias = core.RID """A Resource Identifier (RID) identifying a widget.""" @@ -287,7 +288,7 @@ class WidgetSetInputSpec(core.ModelBase): """The Ontology SDK specifications used by the widget set.""" -WidgetSetRid = core.RID +WidgetSetRid: typing_extensions.TypeAlias = core.RID """A Resource Identifier (RID) identifying a widget set.""" diff --git a/tox.ini b/tox.ini index c36139b0..caff155c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py{3.10,3.11,3.12,3.13}, black +envlist = py{3.10,3.11,3.12,3.13,3.14}, black [testenv] setenv =