@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 FireballCalculationRequestSchemaData {
23
23
  material: Entities.Material;
@@ -41,12 +41,12 @@ class FireballCalculationRequest extends CalculationRequestBase {
41
41
  *
42
42
  */
43
43
  constructor(data: {
44
- material: Entities.Material,
45
- state: Entities.State,
46
- dischargeRecords: Entities.DischargeRecord[],
47
- dischargeRecordCount: number,
48
- dischargeResult: Entities.DischargeResult,
49
- weather: Entities.Weather
44
+ material: Entities.Material;
45
+ state: Entities.State;
46
+ dischargeRecords: Entities.DischargeRecord[];
47
+ dischargeRecordCount: number;
48
+ dischargeResult: Entities.DischargeResult;
49
+ weather: Entities.Weather;
50
50
  }) {
51
51
  super();
52
52
  this.material = data.material;
@@ -76,19 +76,19 @@ export class FireballCalculationRequestSchema {
76
76
  }).unknown(true);
77
77
 
78
78
  this.propertyTypes = {
79
- material: "Entities.Material",
80
- state: "Entities.State",
81
- dischargeRecords: "Entities.DischargeRecord[]",
82
- dischargeRecordCount: "number",
83
- dischargeResult: "Entities.DischargeResult",
84
- weather: "Entities.Weather",
79
+ material: 'Entities.Material',
80
+ state: 'Entities.State',
81
+ dischargeRecords: 'Entities.DischargeRecord[]',
82
+ dischargeRecordCount: 'number',
83
+ dischargeResult: 'Entities.DischargeResult',
84
+ weather: 'Entities.Weather',
85
85
  };
86
86
  }
87
87
 
88
88
  validate(data: FireballCalculationRequestSchemaData): FireballCalculationRequest {
89
89
  const { error, value } = this.schema.validate(data, { abortEarly: false });
90
90
  if (error) {
91
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
91
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
92
92
  }
93
93
  return this.makeCalculationRequest(value);
94
94
  }
@@ -113,12 +113,12 @@ export class FireballCalculation extends CalculationBase {
113
113
  *
114
114
  */
115
115
  constructor(data: {
116
- material: Entities.Material,
117
- state: Entities.State,
118
- dischargeRecords: Entities.DischargeRecord[],
119
- dischargeRecordCount: number,
120
- dischargeResult: Entities.DischargeResult,
121
- weather: Entities.Weather
116
+ material: Entities.Material;
117
+ state: Entities.State;
118
+ dischargeRecords: Entities.DischargeRecord[];
119
+ dischargeRecordCount: number;
120
+ dischargeResult: Entities.DischargeResult;
121
+ weather: Entities.Weather;
122
122
  controller?: AbortController;
123
123
  }) {
124
124
  super(data.controller);
@@ -138,7 +138,7 @@ export class FireballCalculation extends CalculationBase {
138
138
  dischargeRecords: this.dischargeRecords,
139
139
  dischargeRecordCount: this.dischargeRecordCount,
140
140
  dischargeResult: this.dischargeResult,
141
- weather: this.weather
141
+ weather: this.weather,
142
142
  });
143
143
 
144
144
  const schema = new FireballCalculationRequestSchema();
@@ -180,22 +180,18 @@ export class FireballCalculation extends CalculationBase {
180
180
  }
181
181
 
182
182
  toString() {
183
- const parts = ["* Fireball"];
183
+ const parts = ['* Fireball'];
184
184
 
185
185
  parts.push(`flameResult: ${String(this.flameResult)}`);
186
- parts.push("*** flameRecords:");
187
- parts.push(
188
- this.flameRecords && this.flameRecords.length > 0
189
- ? this.flameRecords.map((point) => `flameRecordsElement: ${point}`).join("\n")
190
- : "flameRecords does not contain any elements"
191
- );
186
+ parts.push('*** flameRecords:');
187
+ parts.push(this.flameRecords && this.flameRecords.length > 0 ? this.flameRecords.map((point) => `flameRecordsElement: ${point}`).join('\n') : 'flameRecords does not contain any elements');
192
188
  parts.push(`resultCode: ${String(this.resultCode)}`);
193
- parts.push("*** messages:");
194
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
195
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
196
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
189
+ parts.push('*** messages:');
190
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
191
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
192
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
197
193
 
198
- return parts.join("\n");
194
+ return parts.join('\n');
199
195
  }
200
196
  }
201
197
 
@@ -208,12 +204,12 @@ export class FireballCalculationResponse extends CalculationResponseBase {
208
204
  *
209
205
  */
210
206
  constructor(data: {
211
- flameResult: Entities.FlameResult,
212
- flameRecords: Entities.FlameRecord[],
213
- resultCode: Enums.ResultCode,
214
- messages: string[],
215
- calculationElapsedTime: number,
216
- operationId: string
207
+ flameResult: Entities.FlameResult;
208
+ flameRecords: Entities.FlameRecord[];
209
+ resultCode: Enums.ResultCode;
210
+ messages: string[];
211
+ calculationElapsedTime: number;
212
+ operationId: string;
217
213
  }) {
218
214
  super();
219
215
  this.flameResult = data.flameResult;
@@ -230,25 +226,23 @@ export class FireballCalculationResponse extends CalculationResponseBase {
230
226
  this.flameResult.initialiseFromDictionary(data.flameResult as { [key: string]: unknown });
231
227
  }
232
228
  if (data.flameRecords && Array.isArray(data.flameRecords)) {
233
- this.flameRecords = data.flameRecords.map(
234
- (item) => {
235
- const record = new Entities.FlameRecord();
236
- record.initialiseFromDictionary(item);
237
- return record;
238
- }
239
- );
229
+ this.flameRecords = data.flameRecords.map((item) => {
230
+ const record = new Entities.FlameRecord();
231
+ record.initialiseFromDictionary(item);
232
+ return record;
233
+ });
240
234
  }
241
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
235
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
242
236
  this.resultCode = data.resultCode as Enums.ResultCode;
243
237
  }
244
238
  this.messages = this.messages ?? [];
245
239
  if (data.messages && Array.isArray(data.messages)) {
246
240
  this.messages.push(...data.messages);
247
241
  }
248
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
242
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
249
243
  this.calculationElapsedTime = data.calculationElapsedTime as number;
250
244
  }
251
- if (data.operationId !== undefined && typeof data.operationId === "string") {
245
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
252
246
  this.operationId = data.operationId as string;
253
247
  }
254
248
  }
@@ -281,15 +275,15 @@ export class FireballCalculationResponseSchema {
281
275
  }).unknown(true);
282
276
 
283
277
  this.propertyTypes = {
284
- flameResult: "Entities.FlameResult",
285
- flameRecords: "Entities.FlameRecord[]",
278
+ flameResult: 'Entities.FlameResult',
279
+ flameRecords: 'Entities.FlameRecord[]',
286
280
  };
287
281
  }
288
282
 
289
283
  validate(data: FireballCalculationResponseSchemaData): FireballCalculationResponse {
290
284
  const { error, value } = this.schema.validate(data, { abortEarly: false });
291
285
  if (error) {
292
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
286
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
293
287
  }
294
288
  return this.makeCalculationResponse(value);
295
289
  }
@@ -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 JetFireCalculationRequestSchemaData {
23
23
  material: Entities.Material;
@@ -43,13 +43,13 @@ class JetFireCalculationRequest extends CalculationRequestBase {
43
43
  *
44
44
  */
45
45
  constructor(data: {
46
- material: Entities.Material,
47
- dischargeRecords: Entities.DischargeRecord[],
48
- dischargeRecordCount: number,
49
- dischargeResult: Entities.DischargeResult,
50
- weather: Entities.Weather,
51
- substrate: Entities.Substrate,
52
- flammableParameters: Entities.FlammableParameters
46
+ material: Entities.Material;
47
+ dischargeRecords: Entities.DischargeRecord[];
48
+ dischargeRecordCount: number;
49
+ dischargeResult: Entities.DischargeResult;
50
+ weather: Entities.Weather;
51
+ substrate: Entities.Substrate;
52
+ flammableParameters: Entities.FlammableParameters;
53
53
  }) {
54
54
  super();
55
55
  this.material = data.material;
@@ -81,20 +81,20 @@ export class JetFireCalculationRequestSchema {
81
81
  }).unknown(true);
82
82
 
83
83
  this.propertyTypes = {
84
- material: "Entities.Material",
85
- dischargeRecords: "Entities.DischargeRecord[]",
86
- dischargeRecordCount: "number",
87
- dischargeResult: "Entities.DischargeResult",
88
- weather: "Entities.Weather",
89
- substrate: "Entities.Substrate",
90
- flammableParameters: "Entities.FlammableParameters",
84
+ material: 'Entities.Material',
85
+ dischargeRecords: 'Entities.DischargeRecord[]',
86
+ dischargeRecordCount: 'number',
87
+ dischargeResult: 'Entities.DischargeResult',
88
+ weather: 'Entities.Weather',
89
+ substrate: 'Entities.Substrate',
90
+ flammableParameters: 'Entities.FlammableParameters',
91
91
  };
92
92
  }
93
93
 
94
94
  validate(data: JetFireCalculationRequestSchemaData): JetFireCalculationRequest {
95
95
  const { error, value } = this.schema.validate(data, { abortEarly: false });
96
96
  if (error) {
97
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
97
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
98
98
  }
99
99
  return this.makeCalculationRequest(value);
100
100
  }
@@ -122,13 +122,13 @@ initial constant discharge data provided.
122
122
  *
123
123
  */
124
124
  constructor(data: {
125
- material: Entities.Material,
126
- dischargeRecords: Entities.DischargeRecord[],
127
- dischargeRecordCount: number,
128
- dischargeResult: Entities.DischargeResult,
129
- weather: Entities.Weather,
130
- substrate: Entities.Substrate,
131
- flammableParameters: Entities.FlammableParameters
125
+ material: Entities.Material;
126
+ dischargeRecords: Entities.DischargeRecord[];
127
+ dischargeRecordCount: number;
128
+ dischargeResult: Entities.DischargeResult;
129
+ weather: Entities.Weather;
130
+ substrate: Entities.Substrate;
131
+ flammableParameters: Entities.FlammableParameters;
132
132
  controller?: AbortController;
133
133
  }) {
134
134
  super(data.controller);
@@ -150,7 +150,7 @@ initial constant discharge data provided.
150
150
  dischargeResult: this.dischargeResult,
151
151
  weather: this.weather,
152
152
  substrate: this.substrate,
153
- flammableParameters: this.flammableParameters
153
+ flammableParameters: this.flammableParameters,
154
154
  });
155
155
 
156
156
  const schema = new JetFireCalculationRequestSchema();
@@ -192,22 +192,18 @@ initial constant discharge data provided.
192
192
  }
193
193
 
194
194
  toString() {
195
- const parts = ["* JetFire"];
195
+ const parts = ['* JetFire'];
196
196
 
197
197
  parts.push(`flameResult: ${String(this.flameResult)}`);
198
- parts.push("*** flameRecords:");
199
- parts.push(
200
- this.flameRecords && this.flameRecords.length > 0
201
- ? this.flameRecords.map((point) => `flameRecordsElement: ${point}`).join("\n")
202
- : "flameRecords does not contain any elements"
203
- );
198
+ parts.push('*** flameRecords:');
199
+ parts.push(this.flameRecords && this.flameRecords.length > 0 ? this.flameRecords.map((point) => `flameRecordsElement: ${point}`).join('\n') : 'flameRecords does not contain any elements');
204
200
  parts.push(`resultCode: ${String(this.resultCode)}`);
205
- parts.push("*** messages:");
206
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
207
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
208
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
201
+ parts.push('*** messages:');
202
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
203
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
204
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
209
205
 
210
- return parts.join("\n");
206
+ return parts.join('\n');
211
207
  }
212
208
  }
213
209
 
@@ -220,12 +216,12 @@ export class JetFireCalculationResponse extends CalculationResponseBase {
220
216
  *
221
217
  */
222
218
  constructor(data: {
223
- flameResult: Entities.FlameResult,
224
- flameRecords: Entities.FlameRecord[],
225
- resultCode: Enums.ResultCode,
226
- messages: string[],
227
- calculationElapsedTime: number,
228
- operationId: string
219
+ flameResult: Entities.FlameResult;
220
+ flameRecords: Entities.FlameRecord[];
221
+ resultCode: Enums.ResultCode;
222
+ messages: string[];
223
+ calculationElapsedTime: number;
224
+ operationId: string;
229
225
  }) {
230
226
  super();
231
227
  this.flameResult = data.flameResult;
@@ -242,25 +238,23 @@ export class JetFireCalculationResponse extends CalculationResponseBase {
242
238
  this.flameResult.initialiseFromDictionary(data.flameResult as { [key: string]: unknown });
243
239
  }
244
240
  if (data.flameRecords && Array.isArray(data.flameRecords)) {
245
- this.flameRecords = data.flameRecords.map(
246
- (item) => {
247
- const record = new Entities.FlameRecord();
248
- record.initialiseFromDictionary(item);
249
- return record;
250
- }
251
- );
241
+ this.flameRecords = data.flameRecords.map((item) => {
242
+ const record = new Entities.FlameRecord();
243
+ record.initialiseFromDictionary(item);
244
+ return record;
245
+ });
252
246
  }
253
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
247
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
254
248
  this.resultCode = data.resultCode as Enums.ResultCode;
255
249
  }
256
250
  this.messages = this.messages ?? [];
257
251
  if (data.messages && Array.isArray(data.messages)) {
258
252
  this.messages.push(...data.messages);
259
253
  }
260
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
254
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
261
255
  this.calculationElapsedTime = data.calculationElapsedTime as number;
262
256
  }
263
- if (data.operationId !== undefined && typeof data.operationId === "string") {
257
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
264
258
  this.operationId = data.operationId as string;
265
259
  }
266
260
  }
@@ -293,15 +287,15 @@ export class JetFireCalculationResponseSchema {
293
287
  }).unknown(true);
294
288
 
295
289
  this.propertyTypes = {
296
- flameResult: "Entities.FlameResult",
297
- flameRecords: "Entities.FlameRecord[]",
290
+ flameResult: 'Entities.FlameResult',
291
+ flameRecords: 'Entities.FlameRecord[]',
298
292
  };
299
293
  }
300
294
 
301
295
  validate(data: JetFireCalculationResponseSchemaData): JetFireCalculationResponse {
302
296
  const { error, value } = this.schema.validate(data, { abortEarly: false });
303
297
  if (error) {
304
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
298
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
305
299
  }
306
300
  return this.makeCalculationResponse(value);
307
301
  }
@@ -331,11 +325,11 @@ class ModifyFuelRateForJetFireCalculationRequest extends CalculationRequestBase
331
325
  *
332
326
  */
333
327
  constructor(data: {
334
- dischargeRecords: Entities.DischargeRecord[],
335
- dischargeRecordCount: number,
336
- poolRecords: Entities.PoolRecord[],
337
- poolRecordCount: number,
338
- flammableParameters: Entities.FlammableParameters
328
+ dischargeRecords: Entities.DischargeRecord[];
329
+ dischargeRecordCount: number;
330
+ poolRecords: Entities.PoolRecord[];
331
+ poolRecordCount: number;
332
+ flammableParameters: Entities.FlammableParameters;
339
333
  }) {
340
334
  super();
341
335
  this.dischargeRecords = data.dischargeRecords;
@@ -363,18 +357,18 @@ export class ModifyFuelRateForJetFireCalculationRequestSchema {
363
357
  }).unknown(true);
364
358
 
365
359
  this.propertyTypes = {
366
- dischargeRecords: "Entities.DischargeRecord[]",
367
- dischargeRecordCount: "number",
368
- poolRecords: "Entities.PoolRecord[]",
369
- poolRecordCount: "number",
370
- flammableParameters: "Entities.FlammableParameters",
360
+ dischargeRecords: 'Entities.DischargeRecord[]',
361
+ dischargeRecordCount: 'number',
362
+ poolRecords: 'Entities.PoolRecord[]',
363
+ poolRecordCount: 'number',
364
+ flammableParameters: 'Entities.FlammableParameters',
371
365
  };
372
366
  }
373
367
 
374
368
  validate(data: ModifyFuelRateForJetFireCalculationRequestSchemaData): ModifyFuelRateForJetFireCalculationRequest {
375
369
  const { error, value } = this.schema.validate(data, { abortEarly: false });
376
370
  if (error) {
377
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
371
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
378
372
  }
379
373
  return this.makeCalculationRequest(value);
380
374
  }
@@ -402,11 +396,11 @@ adapted this to a rule set of 33%. Thus, this correction only applies for cases
402
396
  *
403
397
  */
404
398
  constructor(data: {
405
- dischargeRecords: Entities.DischargeRecord[],
406
- dischargeRecordCount: number,
407
- poolRecords: Entities.PoolRecord[],
408
- poolRecordCount: number,
409
- flammableParameters: Entities.FlammableParameters
399
+ dischargeRecords: Entities.DischargeRecord[];
400
+ dischargeRecordCount: number;
401
+ poolRecords: Entities.PoolRecord[];
402
+ poolRecordCount: number;
403
+ flammableParameters: Entities.FlammableParameters;
410
404
  controller?: AbortController;
411
405
  }) {
412
406
  super(data.controller);
@@ -424,7 +418,7 @@ adapted this to a rule set of 33%. Thus, this correction only applies for cases
424
418
  dischargeRecordCount: this.dischargeRecordCount,
425
419
  poolRecords: this.poolRecords,
426
420
  poolRecordCount: this.poolRecordCount,
427
- flammableParameters: this.flammableParameters
421
+ flammableParameters: this.flammableParameters,
428
422
  });
429
423
 
430
424
  const schema = new ModifyFuelRateForJetFireCalculationRequestSchema();
@@ -465,21 +459,21 @@ adapted this to a rule set of 33%. Thus, this correction only applies for cases
465
459
  }
466
460
 
467
461
  toString() {
468
- const parts = ["* ModifyFuelRateForJetFire"];
462
+ const parts = ['* ModifyFuelRateForJetFire'];
469
463
 
470
- parts.push("*** modDischargeRecords:");
464
+ parts.push('*** modDischargeRecords:');
471
465
  parts.push(
472
466
  this.modDischargeRecords && this.modDischargeRecords.length > 0
473
- ? this.modDischargeRecords.map((point) => `modDischargeRecordsElement: ${point}`).join("\n")
474
- : "modDischargeRecords does not contain any elements"
467
+ ? this.modDischargeRecords.map((point) => `modDischargeRecordsElement: ${point}`).join('\n')
468
+ : 'modDischargeRecords does not contain any elements',
475
469
  );
476
470
  parts.push(`resultCode: ${String(this.resultCode)}`);
477
- parts.push("*** messages:");
478
- parts.push(`messages: ${this.messages !== undefined ? this.messages : "(None)"}`);
479
- parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : "(None)"}`);
480
- parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : "(None)"}`);
471
+ parts.push('*** messages:');
472
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
473
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
474
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
481
475
 
482
- return parts.join("\n");
476
+ return parts.join('\n');
483
477
  }
484
478
  }
485
479
 
@@ -490,13 +484,7 @@ export class ModifyFuelRateForJetFireCalculationResponse extends CalculationResp
490
484
  * ModifyFuelRateForJetFire calculation response class.
491
485
  *
492
486
  */
493
- constructor(data: {
494
- modDischargeRecords: Entities.DischargeRecord[],
495
- resultCode: Enums.ResultCode,
496
- messages: string[],
497
- calculationElapsedTime: number,
498
- operationId: string
499
- }) {
487
+ constructor(data: { modDischargeRecords: Entities.DischargeRecord[]; resultCode: Enums.ResultCode; messages: string[]; calculationElapsedTime: number; operationId: string }) {
500
488
  super();
501
489
  this.modDischargeRecords = data.modDischargeRecords;
502
490
  this.resultCode = data.resultCode;
@@ -507,25 +495,23 @@ export class ModifyFuelRateForJetFireCalculationResponse extends CalculationResp
507
495
 
508
496
  initialiseFromDictionary(data: { [key: string]: unknown }) {
509
497
  if (data.modDischargeRecords && Array.isArray(data.modDischargeRecords)) {
510
- this.modDischargeRecords = data.modDischargeRecords.map(
511
- (item) => {
512
- const record = new Entities.DischargeRecord();
513
- record.initialiseFromDictionary(item);
514
- return record;
515
- }
516
- );
498
+ this.modDischargeRecords = data.modDischargeRecords.map((item) => {
499
+ const record = new Entities.DischargeRecord();
500
+ record.initialiseFromDictionary(item);
501
+ return record;
502
+ });
517
503
  }
518
- if (data.resultCode !== undefined && (typeof data.resultCode === "string" || typeof data.resultCode === "number")) {
504
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
519
505
  this.resultCode = data.resultCode as Enums.ResultCode;
520
506
  }
521
507
  this.messages = this.messages ?? [];
522
508
  if (data.messages && Array.isArray(data.messages)) {
523
509
  this.messages.push(...data.messages);
524
510
  }
525
- if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === "number") {
511
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
526
512
  this.calculationElapsedTime = data.calculationElapsedTime as number;
527
513
  }
528
- if (data.operationId !== undefined && typeof data.operationId === "string") {
514
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
529
515
  this.operationId = data.operationId as string;
530
516
  }
531
517
  }
@@ -556,14 +542,14 @@ export class ModifyFuelRateForJetFireCalculationResponseSchema {
556
542
  }).unknown(true);
557
543
 
558
544
  this.propertyTypes = {
559
- modDischargeRecords: "Entities.DischargeRecord[]",
545
+ modDischargeRecords: 'Entities.DischargeRecord[]',
560
546
  };
561
547
  }
562
548
 
563
549
  validate(data: ModifyFuelRateForJetFireCalculationResponseSchemaData): ModifyFuelRateForJetFireCalculationResponse {
564
550
  const { error, value } = this.schema.validate(data, { abortEarly: false });
565
551
  if (error) {
566
- throw new Error(`Validation error: ${error.details.map((x) => x.message).join(", ")}`);
552
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
567
553
  }
568
554
  return this.makeCalculationResponse(value);
569
555
  }