@ignos/api-client 20250320.0.11395-alpha → 20250320.0.11401

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.
@@ -600,6 +600,65 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
600
600
  this.http = http ? http : window;
601
601
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
602
602
  }
603
+ /**
604
+ * Get machine utilization data. Historic utilizations start from now, whereas the start for current utilization is
605
+ calculated based on startTimeToday or utcOffset. An UTC offset is
606
+ obtained either from startTimeToday, utcOffset or the server's local
607
+ time zone. The current utilization is calculated starting from the start of the current date offset from UTC
608
+ by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
609
+ client and server
610
+ * @param assetId (optional)
611
+ * @param favorites (optional)
612
+ * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
613
+ * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
614
+ */
615
+ getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset) {
616
+ let url_ = this.baseUrl + "/machineutilization?";
617
+ if (assetId !== undefined && assetId !== null)
618
+ url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
619
+ if (favorites === null)
620
+ throw new Error("The parameter 'favorites' cannot be null.");
621
+ else if (favorites !== undefined)
622
+ url_ += "favorites=" + encodeURIComponent("" + favorites) + "&";
623
+ if (startTimeToday !== undefined && startTimeToday !== null)
624
+ url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
625
+ if (utcOffset !== undefined && utcOffset !== null)
626
+ url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
627
+ url_ = url_.replace(/[?&]$/, "");
628
+ let options_ = {
629
+ method: "GET",
630
+ headers: {
631
+ "Accept": "application/json"
632
+ }
633
+ };
634
+ return this.transformOptions(options_).then(transformedOptions_ => {
635
+ return this.http.fetch(url_, transformedOptions_);
636
+ }).then((_response) => {
637
+ return this.processGetMachineUtilizations(_response);
638
+ });
639
+ }
640
+ processGetMachineUtilizations(response) {
641
+ const status = response.status;
642
+ let _headers = {};
643
+ if (response.headers && response.headers.forEach) {
644
+ response.headers.forEach((v, k) => _headers[k] = v);
645
+ }
646
+ ;
647
+ if (status === 200) {
648
+ return response.text().then((_responseText) => {
649
+ let result200 = null;
650
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
651
+ result200 = UtilizationListDto.fromJS(resultData200);
652
+ return result200;
653
+ });
654
+ }
655
+ else if (status !== 200 && status !== 204) {
656
+ return response.text().then((_responseText) => {
657
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
658
+ });
659
+ }
660
+ return Promise.resolve(null);
661
+ }
603
662
  getMachineUtilization(id, startTime, endTime) {
604
663
  let url_ = this.baseUrl + "/machineutilization/{id}?";
605
664
  if (id === undefined || id === null)
@@ -646,6 +705,55 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
646
705
  }
647
706
  return Promise.resolve(null);
648
707
  }
708
+ /**
709
+ * @param startTime (optional)
710
+ * @param endTime (optional)
711
+ * @deprecated
712
+ */
713
+ getUtilizationDetailsForMachine(id, startTime, endTime) {
714
+ let url_ = this.baseUrl + "/machineutilization/{id}/utilization?";
715
+ if (id === undefined || id === null)
716
+ throw new Error("The parameter 'id' must be defined.");
717
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
718
+ if (startTime !== undefined && startTime !== null)
719
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
720
+ if (endTime !== undefined && endTime !== null)
721
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
722
+ url_ = url_.replace(/[?&]$/, "");
723
+ let options_ = {
724
+ method: "GET",
725
+ headers: {
726
+ "Accept": "application/json"
727
+ }
728
+ };
729
+ return this.transformOptions(options_).then(transformedOptions_ => {
730
+ return this.http.fetch(url_, transformedOptions_);
731
+ }).then((_response) => {
732
+ return this.processGetUtilizationDetailsForMachine(_response);
733
+ });
734
+ }
735
+ processGetUtilizationDetailsForMachine(response) {
736
+ const status = response.status;
737
+ let _headers = {};
738
+ if (response.headers && response.headers.forEach) {
739
+ response.headers.forEach((v, k) => _headers[k] = v);
740
+ }
741
+ ;
742
+ if (status === 200) {
743
+ return response.text().then((_responseText) => {
744
+ let result200 = null;
745
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
746
+ result200 = MachineStatesSummaryDto.fromJS(resultData200);
747
+ return result200;
748
+ });
749
+ }
750
+ else if (status !== 200 && status !== 204) {
751
+ return response.text().then((_responseText) => {
752
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
753
+ });
754
+ }
755
+ return Promise.resolve(null);
756
+ }
649
757
  listMachineStates(id, startTime, endTime) {
650
758
  let url_ = this.baseUrl + "/machineutilization/{id}/machine-states?";
651
759
  if (id === undefined || id === null)
@@ -778,6 +886,90 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
778
886
  }
779
887
  return Promise.resolve(null);
780
888
  }
889
+ listPowerOnUtilizationDatapoints(id, externalId, nDays, startTime, endTime) {
890
+ let url_ = this.baseUrl + "/machineutilization/power-on/datapoints?";
891
+ if (id !== undefined && id !== null)
892
+ url_ += "id=" + encodeURIComponent("" + id) + "&";
893
+ if (externalId !== undefined && externalId !== null)
894
+ url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
895
+ if (nDays !== undefined && nDays !== null)
896
+ url_ += "nDays=" + encodeURIComponent("" + nDays) + "&";
897
+ if (startTime !== undefined && startTime !== null)
898
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
899
+ if (endTime !== undefined && endTime !== null)
900
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
901
+ url_ = url_.replace(/[?&]$/, "");
902
+ let options_ = {
903
+ method: "GET",
904
+ headers: {
905
+ "Accept": "application/json"
906
+ }
907
+ };
908
+ return this.transformOptions(options_).then(transformedOptions_ => {
909
+ return this.http.fetch(url_, transformedOptions_);
910
+ }).then((_response) => {
911
+ return this.processListPowerOnUtilizationDatapoints(_response);
912
+ });
913
+ }
914
+ processListPowerOnUtilizationDatapoints(response) {
915
+ const status = response.status;
916
+ let _headers = {};
917
+ if (response.headers && response.headers.forEach) {
918
+ response.headers.forEach((v, k) => _headers[k] = v);
919
+ }
920
+ ;
921
+ if (status === 200) {
922
+ return response.text().then((_responseText) => {
923
+ let result200 = null;
924
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
925
+ result200 = PowerOnUtilizationList.fromJS(resultData200);
926
+ return result200;
927
+ });
928
+ }
929
+ else if (status !== 200 && status !== 204) {
930
+ return response.text().then((_responseText) => {
931
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
932
+ });
933
+ }
934
+ return Promise.resolve(null);
935
+ }
936
+ getFactoryUtilization() {
937
+ let url_ = this.baseUrl + "/machineutilization/factory";
938
+ url_ = url_.replace(/[?&]$/, "");
939
+ let options_ = {
940
+ method: "GET",
941
+ headers: {
942
+ "Accept": "application/json"
943
+ }
944
+ };
945
+ return this.transformOptions(options_).then(transformedOptions_ => {
946
+ return this.http.fetch(url_, transformedOptions_);
947
+ }).then((_response) => {
948
+ return this.processGetFactoryUtilization(_response);
949
+ });
950
+ }
951
+ processGetFactoryUtilization(response) {
952
+ const status = response.status;
953
+ let _headers = {};
954
+ if (response.headers && response.headers.forEach) {
955
+ response.headers.forEach((v, k) => _headers[k] = v);
956
+ }
957
+ ;
958
+ if (status === 200) {
959
+ return response.text().then((_responseText) => {
960
+ let result200 = null;
961
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
962
+ result200 = PowerOnUtilizationDto.fromJS(resultData200);
963
+ return result200;
964
+ });
965
+ }
966
+ else if (status !== 200 && status !== 204) {
967
+ return response.text().then((_responseText) => {
968
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
969
+ });
970
+ }
971
+ return Promise.resolve(null);
972
+ }
781
973
  }
782
974
  export class MeClient extends AuthorizedApiBase {
783
975
  constructor(configuration, baseUrl, http) {
@@ -6548,6 +6740,120 @@ export class MachinesClient extends AuthorizedApiBase {
6548
6740
  }
6549
6741
  return Promise.resolve(null);
6550
6742
  }
6743
+ getMachineErpData(id) {
6744
+ let url_ = this.baseUrl + "/machines/{id}/erp";
6745
+ if (id === undefined || id === null)
6746
+ throw new Error("The parameter 'id' must be defined.");
6747
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
6748
+ url_ = url_.replace(/[?&]$/, "");
6749
+ let options_ = {
6750
+ method: "GET",
6751
+ headers: {
6752
+ "Accept": "application/json"
6753
+ }
6754
+ };
6755
+ return this.transformOptions(options_).then(transformedOptions_ => {
6756
+ return this.http.fetch(url_, transformedOptions_);
6757
+ }).then((_response) => {
6758
+ return this.processGetMachineErpData(_response);
6759
+ });
6760
+ }
6761
+ processGetMachineErpData(response) {
6762
+ const status = response.status;
6763
+ let _headers = {};
6764
+ if (response.headers && response.headers.forEach) {
6765
+ response.headers.forEach((v, k) => _headers[k] = v);
6766
+ }
6767
+ ;
6768
+ if (status === 200) {
6769
+ return response.text().then((_responseText) => {
6770
+ let result200 = null;
6771
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6772
+ result200 = MachineErpDataDto.fromJS(resultData200);
6773
+ return result200;
6774
+ });
6775
+ }
6776
+ else if (status !== 200 && status !== 204) {
6777
+ return response.text().then((_responseText) => {
6778
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6779
+ });
6780
+ }
6781
+ return Promise.resolve(null);
6782
+ }
6783
+ getMachineUtilizationSummary() {
6784
+ let url_ = this.baseUrl + "/machines/utilization/summary";
6785
+ url_ = url_.replace(/[?&]$/, "");
6786
+ let options_ = {
6787
+ method: "GET",
6788
+ headers: {
6789
+ "Accept": "application/json"
6790
+ }
6791
+ };
6792
+ return this.transformOptions(options_).then(transformedOptions_ => {
6793
+ return this.http.fetch(url_, transformedOptions_);
6794
+ }).then((_response) => {
6795
+ return this.processGetMachineUtilizationSummary(_response);
6796
+ });
6797
+ }
6798
+ processGetMachineUtilizationSummary(response) {
6799
+ const status = response.status;
6800
+ let _headers = {};
6801
+ if (response.headers && response.headers.forEach) {
6802
+ response.headers.forEach((v, k) => _headers[k] = v);
6803
+ }
6804
+ ;
6805
+ if (status === 200) {
6806
+ return response.text().then((_responseText) => {
6807
+ let result200 = null;
6808
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6809
+ result200 = UtilizationSummaryDto.fromJS(resultData200);
6810
+ return result200;
6811
+ });
6812
+ }
6813
+ else if (status !== 200 && status !== 204) {
6814
+ return response.text().then((_responseText) => {
6815
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6816
+ });
6817
+ }
6818
+ return Promise.resolve(null);
6819
+ }
6820
+ getCrossCompanyUtilizationSummary() {
6821
+ let url_ = this.baseUrl + "/machines/utilization/cross-company";
6822
+ url_ = url_.replace(/[?&]$/, "");
6823
+ let options_ = {
6824
+ method: "GET",
6825
+ headers: {
6826
+ "Accept": "application/json"
6827
+ }
6828
+ };
6829
+ return this.transformOptions(options_).then(transformedOptions_ => {
6830
+ return this.http.fetch(url_, transformedOptions_);
6831
+ }).then((_response) => {
6832
+ return this.processGetCrossCompanyUtilizationSummary(_response);
6833
+ });
6834
+ }
6835
+ processGetCrossCompanyUtilizationSummary(response) {
6836
+ const status = response.status;
6837
+ let _headers = {};
6838
+ if (response.headers && response.headers.forEach) {
6839
+ response.headers.forEach((v, k) => _headers[k] = v);
6840
+ }
6841
+ ;
6842
+ if (status === 200) {
6843
+ return response.text().then((_responseText) => {
6844
+ let result200 = null;
6845
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6846
+ result200 = CrossCompanyUtilizationSummaryDto.fromJS(resultData200);
6847
+ return result200;
6848
+ });
6849
+ }
6850
+ else if (status !== 200 && status !== 204) {
6851
+ return response.text().then((_responseText) => {
6852
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6853
+ });
6854
+ }
6855
+ return Promise.resolve(null);
6856
+ }
6551
6857
  listCurrentMachineOperators(machineExternalId, operatorNameQuery) {
6552
6858
  let url_ = this.baseUrl + "/machines/operators?";
6553
6859
  if (machineExternalId !== undefined && machineExternalId !== null)
@@ -20911,7 +21217,7 @@ export class ComponentSettingsDto {
20911
21217
  return data;
20912
21218
  }
20913
21219
  }
20914
- export class UtilizationDetailsDto {
21220
+ export class UtilizationListDto {
20915
21221
  constructor(data) {
20916
21222
  if (data) {
20917
21223
  for (var property in data) {
@@ -20922,32 +21228,70 @@ export class UtilizationDetailsDto {
20922
21228
  }
20923
21229
  init(_data) {
20924
21230
  if (_data) {
20925
- this.machineId = _data["machineId"];
20926
- this.machineName = _data["machineName"];
20927
- this.machineStateText = _data["machineStateText"];
21231
+ if (Array.isArray(_data["machines"])) {
21232
+ this.machines = [];
21233
+ for (let item of _data["machines"])
21234
+ this.machines.push(MachineUtilizationDto.fromJS(item));
21235
+ }
21236
+ }
21237
+ }
21238
+ static fromJS(data) {
21239
+ data = typeof data === 'object' ? data : {};
21240
+ let result = new UtilizationListDto();
21241
+ result.init(data);
21242
+ return result;
21243
+ }
21244
+ toJSON(data) {
21245
+ data = typeof data === 'object' ? data : {};
21246
+ if (Array.isArray(this.machines)) {
21247
+ data["machines"] = [];
21248
+ for (let item of this.machines)
21249
+ data["machines"].push(item.toJSON());
21250
+ }
21251
+ return data;
21252
+ }
21253
+ }
21254
+ export class MachineUtilizationDto {
21255
+ constructor(data) {
21256
+ if (data) {
21257
+ for (var property in data) {
21258
+ if (data.hasOwnProperty(property))
21259
+ this[property] = data[property];
21260
+ }
21261
+ }
21262
+ }
21263
+ init(_data) {
21264
+ if (_data) {
21265
+ this.assetId = _data["assetId"];
21266
+ this.name = _data["name"];
21267
+ this.description = _data["description"];
21268
+ this.state = _data["state"];
20928
21269
  this.machineState = _data["machineState"];
20929
21270
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
20930
- this.powerOnUtilization = _data["powerOnUtilization"];
21271
+ this.workorder = _data["workorder"] ? UtilizationWorkorderDto.fromJS(_data["workorder"]) : undefined;
21272
+ this.powerOn = _data["powerOn"] ? PowerOnUtilizationDto.fromJS(_data["powerOn"]) : undefined;
20931
21273
  }
20932
21274
  }
20933
21275
  static fromJS(data) {
20934
21276
  data = typeof data === 'object' ? data : {};
20935
- let result = new UtilizationDetailsDto();
21277
+ let result = new MachineUtilizationDto();
20936
21278
  result.init(data);
20937
21279
  return result;
20938
21280
  }
20939
21281
  toJSON(data) {
20940
21282
  data = typeof data === 'object' ? data : {};
20941
- data["machineId"] = this.machineId;
20942
- data["machineName"] = this.machineName;
20943
- data["machineStateText"] = this.machineStateText;
21283
+ data["assetId"] = this.assetId;
21284
+ data["name"] = this.name;
21285
+ data["description"] = this.description;
21286
+ data["state"] = this.state;
20944
21287
  data["machineState"] = this.machineState;
20945
21288
  data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
20946
- data["powerOnUtilization"] = this.powerOnUtilization;
21289
+ data["workorder"] = this.workorder ? this.workorder.toJSON() : undefined;
21290
+ data["powerOn"] = this.powerOn ? this.powerOn.toJSON() : undefined;
20947
21291
  return data;
20948
21292
  }
20949
21293
  }
20950
- export class MachineStateDatapoint {
21294
+ export class UtilizationWorkorderDto {
20951
21295
  constructor(data) {
20952
21296
  if (data) {
20953
21297
  for (var property in data) {
@@ -20955,44 +21299,136 @@ export class MachineStateDatapoint {
20955
21299
  this[property] = data[property];
20956
21300
  }
20957
21301
  }
20958
- if (!data) {
20959
- this.downtimePeriodReasons = [];
21302
+ }
21303
+ init(_data) {
21304
+ if (_data) {
21305
+ this.id = _data["id"];
21306
+ this.operation = _data["operation"];
21307
+ this.isSetup = _data["isSetup"];
21308
+ this.partNumber = _data["partNumber"];
21309
+ this.partName = _data["partName"];
21310
+ this.customer = _data["customer"] ? CustomerDto.fromJS(_data["customer"]) : undefined;
21311
+ this.customerOrder = _data["customerOrder"];
21312
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
21313
+ this.workorderUtilization = _data["workorderUtilization"];
21314
+ this.comparedToAverage = _data["comparedToAverage"];
21315
+ this.workorderDescription = _data["workorderDescription"];
21316
+ this.operationDescription = _data["operationDescription"];
21317
+ }
21318
+ }
21319
+ static fromJS(data) {
21320
+ data = typeof data === 'object' ? data : {};
21321
+ let result = new UtilizationWorkorderDto();
21322
+ result.init(data);
21323
+ return result;
21324
+ }
21325
+ toJSON(data) {
21326
+ data = typeof data === 'object' ? data : {};
21327
+ data["id"] = this.id;
21328
+ data["operation"] = this.operation;
21329
+ data["isSetup"] = this.isSetup;
21330
+ data["partNumber"] = this.partNumber;
21331
+ data["partName"] = this.partName;
21332
+ data["customer"] = this.customer ? this.customer.toJSON() : undefined;
21333
+ data["customerOrder"] = this.customerOrder;
21334
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
21335
+ data["workorderUtilization"] = this.workorderUtilization;
21336
+ data["comparedToAverage"] = this.comparedToAverage;
21337
+ data["workorderDescription"] = this.workorderDescription;
21338
+ data["operationDescription"] = this.operationDescription;
21339
+ return data;
21340
+ }
21341
+ }
21342
+ export class CustomerDto {
21343
+ constructor(data) {
21344
+ if (data) {
21345
+ for (var property in data) {
21346
+ if (data.hasOwnProperty(property))
21347
+ this[property] = data[property];
21348
+ }
20960
21349
  }
20961
21350
  }
20962
21351
  init(_data) {
20963
21352
  if (_data) {
20964
- this.machineStateText = _data["machineStateText"];
20965
- this.machineState = _data["machineState"];
20966
- this.timestamp = _data["timestamp"];
20967
- this.isDowntime = _data["isDowntime"];
20968
- if (Array.isArray(_data["downtimePeriodReasons"])) {
20969
- this.downtimePeriodReasons = [];
20970
- for (let item of _data["downtimePeriodReasons"])
20971
- this.downtimePeriodReasons.push(DowntimePeriodReasonDto.fromJS(item));
21353
+ this.id = _data["id"];
21354
+ this.name = _data["name"];
21355
+ this.groupId = _data["groupId"];
21356
+ this.groupName = _data["groupName"];
21357
+ }
21358
+ }
21359
+ static fromJS(data) {
21360
+ data = typeof data === 'object' ? data : {};
21361
+ let result = new CustomerDto();
21362
+ result.init(data);
21363
+ return result;
21364
+ }
21365
+ toJSON(data) {
21366
+ data = typeof data === 'object' ? data : {};
21367
+ data["id"] = this.id;
21368
+ data["name"] = this.name;
21369
+ data["groupId"] = this.groupId;
21370
+ data["groupName"] = this.groupName;
21371
+ return data;
21372
+ }
21373
+ }
21374
+ export class UtilizationAveragesDto {
21375
+ constructor(data) {
21376
+ if (data) {
21377
+ for (var property in data) {
21378
+ if (data.hasOwnProperty(property))
21379
+ this[property] = data[property];
20972
21380
  }
20973
21381
  }
20974
21382
  }
21383
+ init(_data) {
21384
+ if (_data) {
21385
+ this.averageUtilization90Days = _data["averageUtilization90Days"];
21386
+ this.averageUtilization30Days = _data["averageUtilization30Days"];
21387
+ this.averageUtilization7Days = _data["averageUtilization7Days"];
21388
+ this.averageUtilizationYearToDate = _data["averageUtilizationYearToDate"];
21389
+ }
21390
+ }
20975
21391
  static fromJS(data) {
20976
21392
  data = typeof data === 'object' ? data : {};
20977
- let result = new MachineStateDatapoint();
21393
+ let result = new UtilizationAveragesDto();
20978
21394
  result.init(data);
20979
21395
  return result;
20980
21396
  }
20981
21397
  toJSON(data) {
20982
21398
  data = typeof data === 'object' ? data : {};
20983
- data["machineStateText"] = this.machineStateText;
20984
- data["machineState"] = this.machineState;
20985
- data["timestamp"] = this.timestamp;
20986
- data["isDowntime"] = this.isDowntime;
20987
- if (Array.isArray(this.downtimePeriodReasons)) {
20988
- data["downtimePeriodReasons"] = [];
20989
- for (let item of this.downtimePeriodReasons)
20990
- data["downtimePeriodReasons"].push(item.toJSON());
21399
+ data["averageUtilization90Days"] = this.averageUtilization90Days;
21400
+ data["averageUtilization30Days"] = this.averageUtilization30Days;
21401
+ data["averageUtilization7Days"] = this.averageUtilization7Days;
21402
+ data["averageUtilizationYearToDate"] = this.averageUtilizationYearToDate;
21403
+ return data;
21404
+ }
21405
+ }
21406
+ export class PowerOnUtilizationDto extends UtilizationAveragesDto {
21407
+ constructor(data) {
21408
+ super(data);
21409
+ }
21410
+ init(_data) {
21411
+ super.init(_data);
21412
+ if (_data) {
21413
+ this.powerOnUtilization = _data["powerOnUtilization"];
21414
+ this.comparedToAverage = _data["comparedToAverage"];
20991
21415
  }
21416
+ }
21417
+ static fromJS(data) {
21418
+ data = typeof data === 'object' ? data : {};
21419
+ let result = new PowerOnUtilizationDto();
21420
+ result.init(data);
21421
+ return result;
21422
+ }
21423
+ toJSON(data) {
21424
+ data = typeof data === 'object' ? data : {};
21425
+ data["powerOnUtilization"] = this.powerOnUtilization;
21426
+ data["comparedToAverage"] = this.comparedToAverage;
21427
+ super.toJSON(data);
20992
21428
  return data;
20993
21429
  }
20994
21430
  }
20995
- export class DowntimePeriodReasonDto {
21431
+ export class UtilizationDetailsDto {
20996
21432
  constructor(data) {
20997
21433
  if (data) {
20998
21434
  for (var property in data) {
@@ -21003,34 +21439,28 @@ export class DowntimePeriodReasonDto {
21003
21439
  }
21004
21440
  init(_data) {
21005
21441
  if (_data) {
21006
- this.id = _data["id"];
21007
- this.reason = _data["reason"];
21008
- this.reasonType = _data["reasonType"];
21442
+ this.machineId = _data["machineId"];
21443
+ this.machineName = _data["machineName"];
21444
+ this.machineStateText = _data["machineStateText"];
21445
+ this.machineState = _data["machineState"];
21009
21446
  this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
21010
- this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
21011
- this.assetId = _data["assetId"];
21012
- this.comment = _data["comment"];
21013
- this.companyId = _data["companyId"];
21014
- this.reasonId = _data["reasonId"];
21447
+ this.powerOnUtilization = _data["powerOnUtilization"];
21015
21448
  }
21016
21449
  }
21017
21450
  static fromJS(data) {
21018
21451
  data = typeof data === 'object' ? data : {};
21019
- let result = new DowntimePeriodReasonDto();
21452
+ let result = new UtilizationDetailsDto();
21020
21453
  result.init(data);
21021
21454
  return result;
21022
21455
  }
21023
21456
  toJSON(data) {
21024
21457
  data = typeof data === 'object' ? data : {};
21025
- data["id"] = this.id;
21026
- data["reason"] = this.reason;
21027
- data["reasonType"] = this.reasonType;
21458
+ data["machineId"] = this.machineId;
21459
+ data["machineName"] = this.machineName;
21460
+ data["machineStateText"] = this.machineStateText;
21461
+ data["machineState"] = this.machineState;
21028
21462
  data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
21029
- data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
21030
- data["assetId"] = this.assetId;
21031
- data["comment"] = this.comment;
21032
- data["companyId"] = this.companyId;
21033
- data["reasonId"] = this.reasonId;
21463
+ data["powerOnUtilization"] = this.powerOnUtilization;
21034
21464
  return data;
21035
21465
  }
21036
21466
  }
@@ -21101,6 +21531,93 @@ export class StateDto {
21101
21531
  return data;
21102
21532
  }
21103
21533
  }
21534
+ export class MachineStateDatapoint {
21535
+ constructor(data) {
21536
+ if (data) {
21537
+ for (var property in data) {
21538
+ if (data.hasOwnProperty(property))
21539
+ this[property] = data[property];
21540
+ }
21541
+ }
21542
+ if (!data) {
21543
+ this.downtimePeriodReasons = [];
21544
+ }
21545
+ }
21546
+ init(_data) {
21547
+ if (_data) {
21548
+ this.machineStateText = _data["machineStateText"];
21549
+ this.machineState = _data["machineState"];
21550
+ this.timestamp = _data["timestamp"];
21551
+ this.isDowntime = _data["isDowntime"];
21552
+ if (Array.isArray(_data["downtimePeriodReasons"])) {
21553
+ this.downtimePeriodReasons = [];
21554
+ for (let item of _data["downtimePeriodReasons"])
21555
+ this.downtimePeriodReasons.push(DowntimePeriodReasonDto.fromJS(item));
21556
+ }
21557
+ }
21558
+ }
21559
+ static fromJS(data) {
21560
+ data = typeof data === 'object' ? data : {};
21561
+ let result = new MachineStateDatapoint();
21562
+ result.init(data);
21563
+ return result;
21564
+ }
21565
+ toJSON(data) {
21566
+ data = typeof data === 'object' ? data : {};
21567
+ data["machineStateText"] = this.machineStateText;
21568
+ data["machineState"] = this.machineState;
21569
+ data["timestamp"] = this.timestamp;
21570
+ data["isDowntime"] = this.isDowntime;
21571
+ if (Array.isArray(this.downtimePeriodReasons)) {
21572
+ data["downtimePeriodReasons"] = [];
21573
+ for (let item of this.downtimePeriodReasons)
21574
+ data["downtimePeriodReasons"].push(item.toJSON());
21575
+ }
21576
+ return data;
21577
+ }
21578
+ }
21579
+ export class DowntimePeriodReasonDto {
21580
+ constructor(data) {
21581
+ if (data) {
21582
+ for (var property in data) {
21583
+ if (data.hasOwnProperty(property))
21584
+ this[property] = data[property];
21585
+ }
21586
+ }
21587
+ }
21588
+ init(_data) {
21589
+ if (_data) {
21590
+ this.id = _data["id"];
21591
+ this.reason = _data["reason"];
21592
+ this.reasonType = _data["reasonType"];
21593
+ this.startTime = _data["startTime"] ? new Date(_data["startTime"].toString()) : undefined;
21594
+ this.endTime = _data["endTime"] ? new Date(_data["endTime"].toString()) : undefined;
21595
+ this.assetId = _data["assetId"];
21596
+ this.comment = _data["comment"];
21597
+ this.companyId = _data["companyId"];
21598
+ this.reasonId = _data["reasonId"];
21599
+ }
21600
+ }
21601
+ static fromJS(data) {
21602
+ data = typeof data === 'object' ? data : {};
21603
+ let result = new DowntimePeriodReasonDto();
21604
+ result.init(data);
21605
+ return result;
21606
+ }
21607
+ toJSON(data) {
21608
+ data = typeof data === 'object' ? data : {};
21609
+ data["id"] = this.id;
21610
+ data["reason"] = this.reason;
21611
+ data["reasonType"] = this.reasonType;
21612
+ data["startTime"] = this.startTime ? this.startTime.toISOString() : undefined;
21613
+ data["endTime"] = this.endTime ? this.endTime.toISOString() : undefined;
21614
+ data["assetId"] = this.assetId;
21615
+ data["comment"] = this.comment;
21616
+ data["companyId"] = this.companyId;
21617
+ data["reasonId"] = this.reasonId;
21618
+ return data;
21619
+ }
21620
+ }
21104
21621
  export class MachineUptimesAggregateDto {
21105
21622
  constructor(data) {
21106
21623
  if (data) {
@@ -21235,6 +21752,110 @@ export class ListMachineUptimesTodayRequest {
21235
21752
  return data;
21236
21753
  }
21237
21754
  }
21755
+ export class PowerOnUtilizationList {
21756
+ constructor(data) {
21757
+ if (data) {
21758
+ for (var property in data) {
21759
+ if (data.hasOwnProperty(property))
21760
+ this[property] = data[property];
21761
+ }
21762
+ }
21763
+ }
21764
+ init(_data) {
21765
+ if (_data) {
21766
+ if (Array.isArray(_data["machines"])) {
21767
+ this.machines = [];
21768
+ for (let item of _data["machines"])
21769
+ this.machines.push(Machine.fromJS(item));
21770
+ }
21771
+ }
21772
+ }
21773
+ static fromJS(data) {
21774
+ data = typeof data === 'object' ? data : {};
21775
+ let result = new PowerOnUtilizationList();
21776
+ result.init(data);
21777
+ return result;
21778
+ }
21779
+ toJSON(data) {
21780
+ data = typeof data === 'object' ? data : {};
21781
+ if (Array.isArray(this.machines)) {
21782
+ data["machines"] = [];
21783
+ for (let item of this.machines)
21784
+ data["machines"].push(item.toJSON());
21785
+ }
21786
+ return data;
21787
+ }
21788
+ }
21789
+ export class Machine {
21790
+ constructor(data) {
21791
+ if (data) {
21792
+ for (var property in data) {
21793
+ if (data.hasOwnProperty(property))
21794
+ this[property] = data[property];
21795
+ }
21796
+ }
21797
+ }
21798
+ init(_data) {
21799
+ if (_data) {
21800
+ this.externalId = _data["externalId"];
21801
+ this.id = _data["id"];
21802
+ this.name = _data["name"];
21803
+ this.description = _data["description"];
21804
+ if (Array.isArray(_data["datapoints"])) {
21805
+ this.datapoints = [];
21806
+ for (let item of _data["datapoints"])
21807
+ this.datapoints.push(NumericNullableValueWithTimestamp.fromJS(item));
21808
+ }
21809
+ }
21810
+ }
21811
+ static fromJS(data) {
21812
+ data = typeof data === 'object' ? data : {};
21813
+ let result = new Machine();
21814
+ result.init(data);
21815
+ return result;
21816
+ }
21817
+ toJSON(data) {
21818
+ data = typeof data === 'object' ? data : {};
21819
+ data["externalId"] = this.externalId;
21820
+ data["id"] = this.id;
21821
+ data["name"] = this.name;
21822
+ data["description"] = this.description;
21823
+ if (Array.isArray(this.datapoints)) {
21824
+ data["datapoints"] = [];
21825
+ for (let item of this.datapoints)
21826
+ data["datapoints"].push(item.toJSON());
21827
+ }
21828
+ return data;
21829
+ }
21830
+ }
21831
+ export class NumericNullableValueWithTimestamp {
21832
+ constructor(data) {
21833
+ if (data) {
21834
+ for (var property in data) {
21835
+ if (data.hasOwnProperty(property))
21836
+ this[property] = data[property];
21837
+ }
21838
+ }
21839
+ }
21840
+ init(_data) {
21841
+ if (_data) {
21842
+ this.timestamp = _data["timestamp"];
21843
+ this.value = _data["value"];
21844
+ }
21845
+ }
21846
+ static fromJS(data) {
21847
+ data = typeof data === 'object' ? data : {};
21848
+ let result = new NumericNullableValueWithTimestamp();
21849
+ result.init(data);
21850
+ return result;
21851
+ }
21852
+ toJSON(data) {
21853
+ data = typeof data === 'object' ? data : {};
21854
+ data["timestamp"] = this.timestamp;
21855
+ data["value"] = this.value;
21856
+ return data;
21857
+ }
21858
+ }
21238
21859
  export class UserAppDto {
21239
21860
  constructor(data) {
21240
21861
  if (data) {
@@ -22655,7 +23276,7 @@ export class CompanyUtilizationDto {
22655
23276
  }
22656
23277
  }
22657
23278
  if (!data) {
22658
- this.companyUtilization = new UtilizationDetailsDto2();
23279
+ this.companyUtilization = new UtilizationDetailsV2Dto();
22659
23280
  this.groups = [];
22660
23281
  this.ungroupedMachines = [];
22661
23282
  }
@@ -22663,16 +23284,16 @@ export class CompanyUtilizationDto {
22663
23284
  init(_data) {
22664
23285
  if (_data) {
22665
23286
  this.utilizationType = _data["utilizationType"];
22666
- this.companyUtilization = _data["companyUtilization"] ? UtilizationDetailsDto2.fromJS(_data["companyUtilization"]) : new UtilizationDetailsDto2();
23287
+ this.companyUtilization = _data["companyUtilization"] ? UtilizationDetailsV2Dto.fromJS(_data["companyUtilization"]) : new UtilizationDetailsV2Dto();
22667
23288
  if (Array.isArray(_data["groups"])) {
22668
23289
  this.groups = [];
22669
23290
  for (let item of _data["groups"])
22670
- this.groups.push(MachineGroupUtilizationDto.fromJS(item));
23291
+ this.groups.push(MachineGroupUtilizationV2Dto.fromJS(item));
22671
23292
  }
22672
23293
  if (Array.isArray(_data["ungroupedMachines"])) {
22673
23294
  this.ungroupedMachines = [];
22674
23295
  for (let item of _data["ungroupedMachines"])
22675
- this.ungroupedMachines.push(MachineUtilizationDto.fromJS(item));
23296
+ this.ungroupedMachines.push(MachineUtilizationV3Dto.fromJS(item));
22676
23297
  }
22677
23298
  }
22678
23299
  }
@@ -22699,7 +23320,7 @@ export class CompanyUtilizationDto {
22699
23320
  return data;
22700
23321
  }
22701
23322
  }
22702
- export class UtilizationDetailsDto2 {
23323
+ export class UtilizationDetailsV2Dto {
22703
23324
  constructor(data) {
22704
23325
  if (data) {
22705
23326
  for (var property in data) {
@@ -22721,7 +23342,7 @@ export class UtilizationDetailsDto2 {
22721
23342
  }
22722
23343
  static fromJS(data) {
22723
23344
  data = typeof data === 'object' ? data : {};
22724
- let result = new UtilizationDetailsDto2();
23345
+ let result = new UtilizationDetailsV2Dto();
22725
23346
  result.init(data);
22726
23347
  return result;
22727
23348
  }
@@ -22737,7 +23358,7 @@ export class UtilizationDetailsDto2 {
22737
23358
  return data;
22738
23359
  }
22739
23360
  }
22740
- export class MachineGroupUtilizationDto {
23361
+ export class MachineGroupUtilizationV2Dto {
22741
23362
  constructor(data) {
22742
23363
  if (data) {
22743
23364
  for (var property in data) {
@@ -22746,24 +23367,24 @@ export class MachineGroupUtilizationDto {
22746
23367
  }
22747
23368
  }
22748
23369
  if (!data) {
22749
- this.utilization = new UtilizationDetailsDto2();
23370
+ this.utilization = new UtilizationDetailsV2Dto();
22750
23371
  this.machines = [];
22751
23372
  }
22752
23373
  }
22753
23374
  init(_data) {
22754
23375
  if (_data) {
22755
23376
  this.name = _data["name"];
22756
- this.utilization = _data["utilization"] ? UtilizationDetailsDto2.fromJS(_data["utilization"]) : new UtilizationDetailsDto2();
23377
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
22757
23378
  if (Array.isArray(_data["machines"])) {
22758
23379
  this.machines = [];
22759
23380
  for (let item of _data["machines"])
22760
- this.machines.push(MachineUtilizationDto.fromJS(item));
23381
+ this.machines.push(MachineUtilizationV3Dto.fromJS(item));
22761
23382
  }
22762
23383
  }
22763
23384
  }
22764
23385
  static fromJS(data) {
22765
23386
  data = typeof data === 'object' ? data : {};
22766
- let result = new MachineGroupUtilizationDto();
23387
+ let result = new MachineGroupUtilizationV2Dto();
22767
23388
  result.init(data);
22768
23389
  return result;
22769
23390
  }
@@ -22779,7 +23400,7 @@ export class MachineGroupUtilizationDto {
22779
23400
  return data;
22780
23401
  }
22781
23402
  }
22782
- export class MachineUtilizationDto {
23403
+ export class MachineUtilizationV3Dto {
22783
23404
  constructor(data) {
22784
23405
  if (data) {
22785
23406
  for (var property in data) {
@@ -22788,7 +23409,7 @@ export class MachineUtilizationDto {
22788
23409
  }
22789
23410
  }
22790
23411
  if (!data) {
22791
- this.utilization = new UtilizationDetailsDto2();
23412
+ this.utilization = new UtilizationDetailsV2Dto();
22792
23413
  }
22793
23414
  }
22794
23415
  init(_data) {
@@ -22796,12 +23417,12 @@ export class MachineUtilizationDto {
22796
23417
  this.id = _data["id"];
22797
23418
  this.name = _data["name"];
22798
23419
  this.description = _data["description"];
22799
- this.utilization = _data["utilization"] ? UtilizationDetailsDto2.fromJS(_data["utilization"]) : new UtilizationDetailsDto2();
23420
+ this.utilization = _data["utilization"] ? UtilizationDetailsV2Dto.fromJS(_data["utilization"]) : new UtilizationDetailsV2Dto();
22800
23421
  }
22801
23422
  }
22802
23423
  static fromJS(data) {
22803
23424
  data = typeof data === 'object' ? data : {};
22804
- let result = new MachineUtilizationDto();
23425
+ let result = new MachineUtilizationV3Dto();
22805
23426
  result.init(data);
22806
23427
  return result;
22807
23428
  }
@@ -22823,14 +23444,14 @@ export class CrossCompanyUtilizationDto {
22823
23444
  }
22824
23445
  }
22825
23446
  if (!data) {
22826
- this.crossCompanyUtilization = new UtilizationDetailsDto2();
23447
+ this.crossCompanyUtilization = new UtilizationDetailsV2Dto();
22827
23448
  this.companies = [];
22828
23449
  }
22829
23450
  }
22830
23451
  init(_data) {
22831
23452
  if (_data) {
22832
23453
  this.utilizationType = _data["utilizationType"];
22833
- this.crossCompanyUtilization = _data["crossCompanyUtilization"] ? UtilizationDetailsDto2.fromJS(_data["crossCompanyUtilization"]) : new UtilizationDetailsDto2();
23454
+ this.crossCompanyUtilization = _data["crossCompanyUtilization"] ? UtilizationDetailsV2Dto.fromJS(_data["crossCompanyUtilization"]) : new UtilizationDetailsV2Dto();
22834
23455
  if (Array.isArray(_data["companies"])) {
22835
23456
  this.companies = [];
22836
23457
  for (let item of _data["companies"])
@@ -22964,34 +23585,6 @@ export class MachineUtilizationDatapointListDto extends UtilizationDatapointList
22964
23585
  return data;
22965
23586
  }
22966
23587
  }
22967
- export class NumericNullableValueWithTimestamp {
22968
- constructor(data) {
22969
- if (data) {
22970
- for (var property in data) {
22971
- if (data.hasOwnProperty(property))
22972
- this[property] = data[property];
22973
- }
22974
- }
22975
- }
22976
- init(_data) {
22977
- if (_data) {
22978
- this.timestamp = _data["timestamp"];
22979
- this.value = _data["value"];
22980
- }
22981
- }
22982
- static fromJS(data) {
22983
- data = typeof data === 'object' ? data : {};
22984
- let result = new NumericNullableValueWithTimestamp();
22985
- result.init(data);
22986
- return result;
22987
- }
22988
- toJSON(data) {
22989
- data = typeof data === 'object' ? data : {};
22990
- data["timestamp"] = this.timestamp;
22991
- data["value"] = this.value;
22992
- return data;
22993
- }
22994
- }
22995
23588
  export class CompanyUtilizationDatapointListDto extends UtilizationDatapointListDto {
22996
23589
  constructor(data) {
22997
23590
  super(data);
@@ -27870,6 +28463,372 @@ export class WorkOrderProjectDto {
27870
28463
  return data;
27871
28464
  }
27872
28465
  }
28466
+ export class UtilizationSummaryDto {
28467
+ constructor(data) {
28468
+ if (data) {
28469
+ for (var property in data) {
28470
+ if (data.hasOwnProperty(property))
28471
+ this[property] = data[property];
28472
+ }
28473
+ }
28474
+ if (!data) {
28475
+ this.factory = new FactoryUtilizationDto();
28476
+ this.groups = [];
28477
+ this.ungroupedMachines = [];
28478
+ }
28479
+ }
28480
+ init(_data) {
28481
+ if (_data) {
28482
+ this.factory = _data["factory"] ? FactoryUtilizationDto.fromJS(_data["factory"]) : new FactoryUtilizationDto();
28483
+ if (Array.isArray(_data["groups"])) {
28484
+ this.groups = [];
28485
+ for (let item of _data["groups"])
28486
+ this.groups.push(MachineGroupUtilizationDto.fromJS(item));
28487
+ }
28488
+ if (Array.isArray(_data["ungroupedMachines"])) {
28489
+ this.ungroupedMachines = [];
28490
+ for (let item of _data["ungroupedMachines"])
28491
+ this.ungroupedMachines.push(MachineUtilizationV2Dto.fromJS(item));
28492
+ }
28493
+ }
28494
+ }
28495
+ static fromJS(data) {
28496
+ data = typeof data === 'object' ? data : {};
28497
+ let result = new UtilizationSummaryDto();
28498
+ result.init(data);
28499
+ return result;
28500
+ }
28501
+ toJSON(data) {
28502
+ data = typeof data === 'object' ? data : {};
28503
+ data["factory"] = this.factory ? this.factory.toJSON() : undefined;
28504
+ if (Array.isArray(this.groups)) {
28505
+ data["groups"] = [];
28506
+ for (let item of this.groups)
28507
+ data["groups"].push(item.toJSON());
28508
+ }
28509
+ if (Array.isArray(this.ungroupedMachines)) {
28510
+ data["ungroupedMachines"] = [];
28511
+ for (let item of this.ungroupedMachines)
28512
+ data["ungroupedMachines"].push(item.toJSON());
28513
+ }
28514
+ return data;
28515
+ }
28516
+ }
28517
+ export class FactoryUtilizationDto {
28518
+ constructor(data) {
28519
+ if (data) {
28520
+ for (var property in data) {
28521
+ if (data.hasOwnProperty(property))
28522
+ this[property] = data[property];
28523
+ }
28524
+ }
28525
+ if (!data) {
28526
+ this.utilization = new UtilizationDto();
28527
+ }
28528
+ }
28529
+ init(_data) {
28530
+ if (_data) {
28531
+ this.utilization = _data["utilization"] ? UtilizationDto.fromJS(_data["utilization"]) : new UtilizationDto();
28532
+ }
28533
+ }
28534
+ static fromJS(data) {
28535
+ data = typeof data === 'object' ? data : {};
28536
+ let result = new FactoryUtilizationDto();
28537
+ result.init(data);
28538
+ return result;
28539
+ }
28540
+ toJSON(data) {
28541
+ data = typeof data === 'object' ? data : {};
28542
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : undefined;
28543
+ return data;
28544
+ }
28545
+ }
28546
+ export class UtilizationDto {
28547
+ constructor(data) {
28548
+ if (data) {
28549
+ for (var property in data) {
28550
+ if (data.hasOwnProperty(property))
28551
+ this[property] = data[property];
28552
+ }
28553
+ }
28554
+ if (!data) {
28555
+ this.powerOn = new PowerOnUtilizationV2Dto();
28556
+ this.uptimeDowntimes = new UptimeDowntimesDto();
28557
+ this.twentyFourSeven = new TwentyFourSevenUtilizationDto();
28558
+ }
28559
+ }
28560
+ init(_data) {
28561
+ if (_data) {
28562
+ this.powerOn = _data["powerOn"] ? PowerOnUtilizationV2Dto.fromJS(_data["powerOn"]) : new PowerOnUtilizationV2Dto();
28563
+ this.uptimeDowntimes = _data["uptimeDowntimes"] ? UptimeDowntimesDto.fromJS(_data["uptimeDowntimes"]) : new UptimeDowntimesDto();
28564
+ this.twentyFourSeven = _data["twentyFourSeven"] ? TwentyFourSevenUtilizationDto.fromJS(_data["twentyFourSeven"]) : new TwentyFourSevenUtilizationDto();
28565
+ }
28566
+ }
28567
+ static fromJS(data) {
28568
+ data = typeof data === 'object' ? data : {};
28569
+ let result = new UtilizationDto();
28570
+ result.init(data);
28571
+ return result;
28572
+ }
28573
+ toJSON(data) {
28574
+ data = typeof data === 'object' ? data : {};
28575
+ data["powerOn"] = this.powerOn ? this.powerOn.toJSON() : undefined;
28576
+ data["uptimeDowntimes"] = this.uptimeDowntimes ? this.uptimeDowntimes.toJSON() : undefined;
28577
+ data["twentyFourSeven"] = this.twentyFourSeven ? this.twentyFourSeven.toJSON() : undefined;
28578
+ return data;
28579
+ }
28580
+ }
28581
+ export class PowerOnUtilizationV2Dto {
28582
+ constructor(data) {
28583
+ if (data) {
28584
+ for (var property in data) {
28585
+ if (data.hasOwnProperty(property))
28586
+ this[property] = data[property];
28587
+ }
28588
+ }
28589
+ }
28590
+ init(_data) {
28591
+ if (_data) {
28592
+ this.today = _data["today"];
28593
+ this.sevenDays = _data["sevenDays"];
28594
+ this.thirtyDays = _data["thirtyDays"];
28595
+ this.ninetyDays = _data["ninetyDays"];
28596
+ this.yearToDate = _data["yearToDate"];
28597
+ }
28598
+ }
28599
+ static fromJS(data) {
28600
+ data = typeof data === 'object' ? data : {};
28601
+ let result = new PowerOnUtilizationV2Dto();
28602
+ result.init(data);
28603
+ return result;
28604
+ }
28605
+ toJSON(data) {
28606
+ data = typeof data === 'object' ? data : {};
28607
+ data["today"] = this.today;
28608
+ data["sevenDays"] = this.sevenDays;
28609
+ data["thirtyDays"] = this.thirtyDays;
28610
+ data["ninetyDays"] = this.ninetyDays;
28611
+ data["yearToDate"] = this.yearToDate;
28612
+ return data;
28613
+ }
28614
+ }
28615
+ export class UptimeDowntimesDto {
28616
+ constructor(data) {
28617
+ if (data) {
28618
+ for (var property in data) {
28619
+ if (data.hasOwnProperty(property))
28620
+ this[property] = data[property];
28621
+ }
28622
+ }
28623
+ }
28624
+ init(_data) {
28625
+ if (_data) {
28626
+ this.today = _data["today"] ? UptimeDowntimeDto.fromJS(_data["today"]) : undefined;
28627
+ this.sevenDays = _data["sevenDays"] ? UptimeDowntimeDto.fromJS(_data["sevenDays"]) : undefined;
28628
+ this.thirtyDays = _data["thirtyDays"] ? UptimeDowntimeDto.fromJS(_data["thirtyDays"]) : undefined;
28629
+ this.ninetyDays = _data["ninetyDays"] ? UptimeDowntimeDto.fromJS(_data["ninetyDays"]) : undefined;
28630
+ this.yearToDate = _data["yearToDate"] ? UptimeDowntimeDto.fromJS(_data["yearToDate"]) : undefined;
28631
+ this.total = _data["total"] ? UptimeDowntimeDto.fromJS(_data["total"]) : undefined;
28632
+ }
28633
+ }
28634
+ static fromJS(data) {
28635
+ data = typeof data === 'object' ? data : {};
28636
+ let result = new UptimeDowntimesDto();
28637
+ result.init(data);
28638
+ return result;
28639
+ }
28640
+ toJSON(data) {
28641
+ data = typeof data === 'object' ? data : {};
28642
+ data["today"] = this.today ? this.today.toJSON() : undefined;
28643
+ data["sevenDays"] = this.sevenDays ? this.sevenDays.toJSON() : undefined;
28644
+ data["thirtyDays"] = this.thirtyDays ? this.thirtyDays.toJSON() : undefined;
28645
+ data["ninetyDays"] = this.ninetyDays ? this.ninetyDays.toJSON() : undefined;
28646
+ data["yearToDate"] = this.yearToDate ? this.yearToDate.toJSON() : undefined;
28647
+ data["total"] = this.total ? this.total.toJSON() : undefined;
28648
+ return data;
28649
+ }
28650
+ }
28651
+ export class UptimeDowntimeDto {
28652
+ constructor(data) {
28653
+ if (data) {
28654
+ for (var property in data) {
28655
+ if (data.hasOwnProperty(property))
28656
+ this[property] = data[property];
28657
+ }
28658
+ }
28659
+ }
28660
+ init(_data) {
28661
+ if (_data) {
28662
+ this.uptimeInSeconds = _data["uptimeInSeconds"];
28663
+ this.downtimeInSeconds = _data["downtimeInSeconds"];
28664
+ this.powerOnTimeInSeconds = _data["powerOnTimeInSeconds"];
28665
+ this.twentyFourSevenTimeInSeconds = _data["twentyFourSevenTimeInSeconds"];
28666
+ }
28667
+ }
28668
+ static fromJS(data) {
28669
+ data = typeof data === 'object' ? data : {};
28670
+ let result = new UptimeDowntimeDto();
28671
+ result.init(data);
28672
+ return result;
28673
+ }
28674
+ toJSON(data) {
28675
+ data = typeof data === 'object' ? data : {};
28676
+ data["uptimeInSeconds"] = this.uptimeInSeconds;
28677
+ data["downtimeInSeconds"] = this.downtimeInSeconds;
28678
+ data["powerOnTimeInSeconds"] = this.powerOnTimeInSeconds;
28679
+ data["twentyFourSevenTimeInSeconds"] = this.twentyFourSevenTimeInSeconds;
28680
+ return data;
28681
+ }
28682
+ }
28683
+ export class TwentyFourSevenUtilizationDto {
28684
+ constructor(data) {
28685
+ if (data) {
28686
+ for (var property in data) {
28687
+ if (data.hasOwnProperty(property))
28688
+ this[property] = data[property];
28689
+ }
28690
+ }
28691
+ }
28692
+ init(_data) {
28693
+ if (_data) {
28694
+ this.sevenDays = _data["sevenDays"];
28695
+ this.thirtyDays = _data["thirtyDays"];
28696
+ this.ninetyDays = _data["ninetyDays"];
28697
+ this.yearToDate = _data["yearToDate"];
28698
+ }
28699
+ }
28700
+ static fromJS(data) {
28701
+ data = typeof data === 'object' ? data : {};
28702
+ let result = new TwentyFourSevenUtilizationDto();
28703
+ result.init(data);
28704
+ return result;
28705
+ }
28706
+ toJSON(data) {
28707
+ data = typeof data === 'object' ? data : {};
28708
+ data["sevenDays"] = this.sevenDays;
28709
+ data["thirtyDays"] = this.thirtyDays;
28710
+ data["ninetyDays"] = this.ninetyDays;
28711
+ data["yearToDate"] = this.yearToDate;
28712
+ return data;
28713
+ }
28714
+ }
28715
+ export class MachineGroupUtilizationDto {
28716
+ constructor(data) {
28717
+ if (data) {
28718
+ for (var property in data) {
28719
+ if (data.hasOwnProperty(property))
28720
+ this[property] = data[property];
28721
+ }
28722
+ }
28723
+ if (!data) {
28724
+ this.utilization = new UtilizationDto();
28725
+ this.machines = [];
28726
+ }
28727
+ }
28728
+ init(_data) {
28729
+ if (_data) {
28730
+ this.name = _data["name"];
28731
+ this.utilization = _data["utilization"] ? UtilizationDto.fromJS(_data["utilization"]) : new UtilizationDto();
28732
+ if (Array.isArray(_data["machines"])) {
28733
+ this.machines = [];
28734
+ for (let item of _data["machines"])
28735
+ this.machines.push(MachineUtilizationV2Dto.fromJS(item));
28736
+ }
28737
+ }
28738
+ }
28739
+ static fromJS(data) {
28740
+ data = typeof data === 'object' ? data : {};
28741
+ let result = new MachineGroupUtilizationDto();
28742
+ result.init(data);
28743
+ return result;
28744
+ }
28745
+ toJSON(data) {
28746
+ data = typeof data === 'object' ? data : {};
28747
+ data["name"] = this.name;
28748
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : undefined;
28749
+ if (Array.isArray(this.machines)) {
28750
+ data["machines"] = [];
28751
+ for (let item of this.machines)
28752
+ data["machines"].push(item.toJSON());
28753
+ }
28754
+ return data;
28755
+ }
28756
+ }
28757
+ export class MachineUtilizationV2Dto {
28758
+ constructor(data) {
28759
+ if (data) {
28760
+ for (var property in data) {
28761
+ if (data.hasOwnProperty(property))
28762
+ this[property] = data[property];
28763
+ }
28764
+ }
28765
+ if (!data) {
28766
+ this.utilization = new UtilizationDto();
28767
+ }
28768
+ }
28769
+ init(_data) {
28770
+ if (_data) {
28771
+ this.id = _data["id"];
28772
+ this.name = _data["name"];
28773
+ this.description = _data["description"];
28774
+ this.utilization = _data["utilization"] ? UtilizationDto.fromJS(_data["utilization"]) : new UtilizationDto();
28775
+ }
28776
+ }
28777
+ static fromJS(data) {
28778
+ data = typeof data === 'object' ? data : {};
28779
+ let result = new MachineUtilizationV2Dto();
28780
+ result.init(data);
28781
+ return result;
28782
+ }
28783
+ toJSON(data) {
28784
+ data = typeof data === 'object' ? data : {};
28785
+ data["id"] = this.id;
28786
+ data["name"] = this.name;
28787
+ data["description"] = this.description;
28788
+ data["utilization"] = this.utilization ? this.utilization.toJSON() : undefined;
28789
+ return data;
28790
+ }
28791
+ }
28792
+ export class CrossCompanyUtilizationSummaryDto {
28793
+ constructor(data) {
28794
+ if (data) {
28795
+ for (var property in data) {
28796
+ if (data.hasOwnProperty(property))
28797
+ this[property] = data[property];
28798
+ }
28799
+ }
28800
+ if (!data) {
28801
+ this.crossCompany = new FactoryUtilizationDto();
28802
+ this.companies = [];
28803
+ }
28804
+ }
28805
+ init(_data) {
28806
+ if (_data) {
28807
+ this.crossCompany = _data["crossCompany"] ? FactoryUtilizationDto.fromJS(_data["crossCompany"]) : new FactoryUtilizationDto();
28808
+ if (Array.isArray(_data["companies"])) {
28809
+ this.companies = [];
28810
+ for (let item of _data["companies"])
28811
+ this.companies.push(MachineGroupUtilizationDto.fromJS(item));
28812
+ }
28813
+ }
28814
+ }
28815
+ static fromJS(data) {
28816
+ data = typeof data === 'object' ? data : {};
28817
+ let result = new CrossCompanyUtilizationSummaryDto();
28818
+ result.init(data);
28819
+ return result;
28820
+ }
28821
+ toJSON(data) {
28822
+ data = typeof data === 'object' ? data : {};
28823
+ data["crossCompany"] = this.crossCompany ? this.crossCompany.toJSON() : undefined;
28824
+ if (Array.isArray(this.companies)) {
28825
+ data["companies"] = [];
28826
+ for (let item of this.companies)
28827
+ data["companies"].push(item.toJSON());
28828
+ }
28829
+ return data;
28830
+ }
28831
+ }
27873
28832
  export class OperatorAndMachineDto {
27874
28833
  constructor(data) {
27875
28834
  if (data) {
@@ -39840,6 +40799,7 @@ export class MeasurementFormInstanceDto {
39840
40799
  }
39841
40800
  this.progress = _data["progress"] ? MeasurementFormProgressDto.fromJS(_data["progress"]) : new MeasurementFormProgressDto();
39842
40801
  this.approvedReportUrl = _data["approvedReportUrl"];
40802
+ this.currentResource = _data["currentResource"] ? ResourceDto.fromJS(_data["currentResource"]) : undefined;
39843
40803
  }
39844
40804
  }
39845
40805
  static fromJS(data) {
@@ -39878,6 +40838,7 @@ export class MeasurementFormInstanceDto {
39878
40838
  }
39879
40839
  data["progress"] = this.progress ? this.progress.toJSON() : undefined;
39880
40840
  data["approvedReportUrl"] = this.approvedReportUrl;
40841
+ data["currentResource"] = this.currentResource ? this.currentResource.toJSON() : undefined;
39881
40842
  return data;
39882
40843
  }
39883
40844
  }
@@ -40092,6 +41053,7 @@ export class CreateMeasurementFormInstanceRequest {
40092
41053
  if (_data) {
40093
41054
  this.schemaId = _data["schemaId"];
40094
41055
  this.customerId = _data["customerId"];
41056
+ this.customerName = _data["customerName"];
40095
41057
  this.purchaseOrder = _data["purchaseOrder"];
40096
41058
  if (Array.isArray(_data["series"])) {
40097
41059
  this.series = [];
@@ -40110,6 +41072,7 @@ export class CreateMeasurementFormInstanceRequest {
40110
41072
  data = typeof data === 'object' ? data : {};
40111
41073
  data["schemaId"] = this.schemaId;
40112
41074
  data["customerId"] = this.customerId;
41075
+ data["customerName"] = this.customerName;
40113
41076
  data["purchaseOrder"] = this.purchaseOrder;
40114
41077
  if (Array.isArray(this.series)) {
40115
41078
  data["series"] = [];
@@ -41493,38 +42456,6 @@ export class UpsertCustomerOrderRequest {
41493
42456
  return data;
41494
42457
  }
41495
42458
  }
41496
- export class CustomerDto {
41497
- constructor(data) {
41498
- if (data) {
41499
- for (var property in data) {
41500
- if (data.hasOwnProperty(property))
41501
- this[property] = data[property];
41502
- }
41503
- }
41504
- }
41505
- init(_data) {
41506
- if (_data) {
41507
- this.id = _data["id"];
41508
- this.name = _data["name"];
41509
- this.groupId = _data["groupId"];
41510
- this.groupName = _data["groupName"];
41511
- }
41512
- }
41513
- static fromJS(data) {
41514
- data = typeof data === 'object' ? data : {};
41515
- let result = new CustomerDto();
41516
- result.init(data);
41517
- return result;
41518
- }
41519
- toJSON(data) {
41520
- data = typeof data === 'object' ? data : {};
41521
- data["id"] = this.id;
41522
- data["name"] = this.name;
41523
- data["groupId"] = this.groupId;
41524
- data["groupName"] = this.groupName;
41525
- return data;
41526
- }
41527
- }
41528
42459
  export class CustomerOrderLineDto {
41529
42460
  constructor(data) {
41530
42461
  if (data) {