协议修改

This commit is contained in:
chen wei bo
2025-09-08 19:44:58 +08:00
parent e7cb527ca0
commit d4d3e986b3
17 changed files with 878 additions and 66 deletions
+403
View File
@@ -6625,6 +6625,409 @@ $root.cs = (function() {
return CSGetResConfigRes;
})();
cs.CSGetPurchaseReq = (function() {
/**
* Properties of a CSGetPurchaseReq.
* @memberof cs
* @interface ICSGetPurchaseReq
*/
/**
* Constructs a new CSGetPurchaseReq.
* @memberof cs
* @classdesc Represents a CSGetPurchaseReq.
* @implements ICSGetPurchaseReq
* @constructor
* @param {cs.ICSGetPurchaseReq=} [properties] Properties to set
*/
function CSGetPurchaseReq(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Creates a new CSGetPurchaseReq instance using the specified properties.
* @function create
* @memberof cs.CSGetPurchaseReq
* @static
* @param {cs.ICSGetPurchaseReq=} [properties] Properties to set
* @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq instance
*/
CSGetPurchaseReq.create = function create(properties) {
return new CSGetPurchaseReq(properties);
};
/**
* Encodes the specified CSGetPurchaseReq message. Does not implicitly {@link cs.CSGetPurchaseReq.verify|verify} messages.
* @function encode
* @memberof cs.CSGetPurchaseReq
* @static
* @param {cs.ICSGetPurchaseReq} message CSGetPurchaseReq message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetPurchaseReq.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Encodes the specified CSGetPurchaseReq message, length delimited. Does not implicitly {@link cs.CSGetPurchaseReq.verify|verify} messages.
* @function encodeDelimited
* @memberof cs.CSGetPurchaseReq
* @static
* @param {cs.ICSGetPurchaseReq} message CSGetPurchaseReq message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetPurchaseReq.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CSGetPurchaseReq message from the specified reader or buffer.
* @function decode
* @memberof cs.CSGetPurchaseReq
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetPurchaseReq.decode = function decode(reader, length, error) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSGetPurchaseReq();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CSGetPurchaseReq message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof cs.CSGetPurchaseReq
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetPurchaseReq.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CSGetPurchaseReq message.
* @function verify
* @memberof cs.CSGetPurchaseReq
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CSGetPurchaseReq.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
/**
* Creates a CSGetPurchaseReq message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof cs.CSGetPurchaseReq
* @static
* @param {Object.<string,*>} object Plain object
* @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq
*/
CSGetPurchaseReq.fromObject = function fromObject(object) {
if (object instanceof $root.cs.CSGetPurchaseReq)
return object;
return new $root.cs.CSGetPurchaseReq();
};
/**
* Creates a plain object from a CSGetPurchaseReq message. Also converts values to other types if specified.
* @function toObject
* @memberof cs.CSGetPurchaseReq
* @static
* @param {cs.CSGetPurchaseReq} message CSGetPurchaseReq
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CSGetPurchaseReq.toObject = function toObject() {
return {};
};
/**
* Converts this CSGetPurchaseReq to JSON.
* @function toJSON
* @memberof cs.CSGetPurchaseReq
* @instance
* @returns {Object.<string,*>} JSON object
*/
CSGetPurchaseReq.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CSGetPurchaseReq
* @function getTypeUrl
* @memberof cs.CSGetPurchaseReq
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CSGetPurchaseReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/cs.CSGetPurchaseReq";
};
return CSGetPurchaseReq;
})();
cs.CSGetPurchaseRes = (function() {
/**
* Properties of a CSGetPurchaseRes.
* @memberof cs
* @interface ICSGetPurchaseRes
* @property {Array.<cs.IPurchaseConfig>|null} [items] CSGetPurchaseRes items
*/
/**
* Constructs a new CSGetPurchaseRes.
* @memberof cs
* @classdesc Represents a CSGetPurchaseRes.
* @implements ICSGetPurchaseRes
* @constructor
* @param {cs.ICSGetPurchaseRes=} [properties] Properties to set
*/
function CSGetPurchaseRes(properties) {
this.items = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* CSGetPurchaseRes items.
* @member {Array.<cs.IPurchaseConfig>} items
* @memberof cs.CSGetPurchaseRes
* @instance
*/
CSGetPurchaseRes.prototype.items = $util.emptyArray;
/**
* Creates a new CSGetPurchaseRes instance using the specified properties.
* @function create
* @memberof cs.CSGetPurchaseRes
* @static
* @param {cs.ICSGetPurchaseRes=} [properties] Properties to set
* @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes instance
*/
CSGetPurchaseRes.create = function create(properties) {
return new CSGetPurchaseRes(properties);
};
/**
* Encodes the specified CSGetPurchaseRes message. Does not implicitly {@link cs.CSGetPurchaseRes.verify|verify} messages.
* @function encode
* @memberof cs.CSGetPurchaseRes
* @static
* @param {cs.ICSGetPurchaseRes} message CSGetPurchaseRes message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetPurchaseRes.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.items != null && message.items.length)
for (var i = 0; i < message.items.length; ++i)
$root.cs.PurchaseConfig.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CSGetPurchaseRes message, length delimited. Does not implicitly {@link cs.CSGetPurchaseRes.verify|verify} messages.
* @function encodeDelimited
* @memberof cs.CSGetPurchaseRes
* @static
* @param {cs.ICSGetPurchaseRes} message CSGetPurchaseRes message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetPurchaseRes.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CSGetPurchaseRes message from the specified reader or buffer.
* @function decode
* @memberof cs.CSGetPurchaseRes
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetPurchaseRes.decode = function decode(reader, length, error) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSGetPurchaseRes();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
if (!(message.items && message.items.length))
message.items = [];
message.items.push($root.cs.PurchaseConfig.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CSGetPurchaseRes message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof cs.CSGetPurchaseRes
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetPurchaseRes.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CSGetPurchaseRes message.
* @function verify
* @memberof cs.CSGetPurchaseRes
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CSGetPurchaseRes.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.items != null && message.hasOwnProperty("items")) {
if (!Array.isArray(message.items))
return "items: array expected";
for (var i = 0; i < message.items.length; ++i) {
var error = $root.cs.PurchaseConfig.verify(message.items[i]);
if (error)
return "items." + error;
}
}
return null;
};
/**
* Creates a CSGetPurchaseRes message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof cs.CSGetPurchaseRes
* @static
* @param {Object.<string,*>} object Plain object
* @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes
*/
CSGetPurchaseRes.fromObject = function fromObject(object) {
if (object instanceof $root.cs.CSGetPurchaseRes)
return object;
var message = new $root.cs.CSGetPurchaseRes();
if (object.items) {
if (!Array.isArray(object.items))
throw TypeError(".cs.CSGetPurchaseRes.items: array expected");
message.items = [];
for (var i = 0; i < object.items.length; ++i) {
if (typeof object.items[i] !== "object")
throw TypeError(".cs.CSGetPurchaseRes.items: object expected");
message.items[i] = $root.cs.PurchaseConfig.fromObject(object.items[i]);
}
}
return message;
};
/**
* Creates a plain object from a CSGetPurchaseRes message. Also converts values to other types if specified.
* @function toObject
* @memberof cs.CSGetPurchaseRes
* @static
* @param {cs.CSGetPurchaseRes} message CSGetPurchaseRes
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CSGetPurchaseRes.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.items = [];
if (message.items && message.items.length) {
object.items = [];
for (var j = 0; j < message.items.length; ++j)
object.items[j] = $root.cs.PurchaseConfig.toObject(message.items[j], options);
}
return object;
};
/**
* Converts this CSGetPurchaseRes to JSON.
* @function toJSON
* @memberof cs.CSGetPurchaseRes
* @instance
* @returns {Object.<string,*>} JSON object
*/
CSGetPurchaseRes.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CSGetPurchaseRes
* @function getTypeUrl
* @memberof cs.CSGetPurchaseRes
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CSGetPurchaseRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/cs.CSGetPurchaseRes";
};
return CSGetPurchaseRes;
})();
/**
* Category enum.
* @name cs.Category