import { WireType } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
class DynamicSequencingParameters$Type extends MessageType {
  constructor() {
    super(
      "com.digitalasset.canton.protocol.v30.DynamicSequencingParameters",
      [
        {
          no: 1,
          name: "payload",
          kind: "scalar",
          T: 12
        }
      ],
      {
        "scalapb.message": {
          companionExtends: [
            "com.digitalasset.canton.version.StableProtoVersion"
          ]
        }
      }
    );
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.payload = new Uint8Array(0);
    if (value !== void 0)
      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 /* bytes payload */
        1:
          message.payload = reader.bytes();
          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 ? UnknownFieldHandler.onRead : u)(
              this.typeName,
              message,
              fieldNo,
              wireType,
              d
            );
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.payload.length)
      writer.tag(1, WireType.LengthDelimited).bytes(message.payload);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(
        this.typeName,
        message,
        writer
      );
    return writer;
  }
}
const DynamicSequencingParameters = new DynamicSequencingParameters$Type();
export {
  DynamicSequencingParameters
};
//# sourceMappingURL=sequencing_parameters.js.map