Files
Max-Cocos-Demo/assets/scripts/protos/ProtoDefinitions.d.ts
2025-10-28 21:55:41 +08:00

172 lines
5.2 KiB
TypeScript

import * as $protobuf from "protobufjs";
import Long = require("long");
/** Namespace pkg1. */
export namespace pkg1 {
/** Properties of a Bar. */
interface IBar {
/** Bar bar */
bar?: (number|null);
}
/** Represents a Bar. */
class Bar implements IBar {
/**
* Constructs a new Bar.
* @param [properties] Properties to set
*/
constructor(properties?: pkg1.IBar);
/** Bar bar. */
public bar: number;
/**
* Encodes the specified Bar message. Does not implicitly {@link pkg1.Bar.verify|verify} messages.
* @param message Bar message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: pkg1.IBar, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Bar message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Bar
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.Bar;
/**
* Gets the default type url for Bar
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** MessageCode enum. */
enum MessageCode {
MSG_UNKNOWN = 0,
MSG_USER = 1001,
MSG_BAR = 1002
}
/** Properties of an Envelope. */
interface IEnvelope {
/** Envelope code */
code?: (number|null);
/** Envelope payload */
payload?: (Uint8Array|null);
}
/** Represents an Envelope. */
class Envelope implements IEnvelope {
/**
* Constructs a new Envelope.
* @param [properties] Properties to set
*/
constructor(properties?: pkg1.IEnvelope);
/** Envelope code. */
public code: number;
/** Envelope payload. */
public payload: Uint8Array;
/**
* Encodes the specified Envelope message. Does not implicitly {@link pkg1.Envelope.verify|verify} messages.
* @param message Envelope message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: pkg1.IEnvelope, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Envelope message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Envelope
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.Envelope;
/**
* Gets the default type url for Envelope
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a User. */
interface IUser {
/** User id */
id?: (number|null);
/** User name */
name?: (string|null);
/** User age */
age?: (number|null);
/** User emails */
emails?: (string[]|null);
}
/** Represents a User. */
class User implements IUser {
/**
* Constructs a new User.
* @param [properties] Properties to set
*/
constructor(properties?: pkg1.IUser);
/** User id. */
public id: number;
/** User name. */
public name: string;
/** User age. */
public age: number;
/** User emails. */
public emails: string[];
/**
* Encodes the specified User message. Does not implicitly {@link pkg1.User.verify|verify} messages.
* @param message User message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: pkg1.IUser, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a User message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns User
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): pkg1.User;
/**
* Gets the default type url for User
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
}