// @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
// @generated from file types/v1/version.proto (package types.v1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";

/**
 * @generated from message types.v1.Version
 */
export class Version extends Message<Version> {
  /**
   * @generated from field: int32 major = 1;
   */
  major = 0;

  /**
   * @generated from field: int32 minor = 2;
   */
  minor = 0;

  /**
   * @generated from field: int32 patch = 3;
   */
  patch = 0;

  /**
   * @generated from field: repeated string prereleases = 4;
   */
  prereleases: string[] = [];

  /**
   * @generated from field: string build = 5;
   */
  build = "";

  constructor(data?: PartialMessage<Version>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "types.v1.Version";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "major", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 2, name: "minor", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 3, name: "patch", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 4, name: "prereleases", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 5, name: "build", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Version {
    return new Version().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Version {
    return new Version().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Version {
    return new Version().fromJsonString(jsonString, options);
  }

  static equals(a: Version | PlainMessage<Version> | undefined, b: Version | PlainMessage<Version> | undefined): boolean {
    return proto3.util.equals(Version, a, b);
  }
}

