"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var synchronizer_parameters_exports = {};
__export(synchronizer_parameters_exports, {
  AcsCommitmentsCatchUpConfig: () => AcsCommitmentsCatchUpConfig,
  DynamicSynchronizerParameters: () => DynamicSynchronizerParameters,
  OnboardingRestriction: () => OnboardingRestriction,
  ParticipantSynchronizerLimits: () => ParticipantSynchronizerLimits
});
module.exports = __toCommonJS(synchronizer_parameters_exports);
var import_runtime = require("@protobuf-ts/runtime");
var import_runtime2 = require("@protobuf-ts/runtime");
var import_runtime3 = require("@protobuf-ts/runtime");
var import_runtime4 = require("@protobuf-ts/runtime");
var import_traffic_control_parameters = require("./traffic_control_parameters.cjs");
var import_duration = require("../../../../../google/protobuf/duration.cjs");
var OnboardingRestriction = /* @__PURE__ */ ((OnboardingRestriction2) => {
  OnboardingRestriction2[OnboardingRestriction2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
  OnboardingRestriction2[OnboardingRestriction2["UNRESTRICTED_OPEN"] = 1] = "UNRESTRICTED_OPEN";
  OnboardingRestriction2[OnboardingRestriction2["UNRESTRICTED_LOCKED"] = 2] = "UNRESTRICTED_LOCKED";
  OnboardingRestriction2[OnboardingRestriction2["RESTRICTED_OPEN"] = 3] = "RESTRICTED_OPEN";
  OnboardingRestriction2[OnboardingRestriction2["RESTRICTED_LOCKED"] = 4] = "RESTRICTED_LOCKED";
  return OnboardingRestriction2;
})(OnboardingRestriction || {});
class AcsCommitmentsCatchUpConfig$Type extends import_runtime4.MessageType {
  constructor() {
    super(
      "com.digitalasset.canton.protocol.v30.AcsCommitmentsCatchUpConfig",
      [
        {
          no: 1,
          name: "catchup_interval_skip",
          kind: "scalar",
          T: 13
        },
        {
          no: 2,
          name: "nr_intervals_to_trigger_catchup",
          kind: "scalar",
          T: 13
        }
      ]
    );
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.catchupIntervalSkip = 0;
    message.nrIntervalsToTriggerCatchup = 0;
    if (value !== void 0)
      (0, import_runtime3.reflectionMergePartial)(
        this,
        message,
        value
      );
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* uint32 catchup_interval_skip */
        1:
          message.catchupIntervalSkip = reader.uint32();
          break;
        case /* uint32 nr_intervals_to_trigger_catchup */
        2:
          message.nrIntervalsToTriggerCatchup = reader.uint32();
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(
              `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
            );
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(
              this.typeName,
              message,
              fieldNo,
              wireType,
              d
            );
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.catchupIntervalSkip !== 0)
      writer.tag(1, import_runtime.WireType.Varint).uint32(message.catchupIntervalSkip);
    if (message.nrIntervalsToTriggerCatchup !== 0)
      writer.tag(2, import_runtime.WireType.Varint).uint32(message.nrIntervalsToTriggerCatchup);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(
        this.typeName,
        message,
        writer
      );
    return writer;
  }
}
const AcsCommitmentsCatchUpConfig = new AcsCommitmentsCatchUpConfig$Type();
class ParticipantSynchronizerLimits$Type extends import_runtime4.MessageType {
  constructor() {
    super(
      "com.digitalasset.canton.protocol.v30.ParticipantSynchronizerLimits",
      [
        {
          no: 1,
          name: "confirmation_requests_max_rate",
          kind: "scalar",
          T: 13
        }
      ]
    );
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.confirmationRequestsMaxRate = 0;
    if (value !== void 0)
      (0, import_runtime3.reflectionMergePartial)(
        this,
        message,
        value
      );
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* uint32 confirmation_requests_max_rate */
        1:
          message.confirmationRequestsMaxRate = reader.uint32();
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(
              `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
            );
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(
              this.typeName,
              message,
              fieldNo,
              wireType,
              d
            );
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.confirmationRequestsMaxRate !== 0)
      writer.tag(1, import_runtime.WireType.Varint).uint32(message.confirmationRequestsMaxRate);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(
        this.typeName,
        message,
        writer
      );
    return writer;
  }
}
const ParticipantSynchronizerLimits = new ParticipantSynchronizerLimits$Type();
class DynamicSynchronizerParameters$Type extends import_runtime4.MessageType {
  constructor() {
    super(
      "com.digitalasset.canton.protocol.v30.DynamicSynchronizerParameters",
      [
        {
          no: 1,
          name: "confirmation_response_timeout",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 2,
          name: "mediator_reaction_timeout",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 3,
          name: "assignment_exclusivity_timeout",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 4,
          name: "topology_change_delay",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 5,
          name: "ledger_time_record_time_tolerance",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 6,
          name: "reconciliation_interval",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 7,
          name: "mediator_deduplication_timeout",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 8,
          name: "max_request_size",
          kind: "scalar",
          T: 13
        },
        {
          no: 9,
          name: "onboarding_restriction",
          kind: "enum",
          T: () => [
            "com.digitalasset.canton.protocol.v30.OnboardingRestriction",
            OnboardingRestriction,
            "ONBOARDING_RESTRICTION_"
          ]
        },
        {
          no: 13,
          name: "participant_synchronizer_limits",
          kind: "message",
          T: () => ParticipantSynchronizerLimits
        },
        {
          no: 15,
          name: "sequencer_aggregate_submission_timeout",
          kind: "message",
          T: () => import_duration.Duration
        },
        {
          no: 16,
          name: "traffic_control",
          kind: "message",
          T: () => import_traffic_control_parameters.TrafficControlParameters
        },
        {
          no: 17,
          name: "acs_commitments_catchup",
          kind: "message",
          T: () => AcsCommitmentsCatchUpConfig
        },
        {
          no: 18,
          name: "preparation_time_record_time_tolerance",
          kind: "message",
          T: () => import_duration.Duration
        }
      ],
      {
        "scalapb.message": {
          companionExtends: [
            "com.digitalasset.canton.version.StableProtoVersion"
          ]
        }
      }
    );
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.maxRequestSize = 0;
    message.onboardingRestriction = 0;
    if (value !== void 0)
      (0, import_runtime3.reflectionMergePartial)(
        this,
        message,
        value
      );
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* google.protobuf.Duration confirmation_response_timeout */
        1:
          message.confirmationResponseTimeout = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.confirmationResponseTimeout
          );
          break;
        case /* google.protobuf.Duration mediator_reaction_timeout */
        2:
          message.mediatorReactionTimeout = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.mediatorReactionTimeout
          );
          break;
        case /* google.protobuf.Duration assignment_exclusivity_timeout */
        3:
          message.assignmentExclusivityTimeout = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.assignmentExclusivityTimeout
          );
          break;
        case /* google.protobuf.Duration topology_change_delay */
        4:
          message.topologyChangeDelay = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.topologyChangeDelay
          );
          break;
        case /* google.protobuf.Duration ledger_time_record_time_tolerance */
        5:
          message.ledgerTimeRecordTimeTolerance = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.ledgerTimeRecordTimeTolerance
          );
          break;
        case /* google.protobuf.Duration reconciliation_interval */
        6:
          message.reconciliationInterval = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.reconciliationInterval
          );
          break;
        case /* google.protobuf.Duration mediator_deduplication_timeout */
        7:
          message.mediatorDeduplicationTimeout = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.mediatorDeduplicationTimeout
          );
          break;
        case /* uint32 max_request_size */
        8:
          message.maxRequestSize = reader.uint32();
          break;
        case /* com.digitalasset.canton.protocol.v30.OnboardingRestriction onboarding_restriction */
        9:
          message.onboardingRestriction = reader.int32();
          break;
        case /* com.digitalasset.canton.protocol.v30.ParticipantSynchronizerLimits participant_synchronizer_limits */
        13:
          message.participantSynchronizerLimits = ParticipantSynchronizerLimits.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.participantSynchronizerLimits
          );
          break;
        case /* google.protobuf.Duration sequencer_aggregate_submission_timeout */
        15:
          message.sequencerAggregateSubmissionTimeout = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.sequencerAggregateSubmissionTimeout
          );
          break;
        case /* com.digitalasset.canton.protocol.v30.TrafficControlParameters traffic_control */
        16:
          message.trafficControl = import_traffic_control_parameters.TrafficControlParameters.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.trafficControl
          );
          break;
        case /* com.digitalasset.canton.protocol.v30.AcsCommitmentsCatchUpConfig acs_commitments_catchup */
        17:
          message.acsCommitmentsCatchup = AcsCommitmentsCatchUpConfig.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.acsCommitmentsCatchup
          );
          break;
        case /* google.protobuf.Duration preparation_time_record_time_tolerance */
        18:
          message.preparationTimeRecordTimeTolerance = import_duration.Duration.internalBinaryRead(
            reader,
            reader.uint32(),
            options,
            message.preparationTimeRecordTimeTolerance
          );
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(
              `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`
            );
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(
              this.typeName,
              message,
              fieldNo,
              wireType,
              d
            );
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.confirmationResponseTimeout)
      import_duration.Duration.internalBinaryWrite(
        message.confirmationResponseTimeout,
        writer.tag(1, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.mediatorReactionTimeout)
      import_duration.Duration.internalBinaryWrite(
        message.mediatorReactionTimeout,
        writer.tag(2, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.assignmentExclusivityTimeout)
      import_duration.Duration.internalBinaryWrite(
        message.assignmentExclusivityTimeout,
        writer.tag(3, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.topologyChangeDelay)
      import_duration.Duration.internalBinaryWrite(
        message.topologyChangeDelay,
        writer.tag(4, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.ledgerTimeRecordTimeTolerance)
      import_duration.Duration.internalBinaryWrite(
        message.ledgerTimeRecordTimeTolerance,
        writer.tag(5, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.reconciliationInterval)
      import_duration.Duration.internalBinaryWrite(
        message.reconciliationInterval,
        writer.tag(6, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.mediatorDeduplicationTimeout)
      import_duration.Duration.internalBinaryWrite(
        message.mediatorDeduplicationTimeout,
        writer.tag(7, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.maxRequestSize !== 0)
      writer.tag(8, import_runtime.WireType.Varint).uint32(message.maxRequestSize);
    if (message.onboardingRestriction !== 0)
      writer.tag(9, import_runtime.WireType.Varint).int32(message.onboardingRestriction);
    if (message.participantSynchronizerLimits)
      ParticipantSynchronizerLimits.internalBinaryWrite(
        message.participantSynchronizerLimits,
        writer.tag(13, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.sequencerAggregateSubmissionTimeout)
      import_duration.Duration.internalBinaryWrite(
        message.sequencerAggregateSubmissionTimeout,
        writer.tag(15, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.trafficControl)
      import_traffic_control_parameters.TrafficControlParameters.internalBinaryWrite(
        message.trafficControl,
        writer.tag(16, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.acsCommitmentsCatchup)
      AcsCommitmentsCatchUpConfig.internalBinaryWrite(
        message.acsCommitmentsCatchup,
        writer.tag(17, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    if (message.preparationTimeRecordTimeTolerance)
      import_duration.Duration.internalBinaryWrite(
        message.preparationTimeRecordTimeTolerance,
        writer.tag(18, import_runtime.WireType.LengthDelimited).fork(),
        options
      ).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(
        this.typeName,
        message,
        writer
      );
    return writer;
  }
}
const DynamicSynchronizerParameters = new DynamicSynchronizerParameters$Type();
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  AcsCommitmentsCatchUpConfig,
  DynamicSynchronizerParameters,
  OnboardingRestriction,
  ParticipantSynchronizerLimits
});
//# sourceMappingURL=synchronizer_parameters.cjs.map