• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core3.1-typescript / 46687433664

01 Dec 2026 04:07PM UTC coverage: 75.861%. Remained the same
46687433664

push

github

web-flow
Prepare for npm trusted publishing and the Eclipse project (#11)

The repository moved to eclipse-aascw. npm rejects provenance when
package.json repository.url does not match the publishing repository, and
the repository guards in the publish and CI workflows skipped the version
sync and Coveralls steps in the new org.

Also add the SECURITY.md and NOTICE.md Eclipse projects carry, document the
ECA requirement, and point README links at the new org.

3774 of 6479 branches covered (58.25%)

Branch coverage included in aggregate %.

20066 of 24947 relevant lines covered (80.43%)

259.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.62
/src/stringification.ts
1
// SPDX-FileCopyrightText: 2025 aas-core3.1-typescript AUTHORS
2
//
3
// SPDX-License-Identifier: MIT
4

5
/**
6
 * De/serialize enumerations from and to string representations.
7
 */
8

9
// This code has been automatically generated by aas-core-codegen.
10
// Do NOT edit or append.
11

12
import * as AasTypes from "./types";
19 ✔
13

14
const MODEL_TYPE_FROM_STRING = new Map<string, AasTypes.ModelType>([
19 ✔
15
  ["Extension", AasTypes.ModelType.Extension],
16
  ["AdministrativeInformation", AasTypes.ModelType.AdministrativeInformation],
17
  ["Qualifier", AasTypes.ModelType.Qualifier],
18
  ["AssetAdministrationShell", AasTypes.ModelType.AssetAdministrationShell],
19
  ["AssetInformation", AasTypes.ModelType.AssetInformation],
20
  ["Resource", AasTypes.ModelType.Resource],
21
  ["SpecificAssetId", AasTypes.ModelType.SpecificAssetId],
22
  ["Submodel", AasTypes.ModelType.Submodel],
23
  ["RelationshipElement", AasTypes.ModelType.RelationshipElement],
24
  ["SubmodelElementList", AasTypes.ModelType.SubmodelElementList],
25
  ["SubmodelElementCollection", AasTypes.ModelType.SubmodelElementCollection],
26
  ["Property", AasTypes.ModelType.Property],
27
  ["MultiLanguageProperty", AasTypes.ModelType.MultiLanguageProperty],
28
  ["Range", AasTypes.ModelType.Range],
29
  ["ReferenceElement", AasTypes.ModelType.ReferenceElement],
30
  ["Blob", AasTypes.ModelType.Blob],
31
  ["File", AasTypes.ModelType.File],
32
  ["AnnotatedRelationshipElement", AasTypes.ModelType.AnnotatedRelationshipElement],
33
  ["Entity", AasTypes.ModelType.Entity],
34
  ["EventPayload", AasTypes.ModelType.EventPayload],
35
  ["BasicEventElement", AasTypes.ModelType.BasicEventElement],
36
  ["Operation", AasTypes.ModelType.Operation],
37
  ["OperationVariable", AasTypes.ModelType.OperationVariable],
38
  ["Capability", AasTypes.ModelType.Capability],
39
  ["ConceptDescription", AasTypes.ModelType.ConceptDescription],
40
  ["Reference", AasTypes.ModelType.Reference],
41
  ["Key", AasTypes.ModelType.Key],
42
  ["LangStringNameType", AasTypes.ModelType.LangStringNameType],
43
  ["LangStringTextType", AasTypes.ModelType.LangStringTextType],
44
  ["Environment", AasTypes.ModelType.Environment],
45
  ["EmbeddedDataSpecification", AasTypes.ModelType.EmbeddedDataSpecification],
46
  ["LevelType", AasTypes.ModelType.LevelType],
47
  ["ValueReferencePair", AasTypes.ModelType.ValueReferencePair],
48
  ["ValueList", AasTypes.ModelType.ValueList],
49
  [
50
    "LangStringPreferredNameTypeIec61360",
51
    AasTypes.ModelType.LangStringPreferredNameTypeIec61360
52
  ],
53
  [
54
    "LangStringShortNameTypeIec61360",
55
    AasTypes.ModelType.LangStringShortNameTypeIec61360
56
  ],
57
  [
58
    "LangStringDefinitionTypeIec61360",
59
    AasTypes.ModelType.LangStringDefinitionTypeIec61360
60
  ],
61
  ["DataSpecificationIec61360", AasTypes.ModelType.DataSpecificationIec61360]
62
]);
63

64
/**
65
 * Parse `text` as a string representation of {@link types!ModelType}.
66
 *
67
 * @param text - string representation of {@link types!ModelType}
68
 * @returns literal of {@link types!ModelType}, if valid, and `null` otherwise
69
 */
70
export function modelTypeFromString(text: string): AasTypes.ModelType | null {
19 ✔
71
  const result = MODEL_TYPE_FROM_STRING.get(text);
39 ✔
72
  return result !== undefined ? result : null;
39 ✔
73
}
74

75
const MODEL_TYPE_TO_STRING = new Map<AasTypes.ModelType, string>([
19 ✔
76
  [AasTypes.ModelType.Extension, "Extension"],
77
  [AasTypes.ModelType.AdministrativeInformation, "AdministrativeInformation"],
78
  [AasTypes.ModelType.Qualifier, "Qualifier"],
79
  [AasTypes.ModelType.AssetAdministrationShell, "AssetAdministrationShell"],
80
  [AasTypes.ModelType.AssetInformation, "AssetInformation"],
81
  [AasTypes.ModelType.Resource, "Resource"],
82
  [AasTypes.ModelType.SpecificAssetId, "SpecificAssetId"],
83
  [AasTypes.ModelType.Submodel, "Submodel"],
84
  [AasTypes.ModelType.RelationshipElement, "RelationshipElement"],
85
  [AasTypes.ModelType.SubmodelElementList, "SubmodelElementList"],
86
  [AasTypes.ModelType.SubmodelElementCollection, "SubmodelElementCollection"],
87
  [AasTypes.ModelType.Property, "Property"],
88
  [AasTypes.ModelType.MultiLanguageProperty, "MultiLanguageProperty"],
89
  [AasTypes.ModelType.Range, "Range"],
90
  [AasTypes.ModelType.ReferenceElement, "ReferenceElement"],
91
  [AasTypes.ModelType.Blob, "Blob"],
92
  [AasTypes.ModelType.File, "File"],
93
  [AasTypes.ModelType.AnnotatedRelationshipElement, "AnnotatedRelationshipElement"],
94
  [AasTypes.ModelType.Entity, "Entity"],
95
  [AasTypes.ModelType.EventPayload, "EventPayload"],
96
  [AasTypes.ModelType.BasicEventElement, "BasicEventElement"],
97
  [AasTypes.ModelType.Operation, "Operation"],
98
  [AasTypes.ModelType.OperationVariable, "OperationVariable"],
99
  [AasTypes.ModelType.Capability, "Capability"],
100
  [AasTypes.ModelType.ConceptDescription, "ConceptDescription"],
101
  [AasTypes.ModelType.Reference, "Reference"],
102
  [AasTypes.ModelType.Key, "Key"],
103
  [AasTypes.ModelType.LangStringNameType, "LangStringNameType"],
104
  [AasTypes.ModelType.LangStringTextType, "LangStringTextType"],
105
  [AasTypes.ModelType.Environment, "Environment"],
106
  [AasTypes.ModelType.EmbeddedDataSpecification, "EmbeddedDataSpecification"],
107
  [AasTypes.ModelType.LevelType, "LevelType"],
108
  [AasTypes.ModelType.ValueReferencePair, "ValueReferencePair"],
109
  [AasTypes.ModelType.ValueList, "ValueList"],
110
  [
111
    AasTypes.ModelType.LangStringPreferredNameTypeIec61360,
112
    "LangStringPreferredNameTypeIec61360"
113
  ],
114
  [
115
    AasTypes.ModelType.LangStringShortNameTypeIec61360,
116
    "LangStringShortNameTypeIec61360"
117
  ],
118
  [
119
    AasTypes.ModelType.LangStringDefinitionTypeIec61360,
120
    "LangStringDefinitionTypeIec61360"
121
  ],
122
  [AasTypes.ModelType.DataSpecificationIec61360, "DataSpecificationIec61360"]
123
]);
124

125
/**
126
 * Translate {@link types!ModelType} to a string.
127
 *
128
 * @param value - to be stringified
129
 * @returns string representation of {@link types!ModelType},
130
 * if `value` valid, and `null` otherwise
131
 */
132
export function modelTypeToString(value: AasTypes.ModelType): string | null {
19 ✔
133
  const result = MODEL_TYPE_TO_STRING.get(value);
1 ✔
134
  return result !== undefined ? result : null;
1 !
135
}
136

137
/**
138
 * Translate {@link types!ModelType} to a string.
139
 *
140
 * @param value - to be stringified
141
 * @returns string representation of {@link types!ModelType}
142
 * @throws
143
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
144
 * if the `value` is invalid
145
 */
146
export function mustModelTypeToString(value: AasTypes.ModelType): string {
19 ✔
147
  const result = MODEL_TYPE_TO_STRING.get(value);
38 ✔
148
  if (result === undefined) {
38 !
149
    throw new Error(`Invalid literal of ModelType: ${value}`);
×
150
  }
151
  return result;
38 ✔
152
}
153

154
const MODELLING_KIND_FROM_STRING = new Map<string, AasTypes.ModellingKind>([
19 ✔
155
  ["Template", AasTypes.ModellingKind.Template],
156
  ["Instance", AasTypes.ModellingKind.Instance]
157
]);
158

159
/**
160
 * Parse `text` as a string representation of {@link types!ModellingKind}.
161
 *
162
 * @param text - string representation of {@link types!ModellingKind}
163
 * @returns literal of {@link types!ModellingKind}, if valid, and `null` otherwise
164
 */
165
export function modellingKindFromString(text: string): AasTypes.ModellingKind | null {
19 ✔
166
  const result = MODELLING_KIND_FROM_STRING.get(text);
40 ✔
167
  return result !== undefined ? result : null;
40 ✔
168
}
169

170
const MODELLING_KIND_TO_STRING = new Map<AasTypes.ModellingKind, string>([
19 ✔
171
  [AasTypes.ModellingKind.Template, "Template"],
172
  [AasTypes.ModellingKind.Instance, "Instance"]
173
]);
174

175
/**
176
 * Translate {@link types!ModellingKind} to a string.
177
 *
178
 * @param value - to be stringified
179
 * @returns string representation of {@link types!ModellingKind}, if `value` valid, and `null` otherwise
180
 */
181
export function modellingKindToString(value: AasTypes.ModellingKind): string | null {
19 ✔
182
  const result = MODELLING_KIND_TO_STRING.get(value);
3 ✔
183
  return result !== undefined ? result : null;
3 ✔
184
}
185

186
/**
187
 * Translate {@link types!ModellingKind} to a string.
188
 *
189
 * @param value - to be stringified
190
 * @returns string representation of {@link types!ModellingKind}
191
 * @throws
192
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
193
 * if the `value` is invalid
194
 */
195
export function mustModellingKindToString(value: AasTypes.ModellingKind): string {
19 ✔
196
  const result = MODELLING_KIND_TO_STRING.get(value);
11 ✔
197
  if (result === undefined) {
11 ✔
198
    throw new Error(`Invalid literal of ModellingKind: ${value}`);
1 ✔
199
  }
200
  return result;
10 ✔
201
}
202

203
const QUALIFIER_KIND_FROM_STRING = new Map<string, AasTypes.QualifierKind>([
19 ✔
204
  ["ValueQualifier", AasTypes.QualifierKind.ValueQualifier],
205
  ["ConceptQualifier", AasTypes.QualifierKind.ConceptQualifier],
206
  ["TemplateQualifier", AasTypes.QualifierKind.TemplateQualifier]
207
]);
208

209
/**
210
 * Parse `text` as a string representation of {@link types!QualifierKind}.
211
 *
212
 * @param text - string representation of {@link types!QualifierKind}
213
 * @returns literal of {@link types!QualifierKind}, if valid, and `null` otherwise
214
 */
215
export function qualifierKindFromString(text: string): AasTypes.QualifierKind | null {
19 ✔
216
  const result = QUALIFIER_KIND_FROM_STRING.get(text);
37 ✔
217
  return result !== undefined ? result : null;
37 ✔
218
}
219

220
const QUALIFIER_KIND_TO_STRING = new Map<AasTypes.QualifierKind, string>([
19 ✔
221
  [AasTypes.QualifierKind.ValueQualifier, "ValueQualifier"],
222
  [AasTypes.QualifierKind.ConceptQualifier, "ConceptQualifier"],
223
  [AasTypes.QualifierKind.TemplateQualifier, "TemplateQualifier"]
224
]);
225

226
/**
227
 * Translate {@link types!QualifierKind} to a string.
228
 *
229
 * @param value - to be stringified
230
 * @returns string representation of {@link types!QualifierKind}, if `value` valid, and `null` otherwise
231
 */
232
export function qualifierKindToString(value: AasTypes.QualifierKind): string | null {
19 ✔
233
  const result = QUALIFIER_KIND_TO_STRING.get(value);
4 ✔
234
  return result !== undefined ? result : null;
4 ✔
235
}
236

237
/**
238
 * Translate {@link types!QualifierKind} to a string.
239
 *
240
 * @param value - to be stringified
241
 * @returns string representation of {@link types!QualifierKind}
242
 * @throws
243
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
244
 * if the `value` is invalid
245
 */
246
export function mustQualifierKindToString(value: AasTypes.QualifierKind): string {
19 ✔
247
  const result = QUALIFIER_KIND_TO_STRING.get(value);
13 ✔
248
  if (result === undefined) {
13 ✔
249
    throw new Error(`Invalid literal of QualifierKind: ${value}`);
1 ✔
250
  }
251
  return result;
12 ✔
252
}
253

254
const ASSET_KIND_FROM_STRING = new Map<string, AasTypes.AssetKind>([
19 ✔
255
  ["Type", AasTypes.AssetKind.Type],
256
  ["Instance", AasTypes.AssetKind.Instance],
257
  ["Role", AasTypes.AssetKind.Role],
258
  ["NotApplicable", AasTypes.AssetKind.NotApplicable]
259
]);
260

261
/**
262
 * Parse `text` as a string representation of {@link types!AssetKind}.
263
 *
264
 * @param text - string representation of {@link types!AssetKind}
265
 * @returns literal of {@link types!AssetKind}, if valid, and `null` otherwise
266
 */
267
export function assetKindFromString(text: string): AasTypes.AssetKind | null {
19 ✔
268
  const result = ASSET_KIND_FROM_STRING.get(text);
193 ✔
269
  return result !== undefined ? result : null;
193 ✔
270
}
271

272
const ASSET_KIND_TO_STRING = new Map<AasTypes.AssetKind, string>([
19 ✔
273
  [AasTypes.AssetKind.Type, "Type"],
274
  [AasTypes.AssetKind.Instance, "Instance"],
275
  [AasTypes.AssetKind.Role, "Role"],
276
  [AasTypes.AssetKind.NotApplicable, "NotApplicable"]
277
]);
278

279
/**
280
 * Translate {@link types!AssetKind} to a string.
281
 *
282
 * @param value - to be stringified
283
 * @returns string representation of {@link types!AssetKind}, if `value` valid, and `null` otherwise
284
 */
285
export function assetKindToString(value: AasTypes.AssetKind): string | null {
19 ✔
286
  const result = ASSET_KIND_TO_STRING.get(value);
5 ✔
287
  return result !== undefined ? result : null;
5 ✔
288
}
289

290
/**
291
 * Translate {@link types!AssetKind} to a string.
292
 *
293
 * @param value - to be stringified
294
 * @returns string representation of {@link types!AssetKind}
295
 * @throws
296
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
297
 * if the `value` is invalid
298
 */
299
export function mustAssetKindToString(value: AasTypes.AssetKind): string {
19 ✔
300
  const result = ASSET_KIND_TO_STRING.get(value);
75 ✔
301
  if (result === undefined) {
75 ✔
302
    throw new Error(`Invalid literal of AssetKind: ${value}`);
1 ✔
303
  }
304
  return result;
74 ✔
305
}
306

307
const AAS_SUBMODEL_ELEMENTS_FROM_STRING = new Map<string, AasTypes.AasSubmodelElements>(
19 ✔
308
  [
309
    [
310
      "AnnotatedRelationshipElement",
311
      AasTypes.AasSubmodelElements.AnnotatedRelationshipElement
312
    ],
313
    ["BasicEventElement", AasTypes.AasSubmodelElements.BasicEventElement],
314
    ["Blob", AasTypes.AasSubmodelElements.Blob],
315
    ["Capability", AasTypes.AasSubmodelElements.Capability],
316
    ["DataElement", AasTypes.AasSubmodelElements.DataElement],
317
    ["Entity", AasTypes.AasSubmodelElements.Entity],
318
    ["EventElement", AasTypes.AasSubmodelElements.EventElement],
319
    ["File", AasTypes.AasSubmodelElements.File],
320
    ["MultiLanguageProperty", AasTypes.AasSubmodelElements.MultiLanguageProperty],
321
    ["Operation", AasTypes.AasSubmodelElements.Operation],
322
    ["Property", AasTypes.AasSubmodelElements.Property],
323
    ["Range", AasTypes.AasSubmodelElements.Range],
324
    ["ReferenceElement", AasTypes.AasSubmodelElements.ReferenceElement],
325
    ["RelationshipElement", AasTypes.AasSubmodelElements.RelationshipElement],
326
    ["SubmodelElement", AasTypes.AasSubmodelElements.SubmodelElement],
327
    ["SubmodelElementList", AasTypes.AasSubmodelElements.SubmodelElementList],
328
    [
329
      "SubmodelElementCollection",
330
      AasTypes.AasSubmodelElements.SubmodelElementCollection
331
    ]
332
  ]
333
);
334

335
/**
336
 * Parse `text` as a string representation of {@link types!AasSubmodelElements}.
337
 *
338
 * @param text - string representation of {@link types!AasSubmodelElements}
339
 * @returns literal of {@link types!AasSubmodelElements}, if valid, and `null` otherwise
340
 */
341
export function aasSubmodelElementsFromString(
19 ✔
342
  text: string
343
): AasTypes.AasSubmodelElements | null {
344
  const result = AAS_SUBMODEL_ELEMENTS_FROM_STRING.get(text);
181 ✔
345
  return result !== undefined ? result : null;
181 ✔
346
}
347

348
const AAS_SUBMODEL_ELEMENTS_TO_STRING = new Map<AasTypes.AasSubmodelElements, string>([
19 ✔
349
  [
350
    AasTypes.AasSubmodelElements.AnnotatedRelationshipElement,
351
    "AnnotatedRelationshipElement"
352
  ],
353
  [AasTypes.AasSubmodelElements.BasicEventElement, "BasicEventElement"],
354
  [AasTypes.AasSubmodelElements.Blob, "Blob"],
355
  [AasTypes.AasSubmodelElements.Capability, "Capability"],
356
  [AasTypes.AasSubmodelElements.DataElement, "DataElement"],
357
  [AasTypes.AasSubmodelElements.Entity, "Entity"],
358
  [AasTypes.AasSubmodelElements.EventElement, "EventElement"],
359
  [AasTypes.AasSubmodelElements.File, "File"],
360
  [AasTypes.AasSubmodelElements.MultiLanguageProperty, "MultiLanguageProperty"],
361
  [AasTypes.AasSubmodelElements.Operation, "Operation"],
362
  [AasTypes.AasSubmodelElements.Property, "Property"],
363
  [AasTypes.AasSubmodelElements.Range, "Range"],
364
  [AasTypes.AasSubmodelElements.ReferenceElement, "ReferenceElement"],
365
  [AasTypes.AasSubmodelElements.RelationshipElement, "RelationshipElement"],
366
  [AasTypes.AasSubmodelElements.SubmodelElement, "SubmodelElement"],
367
  [AasTypes.AasSubmodelElements.SubmodelElementList, "SubmodelElementList"],
368
  [AasTypes.AasSubmodelElements.SubmodelElementCollection, "SubmodelElementCollection"]
369
]);
370

371
/**
372
 * Translate {@link types!AasSubmodelElements} to a string.
373
 *
374
 * @param value - to be stringified
375
 * @returns string representation of {@link types!AasSubmodelElements}, if `value` valid, and `null` otherwise
376
 */
377
export function aasSubmodelElementsToString(
19 ✔
378
  value: AasTypes.AasSubmodelElements
379
): string | null {
380
  const result = AAS_SUBMODEL_ELEMENTS_TO_STRING.get(value);
18 ✔
381
  return result !== undefined ? result : null;
18 ✔
382
}
383

384
/**
385
 * Translate {@link types!AasSubmodelElements} to a string.
386
 *
387
 * @param value - to be stringified
388
 * @returns string representation of {@link types!AasSubmodelElements}
389
 * @throws
390
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
391
 * if the `value` is invalid
392
 */
393
export function mustAasSubmodelElementsToString(
19 ✔
394
  value: AasTypes.AasSubmodelElements
395
): string {
396
  const result = AAS_SUBMODEL_ELEMENTS_TO_STRING.get(value);
73 ✔
397
  if (result === undefined) {
73 ✔
398
    throw new Error(`Invalid literal of AasSubmodelElements: ${value}`);
1 ✔
399
  }
400
  return result;
72 ✔
401
}
402

403
const ENTITY_TYPE_FROM_STRING = new Map<string, AasTypes.EntityType>([
19 ✔
404
  ["CoManagedEntity", AasTypes.EntityType.CoManagedEntity],
405
  ["SelfManagedEntity", AasTypes.EntityType.SelfManagedEntity]
406
]);
407

408
/**
409
 * Parse `text` as a string representation of {@link types!EntityType}.
410
 *
411
 * @param text - string representation of {@link types!EntityType}
412
 * @returns literal of {@link types!EntityType}, if valid, and `null` otherwise
413
 */
414
export function entityTypeFromString(text: string): AasTypes.EntityType | null {
19 ✔
415
  const result = ENTITY_TYPE_FROM_STRING.get(text);
37 ✔
416
  return result !== undefined ? result : null;
37 ✔
417
}
418

419
const ENTITY_TYPE_TO_STRING = new Map<AasTypes.EntityType, string>([
19 ✔
420
  [AasTypes.EntityType.CoManagedEntity, "CoManagedEntity"],
421
  [AasTypes.EntityType.SelfManagedEntity, "SelfManagedEntity"]
422
]);
423

424
/**
425
 * Translate {@link types!EntityType} to a string.
426
 *
427
 * @param value - to be stringified
428
 * @returns string representation of {@link types!EntityType}, if `value` valid, and `null` otherwise
429
 */
430
export function entityTypeToString(value: AasTypes.EntityType): string | null {
19 ✔
431
  const result = ENTITY_TYPE_TO_STRING.get(value);
3 ✔
432
  return result !== undefined ? result : null;
3 ✔
433
}
434

435
/**
436
 * Translate {@link types!EntityType} to a string.
437
 *
438
 * @param value - to be stringified
439
 * @returns string representation of {@link types!EntityType}
440
 * @throws
441
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
442
 * if the `value` is invalid
443
 */
444
export function mustEntityTypeToString(value: AasTypes.EntityType): string {
19 ✔
445
  const result = ENTITY_TYPE_TO_STRING.get(value);
9 ✔
446
  if (result === undefined) {
9 ✔
447
    throw new Error(`Invalid literal of EntityType: ${value}`);
1 ✔
448
  }
449
  return result;
8 ✔
450
}
451

452
const DIRECTION_FROM_STRING = new Map<string, AasTypes.Direction>([
19 ✔
453
  ["input", AasTypes.Direction.Input],
454
  ["output", AasTypes.Direction.Output]
455
]);
456

457
/**
458
 * Parse `text` as a string representation of {@link types!Direction}.
459
 *
460
 * @param text - string representation of {@link types!Direction}
461
 * @returns literal of {@link types!Direction}, if valid, and `null` otherwise
462
 */
463
export function directionFromString(text: string): AasTypes.Direction | null {
19 ✔
464
  const result = DIRECTION_FROM_STRING.get(text);
271 ✔
465
  return result !== undefined ? result : null;
271 ✔
466
}
467

468
const DIRECTION_TO_STRING = new Map<AasTypes.Direction, string>([
19 ✔
469
  [AasTypes.Direction.Input, "input"],
470
  [AasTypes.Direction.Output, "output"]
471
]);
472

473
/**
474
 * Translate {@link types!Direction} to a string.
475
 *
476
 * @param value - to be stringified
477
 * @returns string representation of {@link types!Direction}, if `value` valid, and `null` otherwise
478
 */
479
export function directionToString(value: AasTypes.Direction): string | null {
19 ✔
480
  const result = DIRECTION_TO_STRING.get(value);
3 ✔
481
  return result !== undefined ? result : null;
3 ✔
482
}
483

484
/**
485
 * Translate {@link types!Direction} to a string.
486
 *
487
 * @param value - to be stringified
488
 * @returns string representation of {@link types!Direction}
489
 * @throws
490
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
491
 * if the `value` is invalid
492
 */
493
export function mustDirectionToString(value: AasTypes.Direction): string {
19 ✔
494
  const result = DIRECTION_TO_STRING.get(value);
150 ✔
495
  if (result === undefined) {
150 ✔
496
    throw new Error(`Invalid literal of Direction: ${value}`);
1 ✔
497
  }
498
  return result;
149 ✔
499
}
500

501
const STATE_OF_EVENT_FROM_STRING = new Map<string, AasTypes.StateOfEvent>([
19 ✔
502
  ["on", AasTypes.StateOfEvent.On],
503
  ["off", AasTypes.StateOfEvent.Off]
504
]);
505

506
/**
507
 * Parse `text` as a string representation of {@link types!StateOfEvent}.
508
 *
509
 * @param text - string representation of {@link types!StateOfEvent}
510
 * @returns literal of {@link types!StateOfEvent}, if valid, and `null` otherwise
511
 */
512
export function stateOfEventFromString(text: string): AasTypes.StateOfEvent | null {
19 ✔
513
  const result = STATE_OF_EVENT_FROM_STRING.get(text);
268 ✔
514
  return result !== undefined ? result : null;
268 ✔
515
}
516

517
const STATE_OF_EVENT_TO_STRING = new Map<AasTypes.StateOfEvent, string>([
19 ✔
518
  [AasTypes.StateOfEvent.On, "on"],
519
  [AasTypes.StateOfEvent.Off, "off"]
520
]);
521

522
/**
523
 * Translate {@link types!StateOfEvent} to a string.
524
 *
525
 * @param value - to be stringified
526
 * @returns string representation of {@link types!StateOfEvent}, if `value` valid, and `null` otherwise
527
 */
528
export function stateOfEventToString(value: AasTypes.StateOfEvent): string | null {
19 ✔
529
  const result = STATE_OF_EVENT_TO_STRING.get(value);
3 ✔
530
  return result !== undefined ? result : null;
3 ✔
531
}
532

533
/**
534
 * Translate {@link types!StateOfEvent} to a string.
535
 *
536
 * @param value - to be stringified
537
 * @returns string representation of {@link types!StateOfEvent}
538
 * @throws
539
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
540
 * if the `value` is invalid
541
 */
542
export function mustStateOfEventToString(value: AasTypes.StateOfEvent): string {
19 ✔
543
  const result = STATE_OF_EVENT_TO_STRING.get(value);
150 ✔
544
  if (result === undefined) {
150 ✔
545
    throw new Error(`Invalid literal of StateOfEvent: ${value}`);
1 ✔
546
  }
547
  return result;
149 ✔
548
}
549

550
const REFERENCE_TYPES_FROM_STRING = new Map<string, AasTypes.ReferenceTypes>([
19 ✔
551
  ["ExternalReference", AasTypes.ReferenceTypes.ExternalReference],
552
  ["ModelReference", AasTypes.ReferenceTypes.ModelReference]
553
]);
554

555
/**
556
 * Parse `text` as a string representation of {@link types!ReferenceTypes}.
557
 *
558
 * @param text - string representation of {@link types!ReferenceTypes}
559
 * @returns literal of {@link types!ReferenceTypes}, if valid, and `null` otherwise
560
 */
561
export function referenceTypesFromString(text: string): AasTypes.ReferenceTypes | null {
19 ✔
562
  const result = REFERENCE_TYPES_FROM_STRING.get(text);
4,474 ✔
563
  return result !== undefined ? result : null;
4,474 ✔
564
}
565

566
const REFERENCE_TYPES_TO_STRING = new Map<AasTypes.ReferenceTypes, string>([
19 ✔
567
  [AasTypes.ReferenceTypes.ExternalReference, "ExternalReference"],
568
  [AasTypes.ReferenceTypes.ModelReference, "ModelReference"]
569
]);
570

571
/**
572
 * Translate {@link types!ReferenceTypes} to a string.
573
 *
574
 * @param value - to be stringified
575
 * @returns string representation of {@link types!ReferenceTypes}, if `value` valid, and `null` otherwise
576
 */
577
export function referenceTypesToString(value: AasTypes.ReferenceTypes): string | null {
19 ✔
578
  const result = REFERENCE_TYPES_TO_STRING.get(value);
3 ✔
579
  return result !== undefined ? result : null;
3 ✔
580
}
581

582
/**
583
 * Translate {@link types!ReferenceTypes} to a string.
584
 *
585
 * @param value - to be stringified
586
 * @returns string representation of {@link types!ReferenceTypes}
587
 * @throws
588
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
589
 * if the `value` is invalid
590
 */
591
export function mustReferenceTypesToString(value: AasTypes.ReferenceTypes): string {
19 ✔
592
  const result = REFERENCE_TYPES_TO_STRING.get(value);
1,069 ✔
593
  if (result === undefined) {
1,069 ✔
594
    throw new Error(`Invalid literal of ReferenceTypes: ${value}`);
1 ✔
595
  }
596
  return result;
1,068 ✔
597
}
598

599
const KEY_TYPES_FROM_STRING = new Map<string, AasTypes.KeyTypes>([
19 ✔
600
  ["AnnotatedRelationshipElement", AasTypes.KeyTypes.AnnotatedRelationshipElement],
601
  ["AssetAdministrationShell", AasTypes.KeyTypes.AssetAdministrationShell],
602
  ["BasicEventElement", AasTypes.KeyTypes.BasicEventElement],
603
  ["Blob", AasTypes.KeyTypes.Blob],
604
  ["Capability", AasTypes.KeyTypes.Capability],
605
  ["ConceptDescription", AasTypes.KeyTypes.ConceptDescription],
606
  ["DataElement", AasTypes.KeyTypes.DataElement],
607
  ["Entity", AasTypes.KeyTypes.Entity],
608
  ["EventElement", AasTypes.KeyTypes.EventElement],
609
  ["File", AasTypes.KeyTypes.File],
610
  ["FragmentReference", AasTypes.KeyTypes.FragmentReference],
611
  ["GlobalReference", AasTypes.KeyTypes.GlobalReference],
612
  ["Identifiable", AasTypes.KeyTypes.Identifiable],
613
  ["MultiLanguageProperty", AasTypes.KeyTypes.MultiLanguageProperty],
614
  ["Operation", AasTypes.KeyTypes.Operation],
615
  ["Property", AasTypes.KeyTypes.Property],
616
  ["Range", AasTypes.KeyTypes.Range],
617
  ["Referable", AasTypes.KeyTypes.Referable],
618
  ["ReferenceElement", AasTypes.KeyTypes.ReferenceElement],
619
  ["RelationshipElement", AasTypes.KeyTypes.RelationshipElement],
620
  ["Submodel", AasTypes.KeyTypes.Submodel],
621
  ["SubmodelElement", AasTypes.KeyTypes.SubmodelElement],
622
  ["SubmodelElementCollection", AasTypes.KeyTypes.SubmodelElementCollection],
623
  ["SubmodelElementList", AasTypes.KeyTypes.SubmodelElementList]
624
]);
625

626
/**
627
 * Parse `text` as a string representation of {@link types!KeyTypes}.
628
 *
629
 * @param text - string representation of {@link types!KeyTypes}
630
 * @returns literal of {@link types!KeyTypes}, if valid, and `null` otherwise
631
 */
632
export function keyTypesFromString(text: string): AasTypes.KeyTypes | null {
19 ✔
633
  const result = KEY_TYPES_FROM_STRING.get(text);
5,049 ✔
634
  return result !== undefined ? result : null;
5,049 ✔
635
}
636

637
const KEY_TYPES_TO_STRING = new Map<AasTypes.KeyTypes, string>([
19 ✔
638
  [AasTypes.KeyTypes.AnnotatedRelationshipElement, "AnnotatedRelationshipElement"],
639
  [AasTypes.KeyTypes.AssetAdministrationShell, "AssetAdministrationShell"],
640
  [AasTypes.KeyTypes.BasicEventElement, "BasicEventElement"],
641
  [AasTypes.KeyTypes.Blob, "Blob"],
642
  [AasTypes.KeyTypes.Capability, "Capability"],
643
  [AasTypes.KeyTypes.ConceptDescription, "ConceptDescription"],
644
  [AasTypes.KeyTypes.DataElement, "DataElement"],
645
  [AasTypes.KeyTypes.Entity, "Entity"],
646
  [AasTypes.KeyTypes.EventElement, "EventElement"],
647
  [AasTypes.KeyTypes.File, "File"],
648
  [AasTypes.KeyTypes.FragmentReference, "FragmentReference"],
649
  [AasTypes.KeyTypes.GlobalReference, "GlobalReference"],
650
  [AasTypes.KeyTypes.Identifiable, "Identifiable"],
651
  [AasTypes.KeyTypes.MultiLanguageProperty, "MultiLanguageProperty"],
652
  [AasTypes.KeyTypes.Operation, "Operation"],
653
  [AasTypes.KeyTypes.Property, "Property"],
654
  [AasTypes.KeyTypes.Range, "Range"],
655
  [AasTypes.KeyTypes.Referable, "Referable"],
656
  [AasTypes.KeyTypes.ReferenceElement, "ReferenceElement"],
657
  [AasTypes.KeyTypes.RelationshipElement, "RelationshipElement"],
658
  [AasTypes.KeyTypes.Submodel, "Submodel"],
659
  [AasTypes.KeyTypes.SubmodelElement, "SubmodelElement"],
660
  [AasTypes.KeyTypes.SubmodelElementCollection, "SubmodelElementCollection"],
661
  [AasTypes.KeyTypes.SubmodelElementList, "SubmodelElementList"]
662
]);
663

664
/**
665
 * Translate {@link types!KeyTypes} to a string.
666
 *
667
 * @param value - to be stringified
668
 * @returns string representation of {@link types!KeyTypes}, if `value` valid, and `null` otherwise
669
 */
670
export function keyTypesToString(value: AasTypes.KeyTypes): string | null {
19 ✔
671
  const result = KEY_TYPES_TO_STRING.get(value);
25 ✔
672
  return result !== undefined ? result : null;
25 ✔
673
}
674

675
/**
676
 * Translate {@link types!KeyTypes} to a string.
677
 *
678
 * @param value - to be stringified
679
 * @returns string representation of {@link types!KeyTypes}
680
 * @throws
681
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
682
 * if the `value` is invalid
683
 */
684
export function mustKeyTypesToString(value: AasTypes.KeyTypes): string {
19 ✔
685
  const result = KEY_TYPES_TO_STRING.get(value);
1,358 ✔
686
  if (result === undefined) {
1,358 ✔
687
    throw new Error(`Invalid literal of KeyTypes: ${value}`);
1 ✔
688
  }
689
  return result;
1,357 ✔
690
}
691

692
const DATA_TYPE_DEF_XSD_FROM_STRING = new Map<string, AasTypes.DataTypeDefXsd>([
19 ✔
693
  ["xs:anyURI", AasTypes.DataTypeDefXsd.AnyUri],
694
  ["xs:base64Binary", AasTypes.DataTypeDefXsd.Base64Binary],
695
  ["xs:boolean", AasTypes.DataTypeDefXsd.Boolean],
696
  ["xs:byte", AasTypes.DataTypeDefXsd.Byte],
697
  ["xs:date", AasTypes.DataTypeDefXsd.Date],
698
  ["xs:dateTime", AasTypes.DataTypeDefXsd.DateTime],
699
  ["xs:decimal", AasTypes.DataTypeDefXsd.Decimal],
700
  ["xs:double", AasTypes.DataTypeDefXsd.Double],
701
  ["xs:duration", AasTypes.DataTypeDefXsd.Duration],
702
  ["xs:float", AasTypes.DataTypeDefXsd.Float],
703
  ["xs:gDay", AasTypes.DataTypeDefXsd.GDay],
704
  ["xs:gMonth", AasTypes.DataTypeDefXsd.GMonth],
705
  ["xs:gMonthDay", AasTypes.DataTypeDefXsd.GMonthDay],
706
  ["xs:gYear", AasTypes.DataTypeDefXsd.GYear],
707
  ["xs:gYearMonth", AasTypes.DataTypeDefXsd.GYearMonth],
708
  ["xs:hexBinary", AasTypes.DataTypeDefXsd.HexBinary],
709
  ["xs:int", AasTypes.DataTypeDefXsd.Int],
710
  ["xs:integer", AasTypes.DataTypeDefXsd.Integer],
711
  ["xs:long", AasTypes.DataTypeDefXsd.Long],
712
  ["xs:negativeInteger", AasTypes.DataTypeDefXsd.NegativeInteger],
713
  ["xs:nonNegativeInteger", AasTypes.DataTypeDefXsd.NonNegativeInteger],
714
  ["xs:nonPositiveInteger", AasTypes.DataTypeDefXsd.NonPositiveInteger],
715
  ["xs:positiveInteger", AasTypes.DataTypeDefXsd.PositiveInteger],
716
  ["xs:short", AasTypes.DataTypeDefXsd.Short],
717
  ["xs:string", AasTypes.DataTypeDefXsd.String],
718
  ["xs:time", AasTypes.DataTypeDefXsd.Time],
719
  ["xs:unsignedByte", AasTypes.DataTypeDefXsd.UnsignedByte],
720
  ["xs:unsignedInt", AasTypes.DataTypeDefXsd.UnsignedInt],
721
  ["xs:unsignedLong", AasTypes.DataTypeDefXsd.UnsignedLong],
722
  ["xs:unsignedShort", AasTypes.DataTypeDefXsd.UnsignedShort]
723
]);
724

725
/**
726
 * Parse `text` as a string representation of {@link types!DataTypeDefXsd}.
727
 *
728
 * @param text - string representation of {@link types!DataTypeDefXsd}
729
 * @returns literal of {@link types!DataTypeDefXsd}, if valid, and `null` otherwise
730
 */
731
export function dataTypeDefXsdFromString(text: string): AasTypes.DataTypeDefXsd | null {
19 ✔
732
  const result = DATA_TYPE_DEF_XSD_FROM_STRING.get(text);
6,841 ✔
733
  return result !== undefined ? result : null;
6,841 ✔
734
}
735

736
const DATA_TYPE_DEF_XSD_TO_STRING = new Map<AasTypes.DataTypeDefXsd, string>([
19 ✔
737
  [AasTypes.DataTypeDefXsd.AnyUri, "xs:anyURI"],
738
  [AasTypes.DataTypeDefXsd.Base64Binary, "xs:base64Binary"],
739
  [AasTypes.DataTypeDefXsd.Boolean, "xs:boolean"],
740
  [AasTypes.DataTypeDefXsd.Byte, "xs:byte"],
741
  [AasTypes.DataTypeDefXsd.Date, "xs:date"],
742
  [AasTypes.DataTypeDefXsd.DateTime, "xs:dateTime"],
743
  [AasTypes.DataTypeDefXsd.Decimal, "xs:decimal"],
744
  [AasTypes.DataTypeDefXsd.Double, "xs:double"],
745
  [AasTypes.DataTypeDefXsd.Duration, "xs:duration"],
746
  [AasTypes.DataTypeDefXsd.Float, "xs:float"],
747
  [AasTypes.DataTypeDefXsd.GDay, "xs:gDay"],
748
  [AasTypes.DataTypeDefXsd.GMonth, "xs:gMonth"],
749
  [AasTypes.DataTypeDefXsd.GMonthDay, "xs:gMonthDay"],
750
  [AasTypes.DataTypeDefXsd.GYear, "xs:gYear"],
751
  [AasTypes.DataTypeDefXsd.GYearMonth, "xs:gYearMonth"],
752
  [AasTypes.DataTypeDefXsd.HexBinary, "xs:hexBinary"],
753
  [AasTypes.DataTypeDefXsd.Int, "xs:int"],
754
  [AasTypes.DataTypeDefXsd.Integer, "xs:integer"],
755
  [AasTypes.DataTypeDefXsd.Long, "xs:long"],
756
  [AasTypes.DataTypeDefXsd.NegativeInteger, "xs:negativeInteger"],
757
  [AasTypes.DataTypeDefXsd.NonNegativeInteger, "xs:nonNegativeInteger"],
758
  [AasTypes.DataTypeDefXsd.NonPositiveInteger, "xs:nonPositiveInteger"],
759
  [AasTypes.DataTypeDefXsd.PositiveInteger, "xs:positiveInteger"],
760
  [AasTypes.DataTypeDefXsd.Short, "xs:short"],
761
  [AasTypes.DataTypeDefXsd.String, "xs:string"],
762
  [AasTypes.DataTypeDefXsd.Time, "xs:time"],
763
  [AasTypes.DataTypeDefXsd.UnsignedByte, "xs:unsignedByte"],
764
  [AasTypes.DataTypeDefXsd.UnsignedInt, "xs:unsignedInt"],
765
  [AasTypes.DataTypeDefXsd.UnsignedLong, "xs:unsignedLong"],
766
  [AasTypes.DataTypeDefXsd.UnsignedShort, "xs:unsignedShort"]
767
]);
768

769
/**
770
 * Translate {@link types!DataTypeDefXsd} to a string.
771
 *
772
 * @param value - to be stringified
773
 * @returns string representation of {@link types!DataTypeDefXsd}, if `value` valid, and `null` otherwise
774
 */
775
export function dataTypeDefXsdToString(value: AasTypes.DataTypeDefXsd): string | null {
19 ✔
776
  const result = DATA_TYPE_DEF_XSD_TO_STRING.get(value);
31 ✔
777
  return result !== undefined ? result : null;
31 ✔
778
}
779

780
/**
781
 * Translate {@link types!DataTypeDefXsd} to a string.
782
 *
783
 * @param value - to be stringified
784
 * @returns string representation of {@link types!DataTypeDefXsd}
785
 * @throws
786
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
787
 * if the `value` is invalid
788
 */
789
export function mustDataTypeDefXsdToString(value: AasTypes.DataTypeDefXsd): string {
19 ✔
790
  const result = DATA_TYPE_DEF_XSD_TO_STRING.get(value);
4,528 ✔
791
  if (result === undefined) {
4,528 ✔
792
    throw new Error(`Invalid literal of DataTypeDefXsd: ${value}`);
1 ✔
793
  }
794
  return result;
4,527 ✔
795
}
796

797
const DATA_TYPE_IEC_61360_FROM_STRING = new Map<string, AasTypes.DataTypeIec61360>([
19 ✔
798
  ["DATE", AasTypes.DataTypeIec61360.Date],
799
  ["STRING", AasTypes.DataTypeIec61360.String],
800
  ["STRING_TRANSLATABLE", AasTypes.DataTypeIec61360.StringTranslatable],
801
  ["INTEGER_MEASURE", AasTypes.DataTypeIec61360.IntegerMeasure],
802
  ["INTEGER_COUNT", AasTypes.DataTypeIec61360.IntegerCount],
803
  ["INTEGER_CURRENCY", AasTypes.DataTypeIec61360.IntegerCurrency],
804
  ["REAL_MEASURE", AasTypes.DataTypeIec61360.RealMeasure],
805
  ["REAL_COUNT", AasTypes.DataTypeIec61360.RealCount],
806
  ["REAL_CURRENCY", AasTypes.DataTypeIec61360.RealCurrency],
807
  ["BOOLEAN", AasTypes.DataTypeIec61360.Boolean],
808
  ["IRI", AasTypes.DataTypeIec61360.Iri],
809
  ["IRDI", AasTypes.DataTypeIec61360.Irdi],
810
  ["RATIONAL", AasTypes.DataTypeIec61360.Rational],
811
  ["RATIONAL_MEASURE", AasTypes.DataTypeIec61360.RationalMeasure],
812
  ["TIME", AasTypes.DataTypeIec61360.Time],
813
  ["TIMESTAMP", AasTypes.DataTypeIec61360.Timestamp],
814
  ["FILE", AasTypes.DataTypeIec61360.File],
815
  ["HTML", AasTypes.DataTypeIec61360.Html],
816
  ["BLOB", AasTypes.DataTypeIec61360.Blob]
817
]);
818

819
/**
820
 * Parse `text` as a string representation of {@link types!DataTypeIec61360}.
821
 *
822
 * @param text - string representation of {@link types!DataTypeIec61360}
823
 * @returns literal of {@link types!DataTypeIec61360}, if valid, and `null` otherwise
824
 */
825
export function dataTypeIec61360FromString(
19 ✔
826
  text: string
827
): AasTypes.DataTypeIec61360 | null {
828
  const result = DATA_TYPE_IEC_61360_FROM_STRING.get(text);
108 ✔
829
  return result !== undefined ? result : null;
108 ✔
830
}
831

832
const DATA_TYPE_IEC_61360_TO_STRING = new Map<AasTypes.DataTypeIec61360, string>([
19 ✔
833
  [AasTypes.DataTypeIec61360.Date, "DATE"],
834
  [AasTypes.DataTypeIec61360.String, "STRING"],
835
  [AasTypes.DataTypeIec61360.StringTranslatable, "STRING_TRANSLATABLE"],
836
  [AasTypes.DataTypeIec61360.IntegerMeasure, "INTEGER_MEASURE"],
837
  [AasTypes.DataTypeIec61360.IntegerCount, "INTEGER_COUNT"],
838
  [AasTypes.DataTypeIec61360.IntegerCurrency, "INTEGER_CURRENCY"],
839
  [AasTypes.DataTypeIec61360.RealMeasure, "REAL_MEASURE"],
840
  [AasTypes.DataTypeIec61360.RealCount, "REAL_COUNT"],
841
  [AasTypes.DataTypeIec61360.RealCurrency, "REAL_CURRENCY"],
842
  [AasTypes.DataTypeIec61360.Boolean, "BOOLEAN"],
843
  [AasTypes.DataTypeIec61360.Iri, "IRI"],
844
  [AasTypes.DataTypeIec61360.Irdi, "IRDI"],
845
  [AasTypes.DataTypeIec61360.Rational, "RATIONAL"],
846
  [AasTypes.DataTypeIec61360.RationalMeasure, "RATIONAL_MEASURE"],
847
  [AasTypes.DataTypeIec61360.Time, "TIME"],
848
  [AasTypes.DataTypeIec61360.Timestamp, "TIMESTAMP"],
849
  [AasTypes.DataTypeIec61360.File, "FILE"],
850
  [AasTypes.DataTypeIec61360.Html, "HTML"],
851
  [AasTypes.DataTypeIec61360.Blob, "BLOB"]
852
]);
853

854
/**
855
 * Translate {@link types!DataTypeIec61360} to a string.
856
 *
857
 * @param value - to be stringified
858
 * @returns string representation of {@link types!DataTypeIec61360}, if `value` valid, and `null` otherwise
859
 */
860
export function dataTypeIec61360ToString(
19 ✔
861
  value: AasTypes.DataTypeIec61360
862
): string | null {
863
  const result = DATA_TYPE_IEC_61360_TO_STRING.get(value);
20 ✔
864
  return result !== undefined ? result : null;
20 ✔
865
}
866

867
/**
868
 * Translate {@link types!DataTypeIec61360} to a string.
869
 *
870
 * @param value - to be stringified
871
 * @returns string representation of {@link types!DataTypeIec61360}
872
 * @throws
873
 * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error|Error}
874
 * if the `value` is invalid
875
 */
876
export function mustDataTypeIec61360ToString(value: AasTypes.DataTypeIec61360): string {
19 ✔
877
  const result = DATA_TYPE_IEC_61360_TO_STRING.get(value);
43 ✔
878
  if (result === undefined) {
43 ✔
879
    throw new Error(`Invalid literal of DataTypeIec61360: ${value}`);
1 ✔
880
  }
881
  return result;
42 ✔
882
}
883

884
// This code has been automatically generated by aas-core-codegen.
885
// Do NOT edit or append.
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc