Reference
nrl_sdk_lib.models.crs
Module for a simplified feature collection model.
Parent
pydantic-model
Bases: BaseModel
A base model for all other models.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/crs.py
7 8 9 10 11 12 13 14 |
|
CrsProperties
pydantic-model
Bases: Parent
A CRS properties model.
The CrsProperties model represents the properties of a Coordinate Reference System (CRS).
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the CRS. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/crs.py
17 18 19 20 21 22 23 24 25 26 27 |
|
Crs
pydantic-model
Bases: Parent
A CRS model.
The Crs model represents a Coordinate Reference System (CRS) with its properties.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of CRS, typically "name". |
properties |
CrsProperties
|
The properties of the CRS. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/crs.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
nrl_sdk_lib.models.geometry
Module for a simplified feature collection model.
Parent
pydantic-model
Bases: BaseModel
A base model for all other models.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/geometry.py
9 10 11 12 13 14 15 16 |
|
Geometry
pydantic-model
Bases: Parent
A Geometry model.
The Geometry model serves as a base class for different geometry types such as Point, Polygon, and LineString.
Attributes:
Name | Type | Description |
---|---|---|
type |
Literal['Point', 'Polygon', 'LineString']
|
The type of geometry |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/geometry.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
Point
pydantic-model
Bases: Geometry
A Point geometry model.
The Point model represents a single point in a two-dimensional space.
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
list[float]
|
A list of two or three floats representing the x, y and z coordinates of the point. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/geometry.py
36 37 38 39 40 41 42 43 44 45 46 |
|
Polygon
pydantic-model
Bases: Geometry
A Polygon geometry model.
The Polygon model represents a polygon defined by a list of linear rings, where each ring is a list of points.
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
list[list[list[float]]]
|
A list of linear rings, where each ring is a list of points, and each point is represented by a list of two or three floats (x, y, z). |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/geometry.py
49 50 51 52 53 54 55 56 57 58 59 60 |
|
LineString
pydantic-model
Bases: Geometry
A LineString geometry model.
The LineString model represents a sequence of points connected by straight lines.
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
list[list[float]]
|
A list of points, where each point is represented by a list of two or three floats (x, y, z). |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/geometry.py
63 64 65 66 67 68 69 70 71 72 73 |
|
nrl_sdk_lib.models.feature_collection
Module for a simplified feature collection model.
Parent
pydantic-model
Bases: BaseModel
A base model for all other models.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
14 15 16 17 18 19 20 21 |
|
FeatureStatus
Bases: str
, Enum
An enumeration for feature property statuses.
This enumeration defines the possible statuses for feature properties in the NRL.
Attributes:
Name | Type | Description |
---|---|---|
eksisterende |
str
|
Represents an existing feature. |
fjernet |
str
|
Represents a feature that has been removed. |
planlagt_fjernet |
str
|
Represents a feature that is planned to be removed. |
planlagt_oppført |
str
|
Represents a feature that is planned to be constructed. |
erstattet |
str
|
Represents a feature that has been replaced. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
LuftfartsHinderMerking
Bases: str
, Enum
An enumeration for luftfartshindermerking.
This enumeration defines the possible markings for aviation obstacles.
Attributes:
Name | Type | Description |
---|---|---|
fargermerking |
str
|
Represents color marking. |
markør |
str
|
Represents a marker. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
LuftfartsHinderLyssetting
Bases: str
, Enum
An enumeration for luftfartshinderlyssetting.
This enumeration defines the possible lighting settings for aviation obstacles.
Attributes:
Name | Type | Description |
---|---|---|
belyst_med_flomlys |
str
|
Represents lighting with floodlights. |
blinkende_hvitt |
str
|
Represents blinking white lights. |
blinkende_rødt |
str
|
Represents blinking red lights. |
fast_hvitt |
str
|
Represents steady white lights. |
fast_rødt |
str
|
Represents steady red lights. |
høyintensitet_type_a |
str
|
Represents high-intensity type A lighting. |
høyintensitet_type_b |
str
|
Represents high-intensity type B lighting. |
lavintensitet_type_a |
str
|
Represents low-intensity type A lighting. |
lavintensitet_type_b |
str
|
Represents low-intensity type B lighting. |
lyssatt |
str
|
Represents illuminated features. |
mellomintensitet_type_a |
str
|
Represents medium-intensity type A lighting. |
mellomintensitet_type_b |
str
|
Represents medium-intensity type B lighting. |
mellomintensitet_type_c |
str
|
Represents medium-intensity type C lighting. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
Høydereferanse
Bases: str
, Enum
An enumeration for height references.
This enumeration defines the possible height references used in the NRL.
Attributes:
Name | Type | Description |
---|---|---|
fot |
str
|
Represents height at the bottom. |
topp |
str
|
Represents height at the top. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
PunktType
Bases: str
, Enum
An enumeration for punkt types.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
annet = 'annet'
class-attribute
instance-attribute
A generic point type.
bygning = 'bygning'
class-attribute
instance-attribute
A point representing a building.
flaggstang = 'flaggstang'
class-attribute
instance-attribute
A point representing a flagpole.
forankret_ballong = 'forankretBallong'
class-attribute
instance-attribute
A point representing an anchored balloon.
fornøyelsesparkinnretning = 'fornøyelsesparkinnretning'
class-attribute
instance-attribute
A point representing an amusement park attraction.
fyrtårn = 'fyrtårn'
class-attribute
instance-attribute
A point representing a lighthouse.
hopptårn = 'hopptårn'
class-attribute
instance-attribute
A point representing a ski jump tower.
kjøletårn = 'kjøletårn'
class-attribute
instance-attribute
A point representing a cooling tower.
kontrolltårn = 'kontrolltårn'
class-attribute
instance-attribute
A point representing a control tower.
kraftverk = 'kraftverk'
class-attribute
instance-attribute
A point representing a power plant.
kran = 'kran'
class-attribute
instance-attribute
A point representing a crane.
kuppel = 'kuppel'
class-attribute
instance-attribute
A point representing a dome.
monument = 'monument'
class-attribute
instance-attribute
A point representing a monument.
navigasjonshjelpemiddel = 'navigasjonshjelpemiddel'
class-attribute
instance-attribute
A point representing a navigation aid.
petroleumsinnretning = 'petroleumsinnretning'
class-attribute
instance-attribute
A point representing a petroleum installation.
pipe = 'pipe'
class-attribute
instance-attribute
A point representing a chimney.
raffineri = 'raffineri'
class-attribute
instance-attribute
A point representing a refinery.
silo = 'silo'
class-attribute
instance-attribute
A point representing a silo.
sprengningstårn = 'sprengningstårn'
class-attribute
instance-attribute
A point representing a blasting tower.
tank = 'tank'
class-attribute
instance-attribute
A point representing a tank.
tårn = 'tårn'
class-attribute
instance-attribute
A point representing a tower.
vanntårn = 'vanntårn'
class-attribute
instance-attribute
A point representing a water tower.
vindturbin = 'vindturbin'
class-attribute
instance-attribute
A point representing a wind turbine.
Materiale
Bases: str
, Enum
An enumeration for materials.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
annet = 'annet'
class-attribute
instance-attribute
Generic material type.
betong = 'betong'
class-attribute
instance-attribute
Concrete material.
glass = 'glass'
class-attribute
instance-attribute
Glass material.
metall = 'metall'
class-attribute
instance-attribute
Metal material.
murstein = 'murstein'
class-attribute
instance-attribute
Brick material.
stein = 'stein'
class-attribute
instance-attribute
Stone material.
trevirke = 'trevirke'
class-attribute
instance-attribute
Wood material.
DatafangsMetode
Bases: str
, Enum
An enumeration for data capture methods.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
210 211 212 213 214 215 216 217 218 219 220 |
|
KomponentReferanse
pydantic-model
Bases: Parent
A KomponentReferanse model.
The KomponentReferanse model represents a reference to a component in the NRL.
Attributes:
Name | Type | Description |
---|---|---|
kodesystemversjon |
str | None
|
Version of the code system. |
komponentkodesystem |
str | None
|
Code system for the component. |
komponentkodeverdi |
str | None
|
Value of the component code. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
Kvalitet
pydantic-model
Bases: Parent
A Kvalitet model.
Attributes:
Name | Type | Description |
---|---|---|
datafangstmetode |
DatafangsMetode | None
|
Method of data capture. |
nøyaktighet |
int | None
|
Accuracy of the data capture. |
datafangstmetode_høyde |
DatafangsMetode | None
|
Method of data capture for height. |
nøyaktighet_høyde |
int | None
|
Accuracy of the data capture for height. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
FeatureProperty
pydantic-model
Bases: Parent
A FeatureProperty abstract base class model.
Attributes:
Name | Type | Description |
---|---|---|
feature_type |
Literal
|
Type of the feature, e.g., "NrlPunkt |
status |
FeatureStatus
|
Status of the feature. |
komponentident |
UUID
|
Unique identifier for the component. |
verifisert_rapporteringsnøyaktighet |
Literal
|
Verified reporting accuracy. |
referanse |
KomponentReferanse | None
|
Reference to the component, if applicable. |
navn |
str | None
|
Name of the feature, if applicable. |
vertikal_avstand |
float | None
|
Vertical distance, if applicable. |
luftfartshindermerking |
LuftfartsHinderMerking | None
|
Aviation obstacle marking, if applicable. |
luftfartshinderlyssetting |
LuftfartsHinderLyssetting | None
|
Aviation obstacle lighting, if applicable. |
materiale |
Materiale | None
|
Material of the feature, if applicable. |
datafangstdato |
str | None
|
Date of data capture, if applicable. |
kvalitet |
Kvalitet | None
|
Quality of the feature, if applicable. |
informasjon |
str | None
|
Additional information about the feature, if applicable. |
høydereferanse |
Høydereferanse | None
|
Height reference, if applicable. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
|
FlateType
Bases: str
, Enum
An enumeration for flate types.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
294 295 296 297 298 299 300 301 |
|
kontaktledning = 'kontaktledning'
class-attribute
instance-attribute
Contact line type, typically used for overhead power lines.
trafostasjon = 'trafostasjon'
class-attribute
instance-attribute
Transformer station type, typically used for electrical substations.
NrlFlate
pydantic-model
Bases: FeatureProperty
A Nrl Flate model.
To create a NrlFlate:
>>> from uuid import UUID
>>>
>>> from nrl_sdk_lib.models import NrlFlate, FeatureStatus, FlateType
>>>
>>> nrl_flate = NrlFlate(
... feature_type="NrlFlate",
... status=FeatureStatus.eksisterende,
... komponentident=UUID("12345678-1234-5678-1234-567812345678"),
... verifisert_rapporteringsnøyaktighet="20230101_5-1",
... flate_type=FlateType.trafostasjon,
... )
>>> # Do something with nrl_flate, e.g. add it to a feature collection
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
|
NrlLinje
pydantic-model
Bases: FeatureProperty
A Nrl Linje model.
Attributes:
Name | Type | Description |
---|---|---|
linje_type |
str
|
Type of the line, e.g., "høgspent |
anleggsbredde |
float | None
|
Width of the facility, if applicable. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
328 329 330 331 332 333 334 335 336 337 338 |
|
LuftspennType
Bases: str
, Enum
An enumeration for luftspenn types.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
|
annet = 'annet'
class-attribute
instance-attribute
Generic type for unspecified air spans.
bardun = 'bardun'
class-attribute
instance-attribute
Type for guyed spans, typically used for supporting structures.
gondolbane = 'gondolbane'
class-attribute
instance-attribute
Type for gondola cable cars, typically used in ski resorts or mountainous areas.
ekom = 'ekom'
class-attribute
instance-attribute
Type for communication lines, typically used for telecommunication or data transmission.
høgspent = 'høgspent'
class-attribute
instance-attribute
Type for high-voltage power lines, typically used for electrical transmission.
kontaktledning = 'kontaktledning'
class-attribute
instance-attribute
Type for contact lines, typically used in railways or tram systems.
lavspent = 'lavspent'
class-attribute
instance-attribute
Type for low-voltage power lines, typically used for local electrical distribution.
transmisjon = 'transmisjon'
class-attribute
instance-attribute
Type for transmission lines, typically used for long-distance electrical transmission.
regional = 'regional'
class-attribute
instance-attribute
Type for regional lines, typically used for medium-voltage electrical distribution.
løypestreng = 'løypestreng'
class-attribute
instance-attribute
Type for ski lift lines, typically used in ski resorts.
skitrekk = 'skitrekk'
class-attribute
instance-attribute
Type for ski tow lines, typically used in ski resorts.
stolheis = 'stolheis'
class-attribute
instance-attribute
Type for chairlift lines, typically used in ski resorts.
taubane = 'taubane'
class-attribute
instance-attribute
Type for cable car lines, typically used in ski resorts or mountainous areas.
vaier = 'vaier'
class-attribute
instance-attribute
Type for cable lines, typically used for various purposes including ski lifts and gondolas.
zipline = 'zipline'
class-attribute
instance-attribute
Type for zip lines, typically used for recreational activities.
NrlLuftspenn
pydantic-model
Bases: FeatureProperty
A Nrl Luftspenn model.
Attributes:
Name | Type | Description |
---|---|---|
luftspenn_type |
LuftspennType
|
Type of the air span. |
anleggsbredde |
float | None
|
Width of the facility, if applicable. |
friseilingshøyde |
float | None
|
Height of the free span, if applicable. |
nrl_mast |
list[UUID] | None
|
List of UUIDs for associated Nrl Mast, if applicable. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
|
MastType
Bases: str
, Enum
An enumeration for mast types.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
|
annet = 'annet'
class-attribute
instance-attribute
Generic type for unspecified masts.
belysningsmast = 'belysningsmast'
class-attribute
instance-attribute
Type for lighting masts, typically used for street or area lighting.
ekommast = 'ekommast'
class-attribute
instance-attribute
Type for communication masts, typically used for telecommunication or data transmission.
høgspentmast = 'høgspentmast'
class-attribute
instance-attribute
Type for high-voltage masts, typically used for electrical transmission.
kontaktledningsmast = 'kontaktledningsmast'
class-attribute
instance-attribute
Type for contact line masts, typically used in railways or tram systems.
lavspentmast = 'lavspentmast'
class-attribute
instance-attribute
Type for low-voltage masts, typically used for local electrical distribution.
transmisjonmast = 'transmisjonmast'
class-attribute
instance-attribute
Type for transmission masts, typically used for long-distance electrical transmission.
regionalmast = 'regionalmast'
class-attribute
instance-attribute
Type for regional masts, typically used for medium-voltage electrical distribution.
målemast = 'målemast'
class-attribute
instance-attribute
Type for measurement masts, typically used for environmental or structural monitoring.
radiomast = 'radiomast'
class-attribute
instance-attribute
Type for radio masts, typically used for broadcasting or communication.
taubanemast = 'taubanemast'
class-attribute
instance-attribute
Type for cable car masts, typically used in ski resorts or mountainous areas.
telemast = 'telemast'
class-attribute
instance-attribute
Type for telecommunication masts, typically used for mobile or fixed-line communication.
NrlMast
pydantic-model
Bases: FeatureProperty
A Nrl Mast model.
Attributes:
Name | Type | Description |
---|---|---|
mast_type |
MastType
|
Type of the mast. |
horisontal_avstand |
float | None
|
Horizontal distance to the next mast, if applicable. |
nrl_luftspenn |
list[UUID] | None
|
List of UUIDs for associated Nrl Luftspenn, if applicable. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
NrlPunkt
pydantic-model
Bases: FeatureProperty
A Nrl Punkt model.
Attributes:
Name | Type | Description |
---|---|---|
punkt_type |
PunktType
|
Type of the point. |
horisontal_avstand |
float | None
|
Horizontal distance to the next point, if applicable. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
463 464 465 466 467 468 469 470 471 472 473 |
|
Feature
pydantic-model
Bases: Parent
A Feature model.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the feature, typically "Feature". |
geometry |
Point | Polygon | LineString
|
The geometry of the feature, which can be a Point, Polygon, or LineString. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
476 477 478 479 480 481 482 483 484 485 486 487 488 |
|
FeatureCollection
pydantic-model
Bases: Parent
A FeatureCollection model.
The FeatureCollection model represents a collection of geographic features with associated geometries and properties.
How to create a FeatureCollection from a JSON file:
>>> from pydantic import ValidationError
>>> from nrl_sdk_lib.models import FeatureCollection
>>>
>>> testfile_path = "tests/files/Eksempelfil_NRLRapportering-1.0.1.json"
>>> with open(testfile_path) as file:
... data = file.read()
>>>
>>> try:
... feature_collection = FeatureCollection.model_validate_json(data)
... except ValidationError as e:
... print(e.errors())
How to create a FeatureCollection programmatically:
>>> from uuid import UUID
>>>
>>> from nrl_sdk_lib.models import (
... CrsProperties,
... Feature,
... Point,
... NrlFlate,
... FeatureStatus,
... FlateType,
... FeatureCollection,
... Crs,
... )
>>>
>>> nrl_flate = NrlFlate(
... feature_type="NrlFlate",
... status=FeatureStatus.eksisterende,
... komponentident=UUID("12345678-1234-5678-1234-567812345678"),
... verifisert_rapporteringsnøyaktighet="20230101_5-1",
... flate_type=FlateType.trafostasjon,
... )
>>>
>>> feature = Feature(
... type="Feature",
... geometry=Point(type="Point", coordinates=[10.0, 59.0]),
... properties=nrl_flate,
... )
>>>
>>> feature_collection = FeatureCollection(
... crs=Crs(properties=CrsProperties(name="EPSG:4326")),
... features=[feature],
... )
>>>
>>> # Do something with feature_collection, e.g. serialize it to JSON:
>>> # print(feature_collection.serialize())
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of the collection, typically "FeatureCollection". |
crs |
Crs
|
The coordinate reference system of the features in the collection. |
features |
list[Feature]
|
A list of features in the collection, each with its own geometry and properties. |
Methods:
Name | Description |
---|---|
serialize |
Converts the FeatureCollection instance to a JSON string. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
|
serialize()
async
Serialize the FeatureCollection to a JSON string.
This method converts the FeatureCollection instance to a JSON string. The serialization will exclude any fields that are None, and field names in the serialization will be in camelCase.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/feature_collection.py
564 565 566 567 568 569 570 571 |
|
nrl_sdk_lib.models.job
Module for job model.
JobOperation
Bases: str
, Enum
Enum for operation types.
This enum defines the types of operations that can be performed on a job.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/job.py
11 12 13 14 15 16 17 18 19 20 21 |
|
VALIDATE = 'validate'
class-attribute
instance-attribute
Operation for validating data.
REPORT = 'report'
class-attribute
instance-attribute
Operation for reporting data.
JobStatus
Bases: str
, Enum
Enum for job status types.
This enum defines the possible statuses for a job.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/job.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
PENDING = 'pending'
class-attribute
instance-attribute
Job is pending and has not yet started.
IN_PROGRESS = 'in_progress'
class-attribute
instance-attribute
Job is currently being processed.
COMPLETED = 'completed'
class-attribute
instance-attribute
Job has been completed successfully.
FAILED = 'failed'
class-attribute
instance-attribute
Job has failed during processing.
JobDataType
Bases: str
, Enum
Enum for job data types.
This enum defines the possible types of job data.
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/job.py
43 44 45 46 47 48 49 50 51 52 53 |
|
GEOJSON = 'geojson'
class-attribute
instance-attribute
Job data type for GeoJSON data.
CIM = 'cim'
class-attribute
instance-attribute
Job data type for CIM data.
JobData
pydantic-model
Bases: BaseModel
A job data model for storing the data related to the job .
The job data model represents the data associated with a job, including its content type and the actual content.
Attributes:
Name | Type | Description |
---|---|---|
type |
JobDataType
|
Type of job data (e.g., "geojson" or "cim"). |
content_type |
str
|
Type of content being stored (e.g., "application/json"). |
job_id |
UUID
|
Identifier for the job associated with this data. |
content |
bytes
|
The actual content data in bytes. |
id |
UUID
|
Unique identifier for the job data. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/job.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
Job
pydantic-model
Bases: BaseModel
A job model.
The job model represents a processing task that can be validated or reported.
Attributes:
Name | Type | Description |
---|---|---|
id |
UUID
|
Unique identifier for the job. |
status |
JobStatus
|
Current status of the job. |
content_type |
str
|
Type of content being processed in the job. |
operation |
JobOperation
|
Type of operation being performed in the job. |
created_at |
datetime
|
Timestamp when the job was created. |
started_at |
datetime | None
|
Timestamp when the job became in progress. |
created_for_org |
str
|
Organization for which the job was created. |
job_data |
list[JobData] | None
|
List of data associated with the job. |
created_by_user |
str
|
Username of the user who created the job. |
finished_at |
datetime | None
|
Timestamp when the job finished. |
number_of_features |
int | None
|
Number of features processed in the job. |
number_of_batches |
int | None
|
Number of batches processed in the job. |
batch_size |
int | None
|
Size of each batch processed in the job. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/job.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
nrl_sdk_lib.models.result
Module for response message model.
ResultError
pydantic-model
Bases: BaseModel
A result error model.
The result error model represents an error encountered during a validation or reporting process.
Attributes:
Name | Type | Description |
---|---|---|
reason |
str
|
A description of the error encountered. |
komponent_id |
UUID | None
|
An optional identifier for the component associated with the error. |
id |
UUID | None
|
A unique identifier for the error, automatically generated if not provided |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/result.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
ResultStatus
Bases: str
, Enum
Enumeration for result statuses.
This enum defines the possible statuses for a result, such as "success" or "failure".
Attributes:
Name | Type | Description |
---|---|---|
SUCCESS |
str
|
Indicates a successful result. |
FAILURE |
str
|
Indicates a failed result. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/result.py
33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
ResultType
Bases: str
, Enum
Enumeration for result types.
This enum defines the possible types of results, such as "validation" or "reporting".
Attributes:
Name | Type | Description |
---|---|---|
STRUCTURE_VALIDATION_ERRORS |
str
|
Indicates errors related to structure validation. |
VALIDATION_EXCEPTION |
str
|
Indicates a validation exception. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/result.py
48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
ResultStage
Bases: int
, Enum
Enumeration for result stages.
This enum defines the possible stages of validation errors.
Attributes:
Name | Type | Description |
---|---|---|
STRUCTURAL |
int
|
Represents the structural validation stage. |
OWNERSHIP |
int
|
Represents the ownership validation stage. |
BASIC_VALUE_VALIDATION |
int
|
Represents the basic value validation stage. |
ADVANCED_VALUE_VALIDATION |
int
|
Represents the advanced value validation stage. |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/result.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
Result
pydantic-model
Bases: BaseModel
A result model.
The result model represents the outcome of a validation or reporting process.
Attributes:
Name | Type | Description |
---|---|---|
status |
str
|
The status of the result, e.g., "success" or " |
stage |
int
|
The stage of the process, typically an integer indicating the step in the workflow. |
job_id |
UUID
|
The unique identifier of the job associated with this result. |
batch_number |
int | None
|
The batch number if the job was processed in batches. |
type |
str | None
|
The type of result, if applicable. |
errors |
list[ResultError] | None
|
A list of errors encountered during the process or an empty list if there are no errors. |
id |
UUID | None
|
A unique identifier for the result, automatically generated if not provided |
Source code in nrl-sdk-lib/src/nrl_sdk_lib/models/result.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|