text: var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  var DotVVM;
  (function (DotVVM) {
      var Samples;
      (function (Samples) {
          var Common;
          (function (Common) {
              var Api;
              (function (Api) {
                  var AspNetCore;
                  (function (AspNetCore) {
                      var ClientBase = /** @class */ (function () {
                          function ClientBase() {
                          }
                          ClientBase.prototype.transformOptions = function (options) {
                              options.credentials = "same-origin";
                              return Promise.resolve(options);
                          };
                          return ClientBase;
                      }());
                      /* tslint:disable */
                      //----------------------
                      // <auto-generated>
                      //     Generated using the NSwag toolchain v11.14.1.0 (NJsonSchema v9.10.24.0 (Newtonsoft.Json v10.0.0.0)) (http://NSwag.org)
                      // </auto-generated>
                      //----------------------
                      // ReSharper disable InconsistentNaming
                      var TestWebApiClientAspNetCore = /** @class */ (function (_super) {
                          __extends(TestWebApiClientAspNetCore, _super);
                          function TestWebApiClientAspNetCore(baseUrl, http) {
                              var _this = _super.call(this) || this;
                              _this.jsonParseReviver = undefined;
                              _this.http = http ? http : window;
                              _this.baseUrl = baseUrl ? baseUrl : "http://localhost:5001";
                              return _this;
                          }
                          /**
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiCompaniesGet = function () {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Companies";
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiCompaniesGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiCompaniesGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      if (resultData200 && resultData200.constructor === Array) {
                                          result200 = [];
                                          for (var _i = 0, resultData200_1 = resultData200; _i < resultData200_1.length; _i++) {
                                              var item = resultData200_1[_i];
                                              result200.push(CompanyOfString.fromJS(item));
                                          }
                                      }
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @sortingOptions (optional)
                           * @sortingOptions_SortExpression (optional)
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiCompaniesSortedGet = function (sortingOptions) {
                              var _this = this;
                              var sortingOptions_SortDescending = (sortingOptions !== null && typeof sortingOptions === 'object') ? sortingOptions.SortDescending : null;
                              var sortingOptions_SortExpression = (sortingOptions !== null && typeof sortingOptions === 'object') ? sortingOptions.SortExpression : null;
                              var url_ = this.baseUrl + "/api/Companies/sorted?";
                              if (sortingOptions_SortDescending === undefined || sortingOptions_SortDescending === null)
                                  throw new Error("The parameter 'sortingOptions_SortDescending' must be defined and cannot be null.");
                              else
                                  url_ += "sortingOptions.SortDescending=" + encodeURIComponent("" + sortingOptions_SortDescending) + "&";
                              if (sortingOptions_SortExpression !== undefined)
                                  url_ += "sortingOptions.SortExpression=" + encodeURIComponent("" + sortingOptions_SortExpression) + "&";
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiCompaniesSortedGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiCompaniesSortedGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      result200 = resultData200 ? GridViewDataSetOfCompanyOfBoolean.fromJS(resultData200) : new GridViewDataSetOfCompanyOfBoolean();
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @pagingOptions (optional)
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiCompaniesPagedGet = function (pagingOptions) {
                              var _this = this;
                              var pagingOptions_PageIndex = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.PageIndex : null;
                              var pagingOptions_PageSize = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.PageSize : null;
                              var pagingOptions_TotalItemsCount = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.TotalItemsCount : null;
                              var url_ = this.baseUrl + "/api/Companies/paged?";
                              if (pagingOptions_PageIndex === undefined || pagingOptions_PageIndex === null)
                                  throw new Error("The parameter 'pagingOptions_PageIndex' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.PageIndex=" + encodeURIComponent("" + pagingOptions_PageIndex) + "&";
                              if (pagingOptions_PageSize === undefined || pagingOptions_PageSize === null)
                                  throw new Error("The parameter 'pagingOptions_PageSize' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.PageSize=" + encodeURIComponent("" + pagingOptions_PageSize) + "&";
                              if (pagingOptions_TotalItemsCount === undefined || pagingOptions_TotalItemsCount === null)
                                  throw new Error("The parameter 'pagingOptions_TotalItemsCount' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.TotalItemsCount=" + encodeURIComponent("" + pagingOptions_TotalItemsCount) + "&";
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiCompaniesPagedGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiCompaniesPagedGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      result200 = resultData200 ? GridViewDataSetOfCompanyOfString.fromJS(resultData200) : new GridViewDataSetOfCompanyOfString();
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @sortingOptions (optional)
                           * @pagingOptions (optional)
                           * @sortingOptions_SortExpression (optional)
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiCompaniesSortedandpagedGet = function (sortingOptions, pagingOptions) {
                              var _this = this;
                              var sortingOptions_SortDescending = (sortingOptions !== null && typeof sortingOptions === 'object') ? sortingOptions.SortDescending : null;
                              var pagingOptions_PageIndex = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.PageIndex : null;
                              var pagingOptions_PageSize = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.PageSize : null;
                              var pagingOptions_TotalItemsCount = (pagingOptions !== null && typeof pagingOptions === 'object') ? pagingOptions.TotalItemsCount : null;
                              var sortingOptions_SortExpression = (sortingOptions !== null && typeof sortingOptions === 'object') ? sortingOptions.SortExpression : null;
                              var url_ = this.baseUrl + "/api/Companies/sortedandpaged?";
                              if (sortingOptions_SortDescending === undefined || sortingOptions_SortDescending === null)
                                  throw new Error("The parameter 'sortingOptions_SortDescending' must be defined and cannot be null.");
                              else
                                  url_ += "sortingOptions.SortDescending=" + encodeURIComponent("" + sortingOptions_SortDescending) + "&";
                              if (pagingOptions_PageIndex === undefined || pagingOptions_PageIndex === null)
                                  throw new Error("The parameter 'pagingOptions_PageIndex' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.PageIndex=" + encodeURIComponent("" + pagingOptions_PageIndex) + "&";
                              if (pagingOptions_PageSize === undefined || pagingOptions_PageSize === null)
                                  throw new Error("The parameter 'pagingOptions_PageSize' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.PageSize=" + encodeURIComponent("" + pagingOptions_PageSize) + "&";
                              if (pagingOptions_TotalItemsCount === undefined || pagingOptions_TotalItemsCount === null)
                                  throw new Error("The parameter 'pagingOptions_TotalItemsCount' must be defined and cannot be null.");
                              else
                                  url_ += "pagingOptions.TotalItemsCount=" + encodeURIComponent("" + pagingOptions_TotalItemsCount) + "&";
                              if (sortingOptions_SortExpression !== undefined)
                                  url_ += "sortingOptions.SortExpression=" + encodeURIComponent("" + sortingOptions_SortExpression) + "&";
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiCompaniesSortedandpagedGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiCompaniesSortedandpagedGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      result200 = resultData200 ? GridViewDataSetOfCompanyOfString.fromJS(resultData200) : new GridViewDataSetOfCompanyOfString();
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiOrdersGet = function (companyId, pageIndex, pageSize) {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Orders?";
                              if (companyId === undefined || companyId === null)
                                  throw new Error("The parameter 'companyId' must be defined and cannot be null.");
                              else
                                  url_ += "companyId=" + encodeURIComponent("" + companyId) + "&";
                              if (pageIndex === undefined || pageIndex === null)
                                  throw new Error("The parameter 'pageIndex' must be defined and cannot be null.");
                              else
                                  url_ += "pageIndex=" + encodeURIComponent("" + pageIndex) + "&";
                              if (pageSize === undefined || pageSize === null)
                                  throw new Error("The parameter 'pageSize' must be defined and cannot be null.");
                              else
                                  url_ += "pageSize=" + encodeURIComponent("" + pageSize) + "&";
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiOrdersGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiOrdersGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      if (resultData200 && resultData200.constructor === Array) {
                                          result200 = [];
                                          for (var _i = 0, resultData200_2 = resultData200; _i < resultData200_2.length; _i++) {
                                              var item = resultData200_2[_i];
                                              result200.push(Order.fromJS(item));
                                          }
                                      }
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @order (optional)
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiOrdersPost = function (order) {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Orders";
                              url_ = url_.replace(/[?&]$/, "");
                              var content_ = JSON.stringify(order);
                              var options_ = {
                                  body: content_,
                                  method: "POST",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiOrdersPost(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiOrdersPost = function (response) {
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      return;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiOrdersByOrderIdGet = function (orderId) {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Orders/{orderId}";
                              if (orderId === undefined || orderId === null)
                                  throw new Error("The parameter 'orderId' must be defined.");
                              url_ = url_.replace("{orderId}", encodeURIComponent("" + orderId));
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "GET",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                      "Accept": "application/json"
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiOrdersByOrderIdGet(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiOrdersByOrderIdGet = function (response) {
                              var _this = this;
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      var result200 = null;
                                      var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
                                      result200 = resultData200 ? Order.fromJS(resultData200) : new Order();
                                      return result200;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @order (optional)
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiOrdersByOrderIdPut = function (orderId, order) {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Orders/{orderId}";
                              if (orderId === undefined || orderId === null)
                                  throw new Error("The parameter 'orderId' must be defined.");
                              url_ = url_.replace("{orderId}", encodeURIComponent("" + orderId));
                              url_ = url_.replace(/[?&]$/, "");
                              var content_ = JSON.stringify(order);
                              var options_ = {
                                  body: content_,
                                  method: "PUT",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiOrdersByOrderIdPut(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiOrdersByOrderIdPut = function (response) {
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      return;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          /**
                           * @return Success
                           */
                          TestWebApiClientAspNetCore.prototype.apiOrdersDeleteByOrderIdDelete = function (orderId) {
                              var _this = this;
                              var url_ = this.baseUrl + "/api/Orders/delete/{orderId}";
                              if (orderId === undefined || orderId === null)
                                  throw new Error("The parameter 'orderId' must be defined.");
                              url_ = url_.replace("{orderId}", encodeURIComponent("" + orderId));
                              url_ = url_.replace(/[?&]$/, "");
                              var options_ = {
                                  method: "DELETE",
                                  headers: new Headers({
                                      "Content-Type": "application/json",
                                  })
                              };
                              return this.transformOptions(options_).then(function (transformedOptions_) {
                                  return _this.http.fetch(url_, transformedOptions_);
                              }).then(function (_response) {
                                  return _this.processApiOrdersDeleteByOrderIdDelete(_response);
                              });
                          };
                          TestWebApiClientAspNetCore.prototype.processApiOrdersDeleteByOrderIdDelete = function (response) {
                              var status = response.status;
                              var _headers = {};
                              if (response.headers && response.headers.forEach) {
                                  response.headers.forEach(function (v, k) { return _headers[k] = v; });
                              }
                              ;
                              if (status === 200) {
                                  return response.text().then(function (_responseText) {
                                      return;
                                  });
                              }
                              else if (status !== 200 && status !== 204) {
                                  return response.text().then(function (_responseText) {
                                      return throwException("An unexpected server error occurred.", status, _responseText, _headers);
                                  });
                              }
                              return Promise.resolve(null);
                          };
                          return TestWebApiClientAspNetCore;
                      }(ClientBase));
                      AspNetCore.TestWebApiClientAspNetCore = TestWebApiClientAspNetCore;
                      var CompanyOfString = /** @class */ (function () {
                          function CompanyOfString(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          CompanyOfString.prototype.init = function (data) {
                              if (data) {
                                  this.Id = data["id"] !== undefined ? data["id"] : null;
                                  this.Name = data["name"] !== undefined ? data["name"] : null;
                                  this.Owner = data["owner"] !== undefined ? data["owner"] : null;
                                  this.Department = data["department"] !== undefined ? data["department"] : null;
                              }
                          };
                          CompanyOfString.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new CompanyOfString();
                              result.init(data);
                              return result;
                          };
                          CompanyOfString.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["id"] = this.Id !== undefined ? this.Id : null;
                              data["name"] = this.Name !== undefined ? this.Name : null;
                              data["owner"] = this.Owner !== undefined ? this.Owner : null;
                              data["department"] = this.Department !== undefined ? this.Department : null;
                              return data;
                          };
                          return CompanyOfString;
                      }());
                      AspNetCore.CompanyOfString = CompanyOfString;
                      var GridViewDataSetOfCompanyOfBoolean = /** @class */ (function () {
                          function GridViewDataSetOfCompanyOfBoolean(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          GridViewDataSetOfCompanyOfBoolean.prototype.init = function (data) {
                              if (data) {
                                  this.IsRefreshRequired = data["isRefreshRequired"] !== undefined ? data["isRefreshRequired"] : null;
                                  if (data["items"] && data["items"].constructor === Array) {
                                      this.Items = [];
                                      for (var _i = 0, _a = data["items"]; _i < _a.length; _i++) {
                                          var item = _a[_i];
                                          this.Items.push(CompanyOfBoolean.fromJS(item));
                                      }
                                  }
                                  this.PagingOptions = data["pagingOptions"] ? IPagingOptions.fromJS(data["pagingOptions"]) : null;
                                  this.RowEditOptions = data["rowEditOptions"] ? IRowEditOptions.fromJS(data["rowEditOptions"]) : null;
                                  this.SortingOptions = data["sortingOptions"] ? ISortingOptions.fromJS(data["sortingOptions"]) : null;
                              }
                          };
                          GridViewDataSetOfCompanyOfBoolean.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new GridViewDataSetOfCompanyOfBoolean();
                              result.init(data);
                              return result;
                          };
                          GridViewDataSetOfCompanyOfBoolean.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["isRefreshRequired"] = this.IsRefreshRequired !== undefined ? this.IsRefreshRequired : null;
                              if (this.Items && this.Items.constructor === Array) {
                                  data["items"] = [];
                                  for (var _i = 0, _a = this.Items; _i < _a.length; _i++) {
                                      var item = _a[_i];
                                      data["items"].push(item.toJSON());
                                  }
                              }
                              data["pagingOptions"] = this.PagingOptions ? this.PagingOptions.toJSON() : null;
                              data["rowEditOptions"] = this.RowEditOptions ? this.RowEditOptions.toJSON() : null;
                              data["sortingOptions"] = this.SortingOptions ? this.SortingOptions.toJSON() : null;
                              return data;
                          };
                          return GridViewDataSetOfCompanyOfBoolean;
                      }());
                      AspNetCore.GridViewDataSetOfCompanyOfBoolean = GridViewDataSetOfCompanyOfBoolean;
                      var CompanyOfBoolean = /** @class */ (function () {
                          function CompanyOfBoolean(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          CompanyOfBoolean.prototype.init = function (data) {
                              if (data) {
                                  this.id = data["id"] !== undefined ? data["id"] : null;
                                  this.name = data["name"] !== undefined ? data["name"] : null;
                                  this.owner = data["owner"] !== undefined ? data["owner"] : null;
                                  this.department = data["department"] !== undefined ? data["department"] : null;
                              }
                          };
                          CompanyOfBoolean.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new CompanyOfBoolean();
                              result.init(data);
                              return result;
                          };
                          CompanyOfBoolean.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["id"] = this.id !== undefined ? this.id : null;
                              data["name"] = this.name !== undefined ? this.name : null;
                              data["owner"] = this.owner !== undefined ? this.owner : null;
                              data["department"] = this.department !== undefined ? this.department : null;
                              return data;
                          };
                          return CompanyOfBoolean;
                      }());
                      AspNetCore.CompanyOfBoolean = CompanyOfBoolean;
                      var IPagingOptions = /** @class */ (function () {
                          function IPagingOptions(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          IPagingOptions.prototype.init = function (data) {
                              if (data) {
                                  this.PageIndex = data["pageIndex"] !== undefined ? data["pageIndex"] : null;
                                  this.PageSize = data["pageSize"] !== undefined ? data["pageSize"] : null;
                                  this.TotalItemsCount = data["totalItemsCount"] !== undefined ? data["totalItemsCount"] : null;
                                  this.IsFirstPage = data["isFirstPage"] !== undefined ? data["isFirstPage"] : null;
                                  this.IsLastPage = data["isLastPage"] !== undefined ? data["isLastPage"] : null;
                                  this.PagesCount = data["pagesCount"] !== undefined ? data["pagesCount"] : null;
                                  if (data["nearPageIndexes"] && data["nearPageIndexes"].constructor === Array) {
                                      this.NearPageIndexes = [];
                                      for (var _i = 0, _a = data["nearPageIndexes"]; _i < _a.length; _i++) {
                                          var item = _a[_i];
                                          this.NearPageIndexes.push(item);
                                      }
                                  }
                              }
                          };
                          IPagingOptions.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new IPagingOptions();
                              result.init(data);
                              return result;
                          };
                          IPagingOptions.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["pageIndex"] = this.PageIndex !== undefined ? this.PageIndex : null;
                              data["pageSize"] = this.PageSize !== undefined ? this.PageSize : null;
                              data["totalItemsCount"] = this.TotalItemsCount !== undefined ? this.TotalItemsCount : null;
                              data["isFirstPage"] = this.IsFirstPage !== undefined ? this.IsFirstPage : null;
                              data["isLastPage"] = this.IsLastPage !== undefined ? this.IsLastPage : null;
                              data["pagesCount"] = this.PagesCount !== undefined ? this.PagesCount : null;
                              if (this.NearPageIndexes && this.NearPageIndexes.constructor === Array) {
                                  data["nearPageIndexes"] = [];
                                  for (var _i = 0, _a = this.NearPageIndexes; _i < _a.length; _i++) {
                                      var item = _a[_i];
                                      data["nearPageIndexes"].push(item);
                                  }
                              }
                              return data;
                          };
                          return IPagingOptions;
                      }());
                      AspNetCore.IPagingOptions = IPagingOptions;
                      var IRowEditOptions = /** @class */ (function () {
                          function IRowEditOptions(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          IRowEditOptions.prototype.init = function (data) {
                              if (data) {
                                  this.PrimaryKeyPropertyName = data["primaryKeyPropertyName"] !== undefined ? data["primaryKeyPropertyName"] : null;
                                  if (data["editRowId"]) {
                                      this.EditRowId = {};
                                      for (var key in data["editRowId"]) {
                                          if (data["editRowId"].hasOwnProperty(key))
                                              this.EditRowId[key] = data["editRowId"][key];
                                      }
                                  }
                              }
                          };
                          IRowEditOptions.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new IRowEditOptions();
                              result.init(data);
                              return result;
                          };
                          IRowEditOptions.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["primaryKeyPropertyName"] = this.PrimaryKeyPropertyName !== undefined ? this.PrimaryKeyPropertyName : null;
                              if (this.EditRowId) {
                                  data["editRowId"] = {};
                                  for (var key in this.EditRowId) {
                                      if (this.EditRowId.hasOwnProperty(key))
                                          data["editRowId"][key] = this.EditRowId[key] !== undefined ? this.EditRowId[key] : null;
                                  }
                              }
                              return data;
                          };
                          return IRowEditOptions;
                      }());
                      AspNetCore.IRowEditOptions = IRowEditOptions;
                      var ISortingOptions = /** @class */ (function () {
                          function ISortingOptions(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          ISortingOptions.prototype.init = function (data) {
                              if (data) {
                                  this.SortDescending = data["sortDescending"] !== undefined ? data["sortDescending"] : null;
                                  this.SortExpression = data["sortExpression"] !== undefined ? data["sortExpression"] : null;
                              }
                          };
                          ISortingOptions.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new ISortingOptions();
                              result.init(data);
                              return result;
                          };
                          ISortingOptions.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["sortDescending"] = this.SortDescending !== undefined ? this.SortDescending : null;
                              data["sortExpression"] = this.SortExpression !== undefined ? this.SortExpression : null;
                              return data;
                          };
                          return ISortingOptions;
                      }());
                      AspNetCore.ISortingOptions = ISortingOptions;
                      var GridViewDataSetOfCompanyOfString = /** @class */ (function () {
                          function GridViewDataSetOfCompanyOfString(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          GridViewDataSetOfCompanyOfString.prototype.init = function (data) {
                              if (data) {
                                  this.IsRefreshRequired = data["isRefreshRequired"] !== undefined ? data["isRefreshRequired"] : null;
                                  if (data["items"] && data["items"].constructor === Array) {
                                      this.Items = [];
                                      for (var _i = 0, _a = data["items"]; _i < _a.length; _i++) {
                                          var item = _a[_i];
                                          this.Items.push(CompanyOfString.fromJS(item));
                                      }
                                  }
                                  this.PagingOptions = data["pagingOptions"] ? IPagingOptions.fromJS(data["pagingOptions"]) : null;
                                  this.RowEditOptions = data["rowEditOptions"] ? IRowEditOptions.fromJS(data["rowEditOptions"]) : null;
                                  this.SortingOptions = data["sortingOptions"] ? ISortingOptions.fromJS(data["sortingOptions"]) : null;
                              }
                          };
                          GridViewDataSetOfCompanyOfString.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new GridViewDataSetOfCompanyOfString();
                              result.init(data);
                              return result;
                          };
                          GridViewDataSetOfCompanyOfString.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["isRefreshRequired"] = this.IsRefreshRequired !== undefined ? this.IsRefreshRequired : null;
                              if (this.Items && this.Items.constructor === Array) {
                                  data["items"] = [];
                                  for (var _i = 0, _a = this.Items; _i < _a.length; _i++) {
                                      var item = _a[_i];
                                      data["items"].push(item.toJSON());
                                  }
                              }
                              data["pagingOptions"] = this.PagingOptions ? this.PagingOptions.toJSON() : null;
                              data["rowEditOptions"] = this.RowEditOptions ? this.RowEditOptions.toJSON() : null;
                              data["sortingOptions"] = this.SortingOptions ? this.SortingOptions.toJSON() : null;
                              return data;
                          };
                          return GridViewDataSetOfCompanyOfString;
                      }());
                      AspNetCore.GridViewDataSetOfCompanyOfString = GridViewDataSetOfCompanyOfString;
                      var Order = /** @class */ (function () {
                          function Order(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          Order.prototype.init = function (data) {
                              if (data) {
                                  this.id = data["id"] !== undefined ? data["id"] : null;
                                  this.Number = data["Number"] !== undefined ? data["Number"] : null;
                                  this.date = data["date"] ? new Date(data["date"].toString()) : null;
                                  this.companyId = data["companyId"] !== undefined ? data["companyId"] : null;
                                  if (data["orderItems"] && data["orderItems"].constructor === Array) {
                                      this.orderItems = [];
                                      for (var _i = 0, _a = data["orderItems"]; _i < _a.length; _i++) {
                                          var item = _a[_i];
                                          this.orderItems.push(OrderItem.fromJS(item));
                                      }
                                  }
                              }
                          };
                          Order.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new Order();
                              result.init(data);
                              return result;
                          };
                          Order.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["id"] = this.id !== undefined ? this.id : null;
                              data["Number"] = this.Number !== undefined ? this.Number : null;
                              data["date"] = this.date ? this.date.toISOString() : null;
                              data["companyId"] = this.companyId !== undefined ? this.companyId : null;
                              if (this.orderItems && this.orderItems.constructor === Array) {
                                  data["orderItems"] = [];
                                  for (var _i = 0, _a = this.orderItems; _i < _a.length; _i++) {
                                      var item = _a[_i];
                                      data["orderItems"].push(item.toJSON());
                                  }
                              }
                              return data;
                          };
                          return Order;
                      }());
                      AspNetCore.Order = Order;
                      var OrderItem = /** @class */ (function () {
                          function OrderItem(data) {
                              if (data) {
                                  for (var property in data) {
                                      if (data.hasOwnProperty(property))
                                          this[property] = data[property];
                                  }
                              }
                          }
                          OrderItem.prototype.init = function (data) {
                              if (data) {
                                  this.id = data["id"] !== undefined ? data["id"] : null;
                                  this.text = data["text"] !== undefined ? data["text"] : null;
                                  this.amount = data["amount"] !== undefined ? data["amount"] : null;
                                  this.discount = data["discount"] !== undefined ? data["discount"] : null;
                                  this.isOnStock = data["isOnStock"] !== undefined ? data["isOnStock"] : null;
                              }
                          };
                          OrderItem.fromJS = function (data) {
                              data = typeof data === 'object' ? data : {};
                              var result = new OrderItem();
                              result.init(data);
                              return result;
                          };
                          OrderItem.prototype.toJSON = function (data) {
                              data = typeof data === 'object' ? data : {};
                              data["id"] = this.id !== undefined ? this.id : null;
                              data["text"] = this.text !== undefined ? this.text : null;
                              data["amount"] = this.amount !== undefined ? this.amount : null;
                              data["discount"] = this.discount !== undefined ? this.discount : null;
                              data["isOnStock"] = this.isOnStock !== undefined ? this.isOnStock : null;
                              return data;
                          };
                          return OrderItem;
                      }());
                      AspNetCore.OrderItem = OrderItem;
                      var SwaggerException = /** @class */ (function (_super) {
                          __extends(SwaggerException, _super);
                          function SwaggerException(message, status, response, headers, result) {
                              var _this = _super.call(this) || this;
                              _this.isSwaggerException = true;
                              _this.message = message;
                              _this.status = status;
                              _this.response = response;
                              _this.headers = headers;
                              _this.result = result;
                              return _this;
                          }
                          SwaggerException.isSwaggerException = function (obj) {
                              return obj.isSwaggerException === true;
                          };
                          return SwaggerException;
                      }(Error));
                      AspNetCore.SwaggerException = SwaggerException;
                      function throwException(message, status, response, headers, result) {
                          if (result !== null && result !== undefined)
                              throw result;
                          else
                              throw new SwaggerException(message, status, response, headers, null);
                      }
                  })(AspNetCore = Api.AspNetCore || (Api.AspNetCore = {}));
              })(Api = Common.Api || (Common.Api = {}));
          })(Common = Samples.Common || (Samples.Common = {}));
      })(Samples = DotVVM.Samples || (DotVVM.Samples = {}));
  })(DotVVM || (DotVVM = {}));
  //# sourceMappingURL=TestWebApiClientAspNetCore.js.map