From 57b3f06a8c80cdb90068d7016af720e9dfe7c833 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 23:13:11 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 6 +- README.md | 25 +- pyproject.toml | 5 +- reference.md | 103 ++------ src/anduril/__init__.py | 21 ++ src/anduril/client.py | 22 +- src/anduril/core/client_wrapper.py | 4 +- src/anduril/core/http_response.py | 6 +- src/anduril/entities/client.py | 60 +---- src/anduril/entities/raw_client.py | 17 +- .../types/stream_entities_response.py | 6 +- src/anduril/entity/types/error.py | 2 +- src/anduril/errors/content_too_large_error.py | 3 +- .../errors/insufficient_storage_error.py | 3 +- src/anduril/errors/request_timeout_error.py | 3 +- src/anduril/errors/too_many_requests_error.py | 3 +- src/anduril/oauth/client.py | 10 +- src/anduril/oauth/types/get_token_response.py | 14 +- src/anduril/objects/client.py | 60 ++--- src/anduril/objects/raw_client.py | 29 ++- src/anduril/tasks/client.py | 70 +---- .../tasks/types/stream_as_agent_response.py | 14 +- .../tasks/types/stream_tasks_response.py | 4 +- .../types/task_query_update_time_range.py | 23 +- ...ream_request_task_type_task_type_prefix.py | 14 +- ...stream_request_task_type_task_type_urls.py | 11 +- src/anduril/types/__init__.py | 21 ++ src/anduril/types/acm_details.py | 21 +- src/anduril/types/agent.py | 11 +- src/anduril/types/agent_request.py | 14 +- src/anduril/types/agent_task_request.py | 14 +- src/anduril/types/alert.py | 37 ++- src/anduril/types/alert_condition.py | 16 +- src/anduril/types/aliases.py | 6 +- src/anduril/types/allocation.py | 9 +- src/anduril/types/angle_of_arrival.py | 32 ++- src/anduril/types/bandwidth.py | 6 +- src/anduril/types/bandwidth_range.py | 8 +- src/anduril/types/cancel_request.py | 12 +- src/anduril/types/complete_request.py | 11 +- src/anduril/types/component_health.py | 15 +- src/anduril/types/correlation_membership.py | 26 +- src/anduril/types/correlation_metadata.py | 19 +- src/anduril/types/cron_window.py | 34 +-- src/anduril/types/decorrelated_single.py | 12 +- src/anduril/types/decorrelation.py | 32 ++- src/anduril/types/delivery_constraints.py | 40 +++ src/anduril/types/delivery_error.py | 32 +++ src/anduril/types/delivery_error_code.py | 13 + src/anduril/types/delivery_state.py | 44 ++++ src/anduril/types/delivery_state_status.py | 14 + src/anduril/types/dimensions.py | 11 +- src/anduril/types/echelon.py | 4 +- src/anduril/types/emitter_notation.py | 6 +- src/anduril/types/entity.py | 243 ++++++++---------- src/anduril/types/entity_event.py | 6 +- src/anduril/types/entity_event_response.py | 21 +- src/anduril/types/entity_ids_selector.py | 13 +- src/anduril/types/error_ellipse.py | 44 ++-- .../types/field_classification_information.py | 28 +- src/anduril/types/field_of_view.py | 88 +++---- src/anduril/types/fixed_retry.py | 32 +++ src/anduril/types/frequency.py | 13 +- src/anduril/types/frequency_range.py | 23 +- src/anduril/types/fuel.py | 86 +++---- src/anduril/types/geo_details.py | 4 +- src/anduril/types/geo_ellipse.py | 59 +++-- src/anduril/types/geo_ellipsoid.py | 43 ++-- src/anduril/types/geo_polygon.py | 17 +- src/anduril/types/geo_polygon_position.py | 16 +- src/anduril/types/google_protobuf_any.py | 11 +- src/anduril/types/health.py | 59 +++-- src/anduril/types/high_value_target.py | 57 ++-- src/anduril/types/high_value_target_match.py | 26 +- src/anduril/types/line_of_bearing.py | 31 +-- src/anduril/types/lla.py | 14 +- src/anduril/types/location.py | 43 ++-- src/anduril/types/location_uncertainty.py | 40 +-- src/anduril/types/mean_keplerian_elements.py | 73 +++--- src/anduril/types/media_item.py | 14 +- src/anduril/types/mode5.py | 24 +- src/anduril/types/ontology.py | 27 +- src/anduril/types/orbit.py | 12 +- src/anduril/types/orbit_mean_elements.py | 10 +- .../types/orbit_mean_elements_metadata.py | 55 ++-- src/anduril/types/override.py | 54 ++-- src/anduril/types/owner.py | 11 +- src/anduril/types/payload_configuration.py | 44 ++-- src/anduril/types/payloads.py | 6 +- src/anduril/types/pose.py | 32 +-- src/anduril/types/position.py | 80 +++--- src/anduril/types/power_level.py | 51 ++-- src/anduril/types/power_source.py | 37 ++- src/anduril/types/power_state.py | 13 +- src/anduril/types/primary_correlation.py | 9 +- src/anduril/types/principal.py | 16 +- src/anduril/types/projected_frustum.py | 47 ++-- src/anduril/types/provenance.py | 67 +++-- .../types/pulse_repetition_interval.py | 6 +- src/anduril/types/range_rings.py | 47 ++-- src/anduril/types/relations.py | 11 +- src/anduril/types/relationship.py | 36 ++- src/anduril/types/relationship_type.py | 30 +-- src/anduril/types/replication.py | 11 +- src/anduril/types/retry_strategy.py | 30 +++ src/anduril/types/rf_configuration.py | 19 +- src/anduril/types/route_details.py | 23 +- src/anduril/types/scan_characteristics.py | 10 +- src/anduril/types/schedule.py | 21 +- src/anduril/types/secondary_correlation.py | 12 +- src/anduril/types/sensor.py | 74 +++--- src/anduril/types/signal.py | 75 +++--- src/anduril/types/status.py | 16 +- src/anduril/types/symbology.py | 6 +- src/anduril/types/system.py | 40 ++- src/anduril/types/target_priority.py | 12 +- src/anduril/types/task.py | 125 +++++---- src/anduril/types/task_catalog.py | 6 +- src/anduril/types/task_definition.py | 11 +- src/anduril/types/task_error.py | 9 +- src/anduril/types/task_event_data.py | 9 +- .../types/task_event_data_task_event.py | 10 +- src/anduril/types/task_query_results.py | 17 +- src/anduril/types/task_status.py | 26 +- src/anduril/types/task_version.py | 46 ++-- src/anduril/types/team.py | 12 +- src/anduril/types/threat.py | 11 +- src/anduril/types/tle_parameters.py | 81 +++--- src/anduril/types/tracked.py | 79 +++--- src/anduril/types/tracked_by.py | 26 +- src/anduril/types/transponder_codes.py | 24 +- src/anduril/types/u_int32range.py | 12 +- src/anduril/types/user.py | 11 +- src/anduril/types/visual_details.py | 11 +- 134 files changed, 1874 insertions(+), 1888 deletions(-) create mode 100644 src/anduril/types/delivery_constraints.py create mode 100644 src/anduril/types/delivery_error.py create mode 100644 src/anduril/types/delivery_error_code.py create mode 100644 src/anduril/types/delivery_state.py create mode 100644 src/anduril/types/delivery_state_status.py create mode 100644 src/anduril/types/fixed_retry.py create mode 100644 src/anduril/types/retry_strategy.py diff --git a/.fern/metadata.json b/.fern/metadata.json index 84dffbc..46d6785 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,10 +1,10 @@ { - "cliVersion": "3.51.2", + "cliVersion": "3.70.1", "generatorName": "fernapi/fern-python-sdk", - "generatorVersion": "4.51.1", + "generatorVersion": "4.55.1", "generatorConfig": { "client_class_name": "Lattice", "package_name": "anduril" }, - "sdkVersion": "4.2.0" + "sdkVersion": "4.3.0" } \ No newline at end of file diff --git a/README.md b/README.md index 67135ce..48b0f93 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,7 @@ Instantiate and use the client with the following: ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.long_poll_entity_events( session_token="sessionToken", ) @@ -74,10 +71,7 @@ import asyncio from anduril import AsyncLattice -client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = AsyncLattice() async def main() -> None: @@ -111,10 +105,7 @@ The SDK supports streaming responses, as well, the response will be a generator ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.entities.stream_entities() for chunk in response.data: yield chunk @@ -127,10 +118,7 @@ Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.objects.list_objects() for item in response: yield item @@ -181,6 +169,7 @@ client = Lattice( ) response = client.entities.with_raw_response.long_poll_entity_events(...) print(response.headers) # access the response headers +print(response.status_code) # access the response status code print(response.data) # access the underlying object pager = client.objects.list_objects(...) print(pager.response) # access the typed response for the first page @@ -191,7 +180,9 @@ for page in pager.iter_pages(): for item in page: print(item) # access the underlying object(s) with client.entities.with_raw_response.stream_entities(...) as response: - print(response.headers) # access the response headers + print( + response.headers + ) # access the response headersprint(response.status_code) # access the response status code for chunk in response.data: print(chunk) # access the underlying object(s) ``` diff --git a/pyproject.toml b/pyproject.toml index ed52f5a..41efc63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ dynamic = ["version"] [tool.poetry] name = "anduril-lattice-sdk" -version = "4.2.0" +version = "4.3.0" description = "HTTP clients for the Anduril Lattice SDK" readme = "README.md" authors = [ @@ -24,6 +24,9 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", diff --git a/reference.md b/reference.md index 2f31df7..093da84 100644 --- a/reference.md +++ b/reference.md @@ -35,10 +35,7 @@ provenance.sourceUpdateTime is greater than the provenance.sourceUpdateTime of t ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.publish_entity() ``` @@ -420,10 +417,7 @@ Describes an entity's security classification levels at an overall classificatio ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.get_entity( entity_id="entityId", ) @@ -497,10 +491,7 @@ concurrently for the same field path, the last writer wins. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.override_entity( entity_id="entityId", field_path="mil_view.disposition", @@ -596,10 +587,7 @@ This operation clears the override value from the specified field path on the en ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.remove_entity_override( entity_id="entityId", field_path="mil_view.disposition", @@ -684,10 +672,7 @@ In this case you must start a new session by sending a request with an empty ses ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.entities.long_poll_entity_events( session_token="sessionToken", ) @@ -783,10 +768,7 @@ this provides real-time updates with minimal latency and reduced server load. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.entities.stream_entities() for chunk in response.data: yield chunk @@ -878,10 +860,7 @@ through other Tasks API endpoints. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.tasks.create_task() ``` @@ -1023,10 +1002,7 @@ perspective. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.tasks.get_task( task_id="taskId", ) @@ -1104,10 +1080,7 @@ reaches these states, no further updates are allowed. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.tasks.update_task_status( task_id="taskId", ) @@ -1218,10 +1191,7 @@ By default, this returns the latest task version for each matching task from the ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.tasks.query_tasks() ``` @@ -1320,10 +1290,7 @@ updates for task creation and status changes. Additionally, heartbeat messages a ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.tasks.stream_tasks() for chunk in response.data: yield chunk @@ -1440,10 +1407,7 @@ period you will be expected to reinitiate a new request. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.tasks.listen_as_agent() ``` @@ -1527,10 +1491,7 @@ to provide progress information back to Tasks API. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.tasks.stream_as_agent() for chunk in response.data: yield chunk @@ -1607,10 +1568,7 @@ Lists objects in your environment. You can define a prefix to list a subset of y ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() response = client.objects.list_objects() for item in response: yield item @@ -1664,6 +1622,14 @@ for page in response.iter_pages():
+**max_page_size:** `typing.Optional[int]` — Sets the maximum number of items that should be returned on a single page. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -1705,10 +1671,7 @@ Fetches an object from your environment using the objectPath path parameter. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.objects.get_object( object_path="objectPath", ) @@ -1792,10 +1755,7 @@ Uploads an object. The object must be 1 GiB or smaller. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.objects.upload_object() ``` @@ -1869,10 +1829,7 @@ Deletes an object from your environment given the objectPath path parameter. ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.objects.delete_object( object_path="objectPath", ) @@ -1940,10 +1897,7 @@ Returns metadata for a specified object path. Use this to fetch metadata such as ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.objects.get_object_metadata( object_path="objectPath", ) @@ -2012,10 +1966,7 @@ Gets a new short-lived token using the specified client credentials ```python from anduril import Lattice -client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", -) +client = Lattice() client.oauth.get_token() ``` diff --git a/src/anduril/__init__.py b/src/anduril/__init__.py index 62f6976..cb99c82 100644 --- a/src/anduril/__init__.py +++ b/src/anduril/__init__.py @@ -47,6 +47,11 @@ DecorrelatedAll, DecorrelatedSingle, Decorrelation, + DeliveryConstraints, + DeliveryError, + DeliveryErrorCode, + DeliveryState, + DeliveryStateStatus, Dimensions, Echelon, EchelonArmyEchelon, @@ -67,6 +72,7 @@ FieldOfView, FieldOfViewMode, Fixed, + FixedRetry, Frequency, FrequencyRange, Fuel, @@ -150,6 +156,7 @@ RelationshipType, Relationships, Replication, + RetryStrategy, RfConfiguration, RouteDetails, ScanCharacteristics, @@ -272,6 +279,11 @@ "DecorrelatedAll": ".types", "DecorrelatedSingle": ".types", "Decorrelation": ".types", + "DeliveryConstraints": ".types", + "DeliveryError": ".types", + "DeliveryErrorCode": ".types", + "DeliveryState": ".types", + "DeliveryStateStatus": ".types", "Dimensions": ".types", "Echelon": ".types", "EchelonArmyEchelon": ".types", @@ -292,6 +304,7 @@ "FieldOfView": ".types", "FieldOfViewMode": ".types", "Fixed": ".types", + "FixedRetry": ".types", "Frequency": ".types", "FrequencyRange": ".types", "Fuel": ".types", @@ -383,6 +396,7 @@ "Relationships": ".types", "Replication": ".types", "RequestTimeoutError": ".errors", + "RetryStrategy": ".types", "RfConfiguration": ".types", "RouteDetails": ".types", "ScanCharacteristics": ".types", @@ -522,6 +536,11 @@ def __dir__(): "DecorrelatedAll", "DecorrelatedSingle", "Decorrelation", + "DeliveryConstraints", + "DeliveryError", + "DeliveryErrorCode", + "DeliveryState", + "DeliveryStateStatus", "Dimensions", "Echelon", "EchelonArmyEchelon", @@ -542,6 +561,7 @@ def __dir__(): "FieldOfView", "FieldOfViewMode", "Fixed", + "FixedRetry", "Frequency", "FrequencyRange", "Fuel", @@ -633,6 +653,7 @@ def __dir__(): "Relationships", "Replication", "RequestTimeoutError", + "RetryStrategy", "RfConfiguration", "RouteDetails", "ScanCharacteristics", diff --git a/src/anduril/client.py b/src/anduril/client.py index 3db7e78..71e70bd 100644 --- a/src/anduril/client.py +++ b/src/anduril/client.py @@ -63,10 +63,7 @@ class Lattice: -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() # or ... @@ -84,6 +81,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, @@ -97,6 +95,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, @@ -108,6 +107,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, client_id: typing.Optional[str] = None, client_secret: typing.Optional[str] = None, @@ -120,6 +120,9 @@ def __init__( _defaulted_timeout = ( timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read ) + if server is not None: + _server = server if server is not None else "example.developer.anduril.com" + base_url = "https://{server}".format(server=_server) if token is not None: self._client_wrapper = SyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), @@ -244,10 +247,7 @@ class AsyncLattice: -------- from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() # or ... @@ -265,6 +265,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, @@ -278,6 +279,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, @@ -289,6 +291,7 @@ def __init__( *, base_url: typing.Optional[str] = None, environment: LatticeEnvironment = LatticeEnvironment.DEFAULT, + server: typing.Optional[str] = None, headers: typing.Optional[typing.Dict[str, str]] = None, client_id: typing.Optional[str] = None, client_secret: typing.Optional[str] = None, @@ -301,6 +304,9 @@ def __init__( _defaulted_timeout = ( timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read ) + if server is not None: + _server = server if server is not None else "example.developer.anduril.com" + base_url = "https://{server}".format(server=_server) if token is not None: self._client_wrapper = AsyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), diff --git a/src/anduril/core/client_wrapper.py b/src/anduril/core/client_wrapper.py index 01a22f9..5cf25be 100644 --- a/src/anduril/core/client_wrapper.py +++ b/src/anduril/core/client_wrapper.py @@ -24,12 +24,12 @@ def get_headers(self) -> typing.Dict[str, str]: import platform headers: typing.Dict[str, str] = { - "User-Agent": "anduril-lattice-sdk/4.2.0", + "User-Agent": "anduril-lattice-sdk/4.3.0", "X-Fern-Language": "Python", "X-Fern-Runtime": f"python/{platform.python_version()}", "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}", "X-Fern-SDK-Name": "anduril-lattice-sdk", - "X-Fern-SDK-Version": "4.2.0", + "X-Fern-SDK-Version": "4.3.0", **(self.get_custom_headers() or {}), } token = self._get_token() diff --git a/src/anduril/core/http_response.py b/src/anduril/core/http_response.py index 2479747..00bb109 100644 --- a/src/anduril/core/http_response.py +++ b/src/anduril/core/http_response.py @@ -9,7 +9,7 @@ class BaseHttpResponse: - """Minimalist HTTP response wrapper that exposes response headers.""" + """Minimalist HTTP response wrapper that exposes response headers and status code.""" _response: httpx.Response @@ -20,6 +20,10 @@ def __init__(self, response: httpx.Response): def headers(self) -> Dict[str, str]: return dict(self._response.headers) + @property + def status_code(self) -> int: + return self._response.status_code + class HttpResponse(Generic[T], BaseHttpResponse): """HTTP response wrapper that exposes response headers and data.""" diff --git a/src/anduril/entities/client.py b/src/anduril/entities/client.py index acb9f92..027807e 100644 --- a/src/anduril/entities/client.py +++ b/src/anduril/entities/client.py @@ -259,10 +259,7 @@ def publish_entity( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.entities.publish_entity() """ _response = self._raw_client.publish_entity( @@ -327,10 +324,7 @@ def get_entity(self, entity_id: str, *, request_options: typing.Optional[Request -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.entities.get_entity( entity_id="entityId", ) @@ -383,10 +377,7 @@ def override_entity( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.entities.override_entity( entity_id="entityId", field_path="mil_view.disposition", @@ -423,10 +414,7 @@ def remove_entity_override( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.entities.remove_entity_override( entity_id="entityId", field_path="mil_view.disposition", @@ -473,10 +461,7 @@ def long_poll_entity_events( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.entities.long_poll_entity_events( session_token="sessionToken", ) @@ -538,10 +523,7 @@ def stream_entities( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() response = client.entities.stream_entities() for chunk in response: yield chunk @@ -770,10 +752,7 @@ async def publish_entity( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -846,10 +825,7 @@ async def get_entity(self, entity_id: str, *, request_options: typing.Optional[R from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -910,10 +886,7 @@ async def override_entity( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -958,10 +931,7 @@ async def remove_entity_override( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -1018,10 +988,7 @@ async def long_poll_entity_events( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -1091,10 +1058,7 @@ async def stream_entities( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: diff --git a/src/anduril/entities/raw_client.py b/src/anduril/entities/raw_client.py index 3e74acf..e563cf2 100644 --- a/src/anduril/entities/raw_client.py +++ b/src/anduril/entities/raw_client.py @@ -14,6 +14,7 @@ from ..core.pydantic_utilities import parse_obj_as, parse_sse_obj from ..core.request_options import RequestOptions from ..core.serialization import convert_and_respect_annotation_metadata +from ..entity.types.error import Error from ..errors.bad_request_error import BadRequestError from ..errors.not_found_error import NotFoundError from ..errors.request_timeout_error import RequestTimeoutError @@ -740,9 +741,9 @@ def long_poll_entity_events( raise RequestTimeoutError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -751,9 +752,9 @@ def long_poll_entity_events( raise TooManyRequestsError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -1571,9 +1572,9 @@ async def long_poll_entity_events( raise RequestTimeoutError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -1582,9 +1583,9 @@ async def long_poll_entity_events( raise TooManyRequestsError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), diff --git a/src/anduril/entities/types/stream_entities_response.py b/src/anduril/entities/types/stream_entities_response.py index a03a2ac..40b648a 100644 --- a/src/anduril/entities/types/stream_entities_response.py +++ b/src/anduril/entities/types/stream_entities_response.py @@ -36,9 +36,9 @@ class StreamEntitiesResponse_Entity(UniversalBaseModel): """ event: typing.Literal["entity"] = "entity" - event_type: typing_extensions.Annotated[typing.Optional[EntityEventEventType], FieldMetadata(alias="eventType")] = ( - pydantic.Field(alias="eventType", default=None) - ) + event_type: typing_extensions.Annotated[ + typing.Optional[EntityEventEventType], FieldMetadata(alias="eventType"), pydantic.Field(alias="eventType") + ] = None time: typing.Optional[dt.datetime] = None entity: typing.Optional["Entity"] = None diff --git a/src/anduril/entity/types/error.py b/src/anduril/entity/types/error.py index f3b2a1e..b345c02 100644 --- a/src/anduril/entity/types/error.py +++ b/src/anduril/entity/types/error.py @@ -9,7 +9,7 @@ class Error(UniversalBaseModel): - error_code: typing_extensions.Annotated[str, FieldMetadata(alias="errorCode")] = pydantic.Field(alias="errorCode") + error_code: typing_extensions.Annotated[str, FieldMetadata(alias="errorCode"), pydantic.Field(alias="errorCode")] message: str if IS_PYDANTIC_V2: diff --git a/src/anduril/errors/content_too_large_error.py b/src/anduril/errors/content_too_large_error.py index 28d4f48..e3243b2 100644 --- a/src/anduril/errors/content_too_large_error.py +++ b/src/anduril/errors/content_too_large_error.py @@ -3,8 +3,9 @@ import typing from ..core.api_error import ApiError +from ..object.types.error import Error class ContentTooLargeError(ApiError): - def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + def __init__(self, body: Error, headers: typing.Optional[typing.Dict[str, str]] = None): super().__init__(status_code=413, headers=headers, body=body) diff --git a/src/anduril/errors/insufficient_storage_error.py b/src/anduril/errors/insufficient_storage_error.py index f0dc628..5c258ac 100644 --- a/src/anduril/errors/insufficient_storage_error.py +++ b/src/anduril/errors/insufficient_storage_error.py @@ -3,8 +3,9 @@ import typing from ..core.api_error import ApiError +from ..object.types.error import Error class InsufficientStorageError(ApiError): - def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + def __init__(self, body: Error, headers: typing.Optional[typing.Dict[str, str]] = None): super().__init__(status_code=507, headers=headers, body=body) diff --git a/src/anduril/errors/request_timeout_error.py b/src/anduril/errors/request_timeout_error.py index 8406576..33ebdc8 100644 --- a/src/anduril/errors/request_timeout_error.py +++ b/src/anduril/errors/request_timeout_error.py @@ -3,8 +3,9 @@ import typing from ..core.api_error import ApiError +from ..entity.types.error import Error class RequestTimeoutError(ApiError): - def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + def __init__(self, body: Error, headers: typing.Optional[typing.Dict[str, str]] = None): super().__init__(status_code=408, headers=headers, body=body) diff --git a/src/anduril/errors/too_many_requests_error.py b/src/anduril/errors/too_many_requests_error.py index 705d6f1..80eba19 100644 --- a/src/anduril/errors/too_many_requests_error.py +++ b/src/anduril/errors/too_many_requests_error.py @@ -3,8 +3,9 @@ import typing from ..core.api_error import ApiError +from ..entity.types.error import Error class TooManyRequestsError(ApiError): - def __init__(self, body: typing.Any, headers: typing.Optional[typing.Dict[str, str]] = None): + def __init__(self, body: Error, headers: typing.Optional[typing.Dict[str, str]] = None): super().__init__(status_code=429, headers=headers, body=body) diff --git a/src/anduril/oauth/client.py b/src/anduril/oauth/client.py index a8a1554..93726c1 100644 --- a/src/anduril/oauth/client.py +++ b/src/anduril/oauth/client.py @@ -56,10 +56,7 @@ def get_token( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.oauth.get_token() """ _response = self._raw_client.get_token( @@ -115,10 +112,7 @@ async def get_token( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: diff --git a/src/anduril/oauth/types/get_token_response.py b/src/anduril/oauth/types/get_token_response.py index cbc3e6a..e80be92 100644 --- a/src/anduril/oauth/types/get_token_response.py +++ b/src/anduril/oauth/types/get_token_response.py @@ -29,13 +29,13 @@ class GetTokenResponse(UniversalBaseModel): Lifetime of the refresh token """ - not_before_policy: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="not-before-policy")] = ( - pydantic.Field(alias="not-before-policy", default=None) - ) - """ - Enforce that a token cannot be used before a specific unixtime - """ - + not_before_policy: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="not-before-policy"), + pydantic.Field( + alias="not-before-policy", description="Enforce that a token cannot be used before a specific unixtime" + ), + ] = None scope: typing.Optional[str] = pydantic.Field(default=None) """ The scope of the access token diff --git a/src/anduril/objects/client.py b/src/anduril/objects/client.py index 2fd622c..474c06a 100644 --- a/src/anduril/objects/client.py +++ b/src/anduril/objects/client.py @@ -37,6 +37,7 @@ def list_objects( since_timestamp: typing.Optional[dt.datetime] = None, page_token: typing.Optional[str] = None, all_objects_in_mesh: typing.Optional[bool] = None, + max_page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[PathMetadata, ListResponse]: """ @@ -56,6 +57,9 @@ def list_objects( all_objects_in_mesh : typing.Optional[bool] Lists objects across all environment nodes in a Lattice Mesh. + max_page_size : typing.Optional[int] + Sets the maximum number of items that should be returned on a single page. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -68,10 +72,7 @@ def list_objects( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() response = client.objects.list_objects() for item in response: yield item @@ -84,6 +85,7 @@ def list_objects( since_timestamp=since_timestamp, page_token=page_token, all_objects_in_mesh=all_objects_in_mesh, + max_page_size=max_page_size, request_options=request_options, ) @@ -121,10 +123,7 @@ def get_object( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.objects.get_object( object_path="objectPath", ) @@ -163,10 +162,7 @@ def upload_object( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.objects.upload_object() """ _response = self._raw_client.upload_object(object_path, request=request, request_options=request_options) @@ -192,10 +188,7 @@ def delete_object(self, object_path: str, *, request_options: typing.Optional[Re -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.objects.delete_object( object_path="objectPath", ) @@ -225,10 +218,7 @@ def get_object_metadata( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.objects.get_object_metadata( object_path="objectPath", ) @@ -259,6 +249,7 @@ async def list_objects( since_timestamp: typing.Optional[dt.datetime] = None, page_token: typing.Optional[str] = None, all_objects_in_mesh: typing.Optional[bool] = None, + max_page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[PathMetadata, ListResponse]: """ @@ -278,6 +269,9 @@ async def list_objects( all_objects_in_mesh : typing.Optional[bool] Lists objects across all environment nodes in a Lattice Mesh. + max_page_size : typing.Optional[int] + Sets the maximum number of items that should be returned on a single page. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -292,10 +286,7 @@ async def list_objects( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -315,6 +306,7 @@ async def main() -> None: since_timestamp=since_timestamp, page_token=page_token, all_objects_in_mesh=all_objects_in_mesh, + max_page_size=max_page_size, request_options=request_options, ) @@ -354,10 +346,7 @@ async def get_object( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -405,10 +394,7 @@ async def upload_object( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -442,10 +428,7 @@ async def delete_object(self, object_path: str, *, request_options: typing.Optio from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -483,10 +466,7 @@ async def get_object_metadata( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: diff --git a/src/anduril/objects/raw_client.py b/src/anduril/objects/raw_client.py index e8cdc1b..a265813 100644 --- a/src/anduril/objects/raw_client.py +++ b/src/anduril/objects/raw_client.py @@ -19,6 +19,7 @@ from ..errors.internal_server_error import InternalServerError from ..errors.not_found_error import NotFoundError from ..errors.unauthorized_error import UnauthorizedError +from ..object.types.error import Error from ..types.list_response import ListResponse from ..types.path_metadata import PathMetadata from .types.get_object_request_accept_encoding import GetObjectRequestAcceptEncoding @@ -38,6 +39,7 @@ def list_objects( since_timestamp: typing.Optional[dt.datetime] = None, page_token: typing.Optional[str] = None, all_objects_in_mesh: typing.Optional[bool] = None, + max_page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[PathMetadata, ListResponse]: """ @@ -57,6 +59,9 @@ def list_objects( all_objects_in_mesh : typing.Optional[bool] Lists objects across all environment nodes in a Lattice Mesh. + max_page_size : typing.Optional[int] + Sets the maximum number of items that should be returned on a single page. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -73,6 +78,7 @@ def list_objects( "sinceTimestamp": serialize_datetime(since_timestamp) if since_timestamp is not None else None, "pageToken": page_token, "allObjectsInMesh": all_objects_in_mesh, + "maxPageSize": max_page_size, }, request_options=request_options, ) @@ -93,6 +99,7 @@ def list_objects( since_timestamp=since_timestamp, page_token=_parsed_next, all_objects_in_mesh=all_objects_in_mesh, + max_page_size=max_page_size, request_options=request_options, ) return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) @@ -307,9 +314,9 @@ def upload_object( raise ContentTooLargeError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -329,9 +336,9 @@ def upload_object( raise InsufficientStorageError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -492,6 +499,7 @@ async def list_objects( since_timestamp: typing.Optional[dt.datetime] = None, page_token: typing.Optional[str] = None, all_objects_in_mesh: typing.Optional[bool] = None, + max_page_size: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[PathMetadata, ListResponse]: """ @@ -511,6 +519,9 @@ async def list_objects( all_objects_in_mesh : typing.Optional[bool] Lists objects across all environment nodes in a Lattice Mesh. + max_page_size : typing.Optional[int] + Sets the maximum number of items that should be returned on a single page. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -527,6 +538,7 @@ async def list_objects( "sinceTimestamp": serialize_datetime(since_timestamp) if since_timestamp is not None else None, "pageToken": page_token, "allObjectsInMesh": all_objects_in_mesh, + "maxPageSize": max_page_size, }, request_options=request_options, ) @@ -549,6 +561,7 @@ async def _get_next(): since_timestamp=since_timestamp, page_token=_parsed_next, all_objects_in_mesh=all_objects_in_mesh, + max_page_size=max_page_size, request_options=request_options, ) @@ -765,9 +778,9 @@ async def upload_object( raise ContentTooLargeError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), @@ -787,9 +800,9 @@ async def upload_object( raise InsufficientStorageError( headers=dict(_response.headers), body=typing.cast( - typing.Any, + Error, parse_obj_as( - type_=typing.Any, # type: ignore + type_=Error, # type: ignore object_=_response.json(), ), ), diff --git a/src/anduril/tasks/client.py b/src/anduril/tasks/client.py index eaeac22..9c0a091 100644 --- a/src/anduril/tasks/client.py +++ b/src/anduril/tasks/client.py @@ -104,10 +104,7 @@ def create_task( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.tasks.create_task() """ _response = self._raw_client.create_task( @@ -151,10 +148,7 @@ def get_task(self, task_id: str, *, request_options: typing.Optional[RequestOpti -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.tasks.get_task( task_id="taskId", ) @@ -212,10 +206,7 @@ def update_task_status( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.tasks.update_task_status( task_id="taskId", ) @@ -282,10 +273,7 @@ def query_tasks( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.tasks.query_tasks() """ _response = self._raw_client.query_tasks( @@ -340,10 +328,7 @@ def stream_tasks( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() response = client.tasks.stream_tasks() for chunk in response: yield chunk @@ -402,10 +387,7 @@ def listen_as_agent( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() client.tasks.listen_as_agent() """ _response = self._raw_client.listen_as_agent(agent_selector=agent_selector, request_options=request_options) @@ -457,10 +439,7 @@ def stream_as_agent( -------- from anduril import Lattice - client = Lattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = Lattice() response = client.tasks.stream_as_agent() for chunk in response: yield chunk @@ -553,10 +532,7 @@ async def create_task( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -608,10 +584,7 @@ async def get_task(self, task_id: str, *, request_options: typing.Optional[Reque from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -677,10 +650,7 @@ async def update_task_status( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -755,10 +725,7 @@ async def query_tasks( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -821,10 +788,7 @@ async def stream_tasks( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -892,10 +856,7 @@ async def listen_as_agent( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: @@ -957,10 +918,7 @@ async def stream_as_agent( from anduril import AsyncLattice - client = AsyncLattice( - client_id="YOUR_CLIENT_ID", - client_secret="YOUR_CLIENT_SECRET", - ) + client = AsyncLattice() async def main() -> None: diff --git a/src/anduril/tasks/types/stream_as_agent_response.py b/src/anduril/tasks/types/stream_as_agent_response.py index a2f38c0..da65e0a 100644 --- a/src/anduril/tasks/types/stream_as_agent_response.py +++ b/src/anduril/tasks/types/stream_as_agent_response.py @@ -38,14 +38,16 @@ class StreamAsAgentResponse_AgentRequest(UniversalBaseModel): event: typing.Literal["agent_request"] = "agent_request" execute_request: typing_extensions.Annotated[ - typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest") - ] = pydantic.Field(alias="executeRequest", default=None) + typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest"), pydantic.Field(alias="executeRequest") + ] = None cancel_request: typing_extensions.Annotated[ - typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest") - ] = pydantic.Field(alias="cancelRequest", default=None) + typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest"), pydantic.Field(alias="cancelRequest") + ] = None complete_request: typing_extensions.Annotated[ - typing.Optional[CompleteRequest], FieldMetadata(alias="completeRequest") - ] = pydantic.Field(alias="completeRequest", default=None) + typing.Optional[CompleteRequest], + FieldMetadata(alias="completeRequest"), + pydantic.Field(alias="completeRequest"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/tasks/types/stream_tasks_response.py b/src/anduril/tasks/types/stream_tasks_response.py index dfe8966..2de2e9f 100644 --- a/src/anduril/tasks/types/stream_tasks_response.py +++ b/src/anduril/tasks/types/stream_tasks_response.py @@ -36,8 +36,8 @@ class StreamTasksResponse_TaskEvent(UniversalBaseModel): event: typing.Literal["task_event"] = "task_event" task_event: typing_extensions.Annotated[ - typing.Optional[TaskEventDataTaskEvent], FieldMetadata(alias="taskEvent") - ] = pydantic.Field(alias="taskEvent", default=None) + typing.Optional[TaskEventDataTaskEvent], FieldMetadata(alias="taskEvent"), pydantic.Field(alias="taskEvent") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/tasks/types/task_query_update_time_range.py b/src/anduril/tasks/types/task_query_update_time_range.py index cd8476c..6cefbf3 100644 --- a/src/anduril/tasks/types/task_query_update_time_range.py +++ b/src/anduril/tasks/types/task_query_update_time_range.py @@ -13,19 +13,16 @@ class TaskQueryUpdateTimeRange(UniversalBaseModel): If provided, only provides Tasks updated within the time range. """ - start_time: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="startTime")] = pydantic.Field( - alias="startTime", default=None - ) - """ - If provided, returns Tasks only updated after this time. - """ - - end_time: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="endTime")] = pydantic.Field( - alias="endTime", default=None - ) - """ - If provided, returns Tasks only updated before this time. - """ + start_time: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="startTime"), + pydantic.Field(alias="startTime", description="If provided, returns Tasks only updated after this time."), + ] = None + end_time: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="endTime"), + pydantic.Field(alias="endTime", description="If provided, returns Tasks only updated before this time."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/tasks/types/task_stream_request_task_type_task_type_prefix.py b/src/anduril/tasks/types/task_stream_request_task_type_task_type_prefix.py index a512408..735929d 100644 --- a/src/anduril/tasks/types/task_stream_request_task_type_task_type_prefix.py +++ b/src/anduril/tasks/types/task_stream_request_task_type_task_type_prefix.py @@ -9,12 +9,14 @@ class TaskStreamRequestTaskTypeTaskTypePrefix(UniversalBaseModel): - task_type_prefix: typing_extensions.Annotated[str, FieldMetadata(alias="taskTypePrefix")] = pydantic.Field( - alias="taskTypePrefix" - ) - """ - Prefix string to match task types. Any task with a type that starts with this prefix will be included. - """ + task_type_prefix: typing_extensions.Annotated[ + str, + FieldMetadata(alias="taskTypePrefix"), + pydantic.Field( + alias="taskTypePrefix", + description="Prefix string to match task types. Any task with a type that starts with this prefix will be included.", + ), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/tasks/types/task_stream_request_task_type_task_type_urls.py b/src/anduril/tasks/types/task_stream_request_task_type_task_type_urls.py index 327469a..2982043 100644 --- a/src/anduril/tasks/types/task_stream_request_task_type_task_type_urls.py +++ b/src/anduril/tasks/types/task_stream_request_task_type_task_type_urls.py @@ -9,12 +9,11 @@ class TaskStreamRequestTaskTypeTaskTypeUrls(UniversalBaseModel): - task_type_urls: typing_extensions.Annotated[typing.List[str], FieldMetadata(alias="taskTypeUrls")] = pydantic.Field( - alias="taskTypeUrls" - ) - """ - List of exact task type URLs to match. - """ + task_type_urls: typing_extensions.Annotated[ + typing.List[str], + FieldMetadata(alias="taskTypeUrls"), + pydantic.Field(alias="taskTypeUrls", description="List of exact task type URLs to match."), + ] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/__init__.py b/src/anduril/types/__init__.py index 1fcae4e..56d6a12 100644 --- a/src/anduril/types/__init__.py +++ b/src/anduril/types/__init__.py @@ -46,6 +46,11 @@ from .decorrelated_all import DecorrelatedAll from .decorrelated_single import DecorrelatedSingle from .decorrelation import Decorrelation + from .delivery_constraints import DeliveryConstraints + from .delivery_error import DeliveryError + from .delivery_error_code import DeliveryErrorCode + from .delivery_state import DeliveryState + from .delivery_state_status import DeliveryStateStatus from .dimensions import Dimensions from .echelon import Echelon from .echelon_army_echelon import EchelonArmyEchelon @@ -66,6 +71,7 @@ from .field_of_view import FieldOfView from .field_of_view_mode import FieldOfViewMode from .fixed import Fixed + from .fixed_retry import FixedRetry from .frequency import Frequency from .frequency_range import FrequencyRange from .fuel import Fuel @@ -149,6 +155,7 @@ from .relationship_type import RelationshipType from .relationships import Relationships from .replication import Replication + from .retry_strategy import RetryStrategy from .rf_configuration import RfConfiguration from .route_details import RouteDetails from .scan_characteristics import ScanCharacteristics @@ -236,6 +243,11 @@ "DecorrelatedAll": ".decorrelated_all", "DecorrelatedSingle": ".decorrelated_single", "Decorrelation": ".decorrelation", + "DeliveryConstraints": ".delivery_constraints", + "DeliveryError": ".delivery_error", + "DeliveryErrorCode": ".delivery_error_code", + "DeliveryState": ".delivery_state", + "DeliveryStateStatus": ".delivery_state_status", "Dimensions": ".dimensions", "Echelon": ".echelon", "EchelonArmyEchelon": ".echelon_army_echelon", @@ -256,6 +268,7 @@ "FieldOfView": ".field_of_view", "FieldOfViewMode": ".field_of_view_mode", "Fixed": ".fixed", + "FixedRetry": ".fixed_retry", "Frequency": ".frequency", "FrequencyRange": ".frequency_range", "Fuel": ".fuel", @@ -339,6 +352,7 @@ "RelationshipType": ".relationship_type", "Relationships": ".relationships", "Replication": ".replication", + "RetryStrategy": ".retry_strategy", "RfConfiguration": ".rf_configuration", "RouteDetails": ".route_details", "ScanCharacteristics": ".scan_characteristics", @@ -450,6 +464,11 @@ def __dir__(): "DecorrelatedAll", "DecorrelatedSingle", "Decorrelation", + "DeliveryConstraints", + "DeliveryError", + "DeliveryErrorCode", + "DeliveryState", + "DeliveryStateStatus", "Dimensions", "Echelon", "EchelonArmyEchelon", @@ -470,6 +489,7 @@ def __dir__(): "FieldOfView", "FieldOfViewMode", "Fixed", + "FixedRetry", "Frequency", "FrequencyRange", "Fuel", @@ -553,6 +573,7 @@ def __dir__(): "RelationshipType", "Relationships", "Replication", + "RetryStrategy", "RfConfiguration", "RouteDetails", "ScanCharacteristics", diff --git a/src/anduril/types/acm_details.py b/src/anduril/types/acm_details.py index a216574..3d5ba8e 100644 --- a/src/anduril/types/acm_details.py +++ b/src/anduril/types/acm_details.py @@ -10,16 +10,17 @@ class AcmDetails(UniversalBaseModel): - acm_type: typing_extensions.Annotated[typing.Optional[AcmDetailsAcmType], FieldMetadata(alias="acmType")] = ( - pydantic.Field(alias="acmType", default=None) - ) - acm_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="acmDescription")] = ( - pydantic.Field(alias="acmDescription", default=None) - ) - """ - Used for loosely typed associations, such as assignment to a specific fires unit. - Limit to 150 characters. - """ + acm_type: typing_extensions.Annotated[ + typing.Optional[AcmDetailsAcmType], FieldMetadata(alias="acmType"), pydantic.Field(alias="acmType") + ] = None + acm_description: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="acmDescription"), + pydantic.Field( + alias="acmDescription", + description="Used for loosely typed associations, such as assignment to a specific fires unit.\n Limit to 150 characters.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/agent.py b/src/anduril/types/agent.py index 06c01c2..bfa0a83 100644 --- a/src/anduril/types/agent.py +++ b/src/anduril/types/agent.py @@ -13,12 +13,11 @@ class Agent(UniversalBaseModel): Represents an agent capable of processing tasks. """ - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - Entity ID of the agent. - """ + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field(alias="entityId", description="Entity ID of the agent."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/agent_request.py b/src/anduril/types/agent_request.py index e7b2c46..427a3d3 100644 --- a/src/anduril/types/agent_request.py +++ b/src/anduril/types/agent_request.py @@ -28,14 +28,16 @@ class AgentRequest(UniversalBaseModel): """ execute_request: typing_extensions.Annotated[ - typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest") - ] = pydantic.Field(alias="executeRequest", default=None) + typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest"), pydantic.Field(alias="executeRequest") + ] = None cancel_request: typing_extensions.Annotated[ - typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest") - ] = pydantic.Field(alias="cancelRequest", default=None) + typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest"), pydantic.Field(alias="cancelRequest") + ] = None complete_request: typing_extensions.Annotated[ - typing.Optional[CompleteRequest], FieldMetadata(alias="completeRequest") - ] = pydantic.Field(alias="completeRequest", default=None) + typing.Optional[CompleteRequest], + FieldMetadata(alias="completeRequest"), + pydantic.Field(alias="completeRequest"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/agent_task_request.py b/src/anduril/types/agent_task_request.py index 9398920..64758d5 100644 --- a/src/anduril/types/agent_task_request.py +++ b/src/anduril/types/agent_task_request.py @@ -19,14 +19,16 @@ class AgentTaskRequest(UniversalBaseModel): """ execute_request: typing_extensions.Annotated[ - typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest") - ] = pydantic.Field(alias="executeRequest", default=None) + typing.Optional[ExecuteRequest], FieldMetadata(alias="executeRequest"), pydantic.Field(alias="executeRequest") + ] = None cancel_request: typing_extensions.Annotated[ - typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest") - ] = pydantic.Field(alias="cancelRequest", default=None) + typing.Optional[CancelRequest], FieldMetadata(alias="cancelRequest"), pydantic.Field(alias="cancelRequest") + ] = None complete_request: typing_extensions.Annotated[ - typing.Optional[CompleteRequest], FieldMetadata(alias="completeRequest") - ] = pydantic.Field(alias="completeRequest", default=None) + typing.Optional[CompleteRequest], + FieldMetadata(alias="completeRequest"), + pydantic.Field(alias="completeRequest"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/alert.py b/src/anduril/types/alert.py index 1964536..8b05450 100644 --- a/src/anduril/types/alert.py +++ b/src/anduril/types/alert.py @@ -17,14 +17,14 @@ class Alert(UniversalBaseModel): execution. An alert is produced as a result of one or more alert conditions. """ - alert_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="alertCode")] = pydantic.Field( - alias="alertCode", default=None - ) - """ - Short, machine-readable code that describes this alert. This code is intended to provide systems off-asset - with a lookup key to retrieve more detailed information about the alert. - """ - + alert_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="alertCode"), + pydantic.Field( + alias="alertCode", + description="Short, machine-readable code that describes this alert. This code is intended to provide systems off-asset\n with a lookup key to retrieve more detailed information about the alert.", + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ Human-readable description of this alert. The description is intended for display in the UI for human @@ -37,19 +37,16 @@ class Alert(UniversalBaseModel): Alert level (Warning, Caution, or Advisory). """ - activated_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="activatedTime")] = ( - pydantic.Field(alias="activatedTime", default=None) - ) - """ - Time at which this alert was activated. - """ - + activated_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="activatedTime"), + pydantic.Field(alias="activatedTime", description="Time at which this alert was activated."), + ] = None active_conditions: typing_extensions.Annotated[ - typing.Optional[typing.List[AlertCondition]], FieldMetadata(alias="activeConditions") - ] = pydantic.Field(alias="activeConditions", default=None) - """ - Set of conditions which have activated this alert. - """ + typing.Optional[typing.List[AlertCondition]], + FieldMetadata(alias="activeConditions"), + pydantic.Field(alias="activeConditions", description="Set of conditions which have activated this alert."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/alert_condition.py b/src/anduril/types/alert_condition.py index c23a483..9762055 100644 --- a/src/anduril/types/alert_condition.py +++ b/src/anduril/types/alert_condition.py @@ -13,14 +13,14 @@ class AlertCondition(UniversalBaseModel): A condition which may trigger an alert. """ - condition_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="conditionCode")] = ( - pydantic.Field(alias="conditionCode", default=None) - ) - """ - Short, machine-readable code that describes this condition. This code is intended to provide systems off-asset - with a lookup key to retrieve more detailed information about the condition. - """ - + condition_code: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="conditionCode"), + pydantic.Field( + alias="conditionCode", + description="Short, machine-readable code that describes this condition. This code is intended to provide systems off-asset\n with a lookup key to retrieve more detailed information about the condition.", + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ Human-readable description of this condition. The description is intended for display in the UI for human diff --git a/src/anduril/types/aliases.py b/src/anduril/types/aliases.py index 32d4e2b..b193fe4 100644 --- a/src/anduril/types/aliases.py +++ b/src/anduril/types/aliases.py @@ -15,8 +15,10 @@ class Aliases(UniversalBaseModel): """ alternate_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[AlternateId]], FieldMetadata(alias="alternateIds") - ] = pydantic.Field(alias="alternateIds", default=None) + typing.Optional[typing.List[AlternateId]], + FieldMetadata(alias="alternateIds"), + pydantic.Field(alias="alternateIds"), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ The best available version of the entity's display name. diff --git a/src/anduril/types/allocation.py b/src/anduril/types/allocation.py index 3fb5e0f..9c65a5d 100644 --- a/src/anduril/types/allocation.py +++ b/src/anduril/types/allocation.py @@ -15,11 +15,10 @@ class Allocation(UniversalBaseModel): """ active_agents: typing_extensions.Annotated[ - typing.Optional[typing.List[Agent]], FieldMetadata(alias="activeAgents") - ] = pydantic.Field(alias="activeAgents", default=None) - """ - Agents actively being utilized in a task. - """ + typing.Optional[typing.List[Agent]], + FieldMetadata(alias="activeAgents"), + pydantic.Field(alias="activeAgents", description="Agents actively being utilized in a task."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/angle_of_arrival.py b/src/anduril/types/angle_of_arrival.py index 0c94882..4679a56 100644 --- a/src/anduril/types/angle_of_arrival.py +++ b/src/anduril/types/angle_of_arrival.py @@ -15,24 +15,22 @@ class AngleOfArrival(UniversalBaseModel): The direction from which the signal is received """ - relative_pose: typing_extensions.Annotated[typing.Optional[Pose], FieldMetadata(alias="relativePose")] = ( - pydantic.Field(alias="relativePose", default=None) - ) - """ - Origin (LLA) and attitude (relative to ENU) of a ray pointing towards the detection. The attitude represents a - forward-left-up (FLU) frame where the x-axis (1, 0, 0) is pointing towards the target. - """ - + relative_pose: typing_extensions.Annotated[ + typing.Optional[Pose], + FieldMetadata(alias="relativePose"), + pydantic.Field( + alias="relativePose", + description="Origin (LLA) and attitude (relative to ENU) of a ray pointing towards the detection. The attitude represents a\n forward-left-up (FLU) frame where the x-axis (1, 0, 0) is pointing towards the target.", + ), + ] = None bearing_elevation_covariance_rad2: typing_extensions.Annotated[ - typing.Optional[TMat2], FieldMetadata(alias="bearingElevationCovarianceRad2") - ] = pydantic.Field(alias="bearingElevationCovarianceRad2", default=None) - """ - Bearing/elevation covariance matrix where bearing is defined in radians CCW+ about the z-axis from the x-axis of FLU frame - and elevation is positive down from the FL/XY plane. - mxx = bearing variance in rad^2 - mxy = bearing/elevation covariance in rad^2 - myy = elevation variance in rad^2 - """ + typing.Optional[TMat2], + FieldMetadata(alias="bearingElevationCovarianceRad2"), + pydantic.Field( + alias="bearingElevationCovarianceRad2", + description="Bearing/elevation covariance matrix where bearing is defined in radians CCW+ about the z-axis from the x-axis of FLU frame\n and elevation is positive down from the FL/XY plane.\n mxx = bearing variance in rad^2\n mxy = bearing/elevation covariance in rad^2\n myy = elevation variance in rad^2", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/bandwidth.py b/src/anduril/types/bandwidth.py index faf458c..6831a35 100644 --- a/src/anduril/types/bandwidth.py +++ b/src/anduril/types/bandwidth.py @@ -13,9 +13,9 @@ class Bandwidth(UniversalBaseModel): Describes the bandwidth of a signal """ - bandwidth_hz: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="bandwidthHz")] = ( - pydantic.Field(alias="bandwidthHz", default=None) - ) + bandwidth_hz: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="bandwidthHz"), pydantic.Field(alias="bandwidthHz") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/bandwidth_range.py b/src/anduril/types/bandwidth_range.py index 70f681a..8c0cdc3 100644 --- a/src/anduril/types/bandwidth_range.py +++ b/src/anduril/types/bandwidth_range.py @@ -15,11 +15,11 @@ class BandwidthRange(UniversalBaseModel): """ minimum_bandwidth: typing_extensions.Annotated[ - typing.Optional[Bandwidth], FieldMetadata(alias="minimumBandwidth") - ] = pydantic.Field(alias="minimumBandwidth", default=None) + typing.Optional[Bandwidth], FieldMetadata(alias="minimumBandwidth"), pydantic.Field(alias="minimumBandwidth") + ] = None maximum_bandwidth: typing_extensions.Annotated[ - typing.Optional[Bandwidth], FieldMetadata(alias="maximumBandwidth") - ] = pydantic.Field(alias="maximumBandwidth", default=None) + typing.Optional[Bandwidth], FieldMetadata(alias="maximumBandwidth"), pydantic.Field(alias="maximumBandwidth") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/cancel_request.py b/src/anduril/types/cancel_request.py index 026bce6..6e9adb6 100644 --- a/src/anduril/types/cancel_request.py +++ b/src/anduril/types/cancel_request.py @@ -16,13 +16,11 @@ class CancelRequest(UniversalBaseModel): Contains the task, and the assignee of the request to cancel the task. """ - task_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="taskId")] = pydantic.Field( - alias="taskId", default=None - ) - """ - The unique task ID of the task to cancel. - """ - + task_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="taskId"), + pydantic.Field(alias="taskId", description="The unique task ID of the task to cancel."), + ] = None assignee: typing.Optional["Principal"] = pydantic.Field(default=None) """ The assignee of the Task. Useful for agent routing where an endpoint owns multiple agents, diff --git a/src/anduril/types/complete_request.py b/src/anduril/types/complete_request.py index aea1c35..ae600d8 100644 --- a/src/anduril/types/complete_request.py +++ b/src/anduril/types/complete_request.py @@ -14,12 +14,11 @@ class CompleteRequest(UniversalBaseModel): Contains the unique ID of the task to complete. """ - task_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="taskId")] = pydantic.Field( - alias="taskId", default=None - ) - """ - ID of the task to complete. - """ + task_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="taskId"), + pydantic.Field(alias="taskId", description="ID of the task to complete."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/component_health.py b/src/anduril/types/component_health.py index 6b287bd..70c16a6 100644 --- a/src/anduril/types/component_health.py +++ b/src/anduril/types/component_health.py @@ -36,13 +36,14 @@ class ComponentHealth(UniversalBaseModel): Human-readable describing the component state. These messages should be understandable by end users. """ - update_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updateTime")] = ( - pydantic.Field(alias="updateTime", default=None) - ) - """ - The last update time for this specific component. - If this timestamp is unset, the data is assumed to be most recent - """ + update_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updateTime"), + pydantic.Field( + alias="updateTime", + description="The last update time for this specific component.\n If this timestamp is unset, the data is assumed to be most recent", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/correlation_membership.py b/src/anduril/types/correlation_membership.py index 1fe3de8..ce33354 100644 --- a/src/anduril/types/correlation_membership.py +++ b/src/anduril/types/correlation_membership.py @@ -12,13 +12,11 @@ class CorrelationMembership(UniversalBaseModel): - correlation_set_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="correlationSetId")] = ( - pydantic.Field(alias="correlationSetId", default=None) - ) - """ - The ID of the correlation set this entity belongs to. - """ - + correlation_set_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="correlationSetId"), + pydantic.Field(alias="correlationSetId", description="The ID of the correlation set this entity belongs to."), + ] = None primary: typing.Optional[PrimaryMembership] = pydantic.Field(default=None) """ This entity is the primary of a correlation set meaning that it serves as the representative @@ -26,13 +24,13 @@ class CorrelationMembership(UniversalBaseModel): """ non_primary: typing_extensions.Annotated[ - typing.Optional[NonPrimaryMembership], FieldMetadata(alias="nonPrimary") - ] = pydantic.Field(alias="nonPrimary", default=None) - """ - This entity is not the primary of the correlation set. Note that there may not - be a primary at all. - """ - + typing.Optional[NonPrimaryMembership], + FieldMetadata(alias="nonPrimary"), + pydantic.Field( + alias="nonPrimary", + description="This entity is not the primary of the correlation set. Note that there may not\n be a primary at all.", + ), + ] = None metadata: typing.Optional[CorrelationMetadata] = pydantic.Field(default=None) """ Additional metadata on this correlation. diff --git a/src/anduril/types/correlation_metadata.py b/src/anduril/types/correlation_metadata.py index ba34d9e..786bc61 100644 --- a/src/anduril/types/correlation_metadata.py +++ b/src/anduril/types/correlation_metadata.py @@ -18,18 +18,13 @@ class CorrelationMetadata(UniversalBaseModel): """ replication_mode: typing_extensions.Annotated[ - typing.Optional[CorrelationMetadataReplicationMode], FieldMetadata(alias="replicationMode") - ] = pydantic.Field(alias="replicationMode", default=None) - """ - Indicates how the correlation will be distributed. Because a correlation is composed of - multiple secondaries, each of which may have been correlated with different replication - modes, the distribution of the correlation is composed of distributions of the individual - entities within the correlation set. - For example, if there are two secondary entities A and B correlated against a primary C, - with A having been correlated globally and B having been correlated locally, then the - correlation set that is distributed globally than what is known locally in the node. - """ - + typing.Optional[CorrelationMetadataReplicationMode], + FieldMetadata(alias="replicationMode"), + pydantic.Field( + alias="replicationMode", + description="Indicates how the correlation will be distributed. Because a correlation is composed of\n multiple secondaries, each of which may have been correlated with different replication\n modes, the distribution of the correlation is composed of distributions of the individual\n entities within the correlation set.\n For example, if there are two secondary entities A and B correlated against a primary C,\n with A having been correlated globally and B having been correlated locally, then the\n correlation set that is distributed globally than what is known locally in the node.", + ), + ] = None type: typing.Optional[CorrelationMetadataType] = pydantic.Field(default=None) """ What type of (de)correlation was this entity added with. diff --git a/src/anduril/types/cron_window.py b/src/anduril/types/cron_window.py index 7563850..dccb3a9 100644 --- a/src/anduril/types/cron_window.py +++ b/src/anduril/types/cron_window.py @@ -9,27 +9,19 @@ class CronWindow(UniversalBaseModel): - cron_expression: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="cronExpression")] = ( - pydantic.Field(alias="cronExpression", default=None) - ) - """ - in UTC, describes when and at what cadence this window starts, in the quartz flavor of cron - - examples: - This schedule is begins at 7:00:00am UTC everyday between Monday and Friday - 0 0 7 ? * MON-FRI * - This schedule begins every 5 minutes starting at 12:00:00pm UTC until 8:00:00pm UTC everyday - 0 0/5 12-20 * * ? * - This schedule begins at 12:00:00pm UTC on March 2nd 2023 - 0 0 12 2 3 ? 2023 - """ - - duration_millis: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="durationMillis")] = ( - pydantic.Field(alias="durationMillis", default=None) - ) - """ - describes the duration - """ + cron_expression: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="cronExpression"), + pydantic.Field( + alias="cronExpression", + description="in UTC, describes when and at what cadence this window starts, in the quartz flavor of cron\n\n examples:\n This schedule is begins at 7:00:00am UTC everyday between Monday and Friday\n 0 0 7 ? * MON-FRI *\n This schedule begins every 5 minutes starting at 12:00:00pm UTC until 8:00:00pm UTC everyday\n 0 0/5 12-20 * * ? *\n This schedule begins at 12:00:00pm UTC on March 2nd 2023\n 0 0 12 2 3 ? 2023", + ), + ] = None + duration_millis: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="durationMillis"), + pydantic.Field(alias="durationMillis", description="describes the duration"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/decorrelated_single.py b/src/anduril/types/decorrelated_single.py index 5e20520..21bac21 100644 --- a/src/anduril/types/decorrelated_single.py +++ b/src/anduril/types/decorrelated_single.py @@ -10,13 +10,11 @@ class DecorrelatedSingle(UniversalBaseModel): - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - The entity that was decorrelated against. - """ - + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field(alias="entityId", description="The entity that was decorrelated against."), + ] = None metadata: typing.Optional[CorrelationMetadata] = pydantic.Field(default=None) """ Metadata about the decorrelation. diff --git a/src/anduril/types/decorrelation.py b/src/anduril/types/decorrelation.py index 2bdf4d4..15052e0 100644 --- a/src/anduril/types/decorrelation.py +++ b/src/anduril/types/decorrelation.py @@ -11,24 +11,22 @@ class Decorrelation(UniversalBaseModel): - all_: typing_extensions.Annotated[typing.Optional[DecorrelatedAll], FieldMetadata(alias="all")] = pydantic.Field( - alias="all", default=None - ) - """ - This will be specified if this entity was decorrelated against all other entities. - """ - + all_: typing_extensions.Annotated[ + typing.Optional[DecorrelatedAll], + FieldMetadata(alias="all"), + pydantic.Field( + alias="all", + description="This will be specified if this entity was decorrelated against all other entities.", + ), + ] = None decorrelated_entities: typing_extensions.Annotated[ - typing.Optional[typing.List[DecorrelatedSingle]], FieldMetadata(alias="decorrelatedEntities") - ] = pydantic.Field(alias="decorrelatedEntities", default=None) - """ - A list of decorrelated entities that have been explicitly decorrelated against this entity - which prevents lower precedence correlations from overriding it in the future. - For example, if an operator in the UI decorrelated tracks A and B, any automated - correlators would be unable to correlate them since manual decorrelations have - higher precedence than automatic ones. Precedence is determined by both correlation - type and replication mode. - """ + typing.Optional[typing.List[DecorrelatedSingle]], + FieldMetadata(alias="decorrelatedEntities"), + pydantic.Field( + alias="decorrelatedEntities", + description="A list of decorrelated entities that have been explicitly decorrelated against this entity\n which prevents lower precedence correlations from overriding it in the future.\n For example, if an operator in the UI decorrelated tracks A and B, any automated\n correlators would be unable to correlate them since manual decorrelations have\n higher precedence than automatic ones. Precedence is determined by both correlation\n type and replication mode.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/delivery_constraints.py b/src/anduril/types/delivery_constraints.py new file mode 100644 index 0000000..08b2a39 --- /dev/null +++ b/src/anduril/types/delivery_constraints.py @@ -0,0 +1,40 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata + + +class DeliveryConstraints(UniversalBaseModel): + """ + DeliveryConstraints defines when Lattice should deliver the task to the agent. + """ + + deliver_after: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="deliverAfter"), + pydantic.Field( + alias="deliverAfter", description="Optional earliest time the task can attempt to be delivered." + ), + ] = None + deliver_before: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="deliverBefore"), + pydantic.Field( + alias="deliverBefore", + description="The latest time by which the task should be delivered.\n If this deadline passes without successful delivery of the task, then the task will time\n out with DELIVERY_ERROR_CODE_TIMEOUT.\n This field is only required for tasks with retry strategies.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/anduril/types/delivery_error.py b/src/anduril/types/delivery_error.py new file mode 100644 index 0000000..dd55e08 --- /dev/null +++ b/src/anduril/types/delivery_error.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .delivery_error_code import DeliveryErrorCode + + +class DeliveryError(UniversalBaseModel): + """ + DeliveryError contains an error code and message associated with task delivery. + """ + + code: typing.Optional[DeliveryErrorCode] = pydantic.Field(default=None) + """ + Error code for Delivery error. + """ + + message: typing.Optional[str] = pydantic.Field(default=None) + """ + Descriptive human-readable string regarding this delivery error. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/anduril/types/delivery_error_code.py b/src/anduril/types/delivery_error_code.py new file mode 100644 index 0000000..e44e153 --- /dev/null +++ b/src/anduril/types/delivery_error_code.py @@ -0,0 +1,13 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeliveryErrorCode = typing.Union[ + typing.Literal[ + "DELIVERY_ERROR_CODE_INVALID", + "DELIVERY_ERROR_CODE_UNAVAILABLE", + "DELIVERY_ERROR_CODE_TIMEOUT", + "DELIVERY_ERROR_CODE_REJECTED", + ], + typing.Any, +] diff --git a/src/anduril/types/delivery_state.py b/src/anduril/types/delivery_state.py new file mode 100644 index 0000000..b8c18df --- /dev/null +++ b/src/anduril/types/delivery_state.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .delivery_constraints import DeliveryConstraints +from .delivery_error import DeliveryError +from .delivery_state_status import DeliveryStateStatus + + +class DeliveryState(UniversalBaseModel): + """ + Defines the current state of a task's delivery. + """ + + status: typing.Optional[DeliveryStateStatus] = pydantic.Field(default=None) + """ + The current status of the delivery. + """ + + error: typing.Optional[DeliveryError] = pydantic.Field(default=None) + """ + Errors associated with the delivery, if any. + """ + + delivery_constraints: typing_extensions.Annotated[ + typing.Optional[DeliveryConstraints], + FieldMetadata(alias="deliveryConstraints"), + pydantic.Field( + alias="deliveryConstraints", description="Optional scheduling constraints for Lattice delivery of the task." + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/anduril/types/delivery_state_status.py b/src/anduril/types/delivery_state_status.py new file mode 100644 index 0000000..28309ab --- /dev/null +++ b/src/anduril/types/delivery_state_status.py @@ -0,0 +1,14 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DeliveryStateStatus = typing.Union[ + typing.Literal[ + "DELIVERY_STATUS_INVALID", + "DELIVERY_STATUS_DELIVERED", + "DELIVERY_STATUS_PENDING_EXECUTE", + "DELIVERY_STATUS_PENDING_CANCEL", + "DELIVERY_STATUS_PENDING_COMPLETE", + ], + typing.Any, +] diff --git a/src/anduril/types/dimensions.py b/src/anduril/types/dimensions.py index 1023d7c..6682a9c 100644 --- a/src/anduril/types/dimensions.py +++ b/src/anduril/types/dimensions.py @@ -9,12 +9,11 @@ class Dimensions(UniversalBaseModel): - length_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="lengthM")] = pydantic.Field( - alias="lengthM", default=None - ) - """ - Length of the entity in meters - """ + length_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="lengthM"), + pydantic.Field(alias="lengthM", description="Length of the entity in meters"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/echelon.py b/src/anduril/types/echelon.py index 660dabd..b28b146 100644 --- a/src/anduril/types/echelon.py +++ b/src/anduril/types/echelon.py @@ -17,8 +17,8 @@ class Echelon(UniversalBaseModel): """ army_echelon: typing_extensions.Annotated[ - typing.Optional[EchelonArmyEchelon], FieldMetadata(alias="armyEchelon") - ] = pydantic.Field(alias="armyEchelon", default=None) + typing.Optional[EchelonArmyEchelon], FieldMetadata(alias="armyEchelon"), pydantic.Field(alias="armyEchelon") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/emitter_notation.py b/src/anduril/types/emitter_notation.py index 29e1770..2ea0ae8 100644 --- a/src/anduril/types/emitter_notation.py +++ b/src/anduril/types/emitter_notation.py @@ -13,9 +13,9 @@ class EmitterNotation(UniversalBaseModel): A representation of a single emitter notation. """ - emitter_notation: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="emitterNotation")] = ( - pydantic.Field(alias="emitterNotation", default=None) - ) + emitter_notation: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="emitterNotation"), pydantic.Field(alias="emitterNotation") + ] = None confidence: typing.Optional[float] = pydantic.Field(default=None) """ confidence as a percentage that the emitter notation in this component is accurate diff --git a/src/anduril/types/entity.py b/src/anduril/types/entity.py index 9f6ffd6..e2faaf0 100644 --- a/src/anduril/types/entity.py +++ b/src/anduril/types/entity.py @@ -48,61 +48,52 @@ class Entity(UniversalBaseModel): all data associated with the entity, such as its name, ID, and other relevant components. """ - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - A Globally Unique Identifier (GUID) for your entity. This is a required - field. - """ - + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field( + alias="entityId", + description="A Globally Unique Identifier (GUID) for your entity. This is a required\n field.", + ), + ] = None description: typing.Optional[str] = pydantic.Field(default=None) """ A human-readable entity description that's helpful for debugging purposes and human traceability. If this field is empty, the Entity Manager API generates one for you. """ - is_live: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isLive")] = pydantic.Field( - alias="isLive", default=None - ) - """ - Indicates the entity is active and should have a lifecycle state of CREATE or UPDATE. - Set this field to true when publishing an entity. - """ - - created_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createdTime")] = ( - pydantic.Field(alias="createdTime", default=None) - ) - """ - The time when the entity was first known to the entity producer. If this field is empty, the Entity Manager API uses the - current timestamp of when the entity is first received. - For example, when a drone is first powered on, it might report its startup time as the created time. - The timestamp doesn't change for the lifetime of an entity. - """ - - expiry_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="expiryTime")] = ( - pydantic.Field(alias="expiryTime", default=None) - ) - """ - Future time that expires an entity and updates the is_live flag. - For entities that are constantly updating, the expiry time also updates. - In some cases, this may differ from is_live. - Example: Entities with tasks exported to an external system must remain - active even after they expire. - This field is required when publishing a prepopulated entity. - The expiry time must be in the future, but less than 30 days from the current time. - """ - - no_expiry: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="noExpiry")] = pydantic.Field( - alias="noExpiry", default=None - ) - """ - Use noExpiry only when the entity contains information that should be available to other - tasks or integrations beyond its immediate operational context. For example, use noExpiry - for long-living geographical entities that maintain persistent relevance across multiple - operations or tasks. - """ - + is_live: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isLive"), + pydantic.Field( + alias="isLive", + description="Indicates the entity is active and should have a lifecycle state of CREATE or UPDATE.\n Set this field to true when publishing an entity.", + ), + ] = None + created_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createdTime"), + pydantic.Field( + alias="createdTime", + description="The time when the entity was first known to the entity producer. If this field is empty, the Entity Manager API uses the\n current timestamp of when the entity is first received.\n For example, when a drone is first powered on, it might report its startup time as the created time.\n The timestamp doesn't change for the lifetime of an entity.", + ), + ] = None + expiry_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="expiryTime"), + pydantic.Field( + alias="expiryTime", + description="Future time that expires an entity and updates the is_live flag.\n For entities that are constantly updating, the expiry time also updates.\n In some cases, this may differ from is_live.\n Example: Entities with tasks exported to an external system must remain\n active even after they expire.\n This field is required when publishing a prepopulated entity.\n The expiry time must be in the future, but less than 30 days from the current time.", + ), + ] = None + no_expiry: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="noExpiry"), + pydantic.Field( + alias="noExpiry", + description="Use noExpiry only when the entity contains information that should be available to other\n tasks or integrations beyond its immediate operational context. For example, use noExpiry\n for long-living geographical entities that maintain persistent relevance across multiple\n operations or tasks.", + ), + ] = None status: typing.Optional[Status] = pydantic.Field(default=None) """ Human-readable descriptions of what the entity is currently doing. @@ -114,26 +105,28 @@ class Entity(UniversalBaseModel): """ location_uncertainty: typing_extensions.Annotated[ - typing.Optional[LocationUncertainty], FieldMetadata(alias="locationUncertainty") - ] = pydantic.Field(alias="locationUncertainty", default=None) - """ - Indicates uncertainty of the entity's position and kinematics. - """ - - geo_shape: typing_extensions.Annotated[typing.Optional[GeoShape], FieldMetadata(alias="geoShape")] = pydantic.Field( - alias="geoShape", default=None - ) - """ - Geospatial representation of the entity, including entities that cover an area rather than a fixed point. - """ - - geo_details: typing_extensions.Annotated[typing.Optional[GeoDetails], FieldMetadata(alias="geoDetails")] = ( - pydantic.Field(alias="geoDetails", default=None) - ) - """ - Additional details on what the geospatial area or point represents, along with visual display details. - """ - + typing.Optional[LocationUncertainty], + FieldMetadata(alias="locationUncertainty"), + pydantic.Field( + alias="locationUncertainty", description="Indicates uncertainty of the entity's position and kinematics." + ), + ] = None + geo_shape: typing_extensions.Annotated[ + typing.Optional[GeoShape], + FieldMetadata(alias="geoShape"), + pydantic.Field( + alias="geoShape", + description="Geospatial representation of the entity, including entities that cover an area rather than a fixed point.", + ), + ] = None + geo_details: typing_extensions.Annotated[ + typing.Optional[GeoDetails], + FieldMetadata(alias="geoDetails"), + pydantic.Field( + alias="geoDetails", + description="Additional details on what the geospatial area or point represents, along with visual display details.", + ), + ] = None aliases: typing.Optional[Aliases] = pydantic.Field(default=None) """ Entity name displayed in the Lattice UI side panel. Also includes identifiers that other systems can use to reference the same entity. @@ -149,13 +142,11 @@ class Entity(UniversalBaseModel): If this entity has been correlated or decorrelated to another one, this component contains information on the correlation or decorrelation. """ - mil_view: typing_extensions.Annotated[typing.Optional[MilView], FieldMetadata(alias="milView")] = pydantic.Field( - alias="milView", default=None - ) - """ - View of the entity. - """ - + mil_view: typing_extensions.Annotated[ + typing.Optional[MilView], + FieldMetadata(alias="milView"), + pydantic.Field(alias="milView", description="View of the entity."), + ] = None ontology: typing.Optional[Ontology] = pydantic.Field(default=None) """ Ontology defines an entity's categorization in Lattice, and improves data retrieval and integration. Builds a standardized representation of the entity. @@ -171,13 +162,11 @@ class Entity(UniversalBaseModel): Details an entity's available payloads. """ - power_state: typing_extensions.Annotated[typing.Optional[PowerState], FieldMetadata(alias="powerState")] = ( - pydantic.Field(alias="powerState", default=None) - ) - """ - Details the entity's power source. - """ - + power_state: typing_extensions.Annotated[ + typing.Optional[PowerState], + FieldMetadata(alias="powerState"), + pydantic.Field(alias="powerState", description="Details the entity's power source."), + ] = None provenance: typing.Optional[Provenance] = pydantic.Field(default=None) """ The primary data source provenance for this entity. @@ -196,39 +185,39 @@ class Entity(UniversalBaseModel): """ target_priority: typing_extensions.Annotated[ - typing.Optional[TargetPriority], FieldMetadata(alias="targetPriority") - ] = pydantic.Field(alias="targetPriority", default=None) - """ - The prioritization associated with an entity, such as if it's a threat or a high-value target. - """ - + typing.Optional[TargetPriority], + FieldMetadata(alias="targetPriority"), + pydantic.Field( + alias="targetPriority", + description="The prioritization associated with an entity, such as if it's a threat or a high-value target.", + ), + ] = None signal: typing.Optional[Signal] = pydantic.Field(default=None) """ Describes an entity's signal characteristics, primarily used when an entity is a signal of interest. """ transponder_codes: typing_extensions.Annotated[ - typing.Optional[TransponderCodes], FieldMetadata(alias="transponderCodes") - ] = pydantic.Field(alias="transponderCodes", default=None) - """ - A message describing any transponder codes associated with Mode 1, 2, 3, 4, 5, S interrogations. These are related to ADS-B modes. - """ - + typing.Optional[TransponderCodes], + FieldMetadata(alias="transponderCodes"), + pydantic.Field( + alias="transponderCodes", + description="A message describing any transponder codes associated with Mode 1, 2, 3, 4, 5, S interrogations. These are related to ADS-B modes.", + ), + ] = None data_classification: typing_extensions.Annotated[ - typing.Optional[Classification], FieldMetadata(alias="dataClassification") - ] = pydantic.Field(alias="dataClassification", default=None) - """ - Describes an entity's security classification levels at an overall classification level and on a per - field level. - """ - - task_catalog: typing_extensions.Annotated[typing.Optional[TaskCatalog], FieldMetadata(alias="taskCatalog")] = ( - pydantic.Field(alias="taskCatalog", default=None) - ) - """ - A catalog of tasks that can be performed by an entity. - """ - + typing.Optional[Classification], + FieldMetadata(alias="dataClassification"), + pydantic.Field( + alias="dataClassification", + description="Describes an entity's security classification levels at an overall classification level and on a per\n field level.", + ), + ] = None + task_catalog: typing_extensions.Annotated[ + typing.Optional[TaskCatalog], + FieldMetadata(alias="taskCatalog"), + pydantic.Field(alias="taskCatalog", description="A catalog of tasks that can be performed by an entity."), + ] = None media: typing.Optional[Media] = pydantic.Field(default=None) """ Media associated with an entity, such as videos, images, or thumbnails. @@ -240,24 +229,22 @@ class Entity(UniversalBaseModel): """ visual_details: typing_extensions.Annotated[ - typing.Optional[VisualDetails], FieldMetadata(alias="visualDetails") - ] = pydantic.Field(alias="visualDetails", default=None) - """ - Visual details associated with the display of an entity in the client. - """ - + typing.Optional[VisualDetails], + FieldMetadata(alias="visualDetails"), + pydantic.Field( + alias="visualDetails", description="Visual details associated with the display of an entity in the client." + ), + ] = None dimensions: typing.Optional[Dimensions] = pydantic.Field(default=None) """ Physical dimensions of the entity. """ - route_details: typing_extensions.Annotated[typing.Optional[RouteDetails], FieldMetadata(alias="routeDetails")] = ( - pydantic.Field(alias="routeDetails", default=None) - ) - """ - Additional information about an entity's route. - """ - + route_details: typing_extensions.Annotated[ + typing.Optional[RouteDetails], + FieldMetadata(alias="routeDetails"), + pydantic.Field(alias="routeDetails", description="Additional information about an entity's route."), + ] = None schedules: typing.Optional[Schedules] = pydantic.Field(default=None) """ Schedules associated with this entity. @@ -268,13 +255,11 @@ class Entity(UniversalBaseModel): Health metrics or connection status reported by the entity. """ - group_details: typing_extensions.Annotated[typing.Optional[GroupDetails], FieldMetadata(alias="groupDetails")] = ( - pydantic.Field(alias="groupDetails", default=None) - ) - """ - Details for the group associated with this entity. - """ - + group_details: typing_extensions.Annotated[ + typing.Optional[GroupDetails], + FieldMetadata(alias="groupDetails"), + pydantic.Field(alias="groupDetails", description="Details for the group associated with this entity."), + ] = None supplies: typing.Optional[Supplies] = pydantic.Field(default=None) """ Contains relevant supply information for the entity, such as fuel. diff --git a/src/anduril/types/entity_event.py b/src/anduril/types/entity_event.py index dcc8caf..8c09508 100644 --- a/src/anduril/types/entity_event.py +++ b/src/anduril/types/entity_event.py @@ -17,9 +17,9 @@ class EntityEvent(UniversalBaseModel): Event representing some type of entity change. """ - event_type: typing_extensions.Annotated[typing.Optional[EntityEventEventType], FieldMetadata(alias="eventType")] = ( - pydantic.Field(alias="eventType", default=None) - ) + event_type: typing_extensions.Annotated[ + typing.Optional[EntityEventEventType], FieldMetadata(alias="eventType"), pydantic.Field(alias="eventType") + ] = None time: typing.Optional[dt.datetime] = None entity: typing.Optional["Entity"] = None diff --git a/src/anduril/types/entity_event_response.py b/src/anduril/types/entity_event_response.py index 70f6837..9955301 100644 --- a/src/anduril/types/entity_event_response.py +++ b/src/anduril/types/entity_event_response.py @@ -12,16 +12,19 @@ class EntityEventResponse(UniversalBaseModel): - session_token: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sessionToken")] = ( - pydantic.Field(alias="sessionToken", default=None) - ) - """ - Long-poll session identifier. Use this token to resume polling on subsequent requests. - """ - + session_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sessionToken"), + pydantic.Field( + alias="sessionToken", + description="Long-poll session identifier. Use this token to resume polling on subsequent requests.", + ), + ] = None entity_events: typing_extensions.Annotated[ - typing.Optional[typing.List[EntityEvent]], FieldMetadata(alias="entityEvents") - ] = pydantic.Field(alias="entityEvents", default=None) + typing.Optional[typing.List[EntityEvent]], + FieldMetadata(alias="entityEvents"), + pydantic.Field(alias="entityEvents"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/entity_ids_selector.py b/src/anduril/types/entity_ids_selector.py index f12b0fb..18fb7de 100644 --- a/src/anduril/types/entity_ids_selector.py +++ b/src/anduril/types/entity_ids_selector.py @@ -9,12 +9,13 @@ class EntityIdsSelector(UniversalBaseModel): - entity_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="entityIds")] = ( - pydantic.Field(alias="entityIds", default=None) - ) - """ - Receive tasks as an assignee for one or more of the supplied entity ids. - """ + entity_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], + FieldMetadata(alias="entityIds"), + pydantic.Field( + alias="entityIds", description="Receive tasks as an assignee for one or more of the supplied entity ids." + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/error_ellipse.py b/src/anduril/types/error_ellipse.py index 0d2a770..d3445c4 100644 --- a/src/anduril/types/error_ellipse.py +++ b/src/anduril/types/error_ellipse.py @@ -18,26 +18,30 @@ class ErrorEllipse(UniversalBaseModel): Defines the probability in percentage that an entity lies within the given ellipse: 0-1. """ - semi_major_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="semiMajorAxisM")] = ( - pydantic.Field(alias="semiMajorAxisM", default=None) - ) - """ - Defines the distance from the center point of the ellipse to the furthest distance on the perimeter in meters. - """ - - semi_minor_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="semiMinorAxisM")] = ( - pydantic.Field(alias="semiMinorAxisM", default=None) - ) - """ - Defines the distance from the center point of the ellipse to the shortest distance on the perimeter in meters. - """ - - orientation_d: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="orientationD")] = ( - pydantic.Field(alias="orientationD", default=None) - ) - """ - The orientation of the semi-major relative to true north in degrees from clockwise: 0-180 due to symmetry across the semi-minor axis. - """ + semi_major_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="semiMajorAxisM"), + pydantic.Field( + alias="semiMajorAxisM", + description="Defines the distance from the center point of the ellipse to the furthest distance on the perimeter in meters.", + ), + ] = None + semi_minor_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="semiMinorAxisM"), + pydantic.Field( + alias="semiMinorAxisM", + description="Defines the distance from the center point of the ellipse to the shortest distance on the perimeter in meters.", + ), + ] = None + orientation_d: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="orientationD"), + pydantic.Field( + alias="orientationD", + description="The orientation of the semi-major relative to true north in degrees from clockwise: 0-180 due to symmetry across the semi-minor axis.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/field_classification_information.py b/src/anduril/types/field_classification_information.py index 68a59eb..86a864c 100644 --- a/src/anduril/types/field_classification_information.py +++ b/src/anduril/types/field_classification_information.py @@ -14,20 +14,22 @@ class FieldClassificationInformation(UniversalBaseModel): A field specific classification information definition. """ - field_path: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fieldPath")] = pydantic.Field( - alias="fieldPath", default=None - ) - """ - Proto field path which is the string representation of a field. - > example: signal.bandwidth_hz would be bandwidth_hz in the signal component - """ - + field_path: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="fieldPath"), + pydantic.Field( + alias="fieldPath", + description="Proto field path which is the string representation of a field.\n > example: signal.bandwidth_hz would be bandwidth_hz in the signal component", + ), + ] = None classification_information: typing_extensions.Annotated[ - typing.Optional[ClassificationInformation], FieldMetadata(alias="classificationInformation") - ] = pydantic.Field(alias="classificationInformation", default=None) - """ - The information which makes up the field level classification marking. - """ + typing.Optional[ClassificationInformation], + FieldMetadata(alias="classificationInformation"), + pydantic.Field( + alias="classificationInformation", + description="The information which makes up the field level classification marking.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/field_of_view.py b/src/anduril/types/field_of_view.py index aabcc1a..0c8ed80 100644 --- a/src/anduril/types/field_of_view.py +++ b/src/anduril/types/field_of_view.py @@ -17,59 +17,47 @@ class FieldOfView(UniversalBaseModel): Sensor Field Of View closely resembling fov.proto SensorFieldOfView. """ - fov_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="fovId")] = pydantic.Field( - alias="fovId", default=None - ) - """ - The Id for one instance of a FieldOfView, persisted across multiple updates to provide continuity during - smoothing. This is relevant for sensors where the dwell schedule is on the order of - milliseconds, making multiple FOVs a requirement for proper display of search beams. - """ - - mount_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="mountId")] = pydantic.Field( - alias="mountId", default=None - ) - """ - The Id of the mount the sensor is on. - """ - + fov_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="fovId"), + pydantic.Field( + alias="fovId", + description="The Id for one instance of a FieldOfView, persisted across multiple updates to provide continuity during\n smoothing. This is relevant for sensors where the dwell schedule is on the order of\n milliseconds, making multiple FOVs a requirement for proper display of search beams.", + ), + ] = None + mount_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="mountId"), + pydantic.Field(alias="mountId", description="The Id of the mount the sensor is on."), + ] = None projected_frustum: typing_extensions.Annotated[ - typing.Optional[ProjectedFrustum], FieldMetadata(alias="projectedFrustum") - ] = pydantic.Field(alias="projectedFrustum", default=None) - """ - The field of view the sensor projected onto the ground. - """ - + typing.Optional[ProjectedFrustum], + FieldMetadata(alias="projectedFrustum"), + pydantic.Field(alias="projectedFrustum", description="The field of view the sensor projected onto the ground."), + ] = None projected_center_ray: typing_extensions.Annotated[ - typing.Optional[Position], FieldMetadata(alias="projectedCenterRay") - ] = pydantic.Field(alias="projectedCenterRay", default=None) - """ - Center ray of the frustum projected onto the ground. - """ - + typing.Optional[Position], + FieldMetadata(alias="projectedCenterRay"), + pydantic.Field(alias="projectedCenterRay", description="Center ray of the frustum projected onto the ground."), + ] = None center_ray_pose: typing_extensions.Annotated[ - typing.Optional[EntityManagerPose], FieldMetadata(alias="centerRayPose") - ] = pydantic.Field(alias="centerRayPose", default=None) - """ - The origin and direction of the center ray for this sensor relative to the ENU frame. A ray which is aligned with - the positive X axis in the sensor frame will be transformed into the ray along the sensor direction in the ENU - frame when transformed by the quaternion contained in this pose. - """ - - horizontal_fov: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="horizontalFov")] = ( - pydantic.Field(alias="horizontalFov", default=None) - ) - """ - Horizontal field of view in radians. - """ - - vertical_fov: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="verticalFov")] = ( - pydantic.Field(alias="verticalFov", default=None) - ) - """ - Vertical field of view in radians. - """ - + typing.Optional[EntityManagerPose], + FieldMetadata(alias="centerRayPose"), + pydantic.Field( + alias="centerRayPose", + description="The origin and direction of the center ray for this sensor relative to the ENU frame. A ray which is aligned with\n the positive X axis in the sensor frame will be transformed into the ray along the sensor direction in the ENU\n frame when transformed by the quaternion contained in this pose.", + ), + ] = None + horizontal_fov: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="horizontalFov"), + pydantic.Field(alias="horizontalFov", description="Horizontal field of view in radians."), + ] = None + vertical_fov: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="verticalFov"), + pydantic.Field(alias="verticalFov", description="Vertical field of view in radians."), + ] = None range: typing.Optional[float] = pydantic.Field(default=None) """ Sensor range in meters. diff --git a/src/anduril/types/fixed_retry.py b/src/anduril/types/fixed_retry.py new file mode 100644 index 0000000..503e685 --- /dev/null +++ b/src/anduril/types/fixed_retry.py @@ -0,0 +1,32 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata + + +class FixedRetry(UniversalBaseModel): + """ + Defaults to an interval of 5 seconds. If the DeliverBefore field in the task's DeliveryConstraints isn't populated, Lattice does not retry delivery and instead logs a warning. + """ + + retry_interval: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="retryInterval"), + pydantic.Field( + alias="retryInterval", + description="Specifies the interval between retries. A default interval of 5 seconds is used if this field is not set.", + ), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/anduril/types/frequency.py b/src/anduril/types/frequency.py index 235a576..9848908 100644 --- a/src/anduril/types/frequency.py +++ b/src/anduril/types/frequency.py @@ -14,12 +14,13 @@ class Frequency(UniversalBaseModel): A component for describing frequency. """ - frequency_hz: typing_extensions.Annotated[typing.Optional[Measurement], FieldMetadata(alias="frequencyHz")] = ( - pydantic.Field(alias="frequencyHz", default=None) - ) - """ - Indicates a frequency of a signal (Hz) with its standard deviation. - """ + frequency_hz: typing_extensions.Annotated[ + typing.Optional[Measurement], + FieldMetadata(alias="frequencyHz"), + pydantic.Field( + alias="frequencyHz", description="Indicates a frequency of a signal (Hz) with its standard deviation." + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/frequency_range.py b/src/anduril/types/frequency_range.py index ab7fb87..be0b28f 100644 --- a/src/anduril/types/frequency_range.py +++ b/src/anduril/types/frequency_range.py @@ -15,18 +15,19 @@ class FrequencyRange(UniversalBaseModel): """ minimum_frequency_hz: typing_extensions.Annotated[ - typing.Optional[Frequency], FieldMetadata(alias="minimumFrequencyHz") - ] = pydantic.Field(alias="minimumFrequencyHz", default=None) - """ - Indicates the lowest measured frequency of a signal (Hz). - """ - + typing.Optional[Frequency], + FieldMetadata(alias="minimumFrequencyHz"), + pydantic.Field( + alias="minimumFrequencyHz", description="Indicates the lowest measured frequency of a signal (Hz)." + ), + ] = None maximum_frequency_hz: typing_extensions.Annotated[ - typing.Optional[Frequency], FieldMetadata(alias="maximumFrequencyHz") - ] = pydantic.Field(alias="maximumFrequencyHz", default=None) - """ - Indicates the maximum measured frequency of a signal (Hz). - """ + typing.Optional[Frequency], + FieldMetadata(alias="maximumFrequencyHz"), + pydantic.Field( + alias="maximumFrequencyHz", description="Indicates the maximum measured frequency of a signal (Hz)." + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/fuel.py b/src/anduril/types/fuel.py index 4446b12..76eb728 100644 --- a/src/anduril/types/fuel.py +++ b/src/anduril/types/fuel.py @@ -15,60 +15,54 @@ class Fuel(UniversalBaseModel): Fuel describes an entity's repository of fuels stores including current amount, operational requirements, and maximum authorized capacity """ - fuel_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fuelId")] = pydantic.Field( - alias="fuelId", default=None - ) - """ - unique fuel identifier - """ - + fuel_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="fuelId"), + pydantic.Field(alias="fuelId", description="unique fuel identifier"), + ] = None name: typing.Optional[str] = pydantic.Field(default=None) """ long form name of the fuel source. """ - reported_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="reportedDate")] = ( - pydantic.Field(alias="reportedDate", default=None) - ) - """ - timestamp the information was reported - """ - - amount_gallons: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="amountGallons")] = ( - pydantic.Field(alias="amountGallons", default=None) - ) - """ - amount of gallons on hand - """ - + reported_date: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="reportedDate"), + pydantic.Field(alias="reportedDate", description="timestamp the information was reported"), + ] = None + amount_gallons: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="amountGallons"), + pydantic.Field(alias="amountGallons", description="amount of gallons on hand"), + ] = None max_authorized_capacity_gallons: typing_extensions.Annotated[ - typing.Optional[int], FieldMetadata(alias="maxAuthorizedCapacityGallons") - ] = pydantic.Field(alias="maxAuthorizedCapacityGallons", default=None) - """ - how much the asset is allowed to have available (in gallons) - """ - + typing.Optional[int], + FieldMetadata(alias="maxAuthorizedCapacityGallons"), + pydantic.Field( + alias="maxAuthorizedCapacityGallons", + description="how much the asset is allowed to have available (in gallons)", + ), + ] = None operational_requirement_gallons: typing_extensions.Annotated[ - typing.Optional[int], FieldMetadata(alias="operationalRequirementGallons") - ] = pydantic.Field(alias="operationalRequirementGallons", default=None) - """ - minimum required for operations (in gallons) - """ - + typing.Optional[int], + FieldMetadata(alias="operationalRequirementGallons"), + pydantic.Field( + alias="operationalRequirementGallons", description="minimum required for operations (in gallons)" + ), + ] = None data_classification: typing_extensions.Annotated[ - typing.Optional[Classification], FieldMetadata(alias="dataClassification") - ] = pydantic.Field(alias="dataClassification", default=None) - """ - fuel in a single asset may have different levels of classification - use case: fuel for a SECRET asset while diesel fuel may be UNCLASSIFIED - """ - - data_source: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dataSource")] = pydantic.Field( - alias="dataSource", default=None - ) - """ - source of information - """ + typing.Optional[Classification], + FieldMetadata(alias="dataClassification"), + pydantic.Field( + alias="dataClassification", + description="fuel in a single asset may have different levels of classification\n use case: fuel for a SECRET asset while diesel fuel may be UNCLASSIFIED", + ), + ] = None + data_source: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="dataSource"), + pydantic.Field(alias="dataSource", description="source of information"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/geo_details.py b/src/anduril/types/geo_details.py index 6bbd6f7..4e939c4 100644 --- a/src/anduril/types/geo_details.py +++ b/src/anduril/types/geo_details.py @@ -18,8 +18,8 @@ class GeoDetails(UniversalBaseModel): type: typing.Optional[GeoDetailsType] = None control_area: typing_extensions.Annotated[ - typing.Optional[ControlAreaDetails], FieldMetadata(alias="controlArea") - ] = pydantic.Field(alias="controlArea", default=None) + typing.Optional[ControlAreaDetails], FieldMetadata(alias="controlArea"), pydantic.Field(alias="controlArea") + ] = None acm: typing.Optional[AcmDetails] = None if IS_PYDANTIC_V2: diff --git a/src/anduril/types/geo_ellipse.py b/src/anduril/types/geo_ellipse.py index 38fd48c..ecbcb35 100644 --- a/src/anduril/types/geo_ellipse.py +++ b/src/anduril/types/geo_ellipse.py @@ -15,33 +15,38 @@ class GeoEllipse(UniversalBaseModel): This shape is NOT Geo-JSON compatible. """ - semi_major_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="semiMajorAxisM")] = ( - pydantic.Field(alias="semiMajorAxisM", default=None) - ) - """ - Defines the distance from the center point of the ellipse to the furthest distance on the perimeter in meters. - """ - - semi_minor_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="semiMinorAxisM")] = ( - pydantic.Field(alias="semiMinorAxisM", default=None) - ) - """ - Defines the distance from the center point of the ellipse to the shortest distance on the perimeter in meters. - """ - - orientation_d: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="orientationD")] = ( - pydantic.Field(alias="orientationD", default=None) - ) - """ - The orientation of the semi-major relative to true north in degrees from clockwise: 0-180 due to symmetry across the semi-minor axis. - """ - - height_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="heightM")] = pydantic.Field( - alias="heightM", default=None - ) - """ - Optional height above entity position to extrude in meters. A non-zero value creates an elliptic cylinder - """ + semi_major_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="semiMajorAxisM"), + pydantic.Field( + alias="semiMajorAxisM", + description="Defines the distance from the center point of the ellipse to the furthest distance on the perimeter in meters.", + ), + ] = None + semi_minor_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="semiMinorAxisM"), + pydantic.Field( + alias="semiMinorAxisM", + description="Defines the distance from the center point of the ellipse to the shortest distance on the perimeter in meters.", + ), + ] = None + orientation_d: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="orientationD"), + pydantic.Field( + alias="orientationD", + description="The orientation of the semi-major relative to true north in degrees from clockwise: 0-180 due to symmetry across the semi-minor axis.", + ), + ] = None + height_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="heightM"), + pydantic.Field( + alias="heightM", + description="Optional height above entity position to extrude in meters. A non-zero value creates an elliptic cylinder", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/geo_ellipsoid.py b/src/anduril/types/geo_ellipsoid.py index 314fb84..ba4adc5 100644 --- a/src/anduril/types/geo_ellipsoid.py +++ b/src/anduril/types/geo_ellipsoid.py @@ -15,26 +15,29 @@ class GeoEllipsoid(UniversalBaseModel): This shape is NOT Geo-JSON compatible. """ - forward_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="forwardAxisM")] = ( - pydantic.Field(alias="forwardAxisM", default=None) - ) - """ - Defines the distance from the center point to the surface along the forward axis - """ - - side_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="sideAxisM")] = pydantic.Field( - alias="sideAxisM", default=None - ) - """ - Defines the distance from the center point to the surface along the side axis - """ - - up_axis_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="upAxisM")] = pydantic.Field( - alias="upAxisM", default=None - ) - """ - Defines the distance from the center point to the surface along the up axis - """ + forward_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="forwardAxisM"), + pydantic.Field( + alias="forwardAxisM", + description="Defines the distance from the center point to the surface along the forward axis", + ), + ] = None + side_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="sideAxisM"), + pydantic.Field( + alias="sideAxisM", + description="Defines the distance from the center point to the surface along the side axis", + ), + ] = None + up_axis_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="upAxisM"), + pydantic.Field( + alias="upAxisM", description="Defines the distance from the center point to the surface along the up axis" + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/geo_polygon.py b/src/anduril/types/geo_polygon.py index 20e8992..2bfd733 100644 --- a/src/anduril/types/geo_polygon.py +++ b/src/anduril/types/geo_polygon.py @@ -20,15 +20,14 @@ class GeoPolygon(UniversalBaseModel): An array of LinearRings where the first item is the exterior ring and subsequent items are interior rings. """ - is_rectangle: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isRectangle")] = ( - pydantic.Field(alias="isRectangle", default=None) - ) - """ - An extension hint that this polygon is a rectangle. When true this implies several things: - * exactly 1 linear ring with 5 points (starting corner, 3 other corners and start again) - * each point has the same altitude corresponding with the plane of the rectangle - * each point has the same height (either all present and equal, or all not present) - """ + is_rectangle: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isRectangle"), + pydantic.Field( + alias="isRectangle", + description="An extension hint that this polygon is a rectangle. When true this implies several things:\n * exactly 1 linear ring with 5 points (starting corner, 3 other corners and start again)\n * each point has the same altitude corresponding with the plane of the rectangle\n * each point has the same height (either all present and equal, or all not present)", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/geo_polygon_position.py b/src/anduril/types/geo_polygon_position.py index 9189d54..832b968 100644 --- a/src/anduril/types/geo_polygon_position.py +++ b/src/anduril/types/geo_polygon_position.py @@ -19,14 +19,14 @@ class GeoPolygonPosition(UniversalBaseModel): base position. if no altitude set, its on the ground. """ - height_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="heightM")] = pydantic.Field( - alias="heightM", default=None - ) - """ - optional height above base position to extrude in meters. - for a given polygon, all points should have a height or none of them. - strictly GeoJSON compatible polygons will not have this set. - """ + height_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="heightM"), + pydantic.Field( + alias="heightM", + description="optional height above base position to extrude in meters.\n for a given polygon, all points should have a height or none of them.\n strictly GeoJSON compatible polygons will not have this set.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/google_protobuf_any.py b/src/anduril/types/google_protobuf_any.py index f06e379..ad440a5 100644 --- a/src/anduril/types/google_protobuf_any.py +++ b/src/anduril/types/google_protobuf_any.py @@ -13,12 +13,11 @@ class GoogleProtobufAny(UniversalBaseModel): Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. """ - type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="@type")] = pydantic.Field( - alias="@type", default=None - ) - """ - The type of the serialized message. - """ + type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="@type"), + pydantic.Field(alias="@type", description="The type of the serialized message."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/health.py b/src/anduril/types/health.py index cdad044..9b5a0b9 100644 --- a/src/anduril/types/health.py +++ b/src/anduril/types/health.py @@ -19,43 +19,42 @@ class Health(UniversalBaseModel): """ connection_status: typing_extensions.Annotated[ - typing.Optional[HealthConnectionStatus], FieldMetadata(alias="connectionStatus") - ] = pydantic.Field(alias="connectionStatus", default=None) - """ - Status indicating whether the entity is able to communicate with Entity Manager. - """ - + typing.Optional[HealthConnectionStatus], + FieldMetadata(alias="connectionStatus"), + pydantic.Field( + alias="connectionStatus", + description="Status indicating whether the entity is able to communicate with Entity Manager.", + ), + ] = None health_status: typing_extensions.Annotated[ - typing.Optional[HealthHealthStatus], FieldMetadata(alias="healthStatus") - ] = pydantic.Field(alias="healthStatus", default=None) - """ - Top-level health status; typically a roll-up of individual component healths. - """ - + typing.Optional[HealthHealthStatus], + FieldMetadata(alias="healthStatus"), + pydantic.Field( + alias="healthStatus", + description="Top-level health status; typically a roll-up of individual component healths.", + ), + ] = None components: typing.Optional[typing.List[ComponentHealth]] = pydantic.Field(default=None) """ Health of individual components running on this Entity. """ - update_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="updateTime")] = ( - pydantic.Field(alias="updateTime", default=None) - ) - """ - The update time for the top-level health information. - If this timestamp is unset, the data is assumed to be most recent - """ - + update_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="updateTime"), + pydantic.Field( + alias="updateTime", + description="The update time for the top-level health information.\n If this timestamp is unset, the data is assumed to be most recent", + ), + ] = None active_alerts: typing_extensions.Annotated[ - typing.Optional[typing.List[Alert]], FieldMetadata(alias="activeAlerts") - ] = pydantic.Field(alias="activeAlerts", default=None) - """ - Active alerts indicate a critical change in system state sent by the asset - that must be made known to an operator or consumer of the common operating picture. - Alerts are different from ComponentHealth messages--an active alert does not necessarily - indicate a component is in an unhealthy state. For example, an asset may trigger - an active alert based on fuel levels running low. Alerts should be removed from this list when their conditions - are cleared. In other words, only active alerts should be reported here. - """ + typing.Optional[typing.List[Alert]], + FieldMetadata(alias="activeAlerts"), + pydantic.Field( + alias="activeAlerts", + description="Active alerts indicate a critical change in system state sent by the asset\n that must be made known to an operator or consumer of the common operating picture.\n Alerts are different from ComponentHealth messages--an active alert does not necessarily\n indicate a component is in an unhealthy state. For example, an asset may trigger\n an active alert based on fuel levels running low. Alerts should be removed from this list when their conditions\n are cleared. In other words, only active alerts should be reported here.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/high_value_target.py b/src/anduril/types/high_value_target.py index ac8802f..b9515a5 100644 --- a/src/anduril/types/high_value_target.py +++ b/src/anduril/types/high_value_target.py @@ -15,36 +15,37 @@ class HighValueTarget(UniversalBaseModel): """ is_high_value_target: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="isHighValueTarget") - ] = pydantic.Field(alias="isHighValueTarget", default=None) - """ - Indicates whether the target matches any description from a high value target list. - """ - - target_priority: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="targetPriority")] = ( - pydantic.Field(alias="targetPriority", default=None) - ) - """ - The priority associated with the target. If the target's description appears on multiple high value target lists, - the priority will be a reflection of the highest priority of all of those list's target description. - - A lower value indicates the target is of a higher priority, with 1 being the highest possible priority. A value of - 0 indicates there is no priority associated with this target. - """ - + typing.Optional[bool], + FieldMetadata(alias="isHighValueTarget"), + pydantic.Field( + alias="isHighValueTarget", + description="Indicates whether the target matches any description from a high value target list.", + ), + ] = None + target_priority: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="targetPriority"), + pydantic.Field( + alias="targetPriority", + description="The priority associated with the target. If the target's description appears on multiple high value target lists,\n the priority will be a reflection of the highest priority of all of those list's target description.\n\n A lower value indicates the target is of a higher priority, with 1 being the highest possible priority. A value of\n 0 indicates there is no priority associated with this target.", + ), + ] = None target_matches: typing_extensions.Annotated[ - typing.Optional[typing.List[HighValueTargetMatch]], FieldMetadata(alias="targetMatches") - ] = pydantic.Field(alias="targetMatches", default=None) - """ - All of the high value target descriptions that the target matches against. - """ - + typing.Optional[typing.List[HighValueTargetMatch]], + FieldMetadata(alias="targetMatches"), + pydantic.Field( + alias="targetMatches", + description="All of the high value target descriptions that the target matches against.", + ), + ] = None is_high_payoff_target: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="isHighPayoffTarget") - ] = pydantic.Field(alias="isHighPayoffTarget", default=None) - """ - Indicates whether the target is a 'High Payoff Target'. Targets can be one or both of high value and high payoff. - """ + typing.Optional[bool], + FieldMetadata(alias="isHighPayoffTarget"), + pydantic.Field( + alias="isHighPayoffTarget", + description="Indicates whether the target is a 'High Payoff Target'. Targets can be one or both of high value and high payoff.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/high_value_target_match.py b/src/anduril/types/high_value_target_match.py index 7c8d68c..f5541a8 100644 --- a/src/anduril/types/high_value_target_match.py +++ b/src/anduril/types/high_value_target_match.py @@ -10,19 +10,21 @@ class HighValueTargetMatch(UniversalBaseModel): high_value_target_list_id: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="highValueTargetListId") - ] = pydantic.Field(alias="highValueTargetListId", default=None) - """ - The ID of the high value target list that matches the target description. - """ - + typing.Optional[str], + FieldMetadata(alias="highValueTargetListId"), + pydantic.Field( + alias="highValueTargetListId", + description="The ID of the high value target list that matches the target description.", + ), + ] = None high_value_target_description_id: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="highValueTargetDescriptionId") - ] = pydantic.Field(alias="highValueTargetDescriptionId", default=None) - """ - The ID of the specific high value target description within a high value target list that was matched against. - The ID is considered to be a globally unique identifier across all high value target IDs. - """ + typing.Optional[str], + FieldMetadata(alias="highValueTargetDescriptionId"), + pydantic.Field( + alias="highValueTargetDescriptionId", + description="The ID of the specific high value target description within a high value target list that was matched against.\n The ID is considered to be a globally unique identifier across all high value target IDs.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/line_of_bearing.py b/src/anduril/types/line_of_bearing.py index 875e9ce..e1a1e89 100644 --- a/src/anduril/types/line_of_bearing.py +++ b/src/anduril/types/line_of_bearing.py @@ -16,25 +16,20 @@ class LineOfBearing(UniversalBaseModel): """ angle_of_arrival: typing_extensions.Annotated[ - typing.Optional[AngleOfArrival], FieldMetadata(alias="angleOfArrival") - ] = pydantic.Field(alias="angleOfArrival", default=None) - """ - The direction pointing from this entity to the detection - """ - + typing.Optional[AngleOfArrival], + FieldMetadata(alias="angleOfArrival"), + pydantic.Field(alias="angleOfArrival", description="The direction pointing from this entity to the detection"), + ] = None range_estimate_m: typing_extensions.Annotated[ - typing.Optional[Measurement], FieldMetadata(alias="rangeEstimateM") - ] = pydantic.Field(alias="rangeEstimateM", default=None) - """ - The estimated distance of the detection - """ - - max_range_m: typing_extensions.Annotated[typing.Optional[Measurement], FieldMetadata(alias="maxRangeM")] = ( - pydantic.Field(alias="maxRangeM", default=None) - ) - """ - The maximum distance of the detection - """ + typing.Optional[Measurement], + FieldMetadata(alias="rangeEstimateM"), + pydantic.Field(alias="rangeEstimateM", description="The estimated distance of the detection"), + ] = None + max_range_m: typing_extensions.Annotated[ + typing.Optional[Measurement], + FieldMetadata(alias="maxRangeM"), + pydantic.Field(alias="maxRangeM", description="The maximum distance of the detection"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/lla.py b/src/anduril/types/lla.py index fb2628b..cd42c85 100644 --- a/src/anduril/types/lla.py +++ b/src/anduril/types/lla.py @@ -15,13 +15,13 @@ class Lla(UniversalBaseModel): alt: typing.Optional[float] = None is2d: typing.Optional[bool] = None altitude_reference: typing_extensions.Annotated[ - typing.Optional[LlaAltitudeReference], FieldMetadata(alias="altitudeReference") - ] = pydantic.Field(alias="altitudeReference", default=None) - """ - Meaning of alt. - altitude in meters above either WGS84 or EGM96, use altitude_reference to - determine what zero means. - """ + typing.Optional[LlaAltitudeReference], + FieldMetadata(alias="altitudeReference"), + pydantic.Field( + alias="altitudeReference", + description="Meaning of alt.\n altitude in meters above either WGS84 or EGM96, use altitude_reference to\n determine what zero means.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/location.py b/src/anduril/types/location.py index 4893981..c127abb 100644 --- a/src/anduril/types/location.py +++ b/src/anduril/types/location.py @@ -21,31 +21,34 @@ class Location(UniversalBaseModel): see Position definition for details. """ - velocity_enu: typing_extensions.Annotated[typing.Optional[Enu], FieldMetadata(alias="velocityEnu")] = ( - pydantic.Field(alias="velocityEnu", default=None) - ) - """ - Velocity in an ENU reference frame centered on the corresponding position. All units are meters per second. - """ - - speed_mps: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="speedMps")] = pydantic.Field( - alias="speedMps", default=None - ) - """ - Speed is the magnitude of velocity_enu vector [sqrt(e^2 + n^2 + u^2)] when present, measured in m/s. - """ - + velocity_enu: typing_extensions.Annotated[ + typing.Optional[Enu], + FieldMetadata(alias="velocityEnu"), + pydantic.Field( + alias="velocityEnu", + description="Velocity in an ENU reference frame centered on the corresponding position. All units are meters per second.", + ), + ] = None + speed_mps: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="speedMps"), + pydantic.Field( + alias="speedMps", + description="Speed is the magnitude of velocity_enu vector [sqrt(e^2 + n^2 + u^2)] when present, measured in m/s.", + ), + ] = None acceleration: typing.Optional[Enu] = pydantic.Field(default=None) """ The entity's acceleration in meters/s^2. """ - attitude_enu: typing_extensions.Annotated[typing.Optional[Quaternion], FieldMetadata(alias="attitudeEnu")] = ( - pydantic.Field(alias="attitudeEnu", default=None) - ) - """ - quaternion to translate from entity body frame to it's ENU frame - """ + attitude_enu: typing_extensions.Annotated[ + typing.Optional[Quaternion], + FieldMetadata(alias="attitudeEnu"), + pydantic.Field( + alias="attitudeEnu", description="quaternion to translate from entity body frame to it's ENU frame" + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/location_uncertainty.py b/src/anduril/types/location_uncertainty.py index 39915d4..98d5b42 100644 --- a/src/anduril/types/location_uncertainty.py +++ b/src/anduril/types/location_uncertainty.py @@ -16,27 +16,29 @@ class LocationUncertainty(UniversalBaseModel): """ position_enu_cov: typing_extensions.Annotated[ - typing.Optional[EntityManagerTMat3], FieldMetadata(alias="positionEnuCov") - ] = pydantic.Field(alias="positionEnuCov", default=None) - """ - Positional covariance represented by the upper triangle of the covariance matrix. It is valid to populate - only the diagonal of the matrix if the full covariance matrix is unknown. - """ - + typing.Optional[EntityManagerTMat3], + FieldMetadata(alias="positionEnuCov"), + pydantic.Field( + alias="positionEnuCov", + description="Positional covariance represented by the upper triangle of the covariance matrix. It is valid to populate\n only the diagonal of the matrix if the full covariance matrix is unknown.", + ), + ] = None velocity_enu_cov: typing_extensions.Annotated[ - typing.Optional[EntityManagerTMat3], FieldMetadata(alias="velocityEnuCov") - ] = pydantic.Field(alias="velocityEnuCov", default=None) - """ - Velocity covariance represented by the upper triangle of the covariance matrix. It is valid to populate - only the diagonal of the matrix if the full covariance matrix is unknown. - """ - + typing.Optional[EntityManagerTMat3], + FieldMetadata(alias="velocityEnuCov"), + pydantic.Field( + alias="velocityEnuCov", + description="Velocity covariance represented by the upper triangle of the covariance matrix. It is valid to populate\n only the diagonal of the matrix if the full covariance matrix is unknown.", + ), + ] = None position_error_ellipse: typing_extensions.Annotated[ - typing.Optional[ErrorEllipse], FieldMetadata(alias="positionErrorEllipse") - ] = pydantic.Field(alias="positionErrorEllipse", default=None) - """ - An ellipse that describes the certainty probability and error boundary for a given geolocation. - """ + typing.Optional[ErrorEllipse], + FieldMetadata(alias="positionErrorEllipse"), + pydantic.Field( + alias="positionErrorEllipse", + description="An ellipse that describes the certainty probability and error boundary for a given geolocation.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/mean_keplerian_elements.py b/src/anduril/types/mean_keplerian_elements.py index f6120b7..ecb187e 100644 --- a/src/anduril/types/mean_keplerian_elements.py +++ b/src/anduril/types/mean_keplerian_elements.py @@ -15,49 +15,40 @@ class MeanKeplerianElements(UniversalBaseModel): UTC time of validity """ - semi_major_axis_km: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="semiMajorAxisKm")] = ( - pydantic.Field(alias="semiMajorAxisKm", default=None) - ) - """ - Preferred: semi major axis in kilometers - """ - - mean_motion: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="meanMotion")] = ( - pydantic.Field(alias="meanMotion", default=None) - ) - """ - If using SGP/SGP4, provide the Keplerian Mean Motion in revolutions per day - """ - + semi_major_axis_km: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="semiMajorAxisKm"), + pydantic.Field(alias="semiMajorAxisKm", description="Preferred: semi major axis in kilometers"), + ] = None + mean_motion: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="meanMotion"), + pydantic.Field( + alias="meanMotion", + description="If using SGP/SGP4, provide the Keplerian Mean Motion in revolutions per day", + ), + ] = None eccentricity: typing.Optional[float] = None - inclination_deg: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="inclinationDeg")] = ( - pydantic.Field(alias="inclinationDeg", default=None) - ) - """ - Angle of inclination in deg - """ - - ra_of_asc_node_deg: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="raOfAscNodeDeg")] = ( - pydantic.Field(alias="raOfAscNodeDeg", default=None) - ) - """ - Right ascension of the ascending node in deg - """ - + inclination_deg: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="inclinationDeg"), + pydantic.Field(alias="inclinationDeg", description="Angle of inclination in deg"), + ] = None + ra_of_asc_node_deg: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="raOfAscNodeDeg"), + pydantic.Field(alias="raOfAscNodeDeg", description="Right ascension of the ascending node in deg"), + ] = None arg_of_pericenter_deg: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="argOfPericenterDeg") - ] = pydantic.Field(alias="argOfPericenterDeg", default=None) - """ - Argument of pericenter in deg - """ - - mean_anomaly_deg: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="meanAnomalyDeg")] = ( - pydantic.Field(alias="meanAnomalyDeg", default=None) - ) - """ - Mean anomaly in deg - """ - + typing.Optional[float], + FieldMetadata(alias="argOfPericenterDeg"), + pydantic.Field(alias="argOfPericenterDeg", description="Argument of pericenter in deg"), + ] = None + mean_anomaly_deg: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="meanAnomalyDeg"), + pydantic.Field(alias="meanAnomalyDeg", description="Mean anomaly in deg"), + ] = None gm: typing.Optional[float] = pydantic.Field(default=None) """ Optional: gravitational coefficient (Gravitational Constant x central mass) in kg^3 / s^2 diff --git a/src/anduril/types/media_item.py b/src/anduril/types/media_item.py index 41660ec..ca4be22 100644 --- a/src/anduril/types/media_item.py +++ b/src/anduril/types/media_item.py @@ -11,12 +11,14 @@ class MediaItem(UniversalBaseModel): type: typing.Optional[MediaItemType] = None - relative_path: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="relativePath")] = ( - pydantic.Field(alias="relativePath", default=None) - ) - """ - The path, relative to the environment base URL, where media related to an entity can be accessed - """ + relative_path: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="relativePath"), + pydantic.Field( + alias="relativePath", + description="The path, relative to the environment base URL, where media related to an entity can be accessed", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/mode5.py b/src/anduril/types/mode5.py index 2a477f7..9c669e1 100644 --- a/src/anduril/types/mode5.py +++ b/src/anduril/types/mode5.py @@ -15,23 +15,23 @@ class Mode5(UniversalBaseModel): """ mode5interrogation_response: typing_extensions.Annotated[ - typing.Optional[Mode5Mode5InterrogationResponse], FieldMetadata(alias="mode5InterrogationResponse") - ] = pydantic.Field(alias="mode5InterrogationResponse", default=None) - """ - The validity of the response from the Mode 5 interrogation. - """ - + typing.Optional[Mode5Mode5InterrogationResponse], + FieldMetadata(alias="mode5InterrogationResponse"), + pydantic.Field( + alias="mode5InterrogationResponse", + description="The validity of the response from the Mode 5 interrogation.", + ), + ] = None mode5: typing.Optional[int] = pydantic.Field(default=None) """ The Mode 5 code assigned to military assets. """ - mode5platform_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="mode5PlatformId")] = ( - pydantic.Field(alias="mode5PlatformId", default=None) - ) - """ - The Mode 5 platform identification code. - """ + mode5platform_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="mode5PlatformId"), + pydantic.Field(alias="mode5PlatformId", description="The Mode 5 platform identification code."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/ontology.py b/src/anduril/types/ontology.py index 962c2f2..c93399d 100644 --- a/src/anduril/types/ontology.py +++ b/src/anduril/types/ontology.py @@ -14,20 +14,19 @@ class Ontology(UniversalBaseModel): Ontology of the entity. """ - platform_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="platformType")] = ( - pydantic.Field(alias="platformType", default=None) - ) - """ - A string that describes the entity's high-level type with natural language. - """ - - specific_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="specificType")] = ( - pydantic.Field(alias="specificType", default=None) - ) - """ - A string that describes the entity's exact model or type. - """ - + platform_type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="platformType"), + pydantic.Field( + alias="platformType", + description="A string that describes the entity's high-level type with natural language.", + ), + ] = None + specific_type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="specificType"), + pydantic.Field(alias="specificType", description="A string that describes the entity's exact model or type."), + ] = None template: typing.Optional[OntologyTemplate] = pydantic.Field(default=None) """ The template used when creating this entity. Specifies minimum required components. diff --git a/src/anduril/types/orbit.py b/src/anduril/types/orbit.py index 45890ff..fc8d71c 100644 --- a/src/anduril/types/orbit.py +++ b/src/anduril/types/orbit.py @@ -11,11 +11,13 @@ class Orbit(UniversalBaseModel): orbit_mean_elements: typing_extensions.Annotated[ - typing.Optional[OrbitMeanElements], FieldMetadata(alias="orbitMeanElements") - ] = pydantic.Field(alias="orbitMeanElements", default=None) - """ - Orbit Mean Elements data, analogous to the Orbit Mean Elements Message in CCSDS 502.0-B-3 - """ + typing.Optional[OrbitMeanElements], + FieldMetadata(alias="orbitMeanElements"), + pydantic.Field( + alias="orbitMeanElements", + description="Orbit Mean Elements data, analogous to the Orbit Mean Elements Message in CCSDS 502.0-B-3", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/orbit_mean_elements.py b/src/anduril/types/orbit_mean_elements.py index d0fead9..e485aa4 100644 --- a/src/anduril/types/orbit_mean_elements.py +++ b/src/anduril/types/orbit_mean_elements.py @@ -18,11 +18,13 @@ class OrbitMeanElements(UniversalBaseModel): metadata: typing.Optional[OrbitMeanElementsMetadata] = None mean_keplerian_elements: typing_extensions.Annotated[ - typing.Optional[MeanKeplerianElements], FieldMetadata(alias="meanKeplerianElements") - ] = pydantic.Field(alias="meanKeplerianElements", default=None) + typing.Optional[MeanKeplerianElements], + FieldMetadata(alias="meanKeplerianElements"), + pydantic.Field(alias="meanKeplerianElements"), + ] = None tle_parameters: typing_extensions.Annotated[ - typing.Optional[TleParameters], FieldMetadata(alias="tleParameters") - ] = pydantic.Field(alias="tleParameters", default=None) + typing.Optional[TleParameters], FieldMetadata(alias="tleParameters"), pydantic.Field(alias="tleParameters") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/orbit_mean_elements_metadata.py b/src/anduril/types/orbit_mean_elements_metadata.py index ca2cc78..3d89e18 100644 --- a/src/anduril/types/orbit_mean_elements_metadata.py +++ b/src/anduril/types/orbit_mean_elements_metadata.py @@ -12,42 +12,39 @@ class OrbitMeanElementsMetadata(UniversalBaseModel): - creation_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="creationDate")] = ( - pydantic.Field(alias="creationDate", default=None) - ) - """ - Creation date/time in UTC - """ - + creation_date: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="creationDate"), + pydantic.Field(alias="creationDate", description="Creation date/time in UTC"), + ] = None originator: typing.Optional[str] = pydantic.Field(default=None) """ Creating agency or operator """ - message_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="messageId")] = pydantic.Field( - alias="messageId", default=None - ) - """ - ID that uniquely identifies a message from a given originator. - """ - + message_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="messageId"), + pydantic.Field(alias="messageId", description="ID that uniquely identifies a message from a given originator."), + ] = None ref_frame: typing_extensions.Annotated[ - typing.Optional[OrbitMeanElementsMetadataRefFrame], FieldMetadata(alias="refFrame") - ] = pydantic.Field(alias="refFrame", default=None) - """ - Reference frame, assumed to be Earth-centered - """ - - ref_frame_epoch: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="refFrameEpoch")] = ( - pydantic.Field(alias="refFrameEpoch", default=None) - ) - """ - Reference frame epoch in UTC - mandatory only if not intrinsic to frame definition - """ - + typing.Optional[OrbitMeanElementsMetadataRefFrame], + FieldMetadata(alias="refFrame"), + pydantic.Field(alias="refFrame", description="Reference frame, assumed to be Earth-centered"), + ] = None + ref_frame_epoch: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="refFrameEpoch"), + pydantic.Field( + alias="refFrameEpoch", + description="Reference frame epoch in UTC - mandatory only if not intrinsic to frame definition", + ), + ] = None mean_element_theory: typing_extensions.Annotated[ - typing.Optional[OrbitMeanElementsMetadataMeanElementTheory], FieldMetadata(alias="meanElementTheory") - ] = pydantic.Field(alias="meanElementTheory", default=None) + typing.Optional[OrbitMeanElementsMetadataMeanElementTheory], + FieldMetadata(alias="meanElementTheory"), + pydantic.Field(alias="meanElementTheory"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/override.py b/src/anduril/types/override.py index db5faf8..95f722e 100644 --- a/src/anduril/types/override.py +++ b/src/anduril/types/override.py @@ -19,29 +19,27 @@ class Override(UniversalBaseModel): Details about an override. Last write wins. """ - request_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="requestId")] = pydantic.Field( - alias="requestId", default=None - ) - """ - override request id for an override request - """ - - field_path: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fieldPath")] = pydantic.Field( - alias="fieldPath", default=None - ) - """ - proto field path which is the string representation of a field. - example: correlated.primary_entity_id would be primary_entity_id in correlated component - """ - + request_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="requestId"), + pydantic.Field(alias="requestId", description="override request id for an override request"), + ] = None + field_path: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="fieldPath"), + pydantic.Field( + alias="fieldPath", + description="proto field path which is the string representation of a field.\n example: correlated.primary_entity_id would be primary_entity_id in correlated component", + ), + ] = None masked_field_value: typing_extensions.Annotated[ - typing.Optional["Entity"], FieldMetadata(alias="maskedFieldValue") - ] = pydantic.Field(alias="maskedFieldValue", default=None) - """ - new field value corresponding to field path. In the shape of an empty entity with only the changed value. - example: entity: { mil_view: { disposition: Disposition_DISPOSITION_HOSTILE } } - """ - + typing.Optional["Entity"], + FieldMetadata(alias="maskedFieldValue"), + pydantic.Field( + alias="maskedFieldValue", + description="new field value corresponding to field path. In the shape of an empty entity with only the changed value.\n example: entity: { mil_view: { disposition: Disposition_DISPOSITION_HOSTILE } }", + ), + ] = None status: typing.Optional[OverrideStatus] = pydantic.Field(default=None) """ status of the override @@ -55,11 +53,13 @@ class Override(UniversalBaseModel): """ request_timestamp: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="requestTimestamp") - ] = pydantic.Field(alias="requestTimestamp", default=None) - """ - Timestamp of the override request. The timestamp is generated by the Entity Manager instance that receives the request. - """ + typing.Optional[dt.datetime], + FieldMetadata(alias="requestTimestamp"), + pydantic.Field( + alias="requestTimestamp", + description="Timestamp of the override request. The timestamp is generated by the Entity Manager instance that receives the request.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/owner.py b/src/anduril/types/owner.py index da4e3e0..11fd319 100644 --- a/src/anduril/types/owner.py +++ b/src/anduril/types/owner.py @@ -13,12 +13,11 @@ class Owner(UniversalBaseModel): Owner designates the entity responsible for writes of task data. """ - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - Entity ID of the owner. - """ + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field(alias="entityId", description="Entity ID of the owner."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/payload_configuration.py b/src/anduril/types/payload_configuration.py index f0c2744..3e3816f 100644 --- a/src/anduril/types/payload_configuration.py +++ b/src/anduril/types/payload_configuration.py @@ -11,14 +11,14 @@ class PayloadConfiguration(UniversalBaseModel): - capability_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="capabilityId")] = ( - pydantic.Field(alias="capabilityId", default=None) - ) - """ - Identifying ID for the capability. - This ID may be used multiple times to represent payloads that are the same capability but have different operational states - """ - + capability_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="capabilityId"), + pydantic.Field( + alias="capabilityId", + description="Identifying ID for the capability.\n This ID may be used multiple times to represent payloads that are the same capability but have different operational states", + ), + ] = None quantity: typing.Optional[int] = pydantic.Field(default=None) """ The number of payloads currently available in the configuration. @@ -27,24 +27,20 @@ class PayloadConfiguration(UniversalBaseModel): effective_environment: typing_extensions.Annotated[ typing.Optional[typing.List[PayloadConfigurationEffectiveEnvironmentItem]], FieldMetadata(alias="effectiveEnvironment"), - ] = pydantic.Field(alias="effectiveEnvironment", default=None) - """ - The target environments the configuration is effective against. - """ - + pydantic.Field( + alias="effectiveEnvironment", description="The target environments the configuration is effective against." + ), + ] = None payload_operational_state: typing_extensions.Annotated[ - typing.Optional[PayloadConfigurationPayloadOperationalState], FieldMetadata(alias="payloadOperationalState") - ] = pydantic.Field(alias="payloadOperationalState", default=None) - """ - The operational state of this payload. - """ - + typing.Optional[PayloadConfigurationPayloadOperationalState], + FieldMetadata(alias="payloadOperationalState"), + pydantic.Field(alias="payloadOperationalState", description="The operational state of this payload."), + ] = None payload_description: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="payloadDescription") - ] = pydantic.Field(alias="payloadDescription", default=None) - """ - A human readable description of the payload - """ + typing.Optional[str], + FieldMetadata(alias="payloadDescription"), + pydantic.Field(alias="payloadDescription", description="A human readable description of the payload"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/payloads.py b/src/anduril/types/payloads.py index 506e824..9ccc470 100644 --- a/src/anduril/types/payloads.py +++ b/src/anduril/types/payloads.py @@ -15,8 +15,10 @@ class Payloads(UniversalBaseModel): """ payload_configurations: typing_extensions.Annotated[ - typing.Optional[typing.List[Payload]], FieldMetadata(alias="payloadConfigurations") - ] = pydantic.Field(alias="payloadConfigurations", default=None) + typing.Optional[typing.List[Payload]], + FieldMetadata(alias="payloadConfigurations"), + pydantic.Field(alias="payloadConfigurations"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/pose.py b/src/anduril/types/pose.py index ecb0fd5..5104f5b 100644 --- a/src/anduril/types/pose.py +++ b/src/anduril/types/pose.py @@ -16,30 +16,14 @@ class Pose(UniversalBaseModel): Geospatial location defined by this Pose. """ - att_enu: typing_extensions.Annotated[typing.Optional[Quaternion], FieldMetadata(alias="attEnu")] = pydantic.Field( - alias="attEnu", default=None - ) - """ - The quaternion to transform a point in the Pose frame to the ENU frame. The Pose frame could be Body, Turret, - etc and is determined by the context in which this Pose is used. - The normal convention for defining orientation is to list the frames of transformation, for example - att_gimbal_to_enu is the quaternion which transforms a point in the gimbal frame to the body frame, but - in this case we truncate to att_enu because the Pose frame isn't defined. A potentially better name for this - field would have been att_pose_to_enu. - - Implementations of this quaternion should left multiply this quaternion to transform a point from the Pose frame - to the enu frame. - - Point posePt{1,0,0}; - Rotation attPoseToEnu{}; - Point = attPoseToEnu*posePt; - - This transformed point represents some vector in ENU space that is aligned with the x axis of the attPoseToEnu - matrix. - - An alternative matrix expression is as follows: - ptEnu = M x ptPose - """ + att_enu: typing_extensions.Annotated[ + typing.Optional[Quaternion], + FieldMetadata(alias="attEnu"), + pydantic.Field( + alias="attEnu", + description="The quaternion to transform a point in the Pose frame to the ENU frame. The Pose frame could be Body, Turret,\n etc and is determined by the context in which this Pose is used.\n The normal convention for defining orientation is to list the frames of transformation, for example\n att_gimbal_to_enu is the quaternion which transforms a point in the gimbal frame to the body frame, but\n in this case we truncate to att_enu because the Pose frame isn't defined. A potentially better name for this\n field would have been att_pose_to_enu.\n\n Implementations of this quaternion should left multiply this quaternion to transform a point from the Pose frame\n to the enu frame.\n\n Point posePt{1,0,0};\n Rotation attPoseToEnu{};\n Point = attPoseToEnu*posePt;\n\n This transformed point represents some vector in ENU space that is aligned with the x axis of the attPoseToEnu\n matrix.\n\n An alternative matrix expression is as follows:\n ptEnu = M x ptPose", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/position.py b/src/anduril/types/position.py index 5222211..1170111 100644 --- a/src/anduril/types/position.py +++ b/src/anduril/types/position.py @@ -17,52 +17,48 @@ class Position(UniversalBaseModel): Height Above Ellipsoid (HAE) and populate the altitude_hae_meters field. """ - latitude_degrees: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="latitudeDegrees")] = ( - pydantic.Field(alias="latitudeDegrees", default=None) - ) - """ - WGS84 geodetic latitude in decimal degrees. - """ - - longitude_degrees: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="longitudeDegrees")] = ( - pydantic.Field(alias="longitudeDegrees", default=None) - ) - """ - WGS84 longitude in decimal degrees. - """ - + latitude_degrees: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="latitudeDegrees"), + pydantic.Field(alias="latitudeDegrees", description="WGS84 geodetic latitude in decimal degrees."), + ] = None + longitude_degrees: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="longitudeDegrees"), + pydantic.Field(alias="longitudeDegrees", description="WGS84 longitude in decimal degrees."), + ] = None altitude_hae_meters: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="altitudeHaeMeters") - ] = pydantic.Field(alias="altitudeHaeMeters", default=None) - """ - altitude as height above ellipsoid (WGS84) in meters. DoubleValue wrapper is used to distinguish optional from - default 0. - """ - + typing.Optional[float], + FieldMetadata(alias="altitudeHaeMeters"), + pydantic.Field( + alias="altitudeHaeMeters", + description="altitude as height above ellipsoid (WGS84) in meters. DoubleValue wrapper is used to distinguish optional from\n default 0.", + ), + ] = None altitude_agl_meters: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="altitudeAglMeters") - ] = pydantic.Field(alias="altitudeAglMeters", default=None) - """ - Altitude as AGL (Above Ground Level) if the upstream data source has this value set. This value represents the - entity's height above the terrain. This is typically measured with a radar altimeter or by using a terrain tile - set lookup. If the value is not set from the upstream, this value is not set. - """ - + typing.Optional[float], + FieldMetadata(alias="altitudeAglMeters"), + pydantic.Field( + alias="altitudeAglMeters", + description="Altitude as AGL (Above Ground Level) if the upstream data source has this value set. This value represents the\n entity's height above the terrain. This is typically measured with a radar altimeter or by using a terrain tile\n set lookup. If the value is not set from the upstream, this value is not set.", + ), + ] = None altitude_asf_meters: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="altitudeAsfMeters") - ] = pydantic.Field(alias="altitudeAsfMeters", default=None) - """ - Altitude as ASF (Above Sea Floor) if the upstream data source has this value set. If the value is not set from the upstream, this value is - not set. - """ - + typing.Optional[float], + FieldMetadata(alias="altitudeAsfMeters"), + pydantic.Field( + alias="altitudeAsfMeters", + description="Altitude as ASF (Above Sea Floor) if the upstream data source has this value set. If the value is not set from the upstream, this value is\n not set.", + ), + ] = None pressure_depth_meters: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="pressureDepthMeters") - ] = pydantic.Field(alias="pressureDepthMeters", default=None) - """ - The depth of the entity from the surface of the water through sensor measurements based on differential pressure - between the interior and exterior of the vessel. If the value is not set from the upstream, this value is not set. - """ + typing.Optional[float], + FieldMetadata(alias="pressureDepthMeters"), + pydantic.Field( + alias="pressureDepthMeters", + description="The depth of the entity from the surface of the water through sensor measurements based on differential pressure\n between the interior and exterior of the vessel. If the value is not set from the upstream, this value is not set.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/power_level.py b/src/anduril/types/power_level.py index 7baf4a2..33714be 100644 --- a/src/anduril/types/power_level.py +++ b/src/anduril/types/power_level.py @@ -23,41 +23,38 @@ class PowerLevel(UniversalBaseModel): Remaining power capacity of the system. """ - percent_remaining: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="percentRemaining")] = ( - pydantic.Field(alias="percentRemaining", default=None) - ) - """ - Percent of power remaining. - """ - + percent_remaining: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="percentRemaining"), + pydantic.Field(alias="percentRemaining", description="Percent of power remaining."), + ] = None voltage: typing.Optional[float] = pydantic.Field(default=None) """ Voltage of the power source subsystem, as reported by the power source. If the source does not report this value this field will be null. """ - current_amps: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="currentAmps")] = ( - pydantic.Field(alias="currentAmps", default=None) - ) - """ - Current in amps of the power source subsystem, as reported by the power source. If the source does not - report this value this field will be null. - """ - + current_amps: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="currentAmps"), + pydantic.Field( + alias="currentAmps", + description="Current in amps of the power source subsystem, as reported by the power source. If the source does not\n report this value this field will be null.", + ), + ] = None run_time_to_empty_mins: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="runTimeToEmptyMins") - ] = pydantic.Field(alias="runTimeToEmptyMins", default=None) - """ - Estimated minutes until empty. Calculated with consumption at the moment, as reported by the power source. If the source does not - report this value this field will be null. - """ - + typing.Optional[float], + FieldMetadata(alias="runTimeToEmptyMins"), + pydantic.Field( + alias="runTimeToEmptyMins", + description="Estimated minutes until empty. Calculated with consumption at the moment, as reported by the power source. If the source does not\n report this value this field will be null.", + ), + ] = None consumption_rate_l_per_s: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="consumptionRateLPerS") - ] = pydantic.Field(alias="consumptionRateLPerS", default=None) - """ - Fuel consumption rate in liters per second. - """ + typing.Optional[float], + FieldMetadata(alias="consumptionRateLPerS"), + pydantic.Field(alias="consumptionRateLPerS", description="Fuel consumption rate in liters per second."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/power_source.py b/src/anduril/types/power_source.py index d73bfa9..96d6e97 100644 --- a/src/anduril/types/power_source.py +++ b/src/anduril/types/power_source.py @@ -17,26 +17,23 @@ class PowerSource(UniversalBaseModel): """ power_status: typing_extensions.Annotated[ - typing.Optional[PowerSourcePowerStatus], FieldMetadata(alias="powerStatus") - ] = pydantic.Field(alias="powerStatus", default=None) - """ - Status of the power source. - """ - - power_type: typing_extensions.Annotated[typing.Optional[PowerSourcePowerType], FieldMetadata(alias="powerType")] = ( - pydantic.Field(alias="powerType", default=None) - ) - """ - Used to determine the type of power source. - """ - - power_level: typing_extensions.Annotated[typing.Optional[PowerLevel], FieldMetadata(alias="powerLevel")] = ( - pydantic.Field(alias="powerLevel", default=None) - ) - """ - Power level of the system. If absent, the power level is assumed to be unknown. - """ - + typing.Optional[PowerSourcePowerStatus], + FieldMetadata(alias="powerStatus"), + pydantic.Field(alias="powerStatus", description="Status of the power source."), + ] = None + power_type: typing_extensions.Annotated[ + typing.Optional[PowerSourcePowerType], + FieldMetadata(alias="powerType"), + pydantic.Field(alias="powerType", description="Used to determine the type of power source."), + ] = None + power_level: typing_extensions.Annotated[ + typing.Optional[PowerLevel], + FieldMetadata(alias="powerLevel"), + pydantic.Field( + alias="powerLevel", + description="Power level of the system. If absent, the power level is assumed to be unknown.", + ), + ] = None messages: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ Set of human-readable messages with status of the power system. Typically this would be used in an error state diff --git a/src/anduril/types/power_state.py b/src/anduril/types/power_state.py index 6458978..b490ab1 100644 --- a/src/anduril/types/power_state.py +++ b/src/anduril/types/power_state.py @@ -15,12 +15,13 @@ class PowerState(UniversalBaseModel): """ source_id_to_state: typing_extensions.Annotated[ - typing.Optional[typing.Dict[str, PowerSource]], FieldMetadata(alias="sourceIdToState") - ] = pydantic.Field(alias="sourceIdToState", default=None) - """ - This is a map where the key is a unique id of the power source and the value is additional information about the - power source. - """ + typing.Optional[typing.Dict[str, PowerSource]], + FieldMetadata(alias="sourceIdToState"), + pydantic.Field( + alias="sourceIdToState", + description="This is a map where the key is a unique id of the power source and the value is additional information about the\n power source.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/primary_correlation.py b/src/anduril/types/primary_correlation.py index 9566f0b..44d515c 100644 --- a/src/anduril/types/primary_correlation.py +++ b/src/anduril/types/primary_correlation.py @@ -10,11 +10,10 @@ class PrimaryCorrelation(UniversalBaseModel): secondary_entity_ids: typing_extensions.Annotated[ - typing.Optional[typing.List[str]], FieldMetadata(alias="secondaryEntityIds") - ] = pydantic.Field(alias="secondaryEntityIds", default=None) - """ - The secondary entity IDs part of this correlation. - """ + typing.Optional[typing.List[str]], + FieldMetadata(alias="secondaryEntityIds"), + pydantic.Field(alias="secondaryEntityIds", description="The secondary entity IDs part of this correlation."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/principal.py b/src/anduril/types/principal.py index c4a653f..46f127e 100644 --- a/src/anduril/types/principal.py +++ b/src/anduril/types/principal.py @@ -21,14 +21,14 @@ class Principal(UniversalBaseModel): system: typing.Optional[System] = None user: typing.Optional[User] = None team: typing.Optional[Team] = None - on_behalf_of: typing_extensions.Annotated[typing.Optional["Principal"], FieldMetadata(alias="onBehalfOf")] = ( - pydantic.Field(alias="onBehalfOf", default=None) - ) - """ - The Principal _this_ Principal is acting on behalf of. - - Likely only populated once in the nesting (i.e. the "on_behalf_of" Principal would not have another "on_behalf_of" in most cases). - """ + on_behalf_of: typing_extensions.Annotated[ + typing.Optional["Principal"], + FieldMetadata(alias="onBehalfOf"), + pydantic.Field( + alias="onBehalfOf", + description='The Principal _this_ Principal is acting on behalf of.\n\n Likely only populated once in the nesting (i.e. the "on_behalf_of" Principal would not have another "on_behalf_of" in most cases).', + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/projected_frustum.py b/src/anduril/types/projected_frustum.py index bd8cad8..ac13aa7 100644 --- a/src/anduril/types/projected_frustum.py +++ b/src/anduril/types/projected_frustum.py @@ -15,33 +15,26 @@ class ProjectedFrustum(UniversalBaseModel): are optional, if the projection to the ground fails then they will not be populated. """ - upper_left: typing_extensions.Annotated[typing.Optional[Position], FieldMetadata(alias="upperLeft")] = ( - pydantic.Field(alias="upperLeft", default=None) - ) - """ - Upper left point of the frustum. - """ - - upper_right: typing_extensions.Annotated[typing.Optional[Position], FieldMetadata(alias="upperRight")] = ( - pydantic.Field(alias="upperRight", default=None) - ) - """ - Upper right point of the frustum. - """ - - bottom_right: typing_extensions.Annotated[typing.Optional[Position], FieldMetadata(alias="bottomRight")] = ( - pydantic.Field(alias="bottomRight", default=None) - ) - """ - Bottom right point of the frustum. - """ - - bottom_left: typing_extensions.Annotated[typing.Optional[Position], FieldMetadata(alias="bottomLeft")] = ( - pydantic.Field(alias="bottomLeft", default=None) - ) - """ - Bottom left point of the frustum. - """ + upper_left: typing_extensions.Annotated[ + typing.Optional[Position], + FieldMetadata(alias="upperLeft"), + pydantic.Field(alias="upperLeft", description="Upper left point of the frustum."), + ] = None + upper_right: typing_extensions.Annotated[ + typing.Optional[Position], + FieldMetadata(alias="upperRight"), + pydantic.Field(alias="upperRight", description="Upper right point of the frustum."), + ] = None + bottom_right: typing_extensions.Annotated[ + typing.Optional[Position], + FieldMetadata(alias="bottomRight"), + pydantic.Field(alias="bottomRight", description="Bottom right point of the frustum."), + ] = None + bottom_left: typing_extensions.Annotated[ + typing.Optional[Position], + FieldMetadata(alias="bottomLeft"), + pydantic.Field(alias="bottomLeft", description="Bottom left point of the frustum."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/provenance.py b/src/anduril/types/provenance.py index e2bffe7..9d07b79 100644 --- a/src/anduril/types/provenance.py +++ b/src/anduril/types/provenance.py @@ -14,42 +14,39 @@ class Provenance(UniversalBaseModel): Data provenance. """ - integration_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="integrationName")] = ( - pydantic.Field(alias="integrationName", default=None) - ) - """ - Name of the integration that produced this entity - """ - - data_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dataType")] = pydantic.Field( - alias="dataType", default=None - ) - """ - Source data type of this entity. Examples: ADSB, Link16, etc. - """ - - source_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceId")] = pydantic.Field( - alias="sourceId", default=None - ) - """ - An ID that allows an element from a source to be uniquely identified - """ - + integration_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="integrationName"), + pydantic.Field(alias="integrationName", description="Name of the integration that produced this entity"), + ] = None + data_type: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="dataType"), + pydantic.Field(alias="dataType", description="Source data type of this entity. Examples: ADSB, Link16, etc."), + ] = None + source_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sourceId"), + pydantic.Field( + alias="sourceId", description="An ID that allows an element from a source to be uniquely identified" + ), + ] = None source_update_time: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="sourceUpdateTime") - ] = pydantic.Field(alias="sourceUpdateTime", default=None) - """ - The time, according to the source system, that the data in the entity was last modified. Generally, this should - be the time that the source-reported time of validity of the data in the entity. This field must be - updated with every change to the entity or else Entity Manager will discard the update. - """ - - source_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceDescription")] = ( - pydantic.Field(alias="sourceDescription", default=None) - ) - """ - Description of the modification source. In the case of a user this is the email address. - """ + typing.Optional[dt.datetime], + FieldMetadata(alias="sourceUpdateTime"), + pydantic.Field( + alias="sourceUpdateTime", + description="The time, according to the source system, that the data in the entity was last modified. Generally, this should\n be the time that the source-reported time of validity of the data in the entity. This field must be\n updated with every change to the entity or else Entity Manager will discard the update.", + ), + ] = None + source_description: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sourceDescription"), + pydantic.Field( + alias="sourceDescription", + description="Description of the modification source. In the case of a user this is the email address.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/pulse_repetition_interval.py b/src/anduril/types/pulse_repetition_interval.py index 4a0312e..a7ac9fe 100644 --- a/src/anduril/types/pulse_repetition_interval.py +++ b/src/anduril/types/pulse_repetition_interval.py @@ -15,8 +15,10 @@ class PulseRepetitionInterval(UniversalBaseModel): """ pulse_repetition_interval_s: typing_extensions.Annotated[ - typing.Optional[Measurement], FieldMetadata(alias="pulseRepetitionIntervalS") - ] = pydantic.Field(alias="pulseRepetitionIntervalS", default=None) + typing.Optional[Measurement], + FieldMetadata(alias="pulseRepetitionIntervalS"), + pydantic.Field(alias="pulseRepetitionIntervalS"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/range_rings.py b/src/anduril/types/range_rings.py index 547c728..2bea22a 100644 --- a/src/anduril/types/range_rings.py +++ b/src/anduril/types/range_rings.py @@ -14,33 +14,26 @@ class RangeRings(UniversalBaseModel): Range rings allow visual assessment of map distance at varying zoom levels. """ - min_distance_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="minDistanceM")] = ( - pydantic.Field(alias="minDistanceM", default=None) - ) - """ - The minimum range ring distance, specified in meters. - """ - - max_distance_m: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="maxDistanceM")] = ( - pydantic.Field(alias="maxDistanceM", default=None) - ) - """ - The maximum range ring distance, specified in meters. - """ - - ring_count: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="ringCount")] = pydantic.Field( - alias="ringCount", default=None - ) - """ - The count of range rings. - """ - - ring_line_color: typing_extensions.Annotated[typing.Optional[Color], FieldMetadata(alias="ringLineColor")] = ( - pydantic.Field(alias="ringLineColor", default=None) - ) - """ - The color of range rings, specified in hex string. - """ + min_distance_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="minDistanceM"), + pydantic.Field(alias="minDistanceM", description="The minimum range ring distance, specified in meters."), + ] = None + max_distance_m: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="maxDistanceM"), + pydantic.Field(alias="maxDistanceM", description="The maximum range ring distance, specified in meters."), + ] = None + ring_count: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="ringCount"), + pydantic.Field(alias="ringCount", description="The count of range rings."), + ] = None + ring_line_color: typing_extensions.Annotated[ + typing.Optional[Color], + FieldMetadata(alias="ringLineColor"), + pydantic.Field(alias="ringLineColor", description="The color of range rings, specified in hex string."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/relations.py b/src/anduril/types/relations.py index 65f3cef..192e3db 100644 --- a/src/anduril/types/relations.py +++ b/src/anduril/types/relations.py @@ -21,12 +21,11 @@ class Relations(UniversalBaseModel): The system, user, or team assigned to the task. """ - parent_task_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="parentTaskId")] = ( - pydantic.Field(alias="parentTaskId", default=None) - ) - """ - Identifies the parent task if the task is a sub-task. - """ + parent_task_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="parentTaskId"), + pydantic.Field(alias="parentTaskId", description="Identifies the parent task if the task is a sub-task."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/relationship.py b/src/anduril/types/relationship.py index 7fd4f3a..265b3c7 100644 --- a/src/anduril/types/relationship.py +++ b/src/anduril/types/relationship.py @@ -14,26 +14,24 @@ class Relationship(UniversalBaseModel): The relationship component indicates a relationship to another entity. """ - related_entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="relatedEntityId")] = ( - pydantic.Field(alias="relatedEntityId", default=None) - ) - """ - The entity ID to which this entity is related. - """ - - relationship_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="relationshipId")] = ( - pydantic.Field(alias="relationshipId", default=None) - ) - """ - A unique identifier for this relationship. Allows removing or updating relationships. - """ - + related_entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="relatedEntityId"), + pydantic.Field(alias="relatedEntityId", description="The entity ID to which this entity is related."), + ] = None + relationship_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="relationshipId"), + pydantic.Field( + alias="relationshipId", + description="A unique identifier for this relationship. Allows removing or updating relationships.", + ), + ] = None relationship_type: typing_extensions.Annotated[ - typing.Optional[RelationshipType], FieldMetadata(alias="relationshipType") - ] = pydantic.Field(alias="relationshipType", default=None) - """ - The relationship type - """ + typing.Optional[RelationshipType], + FieldMetadata(alias="relationshipType"), + pydantic.Field(alias="relationshipType", description="The relationship type"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/relationship_type.py b/src/anduril/types/relationship_type.py index 0260b97..1a3d434 100644 --- a/src/anduril/types/relationship_type.py +++ b/src/anduril/types/relationship_type.py @@ -18,21 +18,21 @@ class RelationshipType(UniversalBaseModel): Determines the type of relationship between this entity and another. """ - tracked_by: typing_extensions.Annotated[typing.Optional[TrackedBy], FieldMetadata(alias="trackedBy")] = ( - pydantic.Field(alias="trackedBy", default=None) - ) - group_child: typing_extensions.Annotated[typing.Optional[GroupChild], FieldMetadata(alias="groupChild")] = ( - pydantic.Field(alias="groupChild", default=None) - ) - group_parent: typing_extensions.Annotated[typing.Optional[GroupParent], FieldMetadata(alias="groupParent")] = ( - pydantic.Field(alias="groupParent", default=None) - ) - merged_from: typing_extensions.Annotated[typing.Optional[MergedFrom], FieldMetadata(alias="mergedFrom")] = ( - pydantic.Field(alias="mergedFrom", default=None) - ) - active_target: typing_extensions.Annotated[typing.Optional[ActiveTarget], FieldMetadata(alias="activeTarget")] = ( - pydantic.Field(alias="activeTarget", default=None) - ) + tracked_by: typing_extensions.Annotated[ + typing.Optional[TrackedBy], FieldMetadata(alias="trackedBy"), pydantic.Field(alias="trackedBy") + ] = None + group_child: typing_extensions.Annotated[ + typing.Optional[GroupChild], FieldMetadata(alias="groupChild"), pydantic.Field(alias="groupChild") + ] = None + group_parent: typing_extensions.Annotated[ + typing.Optional[GroupParent], FieldMetadata(alias="groupParent"), pydantic.Field(alias="groupParent") + ] = None + merged_from: typing_extensions.Annotated[ + typing.Optional[MergedFrom], FieldMetadata(alias="mergedFrom"), pydantic.Field(alias="mergedFrom") + ] = None + active_target: typing_extensions.Annotated[ + typing.Optional[ActiveTarget], FieldMetadata(alias="activeTarget"), pydantic.Field(alias="activeTarget") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/replication.py b/src/anduril/types/replication.py index cbab471..5a45c28 100644 --- a/src/anduril/types/replication.py +++ b/src/anduril/types/replication.py @@ -14,12 +14,11 @@ class Replication(UniversalBaseModel): Any metadata associated with the replication of a task. """ - stale_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="staleTime")] = ( - pydantic.Field(alias="staleTime", default=None) - ) - """ - The time by which this task should be assumed to be stale. - """ + stale_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="staleTime"), + pydantic.Field(alias="staleTime", description="The time by which this task should be assumed to be stale."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/retry_strategy.py b/src/anduril/types/retry_strategy.py new file mode 100644 index 0000000..9b33fd6 --- /dev/null +++ b/src/anduril/types/retry_strategy.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .fixed_retry import FixedRetry + + +class RetryStrategy(UniversalBaseModel): + """ + Sets an optional try strategy for tasks. Use this option to control how Lattice attempts to retry delivery of tasks to assets with intermittent access or network connectivity to your environment. + """ + + fixed_retry_strategy: typing_extensions.Annotated[ + typing.Optional[FixedRetry], + FieldMetadata(alias="fixedRetryStrategy"), + pydantic.Field(alias="fixedRetryStrategy"), + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/anduril/types/rf_configuration.py b/src/anduril/types/rf_configuration.py index f26ada5..4a05ab2 100644 --- a/src/anduril/types/rf_configuration.py +++ b/src/anduril/types/rf_configuration.py @@ -16,18 +16,15 @@ class RfConfiguration(UniversalBaseModel): """ frequency_range_hz: typing_extensions.Annotated[ - typing.Optional[typing.List[FrequencyRange]], FieldMetadata(alias="frequencyRangeHz") - ] = pydantic.Field(alias="frequencyRangeHz", default=None) - """ - Frequency ranges that are available for this sensor. - """ - + typing.Optional[typing.List[FrequencyRange]], + FieldMetadata(alias="frequencyRangeHz"), + pydantic.Field(alias="frequencyRangeHz", description="Frequency ranges that are available for this sensor."), + ] = None bandwidth_range_hz: typing_extensions.Annotated[ - typing.Optional[typing.List[BandwidthRange]], FieldMetadata(alias="bandwidthRangeHz") - ] = pydantic.Field(alias="bandwidthRangeHz", default=None) - """ - Bandwidth ranges that are available for this sensor. - """ + typing.Optional[typing.List[BandwidthRange]], + FieldMetadata(alias="bandwidthRangeHz"), + pydantic.Field(alias="bandwidthRangeHz", description="Bandwidth ranges that are available for this sensor."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/route_details.py b/src/anduril/types/route_details.py index a21437a..b699c72 100644 --- a/src/anduril/types/route_details.py +++ b/src/anduril/types/route_details.py @@ -10,19 +10,18 @@ class RouteDetails(UniversalBaseModel): - destination_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="destinationName")] = ( - pydantic.Field(alias="destinationName", default=None) - ) - """ - Free form text giving the name of the entity's destination - """ - + destination_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="destinationName"), + pydantic.Field( + alias="destinationName", description="Free form text giving the name of the entity's destination" + ), + ] = None estimated_arrival_time: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="estimatedArrivalTime") - ] = pydantic.Field(alias="estimatedArrivalTime", default=None) - """ - Estimated time of arrival at destination - """ + typing.Optional[dt.datetime], + FieldMetadata(alias="estimatedArrivalTime"), + pydantic.Field(alias="estimatedArrivalTime", description="Estimated time of arrival at destination"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/scan_characteristics.py b/src/anduril/types/scan_characteristics.py index 4c67eab..61dc23e 100644 --- a/src/anduril/types/scan_characteristics.py +++ b/src/anduril/types/scan_characteristics.py @@ -15,11 +15,11 @@ class ScanCharacteristics(UniversalBaseModel): """ scan_type: typing_extensions.Annotated[ - typing.Optional[ScanCharacteristicsScanType], FieldMetadata(alias="scanType") - ] = pydantic.Field(alias="scanType", default=None) - scan_period_s: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="scanPeriodS")] = ( - pydantic.Field(alias="scanPeriodS", default=None) - ) + typing.Optional[ScanCharacteristicsScanType], FieldMetadata(alias="scanType"), pydantic.Field(alias="scanType") + ] = None + scan_period_s: typing_extensions.Annotated[ + typing.Optional[float], FieldMetadata(alias="scanPeriodS"), pydantic.Field(alias="scanPeriodS") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/schedule.py b/src/anduril/types/schedule.py index 0b3b4b5..19ea8bb 100644 --- a/src/anduril/types/schedule.py +++ b/src/anduril/types/schedule.py @@ -20,19 +20,16 @@ class Schedule(UniversalBaseModel): expression that represents this schedule's "ON" state """ - schedule_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="scheduleId")] = pydantic.Field( - alias="scheduleId", default=None - ) - """ - A unique identifier for this schedule. - """ - + schedule_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="scheduleId"), + pydantic.Field(alias="scheduleId", description="A unique identifier for this schedule."), + ] = None schedule_type: typing_extensions.Annotated[ - typing.Optional[ScheduleScheduleType], FieldMetadata(alias="scheduleType") - ] = pydantic.Field(alias="scheduleType", default=None) - """ - The schedule type - """ + typing.Optional[ScheduleScheduleType], + FieldMetadata(alias="scheduleType"), + pydantic.Field(alias="scheduleType", description="The schedule type"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/secondary_correlation.py b/src/anduril/types/secondary_correlation.py index ebe7e3e..8687dd4 100644 --- a/src/anduril/types/secondary_correlation.py +++ b/src/anduril/types/secondary_correlation.py @@ -10,13 +10,11 @@ class SecondaryCorrelation(UniversalBaseModel): - primary_entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="primaryEntityId")] = ( - pydantic.Field(alias="primaryEntityId", default=None) - ) - """ - The primary of this correlation. - """ - + primary_entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="primaryEntityId"), + pydantic.Field(alias="primaryEntityId", description="The primary of this correlation."), + ] = None metadata: typing.Optional[CorrelationMetadata] = pydantic.Field(default=None) """ Metadata about the correlation. diff --git a/src/anduril/types/sensor.py b/src/anduril/types/sensor.py index 391dec5..978dabe 100644 --- a/src/anduril/types/sensor.py +++ b/src/anduril/types/sensor.py @@ -18,50 +18,44 @@ class Sensor(UniversalBaseModel): Individual sensor configuration. """ - sensor_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sensorId")] = pydantic.Field( - alias="sensorId", default=None - ) - """ - This generally is used to indicate a specific type at a more detailed granularity. E.g. COMInt or LWIR - """ - + sensor_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sensorId"), + pydantic.Field( + alias="sensorId", + description="This generally is used to indicate a specific type at a more detailed granularity. E.g. COMInt or LWIR", + ), + ] = None operational_state: typing_extensions.Annotated[ - typing.Optional[SensorOperationalState], FieldMetadata(alias="operationalState") - ] = pydantic.Field(alias="operationalState", default=None) - sensor_type: typing_extensions.Annotated[typing.Optional[SensorSensorType], FieldMetadata(alias="sensorType")] = ( - pydantic.Field(alias="sensorType", default=None) - ) - """ - The type of sensor - """ - - sensor_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sensorDescription")] = ( - pydantic.Field(alias="sensorDescription", default=None) - ) - """ - A human readable description of the sensor - """ - + typing.Optional[SensorOperationalState], + FieldMetadata(alias="operationalState"), + pydantic.Field(alias="operationalState"), + ] = None + sensor_type: typing_extensions.Annotated[ + typing.Optional[SensorSensorType], + FieldMetadata(alias="sensorType"), + pydantic.Field(alias="sensorType", description="The type of sensor"), + ] = None + sensor_description: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="sensorDescription"), + pydantic.Field(alias="sensorDescription", description="A human readable description of the sensor"), + ] = None rf_configuraton: typing_extensions.Annotated[ - typing.Optional[RfConfiguration], FieldMetadata(alias="rfConfiguraton") - ] = pydantic.Field(alias="rfConfiguraton", default=None) - """ - RF configuration details of the sensor - """ - + typing.Optional[RfConfiguration], + FieldMetadata(alias="rfConfiguraton"), + pydantic.Field(alias="rfConfiguraton", description="RF configuration details of the sensor"), + ] = None last_detection_timestamp: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="lastDetectionTimestamp") - ] = pydantic.Field(alias="lastDetectionTimestamp", default=None) - """ - Time of the latest detection from the sensor - """ - + typing.Optional[dt.datetime], + FieldMetadata(alias="lastDetectionTimestamp"), + pydantic.Field(alias="lastDetectionTimestamp", description="Time of the latest detection from the sensor"), + ] = None fields_of_view: typing_extensions.Annotated[ - typing.Optional[typing.List[FieldOfView]], FieldMetadata(alias="fieldsOfView") - ] = pydantic.Field(alias="fieldsOfView", default=None) - """ - Multiple fields of view for a single sensor component - """ + typing.Optional[typing.List[FieldOfView]], + FieldMetadata(alias="fieldsOfView"), + pydantic.Field(alias="fieldsOfView", description="Multiple fields of view for a single sensor component"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/signal.py b/src/anduril/types/signal.py index 82f931f..51992f8 100644 --- a/src/anduril/types/signal.py +++ b/src/anduril/types/signal.py @@ -21,56 +21,45 @@ class Signal(UniversalBaseModel): """ frequency_center: typing_extensions.Annotated[ - typing.Optional[Frequency], FieldMetadata(alias="frequencyCenter") - ] = pydantic.Field(alias="frequencyCenter", default=None) + typing.Optional[Frequency], FieldMetadata(alias="frequencyCenter"), pydantic.Field(alias="frequencyCenter") + ] = None frequency_range: typing_extensions.Annotated[ - typing.Optional[FrequencyRange], FieldMetadata(alias="frequencyRange") - ] = pydantic.Field(alias="frequencyRange", default=None) - bandwidth_hz: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="bandwidthHz")] = ( - pydantic.Field(alias="bandwidthHz", default=None) - ) - """ - Indicates the bandwidth of a signal (Hz). - """ - + typing.Optional[FrequencyRange], FieldMetadata(alias="frequencyRange"), pydantic.Field(alias="frequencyRange") + ] = None + bandwidth_hz: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="bandwidthHz"), + pydantic.Field(alias="bandwidthHz", description="Indicates the bandwidth of a signal (Hz)."), + ] = None signal_to_noise_ratio: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="signalToNoiseRatio") - ] = pydantic.Field(alias="signalToNoiseRatio", default=None) - """ - Indicates the signal to noise (SNR) of this signal. - """ - + typing.Optional[float], + FieldMetadata(alias="signalToNoiseRatio"), + pydantic.Field(alias="signalToNoiseRatio", description="Indicates the signal to noise (SNR) of this signal."), + ] = None line_of_bearing: typing_extensions.Annotated[ - typing.Optional[LineOfBearing], FieldMetadata(alias="lineOfBearing") - ] = pydantic.Field(alias="lineOfBearing", default=None) + typing.Optional[LineOfBearing], FieldMetadata(alias="lineOfBearing"), pydantic.Field(alias="lineOfBearing") + ] = None fixed: typing.Optional[Fixed] = None emitter_notations: typing_extensions.Annotated[ - typing.Optional[typing.List[EmitterNotation]], FieldMetadata(alias="emitterNotations") - ] = pydantic.Field(alias="emitterNotations", default=None) - """ - Emitter notations associated with this entity. - """ - - pulse_width_s: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="pulseWidthS")] = ( - pydantic.Field(alias="pulseWidthS", default=None) - ) - """ - length in time of a single pulse - """ - + typing.Optional[typing.List[EmitterNotation]], + FieldMetadata(alias="emitterNotations"), + pydantic.Field(alias="emitterNotations", description="Emitter notations associated with this entity."), + ] = None + pulse_width_s: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="pulseWidthS"), + pydantic.Field(alias="pulseWidthS", description="length in time of a single pulse"), + ] = None pulse_repetition_interval: typing_extensions.Annotated[ - typing.Optional[PulseRepetitionInterval], FieldMetadata(alias="pulseRepetitionInterval") - ] = pydantic.Field(alias="pulseRepetitionInterval", default=None) - """ - length in time between the start of two pulses - """ - + typing.Optional[PulseRepetitionInterval], + FieldMetadata(alias="pulseRepetitionInterval"), + pydantic.Field(alias="pulseRepetitionInterval", description="length in time between the start of two pulses"), + ] = None scan_characteristics: typing_extensions.Annotated[ - typing.Optional[ScanCharacteristics], FieldMetadata(alias="scanCharacteristics") - ] = pydantic.Field(alias="scanCharacteristics", default=None) - """ - describes how a signal is observing the environment - """ + typing.Optional[ScanCharacteristics], + FieldMetadata(alias="scanCharacteristics"), + pydantic.Field(alias="scanCharacteristics", description="describes how a signal is observing the environment"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/status.py b/src/anduril/types/status.py index 1b7525b..bfedf42 100644 --- a/src/anduril/types/status.py +++ b/src/anduril/types/status.py @@ -13,14 +13,14 @@ class Status(UniversalBaseModel): Contains status of entities. """ - platform_activity: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="platformActivity")] = ( - pydantic.Field(alias="platformActivity", default=None) - ) - """ - A string that describes the activity that the entity is performing. - Examples include "RECONNAISSANCE", "INTERDICTION", "RETURN TO BASE (RTB)", "PREPARING FOR LAUNCH". - """ - + platform_activity: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="platformActivity"), + pydantic.Field( + alias="platformActivity", + description='A string that describes the activity that the entity is performing.\n Examples include "RECONNAISSANCE", "INTERDICTION", "RETURN TO BASE (RTB)", "PREPARING FOR LAUNCH".', + ), + ] = None role: typing.Optional[str] = pydantic.Field(default=None) """ A human-readable string that describes the role the entity is currently performing. E.g. "Team Member", "Commander". diff --git a/src/anduril/types/symbology.py b/src/anduril/types/symbology.py index 16ce130..5c94a8f 100644 --- a/src/anduril/types/symbology.py +++ b/src/anduril/types/symbology.py @@ -14,9 +14,9 @@ class Symbology(UniversalBaseModel): Symbology associated with an entity. """ - mil_std2525c: typing_extensions.Annotated[typing.Optional[MilStd2525C], FieldMetadata(alias="milStd2525C")] = ( - pydantic.Field(alias="milStd2525C", default=None) - ) + mil_std2525c: typing_extensions.Annotated[ + typing.Optional[MilStd2525C], FieldMetadata(alias="milStd2525C"), pydantic.Field(alias="milStd2525C") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/system.py b/src/anduril/types/system.py index da24ea4..1f987bc 100644 --- a/src/anduril/types/system.py +++ b/src/anduril/types/system.py @@ -13,30 +13,24 @@ class System(UniversalBaseModel): System Principal representing some autonomous system. """ - service_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="serviceName")] = ( - pydantic.Field(alias="serviceName", default=None) - ) - """ - Name of the service associated with this System. - """ - - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - The Entity ID of the System. - """ - + service_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="serviceName"), + pydantic.Field(alias="serviceName", description="Name of the service associated with this System."), + ] = None + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field(alias="entityId", description="The Entity ID of the System."), + ] = None manages_own_scheduling: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="managesOwnScheduling") - ] = pydantic.Field(alias="managesOwnScheduling", default=None) - """ - Whether the System Principal (for example, an Asset) can own scheduling. - This means we bypass manager-owned scheduling and defer to the system - Principal to handle scheduling and give us status updates for the task. - Regardless of the value defined by the client, the Task Manager will - determine and set this value appropriately. - """ + typing.Optional[bool], + FieldMetadata(alias="managesOwnScheduling"), + pydantic.Field( + alias="managesOwnScheduling", + description="Whether the System Principal (for example, an Asset) can own scheduling.\n This means we bypass manager-owned scheduling and defer to the system\n Principal to handle scheduling and give us status updates for the task.\n Regardless of the value defined by the client, the Task Manager will\n determine and set this value appropriately.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/target_priority.py b/src/anduril/types/target_priority.py index 1244e87..affcb1f 100644 --- a/src/anduril/types/target_priority.py +++ b/src/anduril/types/target_priority.py @@ -16,12 +16,12 @@ class TargetPriority(UniversalBaseModel): """ high_value_target: typing_extensions.Annotated[ - typing.Optional[HighValueTarget], FieldMetadata(alias="highValueTarget") - ] = pydantic.Field(alias="highValueTarget", default=None) - """ - Describes the target priority in relation to high value target lists. - """ - + typing.Optional[HighValueTarget], + FieldMetadata(alias="highValueTarget"), + pydantic.Field( + alias="highValueTarget", description="Describes the target priority in relation to high value target lists." + ), + ] = None threat: typing.Optional[Threat] = pydantic.Field(default=None) """ Describes whether the entity should be treated as a threat diff --git a/src/anduril/types/task.py b/src/anduril/types/task.py index 3907f82..44b4132 100644 --- a/src/anduril/types/task.py +++ b/src/anduril/types/task.py @@ -9,10 +9,12 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs from ..core.serialization import FieldMetadata +from .delivery_state import DeliveryState from .google_protobuf_any import GoogleProtobufAny from .owner import Owner from .relations import Relations from .replication import Replication +from .retry_strategy import RetryStrategy from .task_entity import TaskEntity from .task_status import TaskStatus from .task_version import TaskVersion @@ -36,51 +38,50 @@ class Task(UniversalBaseModel): Version of this task. """ - display_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="displayName")] = ( - pydantic.Field(alias="displayName", default=None) - ) - """ - DEPRECATED: Human readable display name for this task, should be short (<100 chars). - """ - + display_name: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="displayName"), + pydantic.Field( + alias="displayName", + description="DEPRECATED: Human readable display name for this task, should be short (<100 chars).", + ), + ] = None specification: typing.Optional[GoogleProtobufAny] = pydantic.Field(default=None) """ The path for the Protobuf task definition, and the complete task data. """ - created_by: typing_extensions.Annotated[typing.Optional["Principal"], FieldMetadata(alias="createdBy")] = ( - pydantic.Field(alias="createdBy", default=None) - ) - """ - Records who created this task. This field will not change after the task has been created. - """ - - last_updated_by: typing_extensions.Annotated[typing.Optional["Principal"], FieldMetadata(alias="lastUpdatedBy")] = ( - pydantic.Field(alias="lastUpdatedBy", default=None) - ) - """ - Records who updated this task last. - """ - + created_by: typing_extensions.Annotated[ + typing.Optional["Principal"], + FieldMetadata(alias="createdBy"), + pydantic.Field( + alias="createdBy", + description="Records who created this task. This field will not change after the task has been created.", + ), + ] = None + last_updated_by: typing_extensions.Annotated[ + typing.Optional["Principal"], + FieldMetadata(alias="lastUpdatedBy"), + pydantic.Field(alias="lastUpdatedBy", description="Records who updated this task last."), + ] = None last_update_time: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="lastUpdateTime") - ] = pydantic.Field(alias="lastUpdateTime", default=None) - """ - Records the time of last update. - """ - + typing.Optional[dt.datetime], + FieldMetadata(alias="lastUpdateTime"), + pydantic.Field(alias="lastUpdateTime", description="Records the time of last update."), + ] = None status: typing.Optional[TaskStatus] = pydantic.Field(default=None) """ The status of this task. """ - scheduled_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="scheduledTime")] = ( - pydantic.Field(alias="scheduledTime", default=None) - ) - """ - If the task has been scheduled to execute, what time it should execute at. - """ - + scheduled_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="scheduledTime"), + pydantic.Field( + alias="scheduledTime", + description="If the task has been scheduled to execute, what time it should execute at.", + ), + ] = None relations: typing.Optional[Relations] = pydantic.Field(default=None) """ Any related Tasks associated with this, typically includes an assignee for this task and/or a parent. @@ -92,41 +93,51 @@ class Task(UniversalBaseModel): """ is_executed_elsewhere: typing_extensions.Annotated[ - typing.Optional[bool], FieldMetadata(alias="isExecutedElsewhere") - ] = pydantic.Field(alias="isExecutedElsewhere", default=None) - """ - If set, execution of this task is managed elsewhere, not by Task Manager. - In other words, task manager will not attempt to update the assigned agent with execution instructions. - """ - - create_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="createTime")] = ( - pydantic.Field(alias="createTime", default=None) - ) - """ - Time of task creation. - """ - + typing.Optional[bool], + FieldMetadata(alias="isExecutedElsewhere"), + pydantic.Field( + alias="isExecutedElsewhere", + description="If set, execution of this task is managed elsewhere, not by Task Manager.\n In other words, task manager will not attempt to update the assigned agent with execution instructions.", + ), + ] = None + create_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="createTime"), + pydantic.Field(alias="createTime", description="Time of task creation."), + ] = None replication: typing.Optional[Replication] = pydantic.Field(default=None) """ If populated, designates this to be a replicated task. """ initial_entities: typing_extensions.Annotated[ - typing.Optional[typing.List[TaskEntity]], FieldMetadata(alias="initialEntities") - ] = pydantic.Field(alias="initialEntities", default=None) - """ - If populated, indicates an initial set of entities that can be used to execute an entity aware task - For example, an entity Objective, an entity Keep In Zone, etc. - These will not be updated during execution. If a taskable agent needs continuous updates on the entities from the - COP, can call entity-manager, or use an AlternateId escape hatch. - """ - + typing.Optional[typing.List[TaskEntity]], + FieldMetadata(alias="initialEntities"), + pydantic.Field( + alias="initialEntities", + description="If populated, indicates an initial set of entities that can be used to execute an entity aware task\n For example, an entity Objective, an entity Keep In Zone, etc.\n These will not be updated during execution. If a taskable agent needs continuous updates on the entities from the\n COP, can call entity-manager, or use an AlternateId escape hatch.", + ), + ] = None owner: typing.Optional[Owner] = pydantic.Field(default=None) """ The networked owner of this task. It is used to ensure that linear writes occur on the node responsible for replication of task data to other nodes running Task Manager. """ + retry_strategy: typing_extensions.Annotated[ + typing.Optional[RetryStrategy], + FieldMetadata(alias="retryStrategy"), + pydantic.Field( + alias="retryStrategy", + description="Sets an optional try strategy for tasks. Use this option to control how Lattice attempts to retry delivery of tasks to assets with intermittent access or network connectivity to your environment.", + ), + ] = None + delivery_state: typing_extensions.Annotated[ + typing.Optional[DeliveryState], + FieldMetadata(alias="deliveryState"), + pydantic.Field(alias="deliveryState", description="The current delivery state of a task."), + ] = None + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/anduril/types/task_catalog.py b/src/anduril/types/task_catalog.py index 445cb5f..2eaed2e 100644 --- a/src/anduril/types/task_catalog.py +++ b/src/anduril/types/task_catalog.py @@ -15,8 +15,10 @@ class TaskCatalog(UniversalBaseModel): """ task_definitions: typing_extensions.Annotated[ - typing.Optional[typing.List[TaskDefinition]], FieldMetadata(alias="taskDefinitions") - ] = pydantic.Field(alias="taskDefinitions", default=None) + typing.Optional[typing.List[TaskDefinition]], + FieldMetadata(alias="taskDefinitions"), + pydantic.Field(alias="taskDefinitions"), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/task_definition.py b/src/anduril/types/task_definition.py index dc9e76b..c2b3828 100644 --- a/src/anduril/types/task_definition.py +++ b/src/anduril/types/task_definition.py @@ -14,11 +14,12 @@ class TaskDefinition(UniversalBaseModel): """ task_specification_url: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="taskSpecificationUrl") - ] = pydantic.Field(alias="taskSpecificationUrl", default=None) - """ - Url path must be prefixed with `type.googleapis.com/`. - """ + typing.Optional[str], + FieldMetadata(alias="taskSpecificationUrl"), + pydantic.Field( + alias="taskSpecificationUrl", description="Url path must be prefixed with `type.googleapis.com/`." + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/task_error.py b/src/anduril/types/task_error.py index 4fe1c22..5868077 100644 --- a/src/anduril/types/task_error.py +++ b/src/anduril/types/task_error.py @@ -30,11 +30,10 @@ class TaskError(UniversalBaseModel): """ error_details: typing_extensions.Annotated[ - typing.Optional[GoogleProtobufAny], FieldMetadata(alias="errorDetails") - ] = pydantic.Field(alias="errorDetails", default=None) - """ - Any additional details regarding this error. - """ + typing.Optional[GoogleProtobufAny], + FieldMetadata(alias="errorDetails"), + pydantic.Field(alias="errorDetails", description="Any additional details regarding this error."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/task_event_data.py b/src/anduril/types/task_event_data.py index 59ad1f2..ccd887e 100644 --- a/src/anduril/types/task_event_data.py +++ b/src/anduril/types/task_event_data.py @@ -17,11 +17,10 @@ class TaskEventData(UniversalBaseModel): """ task_event: typing_extensions.Annotated[ - typing.Optional[TaskEventDataTaskEvent], FieldMetadata(alias="taskEvent") - ] = pydantic.Field(alias="taskEvent", default=None) - """ - The task event that occurred. - """ + typing.Optional[TaskEventDataTaskEvent], + FieldMetadata(alias="taskEvent"), + pydantic.Field(alias="taskEvent", description="The task event that occurred."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/task_event_data_task_event.py b/src/anduril/types/task_event_data_task_event.py index 56ca83e..8843381 100644 --- a/src/anduril/types/task_event_data_task_event.py +++ b/src/anduril/types/task_event_data_task_event.py @@ -18,12 +18,10 @@ class TaskEventDataTaskEvent(UniversalBaseModel): """ event_type: typing_extensions.Annotated[ - typing.Optional[TaskEventDataTaskEventEventType], FieldMetadata(alias="eventType") - ] = pydantic.Field(alias="eventType", default=None) - """ - The type of event that occurred for this task. - """ - + typing.Optional[TaskEventDataTaskEventEventType], + FieldMetadata(alias="eventType"), + pydantic.Field(alias="eventType", description="The type of event that occurred for this task."), + ] = None task: typing.Optional[Task] = pydantic.Field(default=None) """ The task associated with this event. diff --git a/src/anduril/types/task_query_results.py b/src/anduril/types/task_query_results.py index e7b7cfa..be02cc6 100644 --- a/src/anduril/types/task_query_results.py +++ b/src/anduril/types/task_query_results.py @@ -23,15 +23,14 @@ class TaskQueryResults(UniversalBaseModel): """ tasks: typing.Optional[typing.List[Task]] = None - next_page_token: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextPageToken")] = ( - pydantic.Field(alias="nextPageToken", default=None) - ) - """ - Incomplete results can be detected by a non-empty nextPageToken field in the query results. In order to retrieve - the next page, perform the exact same request as previously and append a pageToken field with the value of - nextPageToken from the previous page. A new nextPageToken is provided on the following pages until all the - results are retrieved. - """ + next_page_token: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="nextPageToken"), + pydantic.Field( + alias="nextPageToken", + description="Incomplete results can be detected by a non-empty nextPageToken field in the query results. In order to retrieve \nthe next page, perform the exact same request as previously and append a pageToken field with the value of \nnextPageToken from the previous page. A new nextPageToken is provided on the following pages until all the \nresults are retrieved.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/task_status.py b/src/anduril/types/task_status.py index 132aa06..fad9912 100644 --- a/src/anduril/types/task_status.py +++ b/src/anduril/types/task_status.py @@ -28,13 +28,11 @@ class TaskStatus(UniversalBaseModel): Status of the task. """ - task_error: typing_extensions.Annotated[typing.Optional[TaskError], FieldMetadata(alias="taskError")] = ( - pydantic.Field(alias="taskError", default=None) - ) - """ - Any errors associated with the task. - """ - + task_error: typing_extensions.Annotated[ + typing.Optional[TaskError], + FieldMetadata(alias="taskError"), + pydantic.Field(alias="taskError", description="Any errors associated with the task."), + ] = None progress: typing.Optional[GoogleProtobufAny] = pydantic.Field(default=None) """ Any incremental progress on the task, should be from the tasks/v* /progress folder. @@ -45,13 +43,13 @@ class TaskStatus(UniversalBaseModel): Any final result of the task, should be from tasks/v* /result folder. """ - start_time: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="startTime")] = ( - pydantic.Field(alias="startTime", default=None) - ) - """ - Time the task began execution, may not be known even for executing Tasks. - """ - + start_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], + FieldMetadata(alias="startTime"), + pydantic.Field( + alias="startTime", description="Time the task began execution, may not be known even for executing Tasks." + ), + ] = None estimate: typing.Optional[GoogleProtobufAny] = pydantic.Field(default=None) """ Any estimate for how the task will progress, should be from tasks/v* /estimates folder. diff --git a/src/anduril/types/task_version.py b/src/anduril/types/task_version.py index 1189b02..4eb63bd 100644 --- a/src/anduril/types/task_version.py +++ b/src/anduril/types/task_version.py @@ -17,28 +17,30 @@ class TaskVersion(UniversalBaseModel): optimistic concurrency control, ensuring that updates from multiple sources don't conflict. """ - task_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="taskId")] = pydantic.Field( - alias="taskId", default=None - ) - """ - The unique identifier for this task, used to distinguish it from all other tasks in the system. - """ - - definition_version: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="definitionVersion")] = ( - pydantic.Field(alias="definitionVersion", default=None) - ) - """ - Counter that increments on changes to the task definition. - Unset (0) initially, starts at 1 on creation, and increments with each update to task fields. - """ - - status_version: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="statusVersion")] = ( - pydantic.Field(alias="statusVersion", default=None) - ) - """ - Counter that increments on changes to TaskStatus. - Unset (0) initially, starts at 1 on creation, and increments with each status update. - """ + task_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="taskId"), + pydantic.Field( + alias="taskId", + description="The unique identifier for this task, used to distinguish it from all other tasks in the system.", + ), + ] = None + definition_version: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="definitionVersion"), + pydantic.Field( + alias="definitionVersion", + description="Counter that increments on changes to the task definition.\n Unset (0) initially, starts at 1 on creation, and increments with each update to task fields.", + ), + ] = None + status_version: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="statusVersion"), + pydantic.Field( + alias="statusVersion", + description="Counter that increments on changes to TaskStatus.\n Unset (0) initially, starts at 1 on creation, and increments with each status update.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/team.py b/src/anduril/types/team.py index 415471b..e77587f 100644 --- a/src/anduril/types/team.py +++ b/src/anduril/types/team.py @@ -14,13 +14,11 @@ class Team(UniversalBaseModel): Represents a team of agents """ - entity_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="entityId")] = pydantic.Field( - alias="entityId", default=None - ) - """ - Entity ID of the team - """ - + entity_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="entityId"), + pydantic.Field(alias="entityId", description="Entity ID of the team"), + ] = None members: typing.Optional[typing.List[Agent]] = None if IS_PYDANTIC_V2: diff --git a/src/anduril/types/threat.py b/src/anduril/types/threat.py index e97d8ab..c43dd30 100644 --- a/src/anduril/types/threat.py +++ b/src/anduril/types/threat.py @@ -13,12 +13,11 @@ class Threat(UniversalBaseModel): Describes whether an entity is a threat or not. """ - is_threat: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="isThreat")] = pydantic.Field( - alias="isThreat", default=None - ) - """ - Indicates that the entity has been determined to be a threat. - """ + is_threat: typing_extensions.Annotated[ + typing.Optional[bool], + FieldMetadata(alias="isThreat"), + pydantic.Field(alias="isThreat", description="Indicates that the entity has been determined to be a threat."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/tle_parameters.py b/src/anduril/types/tle_parameters.py index 3c6cdc9..ab453ba 100644 --- a/src/anduril/types/tle_parameters.py +++ b/src/anduril/types/tle_parameters.py @@ -9,37 +9,31 @@ class TleParameters(UniversalBaseModel): - ephemeris_type: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="ephemerisType")] = ( - pydantic.Field(alias="ephemerisType", default=None) - ) - """ - Integer specifying TLE ephemeris type - """ - + ephemeris_type: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="ephemerisType"), + pydantic.Field(alias="ephemerisType", description="Integer specifying TLE ephemeris type"), + ] = None classification_type: typing_extensions.Annotated[ - typing.Optional[str], FieldMetadata(alias="classificationType") - ] = pydantic.Field(alias="classificationType", default=None) - """ - User-defined free-text message classification/caveats of this TLE - """ - - norad_cat_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="noradCatId")] = pydantic.Field( - alias="noradCatId", default=None - ) - """ - Norad catalog number: integer up to nine digits. - """ - - element_set_no: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="elementSetNo")] = ( - pydantic.Field(alias="elementSetNo", default=None) - ) - rev_at_epoch: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="revAtEpoch")] = pydantic.Field( - alias="revAtEpoch", default=None - ) - """ - Optional: revolution number - """ - + typing.Optional[str], + FieldMetadata(alias="classificationType"), + pydantic.Field( + alias="classificationType", description="User-defined free-text message classification/caveats of this TLE" + ), + ] = None + norad_cat_id: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="noradCatId"), + pydantic.Field(alias="noradCatId", description="Norad catalog number: integer up to nine digits."), + ] = None + element_set_no: typing_extensions.Annotated[ + typing.Optional[int], FieldMetadata(alias="elementSetNo"), pydantic.Field(alias="elementSetNo") + ] = None + rev_at_epoch: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="revAtEpoch"), + pydantic.Field(alias="revAtEpoch", description="Optional: revolution number"), + ] = None bstar: typing.Optional[float] = pydantic.Field(default=None) """ Drag parameter for SGP-4 in units 1 / Earth radii @@ -50,20 +44,19 @@ class TleParameters(UniversalBaseModel): Drag parameter for SGP4-XP in units m^2 / kg """ - mean_motion_dot: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="meanMotionDot")] = ( - pydantic.Field(alias="meanMotionDot", default=None) - ) - """ - First time derivative of mean motion in rev / day^2 - """ - - mean_motion_ddot: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="meanMotionDdot")] = ( - pydantic.Field(alias="meanMotionDdot", default=None) - ) - """ - Second time derivative of mean motion in rev / day^3. For use with SGP or PPT3. - """ - + mean_motion_dot: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="meanMotionDot"), + pydantic.Field(alias="meanMotionDot", description="First time derivative of mean motion in rev / day^2"), + ] = None + mean_motion_ddot: typing_extensions.Annotated[ + typing.Optional[float], + FieldMetadata(alias="meanMotionDdot"), + pydantic.Field( + alias="meanMotionDdot", + description="Second time derivative of mean motion in rev / day^3. For use with SGP or PPT3.", + ), + ] = None agom: typing.Optional[float] = pydantic.Field(default=None) """ Solar radiation pressure coefficient A_gamma / m in m^2 / kg. For use with SGP4-XP. diff --git a/src/anduril/types/tracked.py b/src/anduril/types/tracked.py index fdce7f3..bad740a 100644 --- a/src/anduril/types/tracked.py +++ b/src/anduril/types/tracked.py @@ -17,53 +17,46 @@ class Tracked(UniversalBaseModel): """ track_quality_wrapper: typing_extensions.Annotated[ - typing.Optional[int], FieldMetadata(alias="trackQualityWrapper") - ] = pydantic.Field(alias="trackQualityWrapper", default=None) - """ - Quality score, 0-15, nil if none - """ - - sensor_hits: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="sensorHits")] = pydantic.Field( - alias="sensorHits", default=None - ) - """ - Sensor hits aggregation on the tracked entity. - """ - + typing.Optional[int], + FieldMetadata(alias="trackQualityWrapper"), + pydantic.Field(alias="trackQualityWrapper", description="Quality score, 0-15, nil if none"), + ] = None + sensor_hits: typing_extensions.Annotated[ + typing.Optional[int], + FieldMetadata(alias="sensorHits"), + pydantic.Field(alias="sensorHits", description="Sensor hits aggregation on the tracked entity."), + ] = None number_of_objects: typing_extensions.Annotated[ - typing.Optional[UInt32Range], FieldMetadata(alias="numberOfObjects") - ] = pydantic.Field(alias="numberOfObjects", default=None) - """ - Estimated number of objects or units that are represented by this entity. Known as Strength in certain contexts (Link16) - if UpperBound == LowerBound; (strength = LowerBound) - If both UpperBound and LowerBound are defined; strength is between LowerBound and UpperBound (represented as string "Strength: 4-5") - If UpperBound is defined only (LowerBound unset), Strength ≤ UpperBound - If LowerBound is defined only (UpperBound unset), LowerBound ≤ Strength - 0 indicates unset. - """ - + typing.Optional[UInt32Range], + FieldMetadata(alias="numberOfObjects"), + pydantic.Field( + alias="numberOfObjects", + description='Estimated number of objects or units that are represented by this entity. Known as Strength in certain contexts (Link16)\n if UpperBound == LowerBound; (strength = LowerBound)\n If both UpperBound and LowerBound are defined; strength is between LowerBound and UpperBound (represented as string "Strength: 4-5")\n If UpperBound is defined only (LowerBound unset), Strength ≤ UpperBound\n If LowerBound is defined only (UpperBound unset), LowerBound ≤ Strength\n 0 indicates unset.', + ), + ] = None radar_cross_section: typing_extensions.Annotated[ - typing.Optional[float], FieldMetadata(alias="radarCrossSection") - ] = pydantic.Field(alias="radarCrossSection", default=None) - """ - The radar cross section (RCS) is a measure of how detectable an object is by radar. A large RCS indicates an object is more easily - detected. The unit is “decibels per square meter,” or dBsm - """ - + typing.Optional[float], + FieldMetadata(alias="radarCrossSection"), + pydantic.Field( + alias="radarCrossSection", + description="The radar cross section (RCS) is a measure of how detectable an object is by radar. A large RCS indicates an object is more easily\n detected. The unit is “decibels per square meter,” or dBsm", + ), + ] = None last_measurement_time: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="lastMeasurementTime") - ] = pydantic.Field(alias="lastMeasurementTime", default=None) - """ - Timestamp of the latest tracking measurement for this entity. - """ - + typing.Optional[dt.datetime], + FieldMetadata(alias="lastMeasurementTime"), + pydantic.Field( + alias="lastMeasurementTime", description="Timestamp of the latest tracking measurement for this entity." + ), + ] = None line_of_bearing: typing_extensions.Annotated[ - typing.Optional[LineOfBearing], FieldMetadata(alias="lineOfBearing") - ] = pydantic.Field(alias="lineOfBearing", default=None) - """ - The relative position of a track with respect to the entity that is tracking it. Used for tracks that do not yet have a 3D position. - For this entity (A), being tracked by some entity (B), this LineOfBearing would express a ray from B to A. - """ + typing.Optional[LineOfBearing], + FieldMetadata(alias="lineOfBearing"), + pydantic.Field( + alias="lineOfBearing", + description="The relative position of a track with respect to the entity that is tracking it. Used for tracks that do not yet have a 3D position.\n For this entity (A), being tracked by some entity (B), this LineOfBearing would express a ray from B to A.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/tracked_by.py b/src/anduril/types/tracked_by.py index cdf3be5..3cdd36b 100644 --- a/src/anduril/types/tracked_by.py +++ b/src/anduril/types/tracked_by.py @@ -17,19 +17,21 @@ class TrackedBy(UniversalBaseModel): """ actively_tracking_sensors: typing_extensions.Annotated[ - typing.Optional[Sensors], FieldMetadata(alias="activelyTrackingSensors") - ] = pydantic.Field(alias="activelyTrackingSensors", default=None) - """ - Sensor details of the tracking entity's sensors that were active and tracking the tracked entity. This may be - a subset of the total sensors available on the tracking entity. - """ - + typing.Optional[Sensors], + FieldMetadata(alias="activelyTrackingSensors"), + pydantic.Field( + alias="activelyTrackingSensors", + description="Sensor details of the tracking entity's sensors that were active and tracking the tracked entity. This may be\n a subset of the total sensors available on the tracking entity.", + ), + ] = None last_measurement_timestamp: typing_extensions.Annotated[ - typing.Optional[dt.datetime], FieldMetadata(alias="lastMeasurementTimestamp") - ] = pydantic.Field(alias="lastMeasurementTimestamp", default=None) - """ - Latest time that any sensor in actively_tracking_sensors detected the tracked entity. - """ + typing.Optional[dt.datetime], + FieldMetadata(alias="lastMeasurementTimestamp"), + pydantic.Field( + alias="lastMeasurementTimestamp", + description="Latest time that any sensor in actively_tracking_sensors detected the tracked entity.", + ), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/transponder_codes.py b/src/anduril/types/transponder_codes.py index b7d18da..57b2b38 100644 --- a/src/anduril/types/transponder_codes.py +++ b/src/anduril/types/transponder_codes.py @@ -32,23 +32,23 @@ class TransponderCodes(UniversalBaseModel): """ mode4interrogation_response: typing_extensions.Annotated[ - typing.Optional[TransponderCodesMode4InterrogationResponse], FieldMetadata(alias="mode4InterrogationResponse") - ] = pydantic.Field(alias="mode4InterrogationResponse", default=None) - """ - The validity of the response from the Mode 4 interrogation. - """ - + typing.Optional[TransponderCodesMode4InterrogationResponse], + FieldMetadata(alias="mode4InterrogationResponse"), + pydantic.Field( + alias="mode4InterrogationResponse", + description="The validity of the response from the Mode 4 interrogation.", + ), + ] = None mode5: typing.Optional[Mode5] = pydantic.Field(default=None) """ The Mode 5 transponder codes. """ - mode_s: typing_extensions.Annotated[typing.Optional[ModeS], FieldMetadata(alias="modeS")] = pydantic.Field( - alias="modeS", default=None - ) - """ - The Mode S transponder codes. - """ + mode_s: typing_extensions.Annotated[ + typing.Optional[ModeS], + FieldMetadata(alias="modeS"), + pydantic.Field(alias="modeS", description="The Mode S transponder codes."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/u_int32range.py b/src/anduril/types/u_int32range.py index 052568f..abf48df 100644 --- a/src/anduril/types/u_int32range.py +++ b/src/anduril/types/u_int32range.py @@ -9,12 +9,12 @@ class UInt32Range(UniversalBaseModel): - lower_bound: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="lowerBound")] = pydantic.Field( - alias="lowerBound", default=None - ) - upper_bound: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="upperBound")] = pydantic.Field( - alias="upperBound", default=None - ) + lower_bound: typing_extensions.Annotated[ + typing.Optional[int], FieldMetadata(alias="lowerBound"), pydantic.Field(alias="lowerBound") + ] = None + upper_bound: typing_extensions.Annotated[ + typing.Optional[int], FieldMetadata(alias="upperBound"), pydantic.Field(alias="upperBound") + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/user.py b/src/anduril/types/user.py index d1f3b64..24ad543 100644 --- a/src/anduril/types/user.py +++ b/src/anduril/types/user.py @@ -13,12 +13,11 @@ class User(UniversalBaseModel): A User Principal representing a human. """ - user_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="userId")] = pydantic.Field( - alias="userId", default=None - ) - """ - The User ID associated with this User. - """ + user_id: typing_extensions.Annotated[ + typing.Optional[str], + FieldMetadata(alias="userId"), + pydantic.Field(alias="userId", description="The User ID associated with this User."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/anduril/types/visual_details.py b/src/anduril/types/visual_details.py index 8ca51f3..dbfc413 100644 --- a/src/anduril/types/visual_details.py +++ b/src/anduril/types/visual_details.py @@ -14,12 +14,11 @@ class VisualDetails(UniversalBaseModel): Visual details associated with the display of an entity in the client. """ - range_rings: typing_extensions.Annotated[typing.Optional[RangeRings], FieldMetadata(alias="rangeRings")] = ( - pydantic.Field(alias="rangeRings", default=None) - ) - """ - The range rings to display around an entity. - """ + range_rings: typing_extensions.Annotated[ + typing.Optional[RangeRings], + FieldMetadata(alias="rangeRings"), + pydantic.Field(alias="rangeRings", description="The range rings to display around an entity."), + ] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2