text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = function (d, b) {
          extendStatics = Object.setPrototypeOf ||
              ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
              function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
          return extendStatics(d, b);
      };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ODataCreateRequestConfig = void 0;
  var odata_request_config_1 = require("./odata-request-config");
  /**
   * OData create request configuration for an entity type.
   *
   * @typeparam EntityT - Type of the entity to setup a request for
   */
  var ODataCreateRequestConfig = /** @class */ (function (_super) {
      __extends(ODataCreateRequestConfig, _super);
      /**
       * Creates an instance of ODataRequest.
       * @param _entityConstructor - Constructor type of the entity to create a configuration for
       */
      function ODataCreateRequestConfig(_entityConstructor, oDataUri) {
          var _this = _super.call(this, 'post', _entityConstructor._defaultServicePath) || this;
          _this._entityConstructor = _entityConstructor;
          _this.oDataUri = oDataUri;
          return _this;
      }
      ODataCreateRequestConfig.prototype.resourcePath = function () {
          return this.parentKeys === undefined
              ? this._entityConstructor._entityName
              : this.resourcePathAsChild();
      };
      ODataCreateRequestConfig.prototype.queryParameters = function () {
          return this.prependDollarToQueryParameters({});
      };
      ODataCreateRequestConfig.prototype.resourcePathAsChild = function () {
          return (this.oDataUri.getResourcePathForKeys(this.parentKeys, this.childField._entityConstructor) +
              '/' +
              this.childField._fieldName);
      };
      return ODataCreateRequestConfig;
  }(odata_request_config_1.ODataRequestConfig));
  exports.ODataCreateRequestConfig = ODataCreateRequestConfig;
  //# sourceMappingURL=odata-create-request-config.js.map