// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.2.0 // protoc v5.28.0 // source: video_streaming/sabr_error.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "video_streaming"; export interface SabrError { type?: string | undefined; code?: number | undefined; } function createBaseSabrError(): SabrError { return { type: "", code: 0 }; } export const SabrError: MessageFns = { encode(message: SabrError, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.type !== undefined && message.type !== "") { writer.uint32(10).string(message.type); } if (message.code !== undefined && message.code !== 0) { writer.uint32(16).int32(message.code); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): SabrError { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSabrError(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: if (tag !== 10) { break; } message.type = reader.string(); continue; case 2: if (tag !== 16) { break; } message.code = reader.int32(); continue; } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, }; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; }