@dnv-plant/typescriptpws 1.0.95 → 1.0.96-alpha.2289077

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,23 @@
1
1
  /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.95
10
- * Date/time: 19 Jan 2026 12:11:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
13
-
14
- import * as Enums from "../enums";
15
- import * as Entities from "../entities";
16
- import * as EntitySchemas from "../entity-schemas";
17
- import { getAnalyticsApiTarget, getClientAliasId } from "../utilities";
18
- import { CalculationRequestBase, CalculationBase, CalculationResponseBase } from "./calculationBase"
19
-
20
- import Joi from "joi";
2
+ * This file has been auto-generated by a code generation tool.
3
+ *
4
+ * DO NOT MODIFY THIS FILE
5
+ * This file is maintained by DNV.
6
+ * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
+ * Please contact DNV if you believe changes are required.
8
+ *
9
+ * Version: 1.0.96
10
+ * Date/time: 4 Apr 2026 08:17:52
11
+ * Template: templates/typescriptpws/calculations.razor.
12
+ ***********************************************************************/
13
+
14
+ import * as Enums from '../enums';
15
+ import * as Entities from '../entities';
16
+ import * as EntitySchemas from '../entity-schemas';
17
+ import { getAnalyticsApiTarget, getClientAliasId } from '../utilities';
18
+ import { CalculationRequestBase, CalculationBase, CalculationResponseBase } from './calculationBase';
19
+
20
+ import Joi from 'joi';
21
21
 
22
22
  export interface ConvertCompositionMassToMoleCalculationRequestSchemaData {
23
23
  mixture: Entities.Material;
@@ -34,11 +34,7 @@ class ConvertCompositionMassToMoleCalculationRequest extends CalculationRequestB
34
34
  * ConvertCompositionMassToMole calculation request class.
35
35
  *
36
36
  */
37
- constructor(data: {
38
- mixture: Entities.Material,
39
- compositionMass: number[],
40
- compositionMassCount: number
41
- }) {
37
+ constructor(data: { mixture: Entities.Material; compositionMass: number[]; compositionMassCount: number }) {
42
38
  super();
43
39
  this.mixture = data.mixture;
44
40
  this.compositionMass = data.compositionMass;
@@ -61,16 +57,16 @@ export class ConvertCompositionMassToMoleCalculationRequestSchema {
61
57
  }).unknown(true);
62
58
 
63
59
  this.propertyTypes = {
64
- mixture: "Entities.Material",
65
- compositionMass: "number[]",
66
- compositionMassCount: "number",
60
+ mixture: 'Entities.Material',
61
+ compositionMass: 'number[]',
62
+ compositionMassCount: 'number',
67
63
  };
68
64
  }
69
65
 
70
66
  validate(data: ConvertCompositionMassToMoleCalculationRequestSchemaData): ConvertCompositionMassToMoleCalculationRequest {
71
67
  const { error, value } = this.schema.validate(data, { abortEarly: false });
72
68
  if (error) {
73
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
69
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
74
70
  }
75
71
  return this.makeCalculationRequest(value);
76
72
  }
@@ -90,12 +86,7 @@ export class ConvertCompositionMassToMoleCalculation extends CalculationBase {
90
86
  * Converts mixture composition from mass to mole basis.
91
87
  *
92
88
  */
93
- constructor(data: {
94
- mixture: Entities.Material,
95
- compositionMass: number[],
96
- compositionMassCount: number
97
- controller?: AbortController;
98
- }) {
89
+ constructor(data: { mixture: Entities.Material; compositionMass: number[]; compositionMassCount: number; controller?: AbortController }) {
99
90
  super(data.controller);
100
91
  this.mixture = data.mixture;
101
92
  this.compositionMass = data.compositionMass;
@@ -107,7 +98,7 @@ export class ConvertCompositionMassToMoleCalculation extends CalculationBase {
107
98
  const request = new ConvertCompositionMassToMoleCalculationRequest({
108
99
  mixture: this.mixture,
109
100
  compositionMass: this.compositionMass,
110
- compositionMassCount: this.compositionMassCount
101
+ compositionMassCount: this.compositionMassCount,
111
102
  });
112
103
 
113
104
  const schema = new ConvertCompositionMassToMoleCalculationRequestSchema();
@@ -148,21 +139,19 @@ export class ConvertCompositionMassToMoleCalculation extends CalculationBase {
148
139
  }
149
140
 
150
141
  toString() {
151
- const parts = ["* ConvertCompositionMassToMole"];
142
+ const parts = ['* ConvertCompositionMassToMole'];
152
143
 
153
- parts.push("*** compositionMole:");
144
+ parts.push('*** compositionMole:');
154
145
  parts.push(
155
- this.compositionMole && this.compositionMole.length > 0
156
- ? this.compositionMole.map((point) => `compositionMoleElement: ${point}`).join("\n")
157
- : "compositionMole does not contain any elements"
146
+ this.compositionMole && this.compositionMole.length > 0 ? this.compositionMole.map((point) => `compositionMoleElement: ${point}`).join('\n') : 'compositionMole does not contain any elements',
158
147
  );
159
148
  parts.push(`resultCode: ${String(this.resultCode)}`);
160
- parts.push("*** messages:");
161
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
162
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
163
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
149
+ parts.push('*** messages:');
150
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
151
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
152
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
164
153
 
165
- return parts.join("\n");
154
+ return parts.join('\n');
166
155
  }
167
156
  }
168
157
 
@@ -173,13 +162,7 @@ export class ConvertCompositionMassToMoleCalculationResponse extends Calculation
173
162
  * ConvertCompositionMassToMole calculation response class.
174
163
  *
175
164
  */
176
- constructor(data: {
177
- compositionMole: number[],
178
- resultCode: Enums.ResultCode,
179
- messages: string[],
180
- calculationElapsedTime: number,
181
- operationId: string
182
- }) {
165
+ constructor(data: { compositionMole: number[]; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
183
166
  super();
184
167
  this.compositionMole = data.compositionMole;
185
168
  this.resultCode = data.resultCode;
@@ -192,17 +175,17 @@ export class ConvertCompositionMassToMoleCalculationResponse extends Calculation
192
175
  if (data.compositionMole && Array.isArray(data.compositionMole)) {
193
176
  this.compositionMole = data.compositionMole.map((item) => parseFloat(item));
194
177
  }
195
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
178
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
196
179
  this.resultCode = data.resultCode as Enums.ResultCode;
197
180
  }
198
181
  this.messages = this.messages ?? [];
199
182
  if (data.messages && Array.isArray(data.messages)) {
200
183
  this.messages.push(...data.messages);
201
184
  }
202
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
185
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
203
186
  this.calculationElapsedTime = data.calculationElapsedTime as number;
204
187
  }
205
- if (data.operationId !== undefined && typeof data.operationId === "string") {
188
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
206
189
  this.operationId = data.operationId as string;
207
190
  }
208
191
  }
@@ -233,14 +216,14 @@ export class ConvertCompositionMassToMoleCalculationResponseSchema {
233
216
  }).unknown(true);
234
217
 
235
218
  this.propertyTypes = {
236
- compositionMole: "number[]",
219
+ compositionMole: 'number[]',
237
220
  };
238
221
  }
239
222
 
240
223
  validate(data: ConvertCompositionMassToMoleCalculationResponseSchemaData): ConvertCompositionMassToMoleCalculationResponse {
241
224
  const { error, value } = this.schema.validate(data, { abortEarly: false });
242
225
  if (error) {
243
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
226
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
244
227
  }
245
228
  return this.makeCalculationResponse(value);
246
229
  }
@@ -265,11 +248,7 @@ class ConvertCompositionMoleToMassCalculationRequest extends CalculationRequestB
265
248
  * ConvertCompositionMoleToMass calculation request class.
266
249
  *
267
250
  */
268
- constructor(data: {
269
- mixture: Entities.Material,
270
- compositionMoles: number[],
271
- compositionMolesCount: number
272
- }) {
251
+ constructor(data: { mixture: Entities.Material; compositionMoles: number[]; compositionMolesCount: number }) {
273
252
  super();
274
253
  this.mixture = data.mixture;
275
254
  this.compositionMoles = data.compositionMoles;
@@ -292,16 +271,16 @@ export class ConvertCompositionMoleToMassCalculationRequestSchema {
292
271
  }).unknown(true);
293
272
 
294
273
  this.propertyTypes = {
295
- mixture: "Entities.Material",
296
- compositionMoles: "number[]",
297
- compositionMolesCount: "number",
274
+ mixture: 'Entities.Material',
275
+ compositionMoles: 'number[]',
276
+ compositionMolesCount: 'number',
298
277
  };
299
278
  }
300
279
 
301
280
  validate(data: ConvertCompositionMoleToMassCalculationRequestSchemaData): ConvertCompositionMoleToMassCalculationRequest {
302
281
  const { error, value } = this.schema.validate(data, { abortEarly: false });
303
282
  if (error) {
304
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
283
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
305
284
  }
306
285
  return this.makeCalculationRequest(value);
307
286
  }
@@ -321,12 +300,7 @@ export class ConvertCompositionMoleToMassCalculation extends CalculationBase {
321
300
  * Converts mixture composition from mole to mass basis.
322
301
  *
323
302
  */
324
- constructor(data: {
325
- mixture: Entities.Material,
326
- compositionMoles: number[],
327
- compositionMolesCount: number
328
- controller?: AbortController;
329
- }) {
303
+ constructor(data: { mixture: Entities.Material; compositionMoles: number[]; compositionMolesCount: number; controller?: AbortController }) {
330
304
  super(data.controller);
331
305
  this.mixture = data.mixture;
332
306
  this.compositionMoles = data.compositionMoles;
@@ -338,7 +312,7 @@ export class ConvertCompositionMoleToMassCalculation extends CalculationBase {
338
312
  const request = new ConvertCompositionMoleToMassCalculationRequest({
339
313
  mixture: this.mixture,
340
314
  compositionMoles: this.compositionMoles,
341
- compositionMolesCount: this.compositionMolesCount
315
+ compositionMolesCount: this.compositionMolesCount,
342
316
  });
343
317
 
344
318
  const schema = new ConvertCompositionMoleToMassCalculationRequestSchema();
@@ -379,21 +353,19 @@ export class ConvertCompositionMoleToMassCalculation extends CalculationBase {
379
353
  }
380
354
 
381
355
  toString() {
382
- const parts = ["* ConvertCompositionMoleToMass"];
356
+ const parts = ['* ConvertCompositionMoleToMass'];
383
357
 
384
- parts.push("*** compositionMass:");
358
+ parts.push('*** compositionMass:');
385
359
  parts.push(
386
- this.compositionMass && this.compositionMass.length > 0
387
- ? this.compositionMass.map((point) => `compositionMassElement: ${point}`).join("\n")
388
- : "compositionMass does not contain any elements"
360
+ this.compositionMass && this.compositionMass.length > 0 ? this.compositionMass.map((point) => `compositionMassElement: ${point}`).join('\n') : 'compositionMass does not contain any elements',
389
361
  );
390
362
  parts.push(`resultCode: ${String(this.resultCode)}`);
391
- parts.push("*** messages:");
392
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
393
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
394
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
363
+ parts.push('*** messages:');
364
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
365
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
366
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
395
367
 
396
- return parts.join("\n");
368
+ return parts.join('\n');
397
369
  }
398
370
  }
399
371
 
@@ -404,13 +376,7 @@ export class ConvertCompositionMoleToMassCalculationResponse extends Calculation
404
376
  * ConvertCompositionMoleToMass calculation response class.
405
377
  *
406
378
  */
407
- constructor(data: {
408
- compositionMass: number[],
409
- resultCode: Enums.ResultCode,
410
- messages: string[],
411
- calculationElapsedTime: number,
412
- operationId: string
413
- }) {
379
+ constructor(data: { compositionMass: number[]; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
414
380
  super();
415
381
  this.compositionMass = data.compositionMass;
416
382
  this.resultCode = data.resultCode;
@@ -423,17 +389,17 @@ export class ConvertCompositionMoleToMassCalculationResponse extends Calculation
423
389
  if (data.compositionMass && Array.isArray(data.compositionMass)) {
424
390
  this.compositionMass = data.compositionMass.map((item) => parseFloat(item));
425
391
  }
426
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
392
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
427
393
  this.resultCode = data.resultCode as Enums.ResultCode;
428
394
  }
429
395
  this.messages = this.messages ?? [];
430
396
  if (data.messages && Array.isArray(data.messages)) {
431
397
  this.messages.push(...data.messages);
432
398
  }
433
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
399
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
434
400
  this.calculationElapsedTime = data.calculationElapsedTime as number;
435
401
  }
436
- if (data.operationId !== undefined && typeof data.operationId === "string") {
402
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
437
403
  this.operationId = data.operationId as string;
438
404
  }
439
405
  }
@@ -464,14 +430,14 @@ export class ConvertCompositionMoleToMassCalculationResponseSchema {
464
430
  }).unknown(true);
465
431
 
466
432
  this.propertyTypes = {
467
- compositionMass: "number[]",
433
+ compositionMass: 'number[]',
468
434
  };
469
435
  }
470
436
 
471
437
  validate(data: ConvertCompositionMoleToMassCalculationResponseSchemaData): ConvertCompositionMoleToMassCalculationResponse {
472
438
  const { error, value } = this.schema.validate(data, { abortEarly: false });
473
439
  if (error) {
474
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
440
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
475
441
  }
476
442
  return this.makeCalculationResponse(value);
477
443
  }
@@ -492,9 +458,7 @@ class GetMassFromVesselCalculationRequest extends CalculationRequestBase {
492
458
  * GetMassFromVessel calculation request class.
493
459
  *
494
460
  */
495
- constructor(data: {
496
- vessel: Entities.Vessel
497
- }) {
461
+ constructor(data: { vessel: Entities.Vessel }) {
498
462
  super();
499
463
  this.vessel = data.vessel;
500
464
  }
@@ -513,14 +477,14 @@ export class GetMassFromVesselCalculationRequestSchema {
513
477
  }).unknown(true);
514
478
 
515
479
  this.propertyTypes = {
516
- vessel: "Entities.Vessel",
480
+ vessel: 'Entities.Vessel',
517
481
  };
518
482
  }
519
483
 
520
484
  validate(data: GetMassFromVesselCalculationRequestSchemaData): GetMassFromVesselCalculationRequest {
521
485
  const { error, value } = this.schema.validate(data, { abortEarly: false });
522
486
  if (error) {
523
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
487
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
524
488
  }
525
489
  return this.makeCalculationRequest(value);
526
490
  }
@@ -538,10 +502,7 @@ export class GetMassFromVesselCalculation extends CalculationBase {
538
502
  * Calculates the mass in a vessel.
539
503
  *
540
504
  */
541
- constructor(data: {
542
- vessel: Entities.Vessel
543
- controller?: AbortController;
544
- }) {
505
+ constructor(data: { vessel: Entities.Vessel; controller?: AbortController }) {
545
506
  super(data.controller);
546
507
  this.vessel = data.vessel;
547
508
  }
@@ -549,7 +510,7 @@ export class GetMassFromVesselCalculation extends CalculationBase {
549
510
  async run() {
550
511
  try {
551
512
  const request = new GetMassFromVesselCalculationRequest({
552
- vessel: this.vessel
513
+ vessel: this.vessel,
553
514
  });
554
515
 
555
516
  const schema = new GetMassFromVesselCalculationRequestSchema();
@@ -590,16 +551,16 @@ export class GetMassFromVesselCalculation extends CalculationBase {
590
551
  }
591
552
 
592
553
  toString() {
593
- const parts = ["* GetMassFromVessel"];
554
+ const parts = ['* GetMassFromVessel'];
594
555
 
595
556
  parts.push(`massInventory: ${String(this.massInventory)}`);
596
557
  parts.push(`resultCode: ${String(this.resultCode)}`);
597
- parts.push("*** messages:");
598
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
599
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
600
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
558
+ parts.push('*** messages:');
559
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
560
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
561
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
601
562
 
602
- return parts.join("\n");
563
+ return parts.join('\n');
603
564
  }
604
565
  }
605
566
 
@@ -610,13 +571,7 @@ export class GetMassFromVesselCalculationResponse extends CalculationResponseBas
610
571
  * GetMassFromVessel calculation response class.
611
572
  *
612
573
  */
613
- constructor(data: {
614
- massInventory: number,
615
- resultCode: Enums.ResultCode,
616
- messages: string[],
617
- calculationElapsedTime: number,
618
- operationId: string
619
- }) {
574
+ constructor(data: { massInventory: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
620
575
  super();
621
576
  this.massInventory = data.massInventory;
622
577
  this.resultCode = data.resultCode;
@@ -626,20 +581,20 @@ export class GetMassFromVesselCalculationResponse extends CalculationResponseBas
626
581
  }
627
582
 
628
583
  initialiseFromDictionary(data: { [key: string]: unknown }) {
629
- if (data.massInventory !== undefined && typeof data.massInventory === "number") {
584
+ if (data.massInventory !== undefined && typeof data.massInventory === 'number') {
630
585
  this.massInventory = data.massInventory as number;
631
586
  }
632
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
587
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
633
588
  this.resultCode = data.resultCode as Enums.ResultCode;
634
589
  }
635
590
  this.messages = this.messages ?? [];
636
591
  if (data.messages && Array.isArray(data.messages)) {
637
592
  this.messages.push(...data.messages);
638
593
  }
639
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
594
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
640
595
  this.calculationElapsedTime = data.calculationElapsedTime as number;
641
596
  }
642
- if (data.operationId !== undefined && typeof data.operationId === "string") {
597
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
643
598
  this.operationId = data.operationId as string;
644
599
  }
645
600
  }
@@ -670,14 +625,14 @@ export class GetMassFromVesselCalculationResponseSchema {
670
625
  }).unknown(true);
671
626
 
672
627
  this.propertyTypes = {
673
- massInventory: "number",
628
+ massInventory: 'number',
674
629
  };
675
630
  }
676
631
 
677
632
  validate(data: GetMassFromVesselCalculationResponseSchemaData): GetMassFromVesselCalculationResponse {
678
633
  const { error, value } = this.schema.validate(data, { abortEarly: false });
679
634
  if (error) {
680
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
635
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
681
636
  }
682
637
  return this.makeCalculationResponse(value);
683
638
  }
@@ -710,15 +665,7 @@ class LoadMassInventoryVesselForLeakScenarioCalculationRequest extends Calculati
710
665
  * LoadMassInventoryVesselForLeakScenario calculation request class.
711
666
  *
712
667
  */
713
- constructor(data: {
714
- material: Entities.Material,
715
- mass: number,
716
- pressure: number,
717
- temperature: number,
718
- holeSize: number,
719
- releaseElevation: number,
720
- releaseAngle: number
721
- }) {
668
+ constructor(data: { material: Entities.Material; mass: number; pressure: number; temperature: number; holeSize: number; releaseElevation: number; releaseAngle: number }) {
722
669
  super();
723
670
  this.material = data.material;
724
671
  this.mass = data.mass;
@@ -749,20 +696,20 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationRequestSchema {
749
696
  }).unknown(true);
750
697
 
751
698
  this.propertyTypes = {
752
- material: "Entities.Material",
753
- mass: "number",
754
- pressure: "number",
755
- temperature: "number",
756
- holeSize: "number",
757
- releaseElevation: "number",
758
- releaseAngle: "number",
699
+ material: 'Entities.Material',
700
+ mass: 'number',
701
+ pressure: 'number',
702
+ temperature: 'number',
703
+ holeSize: 'number',
704
+ releaseElevation: 'number',
705
+ releaseAngle: 'number',
759
706
  };
760
707
  }
761
708
 
762
709
  validate(data: LoadMassInventoryVesselForLeakScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForLeakScenarioCalculationRequest {
763
710
  const { error, value } = this.schema.validate(data, { abortEarly: false });
764
711
  if (error) {
765
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
712
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
766
713
  }
767
714
  return this.makeCalculationRequest(value);
768
715
  }
@@ -789,13 +736,13 @@ export class LoadMassInventoryVesselForLeakScenarioCalculation extends Calculati
789
736
  *
790
737
  */
791
738
  constructor(data: {
792
- material: Entities.Material,
793
- mass: number,
794
- pressure: number,
795
- temperature: number,
796
- holeSize: number,
797
- releaseElevation: number,
798
- releaseAngle: number
739
+ material: Entities.Material;
740
+ mass: number;
741
+ pressure: number;
742
+ temperature: number;
743
+ holeSize: number;
744
+ releaseElevation: number;
745
+ releaseAngle: number;
799
746
  controller?: AbortController;
800
747
  }) {
801
748
  super(data.controller);
@@ -817,7 +764,7 @@ export class LoadMassInventoryVesselForLeakScenarioCalculation extends Calculati
817
764
  temperature: this.temperature,
818
765
  holeSize: this.holeSize,
819
766
  releaseElevation: this.releaseElevation,
820
- releaseAngle: this.releaseAngle
767
+ releaseAngle: this.releaseAngle,
821
768
  });
822
769
 
823
770
  const schema = new LoadMassInventoryVesselForLeakScenarioCalculationRequestSchema();
@@ -860,18 +807,18 @@ export class LoadMassInventoryVesselForLeakScenarioCalculation extends Calculati
860
807
  }
861
808
 
862
809
  toString() {
863
- const parts = ["* LoadMassInventoryVesselForLeakScenario"];
810
+ const parts = ['* LoadMassInventoryVesselForLeakScenario'];
864
811
 
865
812
  parts.push(`vessel: ${String(this.vessel)}`);
866
813
  parts.push(`leak: ${String(this.leak)}`);
867
814
  parts.push(`volume: ${String(this.volume)}`);
868
815
  parts.push(`resultCode: ${String(this.resultCode)}`);
869
- parts.push("*** messages:");
870
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
871
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
872
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
816
+ parts.push('*** messages:');
817
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
818
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
819
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
873
820
 
874
- return parts.join("\n");
821
+ return parts.join('\n');
875
822
  }
876
823
  }
877
824
 
@@ -884,15 +831,7 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationResponse extends C
884
831
  * LoadMassInventoryVesselForLeakScenario calculation response class.
885
832
  *
886
833
  */
887
- constructor(data: {
888
- vessel: Entities.Vessel,
889
- leak: Entities.Leak,
890
- volume: number,
891
- resultCode: Enums.ResultCode,
892
- messages: string[],
893
- calculationElapsedTime: number,
894
- operationId: string
895
- }) {
834
+ constructor(data: { vessel: Entities.Vessel; leak: Entities.Leak; volume: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
896
835
  super();
897
836
  this.vessel = data.vessel;
898
837
  this.leak = data.leak;
@@ -912,20 +851,20 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationResponse extends C
912
851
  this.leak = new Entities.Leak();
913
852
  this.leak.initialiseFromDictionary(data.leak as { [key: string]: unknown });
914
853
  }
915
- if (data.volume !== undefined && typeof data.volume === "number") {
854
+ if (data.volume !== undefined && typeof data.volume === 'number') {
916
855
  this.volume = data.volume as number;
917
856
  }
918
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
857
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
919
858
  this.resultCode = data.resultCode as Enums.ResultCode;
920
859
  }
921
860
  this.messages = this.messages ?? [];
922
861
  if (data.messages && Array.isArray(data.messages)) {
923
862
  this.messages.push(...data.messages);
924
863
  }
925
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
864
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
926
865
  this.calculationElapsedTime = data.calculationElapsedTime as number;
927
866
  }
928
- if (data.operationId !== undefined && typeof data.operationId === "string") {
867
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
929
868
  this.operationId = data.operationId as string;
930
869
  }
931
870
  }
@@ -960,16 +899,16 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationResponseSchema {
960
899
  }).unknown(true);
961
900
 
962
901
  this.propertyTypes = {
963
- vessel: "Entities.Vessel",
964
- leak: "Entities.Leak",
965
- volume: "number",
902
+ vessel: 'Entities.Vessel',
903
+ leak: 'Entities.Leak',
904
+ volume: 'number',
966
905
  };
967
906
  }
968
907
 
969
908
  validate(data: LoadMassInventoryVesselForLeakScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForLeakScenarioCalculationResponse {
970
909
  const { error, value } = this.schema.validate(data, { abortEarly: false });
971
910
  if (error) {
972
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
911
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
973
912
  }
974
913
  return this.makeCalculationResponse(value);
975
914
  }
@@ -1004,16 +943,7 @@ class LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest extends Ca
1004
943
  * LoadMassInventoryVesselForLineRuptureScenario calculation request class.
1005
944
  *
1006
945
  */
1007
- constructor(data: {
1008
- material: Entities.Material,
1009
- mass: number,
1010
- pressure: number,
1011
- temperature: number,
1012
- pipeDiameter: number,
1013
- pipeLength: number,
1014
- releaseElevation: number,
1015
- releaseAngle: number
1016
- }) {
946
+ constructor(data: { material: Entities.Material; mass: number; pressure: number; temperature: number; pipeDiameter: number; pipeLength: number; releaseElevation: number; releaseAngle: number }) {
1017
947
  super();
1018
948
  this.material = data.material;
1019
949
  this.mass = data.mass;
@@ -1046,21 +976,21 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSche
1046
976
  }).unknown(true);
1047
977
 
1048
978
  this.propertyTypes = {
1049
- material: "Entities.Material",
1050
- mass: "number",
1051
- pressure: "number",
1052
- temperature: "number",
1053
- pipeDiameter: "number",
1054
- pipeLength: "number",
1055
- releaseElevation: "number",
1056
- releaseAngle: "number",
979
+ material: 'Entities.Material',
980
+ mass: 'number',
981
+ pressure: 'number',
982
+ temperature: 'number',
983
+ pipeDiameter: 'number',
984
+ pipeLength: 'number',
985
+ releaseElevation: 'number',
986
+ releaseAngle: 'number',
1057
987
  };
1058
988
  }
1059
989
 
1060
990
  validate(data: LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest {
1061
991
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1062
992
  if (error) {
1063
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
993
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1064
994
  }
1065
995
  return this.makeCalculationRequest(value);
1066
996
  }
@@ -1088,14 +1018,14 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculation extends Ca
1088
1018
  *
1089
1019
  */
1090
1020
  constructor(data: {
1091
- material: Entities.Material,
1092
- mass: number,
1093
- pressure: number,
1094
- temperature: number,
1095
- pipeDiameter: number,
1096
- pipeLength: number,
1097
- releaseElevation: number,
1098
- releaseAngle: number
1021
+ material: Entities.Material;
1022
+ mass: number;
1023
+ pressure: number;
1024
+ temperature: number;
1025
+ pipeDiameter: number;
1026
+ pipeLength: number;
1027
+ releaseElevation: number;
1028
+ releaseAngle: number;
1099
1029
  controller?: AbortController;
1100
1030
  }) {
1101
1031
  super(data.controller);
@@ -1119,7 +1049,7 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculation extends Ca
1119
1049
  pipeDiameter: this.pipeDiameter,
1120
1050
  pipeLength: this.pipeLength,
1121
1051
  releaseElevation: this.releaseElevation,
1122
- releaseAngle: this.releaseAngle
1052
+ releaseAngle: this.releaseAngle,
1123
1053
  });
1124
1054
 
1125
1055
  const schema = new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSchema();
@@ -1162,18 +1092,18 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculation extends Ca
1162
1092
  }
1163
1093
 
1164
1094
  toString() {
1165
- const parts = ["* LoadMassInventoryVesselForLineRuptureScenario"];
1095
+ const parts = ['* LoadMassInventoryVesselForLineRuptureScenario'];
1166
1096
 
1167
1097
  parts.push(`vessel: ${String(this.vessel)}`);
1168
1098
  parts.push(`lineRupture: ${String(this.lineRupture)}`);
1169
1099
  parts.push(`volume: ${String(this.volume)}`);
1170
1100
  parts.push(`resultCode: ${String(this.resultCode)}`);
1171
- parts.push("*** messages:");
1172
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
1173
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
1174
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
1101
+ parts.push('*** messages:');
1102
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
1103
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
1104
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
1175
1105
 
1176
- return parts.join("\n");
1106
+ return parts.join('\n');
1177
1107
  }
1178
1108
  }
1179
1109
 
@@ -1187,13 +1117,13 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse ex
1187
1117
  *
1188
1118
  */
1189
1119
  constructor(data: {
1190
- vessel: Entities.Vessel,
1191
- lineRupture: Entities.LineRupture,
1192
- volume: number,
1193
- resultCode: Enums.ResultCode,
1194
- messages: string[],
1195
- calculationElapsedTime: number,
1196
- operationId: string
1120
+ vessel: Entities.Vessel;
1121
+ lineRupture: Entities.LineRupture;
1122
+ volume: number;
1123
+ resultCode: Enums.ResultCode;
1124
+ messages: string[];
1125
+ calculationElapsedTime: number;
1126
+ operationId: string;
1197
1127
  }) {
1198
1128
  super();
1199
1129
  this.vessel = data.vessel;
@@ -1214,20 +1144,20 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse ex
1214
1144
  this.lineRupture = new Entities.LineRupture();
1215
1145
  this.lineRupture.initialiseFromDictionary(data.lineRupture as { [key: string]: unknown });
1216
1146
  }
1217
- if (data.volume !== undefined && typeof data.volume === "number") {
1147
+ if (data.volume !== undefined && typeof data.volume === 'number') {
1218
1148
  this.volume = data.volume as number;
1219
1149
  }
1220
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
1150
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
1221
1151
  this.resultCode = data.resultCode as Enums.ResultCode;
1222
1152
  }
1223
1153
  this.messages = this.messages ?? [];
1224
1154
  if (data.messages && Array.isArray(data.messages)) {
1225
1155
  this.messages.push(...data.messages);
1226
1156
  }
1227
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
1157
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
1228
1158
  this.calculationElapsedTime = data.calculationElapsedTime as number;
1229
1159
  }
1230
- if (data.operationId !== undefined && typeof data.operationId === "string") {
1160
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
1231
1161
  this.operationId = data.operationId as string;
1232
1162
  }
1233
1163
  }
@@ -1262,16 +1192,16 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationResponseSch
1262
1192
  }).unknown(true);
1263
1193
 
1264
1194
  this.propertyTypes = {
1265
- vessel: "Entities.Vessel",
1266
- lineRupture: "Entities.LineRupture",
1267
- volume: "number",
1195
+ vessel: 'Entities.Vessel',
1196
+ lineRupture: 'Entities.LineRupture',
1197
+ volume: 'number',
1268
1198
  };
1269
1199
  }
1270
1200
 
1271
1201
  validate(data: LoadMassInventoryVesselForLineRuptureScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse {
1272
1202
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1273
1203
  if (error) {
1274
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1204
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1275
1205
  }
1276
1206
  return this.makeCalculationResponse(value);
1277
1207
  }
@@ -1309,15 +1239,15 @@ class LoadMassInventoryVesselForReliefValveScenarioCalculationRequest extends Ca
1309
1239
  *
1310
1240
  */
1311
1241
  constructor(data: {
1312
- material: Entities.Material,
1313
- mass: number,
1314
- pressure: number,
1315
- temperature: number,
1316
- constrictionSize: number,
1317
- pipeDiameter: number,
1318
- pipeLength: number,
1319
- releaseElevation: number,
1320
- releaseAngle: number
1242
+ material: Entities.Material;
1243
+ mass: number;
1244
+ pressure: number;
1245
+ temperature: number;
1246
+ constrictionSize: number;
1247
+ pipeDiameter: number;
1248
+ pipeLength: number;
1249
+ releaseElevation: number;
1250
+ releaseAngle: number;
1321
1251
  }) {
1322
1252
  super();
1323
1253
  this.material = data.material;
@@ -1353,22 +1283,22 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSche
1353
1283
  }).unknown(true);
1354
1284
 
1355
1285
  this.propertyTypes = {
1356
- material: "Entities.Material",
1357
- mass: "number",
1358
- pressure: "number",
1359
- temperature: "number",
1360
- constrictionSize: "number",
1361
- pipeDiameter: "number",
1362
- pipeLength: "number",
1363
- releaseElevation: "number",
1364
- releaseAngle: "number",
1286
+ material: 'Entities.Material',
1287
+ mass: 'number',
1288
+ pressure: 'number',
1289
+ temperature: 'number',
1290
+ constrictionSize: 'number',
1291
+ pipeDiameter: 'number',
1292
+ pipeLength: 'number',
1293
+ releaseElevation: 'number',
1294
+ releaseAngle: 'number',
1365
1295
  };
1366
1296
  }
1367
1297
 
1368
1298
  validate(data: LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForReliefValveScenarioCalculationRequest {
1369
1299
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1370
1300
  if (error) {
1371
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1301
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1372
1302
  }
1373
1303
  return this.makeCalculationRequest(value);
1374
1304
  }
@@ -1397,15 +1327,15 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculation extends Ca
1397
1327
  *
1398
1328
  */
1399
1329
  constructor(data: {
1400
- material: Entities.Material,
1401
- mass: number,
1402
- pressure: number,
1403
- temperature: number,
1404
- constrictionSize: number,
1405
- pipeDiameter: number,
1406
- pipeLength: number,
1407
- releaseElevation: number,
1408
- releaseAngle: number
1330
+ material: Entities.Material;
1331
+ mass: number;
1332
+ pressure: number;
1333
+ temperature: number;
1334
+ constrictionSize: number;
1335
+ pipeDiameter: number;
1336
+ pipeLength: number;
1337
+ releaseElevation: number;
1338
+ releaseAngle: number;
1409
1339
  controller?: AbortController;
1410
1340
  }) {
1411
1341
  super(data.controller);
@@ -1431,7 +1361,7 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculation extends Ca
1431
1361
  pipeDiameter: this.pipeDiameter,
1432
1362
  pipeLength: this.pipeLength,
1433
1363
  releaseElevation: this.releaseElevation,
1434
- releaseAngle: this.releaseAngle
1364
+ releaseAngle: this.releaseAngle,
1435
1365
  });
1436
1366
 
1437
1367
  const schema = new LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSchema();
@@ -1474,18 +1404,18 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculation extends Ca
1474
1404
  }
1475
1405
 
1476
1406
  toString() {
1477
- const parts = ["* LoadMassInventoryVesselForReliefValveScenario"];
1407
+ const parts = ['* LoadMassInventoryVesselForReliefValveScenario'];
1478
1408
 
1479
1409
  parts.push(`vessel: ${String(this.vessel)}`);
1480
1410
  parts.push(`reliefValve: ${String(this.reliefValve)}`);
1481
1411
  parts.push(`volume: ${String(this.volume)}`);
1482
1412
  parts.push(`resultCode: ${String(this.resultCode)}`);
1483
- parts.push("*** messages:");
1484
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
1485
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
1486
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
1413
+ parts.push('*** messages:');
1414
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
1415
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
1416
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
1487
1417
 
1488
- return parts.join("\n");
1418
+ return parts.join('\n');
1489
1419
  }
1490
1420
  }
1491
1421
 
@@ -1499,13 +1429,13 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationResponse ex
1499
1429
  *
1500
1430
  */
1501
1431
  constructor(data: {
1502
- vessel: Entities.Vessel,
1503
- reliefValve: Entities.ReliefValve,
1504
- volume: number,
1505
- resultCode: Enums.ResultCode,
1506
- messages: string[],
1507
- calculationElapsedTime: number,
1508
- operationId: string
1432
+ vessel: Entities.Vessel;
1433
+ reliefValve: Entities.ReliefValve;
1434
+ volume: number;
1435
+ resultCode: Enums.ResultCode;
1436
+ messages: string[];
1437
+ calculationElapsedTime: number;
1438
+ operationId: string;
1509
1439
  }) {
1510
1440
  super();
1511
1441
  this.vessel = data.vessel;
@@ -1526,20 +1456,20 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationResponse ex
1526
1456
  this.reliefValve = new Entities.ReliefValve();
1527
1457
  this.reliefValve.initialiseFromDictionary(data.reliefValve as { [key: string]: unknown });
1528
1458
  }
1529
- if (data.volume !== undefined && typeof data.volume === "number") {
1459
+ if (data.volume !== undefined && typeof data.volume === 'number') {
1530
1460
  this.volume = data.volume as number;
1531
1461
  }
1532
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
1462
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
1533
1463
  this.resultCode = data.resultCode as Enums.ResultCode;
1534
1464
  }
1535
1465
  this.messages = this.messages ?? [];
1536
1466
  if (data.messages && Array.isArray(data.messages)) {
1537
1467
  this.messages.push(...data.messages);
1538
1468
  }
1539
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
1469
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
1540
1470
  this.calculationElapsedTime = data.calculationElapsedTime as number;
1541
1471
  }
1542
- if (data.operationId !== undefined && typeof data.operationId === "string") {
1472
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
1543
1473
  this.operationId = data.operationId as string;
1544
1474
  }
1545
1475
  }
@@ -1574,16 +1504,16 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationResponseSch
1574
1504
  }).unknown(true);
1575
1505
 
1576
1506
  this.propertyTypes = {
1577
- vessel: "Entities.Vessel",
1578
- reliefValve: "Entities.ReliefValve",
1579
- volume: "number",
1507
+ vessel: 'Entities.Vessel',
1508
+ reliefValve: 'Entities.ReliefValve',
1509
+ volume: 'number',
1580
1510
  };
1581
1511
  }
1582
1512
 
1583
1513
  validate(data: LoadMassInventoryVesselForReliefValveScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForReliefValveScenarioCalculationResponse {
1584
1514
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1585
1515
  if (error) {
1586
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1516
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1587
1517
  }
1588
1518
  return this.makeCalculationResponse(value);
1589
1519
  }
@@ -1606,10 +1536,7 @@ class ReliefValveMinTemperatureCalculationRequest extends CalculationRequestBase
1606
1536
  * ReliefValveMinTemperature calculation request class.
1607
1537
  *
1608
1538
  */
1609
- constructor(data: {
1610
- material: Entities.Material,
1611
- pressure: number
1612
- }) {
1539
+ constructor(data: { material: Entities.Material; pressure: number }) {
1613
1540
  super();
1614
1541
  this.material = data.material;
1615
1542
  this.pressure = data.pressure;
@@ -1630,15 +1557,15 @@ export class ReliefValveMinTemperatureCalculationRequestSchema {
1630
1557
  }).unknown(true);
1631
1558
 
1632
1559
  this.propertyTypes = {
1633
- material: "Entities.Material",
1634
- pressure: "number",
1560
+ material: 'Entities.Material',
1561
+ pressure: 'number',
1635
1562
  };
1636
1563
  }
1637
1564
 
1638
1565
  validate(data: ReliefValveMinTemperatureCalculationRequestSchemaData): ReliefValveMinTemperatureCalculationRequest {
1639
1566
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1640
1567
  if (error) {
1641
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1568
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1642
1569
  }
1643
1570
  return this.makeCalculationRequest(value);
1644
1571
  }
@@ -1657,11 +1584,7 @@ export class ReliefValveMinTemperatureCalculation extends CalculationBase {
1657
1584
  * The Relief Valve scenario does not allow fluid conditions to be liquid. As such, his method calculates the lower limit for the input temperature to ensure vapour or two-phase fluid state.
1658
1585
  *
1659
1586
  */
1660
- constructor(data: {
1661
- material: Entities.Material,
1662
- pressure: number
1663
- controller?: AbortController;
1664
- }) {
1587
+ constructor(data: { material: Entities.Material; pressure: number; controller?: AbortController }) {
1665
1588
  super(data.controller);
1666
1589
  this.material = data.material;
1667
1590
  this.pressure = data.pressure;
@@ -1671,7 +1594,7 @@ export class ReliefValveMinTemperatureCalculation extends CalculationBase {
1671
1594
  try {
1672
1595
  const request = new ReliefValveMinTemperatureCalculationRequest({
1673
1596
  material: this.material,
1674
- pressure: this.pressure
1597
+ pressure: this.pressure,
1675
1598
  });
1676
1599
 
1677
1600
  const schema = new ReliefValveMinTemperatureCalculationRequestSchema();
@@ -1712,16 +1635,16 @@ export class ReliefValveMinTemperatureCalculation extends CalculationBase {
1712
1635
  }
1713
1636
 
1714
1637
  toString() {
1715
- const parts = ["* ReliefValveMinTemperature"];
1638
+ const parts = ['* ReliefValveMinTemperature'];
1716
1639
 
1717
1640
  parts.push(`minTemperature: ${String(this.minTemperature)}`);
1718
1641
  parts.push(`resultCode: ${String(this.resultCode)}`);
1719
- parts.push("*** messages:");
1720
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
1721
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
1722
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
1642
+ parts.push('*** messages:');
1643
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
1644
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
1645
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
1723
1646
 
1724
- return parts.join("\n");
1647
+ return parts.join('\n');
1725
1648
  }
1726
1649
  }
1727
1650
 
@@ -1732,13 +1655,7 @@ export class ReliefValveMinTemperatureCalculationResponse extends CalculationRes
1732
1655
  * ReliefValveMinTemperature calculation response class.
1733
1656
  *
1734
1657
  */
1735
- constructor(data: {
1736
- minTemperature: number,
1737
- resultCode: Enums.ResultCode,
1738
- messages: string[],
1739
- calculationElapsedTime: number,
1740
- operationId: string
1741
- }) {
1658
+ constructor(data: { minTemperature: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
1742
1659
  super();
1743
1660
  this.minTemperature = data.minTemperature;
1744
1661
  this.resultCode = data.resultCode;
@@ -1748,20 +1665,20 @@ export class ReliefValveMinTemperatureCalculationResponse extends CalculationRes
1748
1665
  }
1749
1666
 
1750
1667
  initialiseFromDictionary(data: { [key: string]: unknown }) {
1751
- if (data.minTemperature !== undefined && typeof data.minTemperature === "number") {
1668
+ if (data.minTemperature !== undefined && typeof data.minTemperature === 'number') {
1752
1669
  this.minTemperature = data.minTemperature as number;
1753
1670
  }
1754
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
1671
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
1755
1672
  this.resultCode = data.resultCode as Enums.ResultCode;
1756
1673
  }
1757
1674
  this.messages = this.messages ?? [];
1758
1675
  if (data.messages && Array.isArray(data.messages)) {
1759
1676
  this.messages.push(...data.messages);
1760
1677
  }
1761
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
1678
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
1762
1679
  this.calculationElapsedTime = data.calculationElapsedTime as number;
1763
1680
  }
1764
- if (data.operationId !== undefined && typeof data.operationId === "string") {
1681
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
1765
1682
  this.operationId = data.operationId as string;
1766
1683
  }
1767
1684
  }
@@ -1792,14 +1709,14 @@ export class ReliefValveMinTemperatureCalculationResponseSchema {
1792
1709
  }).unknown(true);
1793
1710
 
1794
1711
  this.propertyTypes = {
1795
- minTemperature: "number",
1712
+ minTemperature: 'number',
1796
1713
  };
1797
1714
  }
1798
1715
 
1799
1716
  validate(data: ReliefValveMinTemperatureCalculationResponseSchemaData): ReliefValveMinTemperatureCalculationResponse {
1800
1717
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1801
1718
  if (error) {
1802
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1719
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1803
1720
  }
1804
1721
  return this.makeCalculationResponse(value);
1805
1722
  }
@@ -1820,9 +1737,7 @@ class SetMixingLayerHeightCalculationRequest extends CalculationRequestBase {
1820
1737
  * SetMixingLayerHeight calculation request class.
1821
1738
  *
1822
1739
  */
1823
- constructor(data: {
1824
- weather: Entities.Weather
1825
- }) {
1740
+ constructor(data: { weather: Entities.Weather }) {
1826
1741
  super();
1827
1742
  this.weather = data.weather;
1828
1743
  }
@@ -1841,14 +1756,14 @@ export class SetMixingLayerHeightCalculationRequestSchema {
1841
1756
  }).unknown(true);
1842
1757
 
1843
1758
  this.propertyTypes = {
1844
- weather: "Entities.Weather",
1759
+ weather: 'Entities.Weather',
1845
1760
  };
1846
1761
  }
1847
1762
 
1848
1763
  validate(data: SetMixingLayerHeightCalculationRequestSchemaData): SetMixingLayerHeightCalculationRequest {
1849
1764
  const { error, value } = this.schema.validate(data, { abortEarly: false });
1850
1765
  if (error) {
1851
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1766
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
1852
1767
  }
1853
1768
  return this.makeCalculationRequest(value);
1854
1769
  }
@@ -1866,10 +1781,7 @@ export class SetMixingLayerHeightCalculation extends CalculationBase {
1866
1781
  * Updates the mixing layer height in a weather according to the stability class,.
1867
1782
  *
1868
1783
  */
1869
- constructor(data: {
1870
- weather: Entities.Weather
1871
- controller?: AbortController;
1872
- }) {
1784
+ constructor(data: { weather: Entities.Weather; controller?: AbortController }) {
1873
1785
  super(data.controller);
1874
1786
  this.weather = data.weather;
1875
1787
  }
@@ -1877,7 +1789,7 @@ export class SetMixingLayerHeightCalculation extends CalculationBase {
1877
1789
  async run() {
1878
1790
  try {
1879
1791
  const request = new SetMixingLayerHeightCalculationRequest({
1880
- weather: this.weather
1792
+ weather: this.weather,
1881
1793
  });
1882
1794
 
1883
1795
  const schema = new SetMixingLayerHeightCalculationRequestSchema();
@@ -1918,16 +1830,16 @@ export class SetMixingLayerHeightCalculation extends CalculationBase {
1918
1830
  }
1919
1831
 
1920
1832
  toString() {
1921
- const parts = ["* SetMixingLayerHeight"];
1833
+ const parts = ['* SetMixingLayerHeight'];
1922
1834
 
1923
1835
  parts.push(`updatedWeather: ${String(this.updatedWeather)}`);
1924
1836
  parts.push(`resultCode: ${String(this.resultCode)}`);
1925
- parts.push("*** messages:");
1926
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
1927
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
1928
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
1837
+ parts.push('*** messages:');
1838
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
1839
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
1840
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
1929
1841
 
1930
- return parts.join("\n");
1842
+ return parts.join('\n');
1931
1843
  }
1932
1844
  }
1933
1845
 
@@ -1938,13 +1850,7 @@ export class SetMixingLayerHeightCalculationResponse extends CalculationResponse
1938
1850
  * SetMixingLayerHeight calculation response class.
1939
1851
  *
1940
1852
  */
1941
- constructor(data: {
1942
- updatedWeather: Entities.Weather,
1943
- resultCode: Enums.ResultCode,
1944
- messages: string[],
1945
- calculationElapsedTime: number,
1946
- operationId: string
1947
- }) {
1853
+ constructor(data: { updatedWeather: Entities.Weather; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
1948
1854
  super();
1949
1855
  this.updatedWeather = data.updatedWeather;
1950
1856
  this.resultCode = data.resultCode;
@@ -1958,17 +1864,17 @@ export class SetMixingLayerHeightCalculationResponse extends CalculationResponse
1958
1864
  this.updatedWeather = new Entities.Weather();
1959
1865
  this.updatedWeather.initialiseFromDictionary(data.updatedWeather as { [key: string]: unknown });
1960
1866
  }
1961
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
1867
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
1962
1868
  this.resultCode = data.resultCode as Enums.ResultCode;
1963
1869
  }
1964
1870
  this.messages = this.messages ?? [];
1965
1871
  if (data.messages && Array.isArray(data.messages)) {
1966
1872
  this.messages.push(...data.messages);
1967
1873
  }
1968
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
1874
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
1969
1875
  this.calculationElapsedTime = data.calculationElapsedTime as number;
1970
1876
  }
1971
- if (data.operationId !== undefined && typeof data.operationId === "string") {
1877
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
1972
1878
  this.operationId = data.operationId as string;
1973
1879
  }
1974
1880
  }
@@ -1999,14 +1905,14 @@ export class SetMixingLayerHeightCalculationResponseSchema {
1999
1905
  }).unknown(true);
2000
1906
 
2001
1907
  this.propertyTypes = {
2002
- updatedWeather: "Entities.Weather",
1908
+ updatedWeather: 'Entities.Weather',
2003
1909
  };
2004
1910
  }
2005
1911
 
2006
1912
  validate(data: SetMixingLayerHeightCalculationResponseSchemaData): SetMixingLayerHeightCalculationResponse {
2007
1913
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2008
1914
  if (error) {
2009
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1915
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2010
1916
  }
2011
1917
  return this.makeCalculationResponse(value);
2012
1918
  }
@@ -2031,11 +1937,7 @@ class SetPhaseToReleaseForLeakScenarioCalculationRequest extends CalculationRequ
2031
1937
  * SetPhaseToReleaseForLeakScenario calculation request class.
2032
1938
  *
2033
1939
  */
2034
- constructor(data: {
2035
- phaseToRelease: Enums.Phase,
2036
- releaseElevation: number,
2037
- vessel: Entities.Vessel
2038
- }) {
1940
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel }) {
2039
1941
  super();
2040
1942
  this.phaseToRelease = data.phaseToRelease;
2041
1943
  this.releaseElevation = data.releaseElevation;
@@ -2058,16 +1960,16 @@ export class SetPhaseToReleaseForLeakScenarioCalculationRequestSchema {
2058
1960
  }).unknown(true);
2059
1961
 
2060
1962
  this.propertyTypes = {
2061
- phaseToRelease: "Enums.Phase",
2062
- releaseElevation: "number",
2063
- vessel: "Entities.Vessel",
1963
+ phaseToRelease: 'Enums.Phase',
1964
+ releaseElevation: 'number',
1965
+ vessel: 'Entities.Vessel',
2064
1966
  };
2065
1967
  }
2066
1968
 
2067
1969
  validate(data: SetPhaseToReleaseForLeakScenarioCalculationRequestSchemaData): SetPhaseToReleaseForLeakScenarioCalculationRequest {
2068
1970
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2069
1971
  if (error) {
2070
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
1972
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2071
1973
  }
2072
1974
  return this.makeCalculationRequest(value);
2073
1975
  }
@@ -2088,12 +1990,7 @@ export class SetPhaseToReleaseForLeakScenarioCalculation extends CalculationBase
2088
1990
  * Calculates the hole height fraction and vessel z coordinate to release the requested phase (vapour or liquid).
2089
1991
  *
2090
1992
  */
2091
- constructor(data: {
2092
- phaseToRelease: Enums.Phase,
2093
- releaseElevation: number,
2094
- vessel: Entities.Vessel
2095
- controller?: AbortController;
2096
- }) {
1993
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel; controller?: AbortController }) {
2097
1994
  super(data.controller);
2098
1995
  this.phaseToRelease = data.phaseToRelease;
2099
1996
  this.releaseElevation = data.releaseElevation;
@@ -2105,7 +2002,7 @@ export class SetPhaseToReleaseForLeakScenarioCalculation extends CalculationBase
2105
2002
  const request = new SetPhaseToReleaseForLeakScenarioCalculationRequest({
2106
2003
  phaseToRelease: this.phaseToRelease,
2107
2004
  releaseElevation: this.releaseElevation,
2108
- vessel: this.vessel
2005
+ vessel: this.vessel,
2109
2006
  });
2110
2007
 
2111
2008
  const schema = new SetPhaseToReleaseForLeakScenarioCalculationRequestSchema();
@@ -2147,17 +2044,17 @@ export class SetPhaseToReleaseForLeakScenarioCalculation extends CalculationBase
2147
2044
  }
2148
2045
 
2149
2046
  toString() {
2150
- const parts = ["* SetPhaseToReleaseForLeakScenario"];
2047
+ const parts = ['* SetPhaseToReleaseForLeakScenario'];
2151
2048
 
2152
2049
  parts.push(`zCoordUpdated: ${String(this.zCoordUpdated)}`);
2153
2050
  parts.push(`holeHeightFractionUpdated: ${String(this.holeHeightFractionUpdated)}`);
2154
2051
  parts.push(`resultCode: ${String(this.resultCode)}`);
2155
- parts.push("*** messages:");
2156
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
2157
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
2158
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
2052
+ parts.push('*** messages:');
2053
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
2054
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
2055
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
2159
2056
 
2160
- return parts.join("\n");
2057
+ return parts.join('\n');
2161
2058
  }
2162
2059
  }
2163
2060
 
@@ -2169,14 +2066,7 @@ export class SetPhaseToReleaseForLeakScenarioCalculationResponse extends Calcula
2169
2066
  * SetPhaseToReleaseForLeakScenario calculation response class.
2170
2067
  *
2171
2068
  */
2172
- constructor(data: {
2173
- zCoordUpdated: number,
2174
- holeHeightFractionUpdated: number,
2175
- resultCode: Enums.ResultCode,
2176
- messages: string[],
2177
- calculationElapsedTime: number,
2178
- operationId: string
2179
- }) {
2069
+ constructor(data: { zCoordUpdated: number; holeHeightFractionUpdated: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
2180
2070
  super();
2181
2071
  this.zCoordUpdated = data.zCoordUpdated;
2182
2072
  this.holeHeightFractionUpdated = data.holeHeightFractionUpdated;
@@ -2187,23 +2077,23 @@ export class SetPhaseToReleaseForLeakScenarioCalculationResponse extends Calcula
2187
2077
  }
2188
2078
 
2189
2079
  initialiseFromDictionary(data: { [key: string]: unknown }) {
2190
- if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === "number") {
2080
+ if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === 'number') {
2191
2081
  this.zCoordUpdated = data.zCoordUpdated as number;
2192
2082
  }
2193
- if (data.holeHeightFractionUpdated !== undefined && typeof data.holeHeightFractionUpdated === "number") {
2083
+ if (data.holeHeightFractionUpdated !== undefined && typeof data.holeHeightFractionUpdated === 'number') {
2194
2084
  this.holeHeightFractionUpdated = data.holeHeightFractionUpdated as number;
2195
2085
  }
2196
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
2086
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
2197
2087
  this.resultCode = data.resultCode as Enums.ResultCode;
2198
2088
  }
2199
2089
  this.messages = this.messages ?? [];
2200
2090
  if (data.messages && Array.isArray(data.messages)) {
2201
2091
  this.messages.push(...data.messages);
2202
2092
  }
2203
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
2093
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
2204
2094
  this.calculationElapsedTime = data.calculationElapsedTime as number;
2205
2095
  }
2206
- if (data.operationId !== undefined && typeof data.operationId === "string") {
2096
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
2207
2097
  this.operationId = data.operationId as string;
2208
2098
  }
2209
2099
  }
@@ -2236,15 +2126,15 @@ export class SetPhaseToReleaseForLeakScenarioCalculationResponseSchema {
2236
2126
  }).unknown(true);
2237
2127
 
2238
2128
  this.propertyTypes = {
2239
- zCoordUpdated: "number",
2240
- holeHeightFractionUpdated: "number",
2129
+ zCoordUpdated: 'number',
2130
+ holeHeightFractionUpdated: 'number',
2241
2131
  };
2242
2132
  }
2243
2133
 
2244
2134
  validate(data: SetPhaseToReleaseForLeakScenarioCalculationResponseSchemaData): SetPhaseToReleaseForLeakScenarioCalculationResponse {
2245
2135
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2246
2136
  if (error) {
2247
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2137
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2248
2138
  }
2249
2139
  return this.makeCalculationResponse(value);
2250
2140
  }
@@ -2269,11 +2159,7 @@ class SetPhaseToReleaseForLineRuptureScenarioCalculationRequest extends Calculat
2269
2159
  * SetPhaseToReleaseForLineRuptureScenario calculation request class.
2270
2160
  *
2271
2161
  */
2272
- constructor(data: {
2273
- phaseToRelease: Enums.Phase,
2274
- releaseElevation: number,
2275
- vessel: Entities.Vessel
2276
- }) {
2162
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel }) {
2277
2163
  super();
2278
2164
  this.phaseToRelease = data.phaseToRelease;
2279
2165
  this.releaseElevation = data.releaseElevation;
@@ -2296,16 +2182,16 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchema {
2296
2182
  }).unknown(true);
2297
2183
 
2298
2184
  this.propertyTypes = {
2299
- phaseToRelease: "Enums.Phase",
2300
- releaseElevation: "number",
2301
- vessel: "Entities.Vessel",
2185
+ phaseToRelease: 'Enums.Phase',
2186
+ releaseElevation: 'number',
2187
+ vessel: 'Entities.Vessel',
2302
2188
  };
2303
2189
  }
2304
2190
 
2305
2191
  validate(data: SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchemaData): SetPhaseToReleaseForLineRuptureScenarioCalculationRequest {
2306
2192
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2307
2193
  if (error) {
2308
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2194
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2309
2195
  }
2310
2196
  return this.makeCalculationRequest(value);
2311
2197
  }
@@ -2326,12 +2212,7 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculation extends Calculat
2326
2212
  * Calculates the pipe height fraction and vessel z coordinate to release the requested phase (vapour or liquid).
2327
2213
  *
2328
2214
  */
2329
- constructor(data: {
2330
- phaseToRelease: Enums.Phase,
2331
- releaseElevation: number,
2332
- vessel: Entities.Vessel
2333
- controller?: AbortController;
2334
- }) {
2215
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel; controller?: AbortController }) {
2335
2216
  super(data.controller);
2336
2217
  this.phaseToRelease = data.phaseToRelease;
2337
2218
  this.releaseElevation = data.releaseElevation;
@@ -2343,7 +2224,7 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculation extends Calculat
2343
2224
  const request = new SetPhaseToReleaseForLineRuptureScenarioCalculationRequest({
2344
2225
  phaseToRelease: this.phaseToRelease,
2345
2226
  releaseElevation: this.releaseElevation,
2346
- vessel: this.vessel
2227
+ vessel: this.vessel,
2347
2228
  });
2348
2229
 
2349
2230
  const schema = new SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchema();
@@ -2385,17 +2266,17 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculation extends Calculat
2385
2266
  }
2386
2267
 
2387
2268
  toString() {
2388
- const parts = ["* SetPhaseToReleaseForLineRuptureScenario"];
2269
+ const parts = ['* SetPhaseToReleaseForLineRuptureScenario'];
2389
2270
 
2390
2271
  parts.push(`zCoordUpdated: ${String(this.zCoordUpdated)}`);
2391
2272
  parts.push(`pipeHeightFractionUpdated: ${String(this.pipeHeightFractionUpdated)}`);
2392
2273
  parts.push(`resultCode: ${String(this.resultCode)}`);
2393
- parts.push("*** messages:");
2394
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
2395
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
2396
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
2274
+ parts.push('*** messages:');
2275
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
2276
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
2277
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
2397
2278
 
2398
- return parts.join("\n");
2279
+ return parts.join('\n');
2399
2280
  }
2400
2281
  }
2401
2282
 
@@ -2407,14 +2288,7 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationResponse extends
2407
2288
  * SetPhaseToReleaseForLineRuptureScenario calculation response class.
2408
2289
  *
2409
2290
  */
2410
- constructor(data: {
2411
- zCoordUpdated: number,
2412
- pipeHeightFractionUpdated: number,
2413
- resultCode: Enums.ResultCode,
2414
- messages: string[],
2415
- calculationElapsedTime: number,
2416
- operationId: string
2417
- }) {
2291
+ constructor(data: { zCoordUpdated: number; pipeHeightFractionUpdated: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
2418
2292
  super();
2419
2293
  this.zCoordUpdated = data.zCoordUpdated;
2420
2294
  this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated;
@@ -2425,23 +2299,23 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationResponse extends
2425
2299
  }
2426
2300
 
2427
2301
  initialiseFromDictionary(data: { [key: string]: unknown }) {
2428
- if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === "number") {
2302
+ if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === 'number') {
2429
2303
  this.zCoordUpdated = data.zCoordUpdated as number;
2430
2304
  }
2431
- if (data.pipeHeightFractionUpdated !== undefined && typeof data.pipeHeightFractionUpdated === "number") {
2305
+ if (data.pipeHeightFractionUpdated !== undefined && typeof data.pipeHeightFractionUpdated === 'number') {
2432
2306
  this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated as number;
2433
2307
  }
2434
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
2308
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
2435
2309
  this.resultCode = data.resultCode as Enums.ResultCode;
2436
2310
  }
2437
2311
  this.messages = this.messages ?? [];
2438
2312
  if (data.messages && Array.isArray(data.messages)) {
2439
2313
  this.messages.push(...data.messages);
2440
2314
  }
2441
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
2315
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
2442
2316
  this.calculationElapsedTime = data.calculationElapsedTime as number;
2443
2317
  }
2444
- if (data.operationId !== undefined && typeof data.operationId === "string") {
2318
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
2445
2319
  this.operationId = data.operationId as string;
2446
2320
  }
2447
2321
  }
@@ -2474,15 +2348,15 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationResponseSchema {
2474
2348
  }).unknown(true);
2475
2349
 
2476
2350
  this.propertyTypes = {
2477
- zCoordUpdated: "number",
2478
- pipeHeightFractionUpdated: "number",
2351
+ zCoordUpdated: 'number',
2352
+ pipeHeightFractionUpdated: 'number',
2479
2353
  };
2480
2354
  }
2481
2355
 
2482
2356
  validate(data: SetPhaseToReleaseForLineRuptureScenarioCalculationResponseSchemaData): SetPhaseToReleaseForLineRuptureScenarioCalculationResponse {
2483
2357
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2484
2358
  if (error) {
2485
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2359
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2486
2360
  }
2487
2361
  return this.makeCalculationResponse(value);
2488
2362
  }
@@ -2507,11 +2381,7 @@ class SetPhaseToReleaseForReliefValveScenarioCalculationRequest extends Calculat
2507
2381
  * SetPhaseToReleaseForReliefValveScenario calculation request class.
2508
2382
  *
2509
2383
  */
2510
- constructor(data: {
2511
- phaseToRelease: Enums.Phase,
2512
- releaseElevation: number,
2513
- vessel: Entities.Vessel
2514
- }) {
2384
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel }) {
2515
2385
  super();
2516
2386
  this.phaseToRelease = data.phaseToRelease;
2517
2387
  this.releaseElevation = data.releaseElevation;
@@ -2534,16 +2404,16 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchema {
2534
2404
  }).unknown(true);
2535
2405
 
2536
2406
  this.propertyTypes = {
2537
- phaseToRelease: "Enums.Phase",
2538
- releaseElevation: "number",
2539
- vessel: "Entities.Vessel",
2407
+ phaseToRelease: 'Enums.Phase',
2408
+ releaseElevation: 'number',
2409
+ vessel: 'Entities.Vessel',
2540
2410
  };
2541
2411
  }
2542
2412
 
2543
2413
  validate(data: SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchemaData): SetPhaseToReleaseForReliefValveScenarioCalculationRequest {
2544
2414
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2545
2415
  if (error) {
2546
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2416
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2547
2417
  }
2548
2418
  return this.makeCalculationRequest(value);
2549
2419
  }
@@ -2564,12 +2434,7 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculation extends Calculat
2564
2434
  * Calculates the pipe height fraction and vessel z coordinate to release the requested phase.
2565
2435
  *
2566
2436
  */
2567
- constructor(data: {
2568
- phaseToRelease: Enums.Phase,
2569
- releaseElevation: number,
2570
- vessel: Entities.Vessel
2571
- controller?: AbortController;
2572
- }) {
2437
+ constructor(data: { phaseToRelease: Enums.Phase; releaseElevation: number; vessel: Entities.Vessel; controller?: AbortController }) {
2573
2438
  super(data.controller);
2574
2439
  this.phaseToRelease = data.phaseToRelease;
2575
2440
  this.releaseElevation = data.releaseElevation;
@@ -2581,7 +2446,7 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculation extends Calculat
2581
2446
  const request = new SetPhaseToReleaseForReliefValveScenarioCalculationRequest({
2582
2447
  phaseToRelease: this.phaseToRelease,
2583
2448
  releaseElevation: this.releaseElevation,
2584
- vessel: this.vessel
2449
+ vessel: this.vessel,
2585
2450
  });
2586
2451
 
2587
2452
  const schema = new SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchema();
@@ -2623,17 +2488,17 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculation extends Calculat
2623
2488
  }
2624
2489
 
2625
2490
  toString() {
2626
- const parts = ["* SetPhaseToReleaseForReliefValveScenario"];
2491
+ const parts = ['* SetPhaseToReleaseForReliefValveScenario'];
2627
2492
 
2628
2493
  parts.push(`zCoordUpdated: ${String(this.zCoordUpdated)}`);
2629
2494
  parts.push(`pipeHeightFractionUpdated: ${String(this.pipeHeightFractionUpdated)}`);
2630
2495
  parts.push(`resultCode: ${String(this.resultCode)}`);
2631
- parts.push("*** messages:");
2632
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
2633
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
2634
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
2496
+ parts.push('*** messages:');
2497
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
2498
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
2499
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
2635
2500
 
2636
- return parts.join("\n");
2501
+ return parts.join('\n');
2637
2502
  }
2638
2503
  }
2639
2504
 
@@ -2645,14 +2510,7 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationResponse extends
2645
2510
  * SetPhaseToReleaseForReliefValveScenario calculation response class.
2646
2511
  *
2647
2512
  */
2648
- constructor(data: {
2649
- zCoordUpdated: number,
2650
- pipeHeightFractionUpdated: number,
2651
- resultCode: Enums.ResultCode,
2652
- messages: string[],
2653
- calculationElapsedTime: number,
2654
- operationId: string
2655
- }) {
2513
+ constructor(data: { zCoordUpdated: number; pipeHeightFractionUpdated: number; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
2656
2514
  super();
2657
2515
  this.zCoordUpdated = data.zCoordUpdated;
2658
2516
  this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated;
@@ -2663,23 +2521,23 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationResponse extends
2663
2521
  }
2664
2522
 
2665
2523
  initialiseFromDictionary(data: { [key: string]: unknown }) {
2666
- if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === "number") {
2524
+ if (data.zCoordUpdated !== undefined && typeof data.zCoordUpdated === 'number') {
2667
2525
  this.zCoordUpdated = data.zCoordUpdated as number;
2668
2526
  }
2669
- if (data.pipeHeightFractionUpdated !== undefined && typeof data.pipeHeightFractionUpdated === "number") {
2527
+ if (data.pipeHeightFractionUpdated !== undefined && typeof data.pipeHeightFractionUpdated === 'number') {
2670
2528
  this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated as number;
2671
2529
  }
2672
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
2530
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
2673
2531
  this.resultCode = data.resultCode as Enums.ResultCode;
2674
2532
  }
2675
2533
  this.messages = this.messages ?? [];
2676
2534
  if (data.messages && Array.isArray(data.messages)) {
2677
2535
  this.messages.push(...data.messages);
2678
2536
  }
2679
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
2537
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
2680
2538
  this.calculationElapsedTime = data.calculationElapsedTime as number;
2681
2539
  }
2682
- if (data.operationId !== undefined && typeof data.operationId === "string") {
2540
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
2683
2541
  this.operationId = data.operationId as string;
2684
2542
  }
2685
2543
  }
@@ -2712,15 +2570,15 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationResponseSchema {
2712
2570
  }).unknown(true);
2713
2571
 
2714
2572
  this.propertyTypes = {
2715
- zCoordUpdated: "number",
2716
- pipeHeightFractionUpdated: "number",
2573
+ zCoordUpdated: 'number',
2574
+ pipeHeightFractionUpdated: 'number',
2717
2575
  };
2718
2576
  }
2719
2577
 
2720
2578
  validate(data: SetPhaseToReleaseForReliefValveScenarioCalculationResponseSchemaData): SetPhaseToReleaseForReliefValveScenarioCalculationResponse {
2721
2579
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2722
2580
  if (error) {
2723
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2581
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2724
2582
  }
2725
2583
  return this.makeCalculationResponse(value);
2726
2584
  }
@@ -2745,11 +2603,7 @@ class SetReleaseElevationForScenarioCalculationRequest extends CalculationReques
2745
2603
  * SetReleaseElevationForScenario calculation request class.
2746
2604
  *
2747
2605
  */
2748
- constructor(data: {
2749
- releaseElevation: number,
2750
- releaseHeightFraction: number,
2751
- vessel: Entities.Vessel
2752
- }) {
2606
+ constructor(data: { releaseElevation: number; releaseHeightFraction: number; vessel: Entities.Vessel }) {
2753
2607
  super();
2754
2608
  this.releaseElevation = data.releaseElevation;
2755
2609
  this.releaseHeightFraction = data.releaseHeightFraction;
@@ -2772,16 +2626,16 @@ export class SetReleaseElevationForScenarioCalculationRequestSchema {
2772
2626
  }).unknown(true);
2773
2627
 
2774
2628
  this.propertyTypes = {
2775
- releaseElevation: "number",
2776
- releaseHeightFraction: "number",
2777
- vessel: "Entities.Vessel",
2629
+ releaseElevation: 'number',
2630
+ releaseHeightFraction: 'number',
2631
+ vessel: 'Entities.Vessel',
2778
2632
  };
2779
2633
  }
2780
2634
 
2781
2635
  validate(data: SetReleaseElevationForScenarioCalculationRequestSchemaData): SetReleaseElevationForScenarioCalculationRequest {
2782
2636
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2783
2637
  if (error) {
2784
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2638
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2785
2639
  }
2786
2640
  return this.makeCalculationRequest(value);
2787
2641
  }
@@ -2801,12 +2655,7 @@ export class SetReleaseElevationForScenarioCalculation extends CalculationBase {
2801
2655
  * Calculates the vessel z coordinate to release at the requested elevation. The release elevation is the point above the ground from where the dispersion and downstream models start. This method sets the vessel defined by its dimensions and shape to be elevated at a particular height such as to guarantee that the discharge result height is at the requested elevation.
2802
2656
  *
2803
2657
  */
2804
- constructor(data: {
2805
- releaseElevation: number,
2806
- releaseHeightFraction: number,
2807
- vessel: Entities.Vessel
2808
- controller?: AbortController;
2809
- }) {
2658
+ constructor(data: { releaseElevation: number; releaseHeightFraction: number; vessel: Entities.Vessel; controller?: AbortController }) {
2810
2659
  super(data.controller);
2811
2660
  this.releaseElevation = data.releaseElevation;
2812
2661
  this.releaseHeightFraction = data.releaseHeightFraction;
@@ -2818,7 +2667,7 @@ export class SetReleaseElevationForScenarioCalculation extends CalculationBase {
2818
2667
  const request = new SetReleaseElevationForScenarioCalculationRequest({
2819
2668
  releaseElevation: this.releaseElevation,
2820
2669
  releaseHeightFraction: this.releaseHeightFraction,
2821
- vessel: this.vessel
2670
+ vessel: this.vessel,
2822
2671
  });
2823
2672
 
2824
2673
  const schema = new SetReleaseElevationForScenarioCalculationRequestSchema();
@@ -2859,16 +2708,16 @@ export class SetReleaseElevationForScenarioCalculation extends CalculationBase {
2859
2708
  }
2860
2709
 
2861
2710
  toString() {
2862
- const parts = ["* SetReleaseElevationForScenario"];
2711
+ const parts = ['* SetReleaseElevationForScenario'];
2863
2712
 
2864
2713
  parts.push(`updatedVessel: ${String(this.updatedVessel)}`);
2865
2714
  parts.push(`resultCode: ${String(this.resultCode)}`);
2866
- parts.push("*** messages:");
2867
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
2868
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
2869
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
2715
+ parts.push('*** messages:');
2716
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
2717
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
2718
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
2870
2719
 
2871
- return parts.join("\n");
2720
+ return parts.join('\n');
2872
2721
  }
2873
2722
  }
2874
2723
 
@@ -2879,13 +2728,7 @@ export class SetReleaseElevationForScenarioCalculationResponse extends Calculati
2879
2728
  * SetReleaseElevationForScenario calculation response class.
2880
2729
  *
2881
2730
  */
2882
- constructor(data: {
2883
- updatedVessel: Entities.Vessel,
2884
- resultCode: Enums.ResultCode,
2885
- messages: string[],
2886
- calculationElapsedTime: number,
2887
- operationId: string
2888
- }) {
2731
+ constructor(data: { updatedVessel: Entities.Vessel; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
2889
2732
  super();
2890
2733
  this.updatedVessel = data.updatedVessel;
2891
2734
  this.resultCode = data.resultCode;
@@ -2899,17 +2742,17 @@ export class SetReleaseElevationForScenarioCalculationResponse extends Calculati
2899
2742
  this.updatedVessel = new Entities.Vessel();
2900
2743
  this.updatedVessel.initialiseFromDictionary(data.updatedVessel as { [key: string]: unknown });
2901
2744
  }
2902
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
2745
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
2903
2746
  this.resultCode = data.resultCode as Enums.ResultCode;
2904
2747
  }
2905
2748
  this.messages = this.messages ?? [];
2906
2749
  if (data.messages && Array.isArray(data.messages)) {
2907
2750
  this.messages.push(...data.messages);
2908
2751
  }
2909
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
2752
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
2910
2753
  this.calculationElapsedTime = data.calculationElapsedTime as number;
2911
2754
  }
2912
- if (data.operationId !== undefined && typeof data.operationId === "string") {
2755
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
2913
2756
  this.operationId = data.operationId as string;
2914
2757
  }
2915
2758
  }
@@ -2940,14 +2783,14 @@ export class SetReleaseElevationForScenarioCalculationResponseSchema {
2940
2783
  }).unknown(true);
2941
2784
 
2942
2785
  this.propertyTypes = {
2943
- updatedVessel: "Entities.Vessel",
2786
+ updatedVessel: 'Entities.Vessel',
2944
2787
  };
2945
2788
  }
2946
2789
 
2947
2790
  validate(data: SetReleaseElevationForScenarioCalculationResponseSchemaData): SetReleaseElevationForScenarioCalculationResponse {
2948
2791
  const { error, value } = this.schema.validate(data, { abortEarly: false });
2949
2792
  if (error) {
2950
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
2793
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
2951
2794
  }
2952
2795
  return this.makeCalculationResponse(value);
2953
2796
  }