/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 0.0.0
 * source: product.proto
 * git: https://github.com/thesayyn/protoc-gen-ts */
import * as dependency_1 from "./blocks";
import * as pb_1 from "google-protobuf";
import * as grpc_1 from "@grpc/grpc-js";
export namespace mall {
    export class AttrItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            name?: string;
            parent_id?: number;
            value?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("parent_id" in data && data.parent_id != undefined) {
                    this.parent_id = data.parent_id;
                }
                if ("value" in data && data.value != undefined) {
                    this.value = data.value;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set name(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get parent_id() {
            return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
        }
        set parent_id(value: number) {
            pb_1.Message.setField(this, 3, value);
        }
        get value() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set value(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        static fromObject(data: {
            id?: number;
            name?: string;
            parent_id?: number;
            value?: string;
        }): AttrItem {
            const message = new AttrItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.parent_id != null) {
                message.parent_id = data.parent_id;
            }
            if (data.value != null) {
                message.value = data.value;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                name?: string;
                parent_id?: number;
                value?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.parent_id != null) {
                data.parent_id = this.parent_id;
            }
            if (this.value != null) {
                data.value = this.value;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.name.length)
                writer.writeString(2, this.name);
            if (this.parent_id != 0)
                writer.writeInt32(3, this.parent_id);
            if (this.value.length)
                writer.writeString(4, this.value);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AttrItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AttrItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.name = reader.readString();
                        break;
                    case 3:
                        message.parent_id = reader.readInt32();
                        break;
                    case 4:
                        message.value = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): AttrItem {
            return AttrItem.deserialize(bytes);
        }
    }
    export class CommentItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            created_at?: string;
            nick_name?: string;
            score?: number;
            comment?: string;
            reply?: string;
            product_identity?: string;
            store_identity?: string;
            spec_identity?: string;
            comment_identity?: string;
            product?: string;
            product_spec?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("created_at" in data && data.created_at != undefined) {
                    this.created_at = data.created_at;
                }
                if ("nick_name" in data && data.nick_name != undefined) {
                    this.nick_name = data.nick_name;
                }
                if ("score" in data && data.score != undefined) {
                    this.score = data.score;
                }
                if ("comment" in data && data.comment != undefined) {
                    this.comment = data.comment;
                }
                if ("reply" in data && data.reply != undefined) {
                    this.reply = data.reply;
                }
                if ("product_identity" in data && data.product_identity != undefined) {
                    this.product_identity = data.product_identity;
                }
                if ("store_identity" in data && data.store_identity != undefined) {
                    this.store_identity = data.store_identity;
                }
                if ("spec_identity" in data && data.spec_identity != undefined) {
                    this.spec_identity = data.spec_identity;
                }
                if ("comment_identity" in data && data.comment_identity != undefined) {
                    this.comment_identity = data.comment_identity;
                }
                if ("product" in data && data.product != undefined) {
                    this.product = data.product;
                }
                if ("product_spec" in data && data.product_spec != undefined) {
                    this.product_spec = data.product_spec;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get nick_name() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set nick_name(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get score() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set score(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get comment() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set comment(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get reply() {
            return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
        }
        set reply(value: string) {
            pb_1.Message.setField(this, 7, value);
        }
        get product_identity() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set product_identity(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get store_identity() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set store_identity(value: string) {
            pb_1.Message.setField(this, 9, value);
        }
        get spec_identity() {
            return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
        }
        set spec_identity(value: string) {
            pb_1.Message.setField(this, 10, value);
        }
        get comment_identity() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set comment_identity(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get product() {
            return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
        }
        set product(value: string) {
            pb_1.Message.setField(this, 12, value);
        }
        get product_spec() {
            return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
        }
        set product_spec(value: string) {
            pb_1.Message.setField(this, 13, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            created_at?: string;
            nick_name?: string;
            score?: number;
            comment?: string;
            reply?: string;
            product_identity?: string;
            store_identity?: string;
            spec_identity?: string;
            comment_identity?: string;
            product?: string;
            product_spec?: string;
        }): CommentItem {
            const message = new CommentItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            if (data.nick_name != null) {
                message.nick_name = data.nick_name;
            }
            if (data.score != null) {
                message.score = data.score;
            }
            if (data.comment != null) {
                message.comment = data.comment;
            }
            if (data.reply != null) {
                message.reply = data.reply;
            }
            if (data.product_identity != null) {
                message.product_identity = data.product_identity;
            }
            if (data.store_identity != null) {
                message.store_identity = data.store_identity;
            }
            if (data.spec_identity != null) {
                message.spec_identity = data.spec_identity;
            }
            if (data.comment_identity != null) {
                message.comment_identity = data.comment_identity;
            }
            if (data.product != null) {
                message.product = data.product;
            }
            if (data.product_spec != null) {
                message.product_spec = data.product_spec;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                created_at?: string;
                nick_name?: string;
                score?: number;
                comment?: string;
                reply?: string;
                product_identity?: string;
                store_identity?: string;
                spec_identity?: string;
                comment_identity?: string;
                product?: string;
                product_spec?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            if (this.nick_name != null) {
                data.nick_name = this.nick_name;
            }
            if (this.score != null) {
                data.score = this.score;
            }
            if (this.comment != null) {
                data.comment = this.comment;
            }
            if (this.reply != null) {
                data.reply = this.reply;
            }
            if (this.product_identity != null) {
                data.product_identity = this.product_identity;
            }
            if (this.store_identity != null) {
                data.store_identity = this.store_identity;
            }
            if (this.spec_identity != null) {
                data.spec_identity = this.spec_identity;
            }
            if (this.comment_identity != null) {
                data.comment_identity = this.comment_identity;
            }
            if (this.product != null) {
                data.product = this.product;
            }
            if (this.product_spec != null) {
                data.product_spec = this.product_spec;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.created_at.length)
                writer.writeString(3, this.created_at);
            if (this.nick_name.length)
                writer.writeString(4, this.nick_name);
            if (this.score != 0)
                writer.writeInt32(5, this.score);
            if (this.comment.length)
                writer.writeString(6, this.comment);
            if (this.reply.length)
                writer.writeString(7, this.reply);
            if (this.product_identity.length)
                writer.writeString(8, this.product_identity);
            if (this.store_identity.length)
                writer.writeString(9, this.store_identity);
            if (this.spec_identity.length)
                writer.writeString(10, this.spec_identity);
            if (this.comment_identity.length)
                writer.writeString(11, this.comment_identity);
            if (this.product.length)
                writer.writeString(12, this.product);
            if (this.product_spec.length)
                writer.writeString(13, this.product_spec);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommentItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommentItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.created_at = reader.readString();
                        break;
                    case 4:
                        message.nick_name = reader.readString();
                        break;
                    case 5:
                        message.score = reader.readInt32();
                        break;
                    case 6:
                        message.comment = reader.readString();
                        break;
                    case 7:
                        message.reply = reader.readString();
                        break;
                    case 8:
                        message.product_identity = reader.readString();
                        break;
                    case 9:
                        message.store_identity = reader.readString();
                        break;
                    case 10:
                        message.spec_identity = reader.readString();
                        break;
                    case 11:
                        message.comment_identity = reader.readString();
                        break;
                    case 12:
                        message.product = reader.readString();
                        break;
                    case 13:
                        message.product_spec = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): CommentItem {
            return CommentItem.deserialize(bytes);
        }
    }
    export class CommentItemRep extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            created_at?: string;
            nick_name?: string;
            score?: number;
            comment?: string;
            reply?: string;
            product_identity?: string;
            store_identity?: string;
            spec_identity?: string;
            comment_identity?: string;
            list?: CommentItem[];
            product?: string;
            product_spec?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [12], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("created_at" in data && data.created_at != undefined) {
                    this.created_at = data.created_at;
                }
                if ("nick_name" in data && data.nick_name != undefined) {
                    this.nick_name = data.nick_name;
                }
                if ("score" in data && data.score != undefined) {
                    this.score = data.score;
                }
                if ("comment" in data && data.comment != undefined) {
                    this.comment = data.comment;
                }
                if ("reply" in data && data.reply != undefined) {
                    this.reply = data.reply;
                }
                if ("product_identity" in data && data.product_identity != undefined) {
                    this.product_identity = data.product_identity;
                }
                if ("store_identity" in data && data.store_identity != undefined) {
                    this.store_identity = data.store_identity;
                }
                if ("spec_identity" in data && data.spec_identity != undefined) {
                    this.spec_identity = data.spec_identity;
                }
                if ("comment_identity" in data && data.comment_identity != undefined) {
                    this.comment_identity = data.comment_identity;
                }
                if ("list" in data && data.list != undefined) {
                    this.list = data.list;
                }
                if ("product" in data && data.product != undefined) {
                    this.product = data.product;
                }
                if ("product_spec" in data && data.product_spec != undefined) {
                    this.product_spec = data.product_spec;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get nick_name() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set nick_name(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get score() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set score(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get comment() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set comment(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get reply() {
            return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
        }
        set reply(value: string) {
            pb_1.Message.setField(this, 7, value);
        }
        get product_identity() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set product_identity(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get store_identity() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set store_identity(value: string) {
            pb_1.Message.setField(this, 9, value);
        }
        get spec_identity() {
            return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
        }
        set spec_identity(value: string) {
            pb_1.Message.setField(this, 10, value);
        }
        get comment_identity() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set comment_identity(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get list() {
            return pb_1.Message.getRepeatedWrapperField(this, CommentItem, 12) as CommentItem[];
        }
        set list(value: CommentItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 12, value);
        }
        get product() {
            return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
        }
        set product(value: string) {
            pb_1.Message.setField(this, 13, value);
        }
        get product_spec() {
            return pb_1.Message.getFieldWithDefault(this, 14, "") as string;
        }
        set product_spec(value: string) {
            pb_1.Message.setField(this, 14, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            created_at?: string;
            nick_name?: string;
            score?: number;
            comment?: string;
            reply?: string;
            product_identity?: string;
            store_identity?: string;
            spec_identity?: string;
            comment_identity?: string;
            list?: ReturnType<typeof CommentItem.prototype.toObject>[];
            product?: string;
            product_spec?: string;
        }): CommentItemRep {
            const message = new CommentItemRep({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            if (data.nick_name != null) {
                message.nick_name = data.nick_name;
            }
            if (data.score != null) {
                message.score = data.score;
            }
            if (data.comment != null) {
                message.comment = data.comment;
            }
            if (data.reply != null) {
                message.reply = data.reply;
            }
            if (data.product_identity != null) {
                message.product_identity = data.product_identity;
            }
            if (data.store_identity != null) {
                message.store_identity = data.store_identity;
            }
            if (data.spec_identity != null) {
                message.spec_identity = data.spec_identity;
            }
            if (data.comment_identity != null) {
                message.comment_identity = data.comment_identity;
            }
            if (data.list != null) {
                message.list = data.list.map(item => CommentItem.fromObject(item));
            }
            if (data.product != null) {
                message.product = data.product;
            }
            if (data.product_spec != null) {
                message.product_spec = data.product_spec;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                created_at?: string;
                nick_name?: string;
                score?: number;
                comment?: string;
                reply?: string;
                product_identity?: string;
                store_identity?: string;
                spec_identity?: string;
                comment_identity?: string;
                list?: ReturnType<typeof CommentItem.prototype.toObject>[];
                product?: string;
                product_spec?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            if (this.nick_name != null) {
                data.nick_name = this.nick_name;
            }
            if (this.score != null) {
                data.score = this.score;
            }
            if (this.comment != null) {
                data.comment = this.comment;
            }
            if (this.reply != null) {
                data.reply = this.reply;
            }
            if (this.product_identity != null) {
                data.product_identity = this.product_identity;
            }
            if (this.store_identity != null) {
                data.store_identity = this.store_identity;
            }
            if (this.spec_identity != null) {
                data.spec_identity = this.spec_identity;
            }
            if (this.comment_identity != null) {
                data.comment_identity = this.comment_identity;
            }
            if (this.list != null) {
                data.list = this.list.map((item: CommentItem) => item.toObject());
            }
            if (this.product != null) {
                data.product = this.product;
            }
            if (this.product_spec != null) {
                data.product_spec = this.product_spec;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.created_at.length)
                writer.writeString(3, this.created_at);
            if (this.nick_name.length)
                writer.writeString(4, this.nick_name);
            if (this.score != 0)
                writer.writeInt32(5, this.score);
            if (this.comment.length)
                writer.writeString(6, this.comment);
            if (this.reply.length)
                writer.writeString(7, this.reply);
            if (this.product_identity.length)
                writer.writeString(8, this.product_identity);
            if (this.store_identity.length)
                writer.writeString(9, this.store_identity);
            if (this.spec_identity.length)
                writer.writeString(10, this.spec_identity);
            if (this.comment_identity.length)
                writer.writeString(11, this.comment_identity);
            if (this.list.length)
                writer.writeRepeatedMessage(12, this.list, (item: CommentItem) => item.serialize(writer));
            if (this.product.length)
                writer.writeString(13, this.product);
            if (this.product_spec.length)
                writer.writeString(14, this.product_spec);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommentItemRep {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommentItemRep();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.created_at = reader.readString();
                        break;
                    case 4:
                        message.nick_name = reader.readString();
                        break;
                    case 5:
                        message.score = reader.readInt32();
                        break;
                    case 6:
                        message.comment = reader.readString();
                        break;
                    case 7:
                        message.reply = reader.readString();
                        break;
                    case 8:
                        message.product_identity = reader.readString();
                        break;
                    case 9:
                        message.store_identity = reader.readString();
                        break;
                    case 10:
                        message.spec_identity = reader.readString();
                        break;
                    case 11:
                        message.comment_identity = reader.readString();
                        break;
                    case 12:
                        reader.readMessage(message.list, () => pb_1.Message.addToRepeatedWrapperField(message, 12, CommentItem.deserialize(reader), CommentItem));
                        break;
                    case 13:
                        message.product = reader.readString();
                        break;
                    case 14:
                        message.product_spec = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): CommentItemRep {
            return CommentItemRep.deserialize(bytes);
        }
    }
    export class DetailBySpecRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            spec_no?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("spec_no" in data && data.spec_no != undefined) {
                    this.spec_no = data.spec_no;
                }
            }
        }
        get spec_no() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set spec_no(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        static fromObject(data: {
            spec_no?: string;
        }): DetailBySpecRequest {
            const message = new DetailBySpecRequest({});
            if (data.spec_no != null) {
                message.spec_no = data.spec_no;
            }
            return message;
        }
        toObject() {
            const data: {
                spec_no?: string;
            } = {};
            if (this.spec_no != null) {
                data.spec_no = this.spec_no;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.spec_no.length)
                writer.writeString(1, this.spec_no);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DetailBySpecRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DetailBySpecRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.spec_no = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): DetailBySpecRequest {
            return DetailBySpecRequest.deserialize(bytes);
        }
    }
    export class OpRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            identity?: string[];
            status?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
            }
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 1, []) as string[];
        }
        set identity(value: string[]) {
            pb_1.Message.setField(this, 1, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 2, value);
        }
        static fromObject(data: {
            identity?: string[];
            status?: number;
        }): OpRequest {
            const message = new OpRequest({});
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            return message;
        }
        toObject() {
            const data: {
                identity?: string[];
                status?: number;
            } = {};
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.identity.length)
                writer.writeRepeatedString(1, this.identity);
            if (this.status != 0)
                writer.writeInt32(2, this.status);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OpRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OpRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        pb_1.Message.addToRepeatedField(message, 1, reader.readString());
                        break;
                    case 2:
                        message.status = reader.readInt32();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): OpRequest {
            return OpRequest.deserialize(bytes);
        }
    }
    export class ModifyRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            identity?: string;
            status?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
            }
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 2, value);
        }
        static fromObject(data: {
            identity?: string;
            status?: number;
        }): ModifyRequest {
            const message = new ModifyRequest({});
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            return message;
        }
        toObject() {
            const data: {
                identity?: string;
                status?: number;
            } = {};
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.identity.length)
                writer.writeString(1, this.identity);
            if (this.status != 0)
                writer.writeInt32(2, this.status);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ModifyRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ModifyRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.identity = reader.readString();
                        break;
                    case 2:
                        message.status = reader.readInt32();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ModifyRequest {
            return ModifyRequest.deserialize(bytes);
        }
    }
    export class ListItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            product_id?: number;
            product?: string;
            spec_id?: number;
            spec?: string;
            spec_no?: string;
            price?: number;
            count?: number;
            img?: string;
            product_identity?: string;
            serial_id?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("product_id" in data && data.product_id != undefined) {
                    this.product_id = data.product_id;
                }
                if ("product" in data && data.product != undefined) {
                    this.product = data.product;
                }
                if ("spec_id" in data && data.spec_id != undefined) {
                    this.spec_id = data.spec_id;
                }
                if ("spec" in data && data.spec != undefined) {
                    this.spec = data.spec;
                }
                if ("spec_no" in data && data.spec_no != undefined) {
                    this.spec_no = data.spec_no;
                }
                if ("price" in data && data.price != undefined) {
                    this.price = data.price;
                }
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
                if ("img" in data && data.img != undefined) {
                    this.img = data.img;
                }
                if ("product_identity" in data && data.product_identity != undefined) {
                    this.product_identity = data.product_identity;
                }
                if ("serial_id" in data && data.serial_id != undefined) {
                    this.serial_id = data.serial_id;
                }
            }
        }
        get product_id() {
            return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
        }
        set product_id(value: number) {
            pb_1.Message.setField(this, 2, value);
        }
        get product() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set product(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get spec_id() {
            return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
        }
        set spec_id(value: number) {
            pb_1.Message.setField(this, 4, value);
        }
        get spec() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set spec(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get spec_no() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set spec_no(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get price() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set price(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get img() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set img(value: string) {
            pb_1.Message.setField(this, 9, value);
        }
        get product_identity() {
            return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
        }
        set product_identity(value: string) {
            pb_1.Message.setField(this, 10, value);
        }
        get serial_id() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set serial_id(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        static fromObject(data: {
            product_id?: number;
            product?: string;
            spec_id?: number;
            spec?: string;
            spec_no?: string;
            price?: number;
            count?: number;
            img?: string;
            product_identity?: string;
            serial_id?: string;
        }): ListItem {
            const message = new ListItem({});
            if (data.product_id != null) {
                message.product_id = data.product_id;
            }
            if (data.product != null) {
                message.product = data.product;
            }
            if (data.spec_id != null) {
                message.spec_id = data.spec_id;
            }
            if (data.spec != null) {
                message.spec = data.spec;
            }
            if (data.spec_no != null) {
                message.spec_no = data.spec_no;
            }
            if (data.price != null) {
                message.price = data.price;
            }
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.img != null) {
                message.img = data.img;
            }
            if (data.product_identity != null) {
                message.product_identity = data.product_identity;
            }
            if (data.serial_id != null) {
                message.serial_id = data.serial_id;
            }
            return message;
        }
        toObject() {
            const data: {
                product_id?: number;
                product?: string;
                spec_id?: number;
                spec?: string;
                spec_no?: string;
                price?: number;
                count?: number;
                img?: string;
                product_identity?: string;
                serial_id?: string;
            } = {};
            if (this.product_id != null) {
                data.product_id = this.product_id;
            }
            if (this.product != null) {
                data.product = this.product;
            }
            if (this.spec_id != null) {
                data.spec_id = this.spec_id;
            }
            if (this.spec != null) {
                data.spec = this.spec;
            }
            if (this.spec_no != null) {
                data.spec_no = this.spec_no;
            }
            if (this.price != null) {
                data.price = this.price;
            }
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.img != null) {
                data.img = this.img;
            }
            if (this.product_identity != null) {
                data.product_identity = this.product_identity;
            }
            if (this.serial_id != null) {
                data.serial_id = this.serial_id;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.product_id != 0)
                writer.writeInt64(2, this.product_id);
            if (this.product.length)
                writer.writeString(3, this.product);
            if (this.spec_id != 0)
                writer.writeInt64(4, this.spec_id);
            if (this.spec.length)
                writer.writeString(5, this.spec);
            if (this.spec_no.length)
                writer.writeString(6, this.spec_no);
            if (this.price != 0)
                writer.writeInt64(7, this.price);
            if (this.count != 0)
                writer.writeInt64(8, this.count);
            if (this.img.length)
                writer.writeString(9, this.img);
            if (this.product_identity.length)
                writer.writeString(10, this.product_identity);
            if (this.serial_id.length)
                writer.writeString(11, this.serial_id);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 2:
                        message.product_id = reader.readInt64();
                        break;
                    case 3:
                        message.product = reader.readString();
                        break;
                    case 4:
                        message.spec_id = reader.readInt64();
                        break;
                    case 5:
                        message.spec = reader.readString();
                        break;
                    case 6:
                        message.spec_no = reader.readString();
                        break;
                    case 7:
                        message.price = reader.readInt64();
                        break;
                    case 8:
                        message.count = reader.readInt64();
                        break;
                    case 9:
                        message.img = reader.readString();
                        break;
                    case 10:
                        message.product_identity = reader.readString();
                        break;
                    case 11:
                        message.serial_id = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ListItem {
            return ListItem.deserialize(bytes);
        }
    }
    export class ListWithIdRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, []) as number[];
        }
        set id(value: number[]) {
            pb_1.Message.setField(this, 1, value);
        }
        static fromObject(data: {
            id?: number[];
        }): ListWithIdRequest {
            const message = new ListWithIdRequest({});
            if (data.id != null) {
                message.id = data.id;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number[];
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id.length)
                writer.writePackedInt64(1, this.id);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListWithIdRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListWithIdRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readPackedInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ListWithIdRequest {
            return ListWithIdRequest.deserialize(bytes);
        }
    }
    export class ListWithIdReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            data?: ListItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
            }
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, ListItem, 1) as ListItem[];
        }
        set data(value: ListItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 1, value);
        }
        static fromObject(data: {
            data?: ReturnType<typeof ListItem.prototype.toObject>[];
        }): ListWithIdReply {
            const message = new ListWithIdReply({});
            if (data.data != null) {
                message.data = data.data.map(item => ListItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                data?: ReturnType<typeof ListItem.prototype.toObject>[];
            } = {};
            if (this.data != null) {
                data.data = this.data.map((item: ListItem) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.data.length)
                writer.writeRepeatedMessage(1, this.data, (item: ListItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListWithIdReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListWithIdReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 1, ListItem.deserialize(reader), ListItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ListWithIdReply {
            return ListWithIdReply.deserialize(bytes);
        }
    }
    export class PhotoReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: PhotoItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
                if ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
            }
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, PhotoItem, 2) as PhotoItem[];
        }
        set data(value: PhotoItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof PhotoItem.prototype.toObject>[];
        }): PhotoReply {
            const message = new PhotoReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => PhotoItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof PhotoItem.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: PhotoItem) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.count != 0)
                writer.writeInt64(1, this.count);
            if (this.data.length)
                writer.writeRepeatedMessage(2, this.data, (item: PhotoItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PhotoReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PhotoReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.count = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 2, PhotoItem.deserialize(reader), PhotoItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): PhotoReply {
            return PhotoReply.deserialize(bytes);
        }
    }
    export class SpecReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: SpecItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
                if ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
            }
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, SpecItem, 2) as SpecItem[];
        }
        set data(value: SpecItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof SpecItem.prototype.toObject>[];
        }): SpecReply {
            const message = new SpecReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => SpecItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof SpecItem.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: SpecItem) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.count != 0)
                writer.writeInt64(1, this.count);
            if (this.data.length)
                writer.writeRepeatedMessage(2, this.data, (item: SpecItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SpecReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SpecReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.count = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 2, SpecItem.deserialize(reader), SpecItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): SpecReply {
            return SpecReply.deserialize(bytes);
        }
    }
    export class CommentListReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: CommentItemRep[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
                if ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
            }
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, CommentItemRep, 2) as CommentItemRep[];
        }
        set data(value: CommentItemRep[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof CommentItemRep.prototype.toObject>[];
        }): CommentListReply {
            const message = new CommentListReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => CommentItemRep.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof CommentItemRep.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: CommentItemRep) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.count != 0)
                writer.writeInt64(1, this.count);
            if (this.data.length)
                writer.writeRepeatedMessage(2, this.data, (item: CommentItemRep) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommentListReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommentListReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.count = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 2, CommentItemRep.deserialize(reader), CommentItemRep));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): CommentListReply {
            return CommentListReply.deserialize(bytes);
        }
    }
    export class StatisticReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            total?: number;
            selling?: number;
            forbidden?: number;
            draft?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("total" in data && data.total != undefined) {
                    this.total = data.total;
                }
                if ("selling" in data && data.selling != undefined) {
                    this.selling = data.selling;
                }
                if ("forbidden" in data && data.forbidden != undefined) {
                    this.forbidden = data.forbidden;
                }
                if ("draft" in data && data.draft != undefined) {
                    this.draft = data.draft;
                }
            }
        }
        get total() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set total(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get selling() {
            return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
        }
        set selling(value: number) {
            pb_1.Message.setField(this, 2, value);
        }
        get forbidden() {
            return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
        }
        set forbidden(value: number) {
            pb_1.Message.setField(this, 3, value);
        }
        get draft() {
            return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
        }
        set draft(value: number) {
            pb_1.Message.setField(this, 4, value);
        }
        static fromObject(data: {
            total?: number;
            selling?: number;
            forbidden?: number;
            draft?: number;
        }): StatisticReply {
            const message = new StatisticReply({});
            if (data.total != null) {
                message.total = data.total;
            }
            if (data.selling != null) {
                message.selling = data.selling;
            }
            if (data.forbidden != null) {
                message.forbidden = data.forbidden;
            }
            if (data.draft != null) {
                message.draft = data.draft;
            }
            return message;
        }
        toObject() {
            const data: {
                total?: number;
                selling?: number;
                forbidden?: number;
                draft?: number;
            } = {};
            if (this.total != null) {
                data.total = this.total;
            }
            if (this.selling != null) {
                data.selling = this.selling;
            }
            if (this.forbidden != null) {
                data.forbidden = this.forbidden;
            }
            if (this.draft != null) {
                data.draft = this.draft;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.total != 0)
                writer.writeInt64(1, this.total);
            if (this.selling != 0)
                writer.writeInt64(2, this.selling);
            if (this.forbidden != 0)
                writer.writeInt64(3, this.forbidden);
            if (this.draft != 0)
                writer.writeInt64(4, this.draft);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StatisticReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StatisticReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.total = reader.readInt64();
                        break;
                    case 2:
                        message.selling = reader.readInt64();
                        break;
                    case 3:
                        message.forbidden = reader.readInt64();
                        break;
                    case 4:
                        message.draft = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): StatisticReply {
            return StatisticReply.deserialize(bytes);
        }
    }
    export class OrgBySpecIdReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            title?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            title?: string;
        }): OrgBySpecIdReply {
            const message = new OrgBySpecIdReply({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                title?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.title.length)
                writer.writeString(3, this.title);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OrgBySpecIdReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrgBySpecIdReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.title = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): OrgBySpecIdReply {
            return OrgBySpecIdReply.deserialize(bytes);
        }
    }
    export class Subjoin extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            category_paths?: string;
            sub_title?: string;
            keyword?: string;
            stock?: number;
            sales_price?: number;
            args?: string;
            comment_total?: number;
            sale_total?: number;
            view_total?: number;
            image_total?: number;
            recommend?: number;
            sort?: number;
            types?: number;
            star?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("category_paths" in data && data.category_paths != undefined) {
                    this.category_paths = data.category_paths;
                }
                if ("sub_title" in data && data.sub_title != undefined) {
                    this.sub_title = data.sub_title;
                }
                if ("keyword" in data && data.keyword != undefined) {
                    this.keyword = data.keyword;
                }
                if ("stock" in data && data.stock != undefined) {
                    this.stock = data.stock;
                }
                if ("sales_price" in data && data.sales_price != undefined) {
                    this.sales_price = data.sales_price;
                }
                if ("args" in data && data.args != undefined) {
                    this.args = data.args;
                }
                if ("comment_total" in data && data.comment_total != undefined) {
                    this.comment_total = data.comment_total;
                }
                if ("sale_total" in data && data.sale_total != undefined) {
                    this.sale_total = data.sale_total;
                }
                if ("view_total" in data && data.view_total != undefined) {
                    this.view_total = data.view_total;
                }
                if ("image_total" in data && data.image_total != undefined) {
                    this.image_total = data.image_total;
                }
                if ("recommend" in data && data.recommend != undefined) {
                    this.recommend = data.recommend;
                }
                if ("sort" in data && data.sort != undefined) {
                    this.sort = data.sort;
                }
                if ("types" in data && data.types != undefined) {
                    this.types = data.types;
                }
                if ("star" in data && data.star != undefined) {
                    this.star = data.star;
                }
            }
        }
        get category_paths() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set category_paths(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get sub_title() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set sub_title(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get keyword() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set keyword(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get stock() {
            return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
        }
        set stock(value: number) {
            pb_1.Message.setField(this, 4, value);
        }
        get sales_price() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set sales_price(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get args() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set args(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get comment_total() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set comment_total(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get sale_total() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set sale_total(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get view_total() {
            return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
        }
        set view_total(value: number) {
            pb_1.Message.setField(this, 9, value);
        }
        get image_total() {
            return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
        }
        set image_total(value: number) {
            pb_1.Message.setField(this, 10, value);
        }
        get recommend() {
            return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
        }
        set recommend(value: number) {
            pb_1.Message.setField(this, 11, value);
        }
        get sort() {
            return pb_1.Message.getFieldWithDefault(this, 12, 0) as number;
        }
        set sort(value: number) {
            pb_1.Message.setField(this, 12, value);
        }
        get types() {
            return pb_1.Message.getFieldWithDefault(this, 13, 0) as number;
        }
        set types(value: number) {
            pb_1.Message.setField(this, 13, value);
        }
        get star() {
            return pb_1.Message.getFieldWithDefault(this, 14, 0) as number;
        }
        set star(value: number) {
            pb_1.Message.setField(this, 14, value);
        }
        static fromObject(data: {
            category_paths?: string;
            sub_title?: string;
            keyword?: string;
            stock?: number;
            sales_price?: number;
            args?: string;
            comment_total?: number;
            sale_total?: number;
            view_total?: number;
            image_total?: number;
            recommend?: number;
            sort?: number;
            types?: number;
            star?: number;
        }): Subjoin {
            const message = new Subjoin({});
            if (data.category_paths != null) {
                message.category_paths = data.category_paths;
            }
            if (data.sub_title != null) {
                message.sub_title = data.sub_title;
            }
            if (data.keyword != null) {
                message.keyword = data.keyword;
            }
            if (data.stock != null) {
                message.stock = data.stock;
            }
            if (data.sales_price != null) {
                message.sales_price = data.sales_price;
            }
            if (data.args != null) {
                message.args = data.args;
            }
            if (data.comment_total != null) {
                message.comment_total = data.comment_total;
            }
            if (data.sale_total != null) {
                message.sale_total = data.sale_total;
            }
            if (data.view_total != null) {
                message.view_total = data.view_total;
            }
            if (data.image_total != null) {
                message.image_total = data.image_total;
            }
            if (data.recommend != null) {
                message.recommend = data.recommend;
            }
            if (data.sort != null) {
                message.sort = data.sort;
            }
            if (data.types != null) {
                message.types = data.types;
            }
            if (data.star != null) {
                message.star = data.star;
            }
            return message;
        }
        toObject() {
            const data: {
                category_paths?: string;
                sub_title?: string;
                keyword?: string;
                stock?: number;
                sales_price?: number;
                args?: string;
                comment_total?: number;
                sale_total?: number;
                view_total?: number;
                image_total?: number;
                recommend?: number;
                sort?: number;
                types?: number;
                star?: number;
            } = {};
            if (this.category_paths != null) {
                data.category_paths = this.category_paths;
            }
            if (this.sub_title != null) {
                data.sub_title = this.sub_title;
            }
            if (this.keyword != null) {
                data.keyword = this.keyword;
            }
            if (this.stock != null) {
                data.stock = this.stock;
            }
            if (this.sales_price != null) {
                data.sales_price = this.sales_price;
            }
            if (this.args != null) {
                data.args = this.args;
            }
            if (this.comment_total != null) {
                data.comment_total = this.comment_total;
            }
            if (this.sale_total != null) {
                data.sale_total = this.sale_total;
            }
            if (this.view_total != null) {
                data.view_total = this.view_total;
            }
            if (this.image_total != null) {
                data.image_total = this.image_total;
            }
            if (this.recommend != null) {
                data.recommend = this.recommend;
            }
            if (this.sort != null) {
                data.sort = this.sort;
            }
            if (this.types != null) {
                data.types = this.types;
            }
            if (this.star != null) {
                data.star = this.star;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.category_paths.length)
                writer.writeString(1, this.category_paths);
            if (this.sub_title.length)
                writer.writeString(2, this.sub_title);
            if (this.keyword.length)
                writer.writeString(3, this.keyword);
            if (this.stock != 0)
                writer.writeInt32(4, this.stock);
            if (this.sales_price != 0)
                writer.writeInt64(5, this.sales_price);
            if (this.args.length)
                writer.writeString(6, this.args);
            if (this.comment_total != 0)
                writer.writeInt32(7, this.comment_total);
            if (this.sale_total != 0)
                writer.writeInt32(8, this.sale_total);
            if (this.view_total != 0)
                writer.writeInt32(9, this.view_total);
            if (this.image_total != 0)
                writer.writeInt32(10, this.image_total);
            if (this.recommend != 0)
                writer.writeInt32(11, this.recommend);
            if (this.sort != 0)
                writer.writeInt32(12, this.sort);
            if (this.types != 0)
                writer.writeInt32(13, this.types);
            if (this.star != 0)
                writer.writeInt64(14, this.star);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Subjoin {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Subjoin();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.category_paths = reader.readString();
                        break;
                    case 2:
                        message.sub_title = reader.readString();
                        break;
                    case 3:
                        message.keyword = reader.readString();
                        break;
                    case 4:
                        message.stock = reader.readInt32();
                        break;
                    case 5:
                        message.sales_price = reader.readInt64();
                        break;
                    case 6:
                        message.args = reader.readString();
                        break;
                    case 7:
                        message.comment_total = reader.readInt32();
                        break;
                    case 8:
                        message.sale_total = reader.readInt32();
                        break;
                    case 9:
                        message.view_total = reader.readInt32();
                        break;
                    case 10:
                        message.image_total = reader.readInt32();
                        break;
                    case 11:
                        message.recommend = reader.readInt32();
                        break;
                    case 12:
                        message.sort = reader.readInt32();
                        break;
                    case 13:
                        message.types = reader.readInt32();
                        break;
                    case 14:
                        message.star = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): Subjoin {
            return Subjoin.deserialize(bytes);
        }
    }
    export class ListReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: ProductItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
                if ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
            }
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, ProductItem, 2) as ProductItem[];
        }
        set data(value: ProductItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof ProductItem.prototype.toObject>[];
        }): ListReply {
            const message = new ListReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => ProductItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof ProductItem.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: ProductItem) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.count != 0)
                writer.writeInt64(1, this.count);
            if (this.data.length)
                writer.writeRepeatedMessage(2, this.data, (item: ProductItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.count = reader.readInt64();
                        break;
                    case 2:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ProductItem.deserialize(reader), ProductItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ListReply {
            return ListReply.deserialize(bytes);
        }
    }
    export class ProductBase extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            supply_id?: number;
            category_id?: number;
            title?: string;
            measuring_name?: string;
            sell_max?: number;
            sell_min?: number;
            wastage?: number;
            standard_number?: string;
            brand?: string;
            stock_type?: number;
            status?: number;
            putaway_time?: string;
            cover_image?: string;
            images?: string[];
            content?: string;
            serial_id?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [24], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("supply_id" in data && data.supply_id != undefined) {
                    this.supply_id = data.supply_id;
                }
                if ("category_id" in data && data.category_id != undefined) {
                    this.category_id = data.category_id;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("measuring_name" in data && data.measuring_name != undefined) {
                    this.measuring_name = data.measuring_name;
                }
                if ("sell_max" in data && data.sell_max != undefined) {
                    this.sell_max = data.sell_max;
                }
                if ("sell_min" in data && data.sell_min != undefined) {
                    this.sell_min = data.sell_min;
                }
                if ("wastage" in data && data.wastage != undefined) {
                    this.wastage = data.wastage;
                }
                if ("standard_number" in data && data.standard_number != undefined) {
                    this.standard_number = data.standard_number;
                }
                if ("brand" in data && data.brand != undefined) {
                    this.brand = data.brand;
                }
                if ("stock_type" in data && data.stock_type != undefined) {
                    this.stock_type = data.stock_type;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("putaway_time" in data && data.putaway_time != undefined) {
                    this.putaway_time = data.putaway_time;
                }
                if ("cover_image" in data && data.cover_image != undefined) {
                    this.cover_image = data.cover_image;
                }
                if ("images" in data && data.images != undefined) {
                    this.images = data.images;
                }
                if ("content" in data && data.content != undefined) {
                    this.content = data.content;
                }
                if ("serial_id" in data && data.serial_id != undefined) {
                    this.serial_id = data.serial_id;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get supply_id() {
            return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
        }
        set supply_id(value: number) {
            pb_1.Message.setField(this, 4, value);
        }
        get category_id() {
            return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
        }
        set category_id(value: number) {
            pb_1.Message.setField(this, 6, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get measuring_name() {
            return pb_1.Message.getFieldWithDefault(this, 99, "") as string;
        }
        set measuring_name(value: string) {
            pb_1.Message.setField(this, 99, value);
        }
        get sell_max() {
            return pb_1.Message.getFieldWithDefault(this, 97, 0) as number;
        }
        set sell_max(value: number) {
            pb_1.Message.setField(this, 97, value);
        }
        get sell_min() {
            return pb_1.Message.getFieldWithDefault(this, 96, 0) as number;
        }
        set sell_min(value: number) {
            pb_1.Message.setField(this, 96, value);
        }
        get wastage() {
            return pb_1.Message.getFieldWithDefault(this, 95, 0) as number;
        }
        set wastage(value: number) {
            pb_1.Message.setField(this, 95, value);
        }
        get standard_number() {
            return pb_1.Message.getFieldWithDefault(this, 94, "") as string;
        }
        set standard_number(value: string) {
            pb_1.Message.setField(this, 94, value);
        }
        get brand() {
            return pb_1.Message.getFieldWithDefault(this, 93, "") as string;
        }
        set brand(value: string) {
            pb_1.Message.setField(this, 93, value);
        }
        get stock_type() {
            return pb_1.Message.getFieldWithDefault(this, 92, 0) as number;
        }
        set stock_type(value: number) {
            pb_1.Message.setField(this, 92, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 91, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 91, value);
        }
        get putaway_time() {
            return pb_1.Message.getFieldWithDefault(this, 90, "") as string;
        }
        set putaway_time(value: string) {
            pb_1.Message.setField(this, 90, value);
        }
        get cover_image() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set cover_image(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get images() {
            return pb_1.Message.getFieldWithDefault(this, 24, []) as string[];
        }
        set images(value: string[]) {
            pb_1.Message.setField(this, 24, value);
        }
        get content() {
            return pb_1.Message.getFieldWithDefault(this, 14, "") as string;
        }
        set content(value: string) {
            pb_1.Message.setField(this, 14, value);
        }
        get serial_id() {
            return pb_1.Message.getFieldWithDefault(this, 15, "") as string;
        }
        set serial_id(value: string) {
            pb_1.Message.setField(this, 15, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            supply_id?: number;
            category_id?: number;
            title?: string;
            measuring_name?: string;
            sell_max?: number;
            sell_min?: number;
            wastage?: number;
            standard_number?: string;
            brand?: string;
            stock_type?: number;
            status?: number;
            putaway_time?: string;
            cover_image?: string;
            images?: string[];
            content?: string;
            serial_id?: string;
        }): ProductBase {
            const message = new ProductBase({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.supply_id != null) {
                message.supply_id = data.supply_id;
            }
            if (data.category_id != null) {
                message.category_id = data.category_id;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.measuring_name != null) {
                message.measuring_name = data.measuring_name;
            }
            if (data.sell_max != null) {
                message.sell_max = data.sell_max;
            }
            if (data.sell_min != null) {
                message.sell_min = data.sell_min;
            }
            if (data.wastage != null) {
                message.wastage = data.wastage;
            }
            if (data.standard_number != null) {
                message.standard_number = data.standard_number;
            }
            if (data.brand != null) {
                message.brand = data.brand;
            }
            if (data.stock_type != null) {
                message.stock_type = data.stock_type;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.putaway_time != null) {
                message.putaway_time = data.putaway_time;
            }
            if (data.cover_image != null) {
                message.cover_image = data.cover_image;
            }
            if (data.images != null) {
                message.images = data.images;
            }
            if (data.content != null) {
                message.content = data.content;
            }
            if (data.serial_id != null) {
                message.serial_id = data.serial_id;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                supply_id?: number;
                category_id?: number;
                title?: string;
                measuring_name?: string;
                sell_max?: number;
                sell_min?: number;
                wastage?: number;
                standard_number?: string;
                brand?: string;
                stock_type?: number;
                status?: number;
                putaway_time?: string;
                cover_image?: string;
                images?: string[];
                content?: string;
                serial_id?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.supply_id != null) {
                data.supply_id = this.supply_id;
            }
            if (this.category_id != null) {
                data.category_id = this.category_id;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.measuring_name != null) {
                data.measuring_name = this.measuring_name;
            }
            if (this.sell_max != null) {
                data.sell_max = this.sell_max;
            }
            if (this.sell_min != null) {
                data.sell_min = this.sell_min;
            }
            if (this.wastage != null) {
                data.wastage = this.wastage;
            }
            if (this.standard_number != null) {
                data.standard_number = this.standard_number;
            }
            if (this.brand != null) {
                data.brand = this.brand;
            }
            if (this.stock_type != null) {
                data.stock_type = this.stock_type;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.putaway_time != null) {
                data.putaway_time = this.putaway_time;
            }
            if (this.cover_image != null) {
                data.cover_image = this.cover_image;
            }
            if (this.images != null) {
                data.images = this.images;
            }
            if (this.content != null) {
                data.content = this.content;
            }
            if (this.serial_id != null) {
                data.serial_id = this.serial_id;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.supply_id != 0)
                writer.writeInt64(4, this.supply_id);
            if (this.category_id != 0)
                writer.writeInt64(6, this.category_id);
            if (this.title.length)
                writer.writeString(8, this.title);
            if (this.measuring_name.length)
                writer.writeString(99, this.measuring_name);
            if (this.sell_max != 0)
                writer.writeInt64(97, this.sell_max);
            if (this.sell_min != 0)
                writer.writeInt64(96, this.sell_min);
            if (this.wastage != 0)
                writer.writeInt64(95, this.wastage);
            if (this.standard_number.length)
                writer.writeString(94, this.standard_number);
            if (this.brand.length)
                writer.writeString(93, this.brand);
            if (this.stock_type != 0)
                writer.writeInt64(92, this.stock_type);
            if (this.status != 0)
                writer.writeInt32(91, this.status);
            if (this.putaway_time.length)
                writer.writeString(90, this.putaway_time);
            if (this.cover_image.length)
                writer.writeString(11, this.cover_image);
            if (this.images.length)
                writer.writeRepeatedString(24, this.images);
            if (this.content.length)
                writer.writeString(14, this.content);
            if (this.serial_id.length)
                writer.writeString(15, this.serial_id);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProductBase {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProductBase();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 4:
                        message.supply_id = reader.readInt64();
                        break;
                    case 6:
                        message.category_id = reader.readInt64();
                        break;
                    case 8:
                        message.title = reader.readString();
                        break;
                    case 99:
                        message.measuring_name = reader.readString();
                        break;
                    case 97:
                        message.sell_max = reader.readInt64();
                        break;
                    case 96:
                        message.sell_min = reader.readInt64();
                        break;
                    case 95:
                        message.wastage = reader.readInt64();
                        break;
                    case 94:
                        message.standard_number = reader.readString();
                        break;
                    case 93:
                        message.brand = reader.readString();
                        break;
                    case 92:
                        message.stock_type = reader.readInt64();
                        break;
                    case 91:
                        message.status = reader.readInt32();
                        break;
                    case 90:
                        message.putaway_time = reader.readString();
                        break;
                    case 11:
                        message.cover_image = reader.readString();
                        break;
                    case 24:
                        pb_1.Message.addToRepeatedField(message, 24, reader.readString());
                        break;
                    case 14:
                        message.content = reader.readString();
                        break;
                    case 15:
                        message.serial_id = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ProductBase {
            return ProductBase.deserialize(bytes);
        }
    }
    export class SpecItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            product_identity?: string;
            store_identity?: string;
            title?: string;
            stock_type?: number;
            stock?: number;
            price?: number;
            direct_sales?: number;
            tp_type?: number;
            ds_tp_type?: number;
            img?: string;
            spec_no?: string;
            keyword?: string;
            purchasing_price?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("product_identity" in data && data.product_identity != undefined) {
                    this.product_identity = data.product_identity;
                }
                if ("store_identity" in data && data.store_identity != undefined) {
                    this.store_identity = data.store_identity;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("stock_type" in data && data.stock_type != undefined) {
                    this.stock_type = data.stock_type;
                }
                if ("stock" in data && data.stock != undefined) {
                    this.stock = data.stock;
                }
                if ("price" in data && data.price != undefined) {
                    this.price = data.price;
                }
                if ("direct_sales" in data && data.direct_sales != undefined) {
                    this.direct_sales = data.direct_sales;
                }
                if ("tp_type" in data && data.tp_type != undefined) {
                    this.tp_type = data.tp_type;
                }
                if ("ds_tp_type" in data && data.ds_tp_type != undefined) {
                    this.ds_tp_type = data.ds_tp_type;
                }
                if ("img" in data && data.img != undefined) {
                    this.img = data.img;
                }
                if ("spec_no" in data && data.spec_no != undefined) {
                    this.spec_no = data.spec_no;
                }
                if ("keyword" in data && data.keyword != undefined) {
                    this.keyword = data.keyword;
                }
                if ("purchasing_price" in data && data.purchasing_price != undefined) {
                    this.purchasing_price = data.purchasing_price;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get product_identity() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set product_identity(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get store_identity() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set store_identity(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get stock_type() {
            return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
        }
        set stock_type(value: number) {
            pb_1.Message.setField(this, 6, value);
        }
        get stock() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set stock(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get price() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set price(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get direct_sales() {
            return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
        }
        set direct_sales(value: number) {
            pb_1.Message.setField(this, 9, value);
        }
        get tp_type() {
            return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
        }
        set tp_type(value: number) {
            pb_1.Message.setField(this, 10, value);
        }
        get ds_tp_type() {
            return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
        }
        set ds_tp_type(value: number) {
            pb_1.Message.setField(this, 11, value);
        }
        get img() {
            return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
        }
        set img(value: string) {
            pb_1.Message.setField(this, 12, value);
        }
        get spec_no() {
            return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
        }
        set spec_no(value: string) {
            pb_1.Message.setField(this, 13, value);
        }
        get keyword() {
            return pb_1.Message.getFieldWithDefault(this, 14, "") as string;
        }
        set keyword(value: string) {
            pb_1.Message.setField(this, 14, value);
        }
        get purchasing_price() {
            return pb_1.Message.getFieldWithDefault(this, 15, 0) as number;
        }
        set purchasing_price(value: number) {
            pb_1.Message.setField(this, 15, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            product_identity?: string;
            store_identity?: string;
            title?: string;
            stock_type?: number;
            stock?: number;
            price?: number;
            direct_sales?: number;
            tp_type?: number;
            ds_tp_type?: number;
            img?: string;
            spec_no?: string;
            keyword?: string;
            purchasing_price?: number;
        }): SpecItem {
            const message = new SpecItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.product_identity != null) {
                message.product_identity = data.product_identity;
            }
            if (data.store_identity != null) {
                message.store_identity = data.store_identity;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.stock_type != null) {
                message.stock_type = data.stock_type;
            }
            if (data.stock != null) {
                message.stock = data.stock;
            }
            if (data.price != null) {
                message.price = data.price;
            }
            if (data.direct_sales != null) {
                message.direct_sales = data.direct_sales;
            }
            if (data.tp_type != null) {
                message.tp_type = data.tp_type;
            }
            if (data.ds_tp_type != null) {
                message.ds_tp_type = data.ds_tp_type;
            }
            if (data.img != null) {
                message.img = data.img;
            }
            if (data.spec_no != null) {
                message.spec_no = data.spec_no;
            }
            if (data.keyword != null) {
                message.keyword = data.keyword;
            }
            if (data.purchasing_price != null) {
                message.purchasing_price = data.purchasing_price;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                product_identity?: string;
                store_identity?: string;
                title?: string;
                stock_type?: number;
                stock?: number;
                price?: number;
                direct_sales?: number;
                tp_type?: number;
                ds_tp_type?: number;
                img?: string;
                spec_no?: string;
                keyword?: string;
                purchasing_price?: number;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.product_identity != null) {
                data.product_identity = this.product_identity;
            }
            if (this.store_identity != null) {
                data.store_identity = this.store_identity;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.stock_type != null) {
                data.stock_type = this.stock_type;
            }
            if (this.stock != null) {
                data.stock = this.stock;
            }
            if (this.price != null) {
                data.price = this.price;
            }
            if (this.direct_sales != null) {
                data.direct_sales = this.direct_sales;
            }
            if (this.tp_type != null) {
                data.tp_type = this.tp_type;
            }
            if (this.ds_tp_type != null) {
                data.ds_tp_type = this.ds_tp_type;
            }
            if (this.img != null) {
                data.img = this.img;
            }
            if (this.spec_no != null) {
                data.spec_no = this.spec_no;
            }
            if (this.keyword != null) {
                data.keyword = this.keyword;
            }
            if (this.purchasing_price != null) {
                data.purchasing_price = this.purchasing_price;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.product_identity.length)
                writer.writeString(3, this.product_identity);
            if (this.store_identity.length)
                writer.writeString(4, this.store_identity);
            if (this.title.length)
                writer.writeString(5, this.title);
            if (this.stock_type != 0)
                writer.writeInt32(6, this.stock_type);
            if (this.stock != 0)
                writer.writeInt64(7, this.stock);
            if (this.price != 0)
                writer.writeInt64(8, this.price);
            if (this.direct_sales != 0)
                writer.writeInt64(9, this.direct_sales);
            if (this.tp_type != 0)
                writer.writeInt32(10, this.tp_type);
            if (this.ds_tp_type != 0)
                writer.writeInt32(11, this.ds_tp_type);
            if (this.img.length)
                writer.writeString(12, this.img);
            if (this.spec_no.length)
                writer.writeString(13, this.spec_no);
            if (this.keyword.length)
                writer.writeString(14, this.keyword);
            if (this.purchasing_price != 0)
                writer.writeInt64(15, this.purchasing_price);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SpecItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SpecItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.product_identity = reader.readString();
                        break;
                    case 4:
                        message.store_identity = reader.readString();
                        break;
                    case 5:
                        message.title = reader.readString();
                        break;
                    case 6:
                        message.stock_type = reader.readInt32();
                        break;
                    case 7:
                        message.stock = reader.readInt64();
                        break;
                    case 8:
                        message.price = reader.readInt64();
                        break;
                    case 9:
                        message.direct_sales = reader.readInt64();
                        break;
                    case 10:
                        message.tp_type = reader.readInt32();
                        break;
                    case 11:
                        message.ds_tp_type = reader.readInt32();
                        break;
                    case 12:
                        message.img = reader.readString();
                        break;
                    case 13:
                        message.spec_no = reader.readString();
                        break;
                    case 14:
                        message.keyword = reader.readString();
                        break;
                    case 15:
                        message.purchasing_price = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): SpecItem {
            return SpecItem.deserialize(bytes);
        }
    }
    export class PhotoItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            name?: string;
            identity?: string;
            product_identity?: string;
            url?: string;
            sort?: number;
            types?: string;
            id?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("product_identity" in data && data.product_identity != undefined) {
                    this.product_identity = data.product_identity;
                }
                if ("url" in data && data.url != undefined) {
                    this.url = data.url;
                }
                if ("sort" in data && data.sort != undefined) {
                    this.sort = data.sort;
                }
                if ("types" in data && data.types != undefined) {
                    this.types = data.types;
                }
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
            }
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set name(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get product_identity() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set product_identity(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get url() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set url(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get sort() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set sort(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get types() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set types(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        static fromObject(data: {
            name?: string;
            identity?: string;
            product_identity?: string;
            url?: string;
            sort?: number;
            types?: string;
            id?: number;
        }): PhotoItem {
            const message = new PhotoItem({});
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.product_identity != null) {
                message.product_identity = data.product_identity;
            }
            if (data.url != null) {
                message.url = data.url;
            }
            if (data.sort != null) {
                message.sort = data.sort;
            }
            if (data.types != null) {
                message.types = data.types;
            }
            if (data.id != null) {
                message.id = data.id;
            }
            return message;
        }
        toObject() {
            const data: {
                name?: string;
                identity?: string;
                product_identity?: string;
                url?: string;
                sort?: number;
                types?: string;
                id?: number;
            } = {};
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.product_identity != null) {
                data.product_identity = this.product_identity;
            }
            if (this.url != null) {
                data.url = this.url;
            }
            if (this.sort != null) {
                data.sort = this.sort;
            }
            if (this.types != null) {
                data.types = this.types;
            }
            if (this.id != null) {
                data.id = this.id;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.name.length)
                writer.writeString(1, this.name);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.product_identity.length)
                writer.writeString(3, this.product_identity);
            if (this.url.length)
                writer.writeString(4, this.url);
            if (this.sort != 0)
                writer.writeInt32(5, this.sort);
            if (this.types.length)
                writer.writeString(6, this.types);
            if (this.id != 0)
                writer.writeInt64(7, this.id);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PhotoItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PhotoItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.name = reader.readString();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.product_identity = reader.readString();
                        break;
                    case 4:
                        message.url = reader.readString();
                        break;
                    case 5:
                        message.sort = reader.readInt32();
                        break;
                    case 6:
                        message.types = reader.readString();
                        break;
                    case 7:
                        message.id = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): PhotoItem {
            return PhotoItem.deserialize(bytes);
        }
    }
    export class CategoriesItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            title?: string;
            en_title?: string;
            parent_id?: number;
            paths?: string;
            intro?: string;
            icon?: string;
            sort?: number;
            status?: number;
            created_at?: string;
            categories?: CategoriesItem[];
            keys?: string;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [12], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("en_title" in data && data.en_title != undefined) {
                    this.en_title = data.en_title;
                }
                if ("parent_id" in data && data.parent_id != undefined) {
                    this.parent_id = data.parent_id;
                }
                if ("paths" in data && data.paths != undefined) {
                    this.paths = data.paths;
                }
                if ("intro" in data && data.intro != undefined) {
                    this.intro = data.intro;
                }
                if ("icon" in data && data.icon != undefined) {
                    this.icon = data.icon;
                }
                if ("sort" in data && data.sort != undefined) {
                    this.sort = data.sort;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("created_at" in data && data.created_at != undefined) {
                    this.created_at = data.created_at;
                }
                if ("categories" in data && data.categories != undefined) {
                    this.categories = data.categories;
                }
                if ("keys" in data && data.keys != undefined) {
                    this.keys = data.keys;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get en_title() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set en_title(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get parent_id() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set parent_id(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get paths() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set paths(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get intro() {
            return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
        }
        set intro(value: string) {
            pb_1.Message.setField(this, 7, value);
        }
        get icon() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set icon(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get sort() {
            return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
        }
        set sort(value: number) {
            pb_1.Message.setField(this, 9, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 10, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get categories() {
            return pb_1.Message.getRepeatedWrapperField(this, CategoriesItem, 12) as CategoriesItem[];
        }
        set categories(value: CategoriesItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 12, value);
        }
        get keys() {
            return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
        }
        set keys(value: string) {
            pb_1.Message.setField(this, 13, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            title?: string;
            en_title?: string;
            parent_id?: number;
            paths?: string;
            intro?: string;
            icon?: string;
            sort?: number;
            status?: number;
            created_at?: string;
            categories?: ReturnType<typeof CategoriesItem.prototype.toObject>[];
            keys?: string;
        }): CategoriesItem {
            const message = new CategoriesItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.en_title != null) {
                message.en_title = data.en_title;
            }
            if (data.parent_id != null) {
                message.parent_id = data.parent_id;
            }
            if (data.paths != null) {
                message.paths = data.paths;
            }
            if (data.intro != null) {
                message.intro = data.intro;
            }
            if (data.icon != null) {
                message.icon = data.icon;
            }
            if (data.sort != null) {
                message.sort = data.sort;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            if (data.categories != null) {
                message.categories = data.categories.map(item => CategoriesItem.fromObject(item));
            }
            if (data.keys != null) {
                message.keys = data.keys;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                title?: string;
                en_title?: string;
                parent_id?: number;
                paths?: string;
                intro?: string;
                icon?: string;
                sort?: number;
                status?: number;
                created_at?: string;
                categories?: ReturnType<typeof CategoriesItem.prototype.toObject>[];
                keys?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.en_title != null) {
                data.en_title = this.en_title;
            }
            if (this.parent_id != null) {
                data.parent_id = this.parent_id;
            }
            if (this.paths != null) {
                data.paths = this.paths;
            }
            if (this.intro != null) {
                data.intro = this.intro;
            }
            if (this.icon != null) {
                data.icon = this.icon;
            }
            if (this.sort != null) {
                data.sort = this.sort;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            if (this.categories != null) {
                data.categories = this.categories.map((item: CategoriesItem) => item.toObject());
            }
            if (this.keys != null) {
                data.keys = this.keys;
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.title.length)
                writer.writeString(3, this.title);
            if (this.en_title.length)
                writer.writeString(4, this.en_title);
            if (this.parent_id != 0)
                writer.writeInt64(5, this.parent_id);
            if (this.paths.length)
                writer.writeString(6, this.paths);
            if (this.intro.length)
                writer.writeString(7, this.intro);
            if (this.icon.length)
                writer.writeString(8, this.icon);
            if (this.sort != 0)
                writer.writeInt32(9, this.sort);
            if (this.status != 0)
                writer.writeInt32(10, this.status);
            if (this.created_at.length)
                writer.writeString(11, this.created_at);
            if (this.categories.length)
                writer.writeRepeatedMessage(12, this.categories, (item: CategoriesItem) => item.serialize(writer));
            if (this.keys.length)
                writer.writeString(13, this.keys);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CategoriesItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CategoriesItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.title = reader.readString();
                        break;
                    case 4:
                        message.en_title = reader.readString();
                        break;
                    case 5:
                        message.parent_id = reader.readInt64();
                        break;
                    case 6:
                        message.paths = reader.readString();
                        break;
                    case 7:
                        message.intro = reader.readString();
                        break;
                    case 8:
                        message.icon = reader.readString();
                        break;
                    case 9:
                        message.sort = reader.readInt32();
                        break;
                    case 10:
                        message.status = reader.readInt32();
                        break;
                    case 11:
                        message.created_at = reader.readString();
                        break;
                    case 12:
                        reader.readMessage(message.categories, () => pb_1.Message.addToRepeatedWrapperField(message, 12, CategoriesItem.deserialize(reader), CategoriesItem));
                        break;
                    case 13:
                        message.keys = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): CategoriesItem {
            return CategoriesItem.deserialize(bytes);
        }
    }
    export class ProductItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            supply_id?: number;
            category_id?: number[];
            title?: string;
            measuring_name?: string;
            sell_max?: number;
            sell_min?: number;
            wastage?: number;
            standard_number?: string;
            brand?: string;
            stock_type?: number;
            status?: number;
            putaway_time?: string;
            cover_image?: string;
            content?: string;
            store_id?: number;
            store_identity?: string;
            template_id?: number;
            note?: string;
            images?: PhotoItem[];
            specification?: SpecItem[];
            recent_number?: number;
            sale_total?: number;
            created_at?: string;
            limitation?: number;
            liTemplate_id?: number;
            price?: number;
            stock?: number;
            category?: string;
            serial_id?: string;
            gas_types?: number;
            spec_id?: number[];
            categories?: CategoriesItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 21, 22, 33, 34], this.#one_of_decls);
            if (!Array.isArray(data) && typeof data == "object") {
                if ("id" in data && data.id != undefined) {
                    this.id = data.id;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("supply_id" in data && data.supply_id != undefined) {
                    this.supply_id = data.supply_id;
                }
                if ("category_id" in data && data.category_id != undefined) {
                    this.category_id = data.category_id;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("measuring_name" in data && data.measuring_name != undefined) {
                    this.measuring_name = data.measuring_name;
                }
                if ("sell_max" in data && data.sell_max != undefined) {
                    this.sell_max = data.sell_max;
                }
                if ("sell_min" in data && data.sell_min != undefined) {
                    this.sell_min = data.sell_min;
                }
                if ("wastage" in data && data.wastage != undefined) {
                    this.wastage = data.wastage;
                }
                if ("standard_number" in data && data.standard_number != undefined) {
                    this.standard_number = data.standard_number;
                }
                if ("brand" in data && data.brand != undefined) {
                    this.brand = data.brand;
                }
                if ("stock_type" in data && data.stock_type != undefined) {
                    this.stock_type = data.stock_type;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("putaway_time" in data && data.putaway_time != undefined) {
                    this.putaway_time = data.putaway_time;
                }
                if ("cover_image" in data && data.cover_image != undefined) {
                    this.cover_image = data.cover_image;
                }
                if ("content" in data && data.content != undefined) {
                    this.content = data.content;
                }
                if ("store_id" in data && data.store_id != undefined) {
                    this.store_id = data.store_id;
                }
                if ("store_identity" in data && data.store_identity != undefined) {
                    this.store_identity = data.store_identity;
                }
                if ("template_id" in data && data.template_id != undefined) {
                    this.template_id = data.template_id;
                }
                if ("note" in data && data.note != undefined) {
                    this.note = data.note;
                }
                if ("images" in data && data.images != undefined) {
                    this.images = data.images;
                }
                if ("specification" in data && data.specification != undefined) {
                    this.specification = data.specification;
                }
                if ("recent_number" in data && data.recent_number != undefined) {
                    this.recent_number = data.recent_number;
                }
                if ("sale_total" in data && data.sale_total != undefined) {
                    this.sale_total = data.sale_total;
                }
                if ("created_at" in data && data.created_at != undefined) {
                    this.created_at = data.created_at;
                }
                if ("limitation" in data && data.limitation != undefined) {
                    this.limitation = data.limitation;
                }
                if ("liTemplate_id" in data && data.liTemplate_id != undefined) {
                    this.liTemplate_id = data.liTemplate_id;
                }
                if ("price" in data && data.price != undefined) {
                    this.price = data.price;
                }
                if ("stock" in data && data.stock != undefined) {
                    this.stock = data.stock;
                }
                if ("category" in data && data.category != undefined) {
                    this.category = data.category;
                }
                if ("serial_id" in data && data.serial_id != undefined) {
                    this.serial_id = data.serial_id;
                }
                if ("gas_types" in data && data.gas_types != undefined) {
                    this.gas_types = data.gas_types;
                }
                if ("spec_id" in data && data.spec_id != undefined) {
                    this.spec_id = data.spec_id;
                }
                if ("categories" in data && data.categories != undefined) {
                    this.categories = data.categories;
                }
            }
        }
        get id() {
            return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
        }
        set id(value: number) {
            pb_1.Message.setField(this, 1, value);
        }
        get identity() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set identity(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get supply_id() {
            return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
        }
        set supply_id(value: number) {
            pb_1.Message.setField(this, 3, value);
        }
        get category_id() {
            return pb_1.Message.getFieldWithDefault(this, 4, []) as number[];
        }
        set category_id(value: number[]) {
            pb_1.Message.setField(this, 4, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get measuring_name() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set measuring_name(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get sell_max() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set sell_max(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get sell_min() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set sell_min(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get wastage() {
            return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
        }
        set wastage(value: number) {
            pb_1.Message.setField(this, 9, value);
        }
        get standard_number() {
            return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
        }
        set standard_number(value: string) {
            pb_1.Message.setField(this, 10, value);
        }
        get brand() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set brand(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get stock_type() {
            return pb_1.Message.getFieldWithDefault(this, 12, 0) as number;
        }
        set stock_type(value: number) {
            pb_1.Message.setField(this, 12, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 13, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 13, value);
        }
        get putaway_time() {
            return pb_1.Message.getFieldWithDefault(this, 14, "") as string;
        }
        set putaway_time(value: string) {
            pb_1.Message.setField(this, 14, value);
        }
        get cover_image() {
            return pb_1.Message.getFieldWithDefault(this, 15, "") as string;
        }
        set cover_image(value: string) {
            pb_1.Message.setField(this, 15, value);
        }
        get content() {
            return pb_1.Message.getFieldWithDefault(this, 16, "") as string;
        }
        set content(value: string) {
            pb_1.Message.setField(this, 16, value);
        }
        get store_id() {
            return pb_1.Message.getFieldWithDefault(this, 17, 0) as number;
        }
        set store_id(value: number) {
            pb_1.Message.setField(this, 17, value);
        }
        get store_identity() {
            return pb_1.Message.getFieldWithDefault(this, 18, "") as string;
        }
        set store_identity(value: string) {
            pb_1.Message.setField(this, 18, value);
        }
        get template_id() {
            return pb_1.Message.getFieldWithDefault(this, 19, 0) as number;
        }
        set template_id(value: number) {
            pb_1.Message.setField(this, 19, value);
        }
        get note() {
            return pb_1.Message.getFieldWithDefault(this, 20, "") as string;
        }
        set note(value: string) {
            pb_1.Message.setField(this, 20, value);
        }
        get images() {
            return pb_1.Message.getRepeatedWrapperField(this, PhotoItem, 21) as PhotoItem[];
        }
        set images(value: PhotoItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 21, value);
        }
        get specification() {
            return pb_1.Message.getRepeatedWrapperField(this, SpecItem, 22) as SpecItem[];
        }
        set specification(value: SpecItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 22, value);
        }
        get recent_number() {
            return pb_1.Message.getFieldWithDefault(this, 23, 0) as number;
        }
        set recent_number(value: number) {
            pb_1.Message.setField(this, 23, value);
        }
        get sale_total() {
            return pb_1.Message.getFieldWithDefault(this, 24, 0) as number;
        }
        set sale_total(value: number) {
            pb_1.Message.setField(this, 24, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 25, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 25, value);
        }
        get limitation() {
            return pb_1.Message.getFieldWithDefault(this, 26, 0) as number;
        }
        set limitation(value: number) {
            pb_1.Message.setField(this, 26, value);
        }
        get liTemplate_id() {
            return pb_1.Message.getFieldWithDefault(this, 27, 0) as number;
        }
        set liTemplate_id(value: number) {
            pb_1.Message.setField(this, 27, value);
        }
        get price() {
            return pb_1.Message.getFieldWithDefault(this, 28, 0) as number;
        }
        set price(value: number) {
            pb_1.Message.setField(this, 28, value);
        }
        get stock() {
            return pb_1.Message.getFieldWithDefault(this, 29, 0) as number;
        }
        set stock(value: number) {
            pb_1.Message.setField(this, 29, value);
        }
        get category() {
            return pb_1.Message.getFieldWithDefault(this, 30, "") as string;
        }
        set category(value: string) {
            pb_1.Message.setField(this, 30, value);
        }
        get serial_id() {
            return pb_1.Message.getFieldWithDefault(this, 31, "") as string;
        }
        set serial_id(value: string) {
            pb_1.Message.setField(this, 31, value);
        }
        get gas_types() {
            return pb_1.Message.getFieldWithDefault(this, 32, 0) as number;
        }
        set gas_types(value: number) {
            pb_1.Message.setField(this, 32, value);
        }
        get spec_id() {
            return pb_1.Message.getFieldWithDefault(this, 33, []) as number[];
        }
        set spec_id(value: number[]) {
            pb_1.Message.setField(this, 33, value);
        }
        get categories() {
            return pb_1.Message.getRepeatedWrapperField(this, CategoriesItem, 34) as CategoriesItem[];
        }
        set categories(value: CategoriesItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 34, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            supply_id?: number;
            category_id?: number[];
            title?: string;
            measuring_name?: string;
            sell_max?: number;
            sell_min?: number;
            wastage?: number;
            standard_number?: string;
            brand?: string;
            stock_type?: number;
            status?: number;
            putaway_time?: string;
            cover_image?: string;
            content?: string;
            store_id?: number;
            store_identity?: string;
            template_id?: number;
            note?: string;
            images?: ReturnType<typeof PhotoItem.prototype.toObject>[];
            specification?: ReturnType<typeof SpecItem.prototype.toObject>[];
            recent_number?: number;
            sale_total?: number;
            created_at?: string;
            limitation?: number;
            liTemplate_id?: number;
            price?: number;
            stock?: number;
            category?: string;
            serial_id?: string;
            gas_types?: number;
            spec_id?: number[];
            categories?: ReturnType<typeof CategoriesItem.prototype.toObject>[];
        }): ProductItem {
            const message = new ProductItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.supply_id != null) {
                message.supply_id = data.supply_id;
            }
            if (data.category_id != null) {
                message.category_id = data.category_id;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.measuring_name != null) {
                message.measuring_name = data.measuring_name;
            }
            if (data.sell_max != null) {
                message.sell_max = data.sell_max;
            }
            if (data.sell_min != null) {
                message.sell_min = data.sell_min;
            }
            if (data.wastage != null) {
                message.wastage = data.wastage;
            }
            if (data.standard_number != null) {
                message.standard_number = data.standard_number;
            }
            if (data.brand != null) {
                message.brand = data.brand;
            }
            if (data.stock_type != null) {
                message.stock_type = data.stock_type;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.putaway_time != null) {
                message.putaway_time = data.putaway_time;
            }
            if (data.cover_image != null) {
                message.cover_image = data.cover_image;
            }
            if (data.content != null) {
                message.content = data.content;
            }
            if (data.store_id != null) {
                message.store_id = data.store_id;
            }
            if (data.store_identity != null) {
                message.store_identity = data.store_identity;
            }
            if (data.template_id != null) {
                message.template_id = data.template_id;
            }
            if (data.note != null) {
                message.note = data.note;
            }
            if (data.images != null) {
                message.images = data.images.map(item => PhotoItem.fromObject(item));
            }
            if (data.specification != null) {
                message.specification = data.specification.map(item => SpecItem.fromObject(item));
            }
            if (data.recent_number != null) {
                message.recent_number = data.recent_number;
            }
            if (data.sale_total != null) {
                message.sale_total = data.sale_total;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            if (data.limitation != null) {
                message.limitation = data.limitation;
            }
            if (data.liTemplate_id != null) {
                message.liTemplate_id = data.liTemplate_id;
            }
            if (data.price != null) {
                message.price = data.price;
            }
            if (data.stock != null) {
                message.stock = data.stock;
            }
            if (data.category != null) {
                message.category = data.category;
            }
            if (data.serial_id != null) {
                message.serial_id = data.serial_id;
            }
            if (data.gas_types != null) {
                message.gas_types = data.gas_types;
            }
            if (data.spec_id != null) {
                message.spec_id = data.spec_id;
            }
            if (data.categories != null) {
                message.categories = data.categories.map(item => CategoriesItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                supply_id?: number;
                category_id?: number[];
                title?: string;
                measuring_name?: string;
                sell_max?: number;
                sell_min?: number;
                wastage?: number;
                standard_number?: string;
                brand?: string;
                stock_type?: number;
                status?: number;
                putaway_time?: string;
                cover_image?: string;
                content?: string;
                store_id?: number;
                store_identity?: string;
                template_id?: number;
                note?: string;
                images?: ReturnType<typeof PhotoItem.prototype.toObject>[];
                specification?: ReturnType<typeof SpecItem.prototype.toObject>[];
                recent_number?: number;
                sale_total?: number;
                created_at?: string;
                limitation?: number;
                liTemplate_id?: number;
                price?: number;
                stock?: number;
                category?: string;
                serial_id?: string;
                gas_types?: number;
                spec_id?: number[];
                categories?: ReturnType<typeof CategoriesItem.prototype.toObject>[];
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.supply_id != null) {
                data.supply_id = this.supply_id;
            }
            if (this.category_id != null) {
                data.category_id = this.category_id;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.measuring_name != null) {
                data.measuring_name = this.measuring_name;
            }
            if (this.sell_max != null) {
                data.sell_max = this.sell_max;
            }
            if (this.sell_min != null) {
                data.sell_min = this.sell_min;
            }
            if (this.wastage != null) {
                data.wastage = this.wastage;
            }
            if (this.standard_number != null) {
                data.standard_number = this.standard_number;
            }
            if (this.brand != null) {
                data.brand = this.brand;
            }
            if (this.stock_type != null) {
                data.stock_type = this.stock_type;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.putaway_time != null) {
                data.putaway_time = this.putaway_time;
            }
            if (this.cover_image != null) {
                data.cover_image = this.cover_image;
            }
            if (this.content != null) {
                data.content = this.content;
            }
            if (this.store_id != null) {
                data.store_id = this.store_id;
            }
            if (this.store_identity != null) {
                data.store_identity = this.store_identity;
            }
            if (this.template_id != null) {
                data.template_id = this.template_id;
            }
            if (this.note != null) {
                data.note = this.note;
            }
            if (this.images != null) {
                data.images = this.images.map((item: PhotoItem) => item.toObject());
            }
            if (this.specification != null) {
                data.specification = this.specification.map((item: SpecItem) => item.toObject());
            }
            if (this.recent_number != null) {
                data.recent_number = this.recent_number;
            }
            if (this.sale_total != null) {
                data.sale_total = this.sale_total;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            if (this.limitation != null) {
                data.limitation = this.limitation;
            }
            if (this.liTemplate_id != null) {
                data.liTemplate_id = this.liTemplate_id;
            }
            if (this.price != null) {
                data.price = this.price;
            }
            if (this.stock != null) {
                data.stock = this.stock;
            }
            if (this.category != null) {
                data.category = this.category;
            }
            if (this.serial_id != null) {
                data.serial_id = this.serial_id;
            }
            if (this.gas_types != null) {
                data.gas_types = this.gas_types;
            }
            if (this.spec_id != null) {
                data.spec_id = this.spec_id;
            }
            if (this.categories != null) {
                data.categories = this.categories.map((item: CategoriesItem) => item.toObject());
            }
            return data;
        }
        serialize(): Uint8Array;
        serialize(w: pb_1.BinaryWriter): void;
        serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
            const writer = w || new pb_1.BinaryWriter();
            if (this.id != 0)
                writer.writeInt64(1, this.id);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.supply_id != 0)
                writer.writeInt64(3, this.supply_id);
            if (this.category_id.length)
                writer.writePackedInt64(4, this.category_id);
            if (this.title.length)
                writer.writeString(5, this.title);
            if (this.measuring_name.length)
                writer.writeString(6, this.measuring_name);
            if (this.sell_max != 0)
                writer.writeInt64(7, this.sell_max);
            if (this.sell_min != 0)
                writer.writeInt64(8, this.sell_min);
            if (this.wastage != 0)
                writer.writeInt64(9, this.wastage);
            if (this.standard_number.length)
                writer.writeString(10, this.standard_number);
            if (this.brand.length)
                writer.writeString(11, this.brand);
            if (this.stock_type != 0)
                writer.writeInt64(12, this.stock_type);
            if (this.status != 0)
                writer.writeInt32(13, this.status);
            if (this.putaway_time.length)
                writer.writeString(14, this.putaway_time);
            if (this.cover_image.length)
                writer.writeString(15, this.cover_image);
            if (this.content.length)
                writer.writeString(16, this.content);
            if (this.store_id != 0)
                writer.writeInt64(17, this.store_id);
            if (this.store_identity.length)
                writer.writeString(18, this.store_identity);
            if (this.template_id != 0)
                writer.writeInt32(19, this.template_id);
            if (this.note.length)
                writer.writeString(20, this.note);
            if (this.images.length)
                writer.writeRepeatedMessage(21, this.images, (item: PhotoItem) => item.serialize(writer));
            if (this.specification.length)
                writer.writeRepeatedMessage(22, this.specification, (item: SpecItem) => item.serialize(writer));
            if (this.recent_number != 0)
                writer.writeInt64(23, this.recent_number);
            if (this.sale_total != 0)
                writer.writeInt64(24, this.sale_total);
            if (this.created_at.length)
                writer.writeString(25, this.created_at);
            if (this.limitation != 0)
                writer.writeInt64(26, this.limitation);
            if (this.liTemplate_id != 0)
                writer.writeInt64(27, this.liTemplate_id);
            if (this.price != 0)
                writer.writeInt64(28, this.price);
            if (this.stock != 0)
                writer.writeInt64(29, this.stock);
            if (this.category.length)
                writer.writeString(30, this.category);
            if (this.serial_id.length)
                writer.writeString(31, this.serial_id);
            if (this.gas_types != 0)
                writer.writeInt64(32, this.gas_types);
            if (this.spec_id.length)
                writer.writePackedInt64(33, this.spec_id);
            if (this.categories.length)
                writer.writeRepeatedMessage(34, this.categories, (item: CategoriesItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ProductItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ProductItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt64();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.supply_id = reader.readInt64();
                        break;
                    case 4:
                        message.category_id = reader.readPackedInt64();
                        break;
                    case 5:
                        message.title = reader.readString();
                        break;
                    case 6:
                        message.measuring_name = reader.readString();
                        break;
                    case 7:
                        message.sell_max = reader.readInt64();
                        break;
                    case 8:
                        message.sell_min = reader.readInt64();
                        break;
                    case 9:
                        message.wastage = reader.readInt64();
                        break;
                    case 10:
                        message.standard_number = reader.readString();
                        break;
                    case 11:
                        message.brand = reader.readString();
                        break;
                    case 12:
                        message.stock_type = reader.readInt64();
                        break;
                    case 13:
                        message.status = reader.readInt32();
                        break;
                    case 14:
                        message.putaway_time = reader.readString();
                        break;
                    case 15:
                        message.cover_image = reader.readString();
                        break;
                    case 16:
                        message.content = reader.readString();
                        break;
                    case 17:
                        message.store_id = reader.readInt64();
                        break;
                    case 18:
                        message.store_identity = reader.readString();
                        break;
                    case 19:
                        message.template_id = reader.readInt32();
                        break;
                    case 20:
                        message.note = reader.readString();
                        break;
                    case 21:
                        reader.readMessage(message.images, () => pb_1.Message.addToRepeatedWrapperField(message, 21, PhotoItem.deserialize(reader), PhotoItem));
                        break;
                    case 22:
                        reader.readMessage(message.specification, () => pb_1.Message.addToRepeatedWrapperField(message, 22, SpecItem.deserialize(reader), SpecItem));
                        break;
                    case 23:
                        message.recent_number = reader.readInt64();
                        break;
                    case 24:
                        message.sale_total = reader.readInt64();
                        break;
                    case 25:
                        message.created_at = reader.readString();
                        break;
                    case 26:
                        message.limitation = reader.readInt64();
                        break;
                    case 27:
                        message.liTemplate_id = reader.readInt64();
                        break;
                    case 28:
                        message.price = reader.readInt64();
                        break;
                    case 29:
                        message.stock = reader.readInt64();
                        break;
                    case 30:
                        message.category = reader.readString();
                        break;
                    case 31:
                        message.serial_id = reader.readString();
                        break;
                    case 32:
                        message.gas_types = reader.readInt64();
                        break;
                    case 33:
                        message.spec_id = reader.readPackedInt64();
                        break;
                    case 34:
                        reader.readMessage(message.categories, () => pb_1.Message.addToRepeatedWrapperField(message, 34, CategoriesItem.deserialize(reader), CategoriesItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): ProductItem {
            return ProductItem.deserialize(bytes);
        }
    }
    interface GrpcUnaryServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
        (message: P, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
    }
    interface GrpcStreamServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
        (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
    }
    interface GrpWritableServiceInterface<P, R> {
        (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
        (callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
    }
    interface GrpcChunkServiceInterface<P, R> {
        (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
        (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
    }
    interface GrpcPromiseServiceInterface<P, R> {
        (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
        (message: P, options?: grpc_1.CallOptions): Promise<R>;
    }
    export abstract class UnimplementedProductService {
        static definition = {
            ItemFetch: {
                path: "/mall.Product/ItemFetch",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.FetchRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.FetchRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: ListReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => ListReply.deserialize(new Uint8Array(bytes))
            },
            ItemDetail: {
                path: "/mall.Product/ItemDetail",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: ProductItem) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => ProductItem.deserialize(new Uint8Array(bytes))
            },
            ItemDetailBySerial: {
                path: "/mall.Product/ItemDetailBySerial",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.StoreSerialRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.StoreSerialRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: ListReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => ListReply.deserialize(new Uint8Array(bytes))
            },
            ItemDetailBySpec: {
                path: "/mall.Product/ItemDetailBySpec",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: DetailBySpecRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => DetailBySpecRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: ListItem) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => ListItem.deserialize(new Uint8Array(bytes))
            },
            ItemCreate: {
                path: "/mall.Product/ItemCreate",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: ProductItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => ProductItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            ItemDelete: {
                path: "/mall.Product/ItemDelete",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            ItemModify: {
                path: "/mall.Product/ItemModify",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: ModifyRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => ModifyRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            ItemBatchOp: {
                path: "/mall.Product/ItemBatchOp",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: OpRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => OpRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            SpecFetch: {
                path: "/mall.Product/SpecFetch",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.FetchRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.FetchRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: SpecReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => SpecReply.deserialize(new Uint8Array(bytes))
            },
            SpecCreate: {
                path: "/mall.Product/SpecCreate",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: SpecItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => SpecItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            SpecModify: {
                path: "/mall.Product/SpecModify",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: SpecItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => SpecItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            SpecDelete: {
                path: "/mall.Product/SpecDelete",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            SpecDetail: {
                path: "/mall.Product/SpecDetail",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: SpecItem) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => SpecItem.deserialize(new Uint8Array(bytes))
            },
            PhotoCreate: {
                path: "/mall.Product/PhotoCreate",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: PhotoItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => PhotoItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            PhotoDelete: {
                path: "/mall.Product/PhotoDelete",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            PhotoList: {
                path: "/mall.Product/PhotoList",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: PhotoItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => PhotoItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: PhotoReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => PhotoReply.deserialize(new Uint8Array(bytes))
            },
            CommentFetch: {
                path: "/mall.Product/CommentFetch",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.FetchRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.FetchRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: CommentListReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => CommentListReply.deserialize(new Uint8Array(bytes))
            },
            CommentCreate: {
                path: "/mall.Product/CommentCreate",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: CommentItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => CommentItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            CommentRe: {
                path: "/mall.Product/CommentRe",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: CommentItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => CommentItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            CommentDelete: {
                path: "/mall.Product/CommentDelete",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: dependency_1.mall.IdentRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => dependency_1.mall.IdentRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            },
            CommentModify: {
                path: "/mall.Product/CommentModify",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: CommentItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => CommentItem.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: dependency_1.mall.StatusReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => dependency_1.mall.StatusReply.deserialize(new Uint8Array(bytes))
            }
        };
        [method: string]: grpc_1.UntypedHandleCall;
        abstract ItemFetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, ListReply>, callback: grpc_1.sendUnaryData<ListReply>): void;
        abstract ItemDetail(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, ProductItem>, callback: grpc_1.sendUnaryData<ProductItem>): void;
        abstract ItemDetailBySerial(call: grpc_1.ServerUnaryCall<dependency_1.mall.StoreSerialRequest, ListReply>, callback: grpc_1.sendUnaryData<ListReply>): void;
        abstract ItemDetailBySpec(call: grpc_1.ServerUnaryCall<DetailBySpecRequest, ListItem>, callback: grpc_1.sendUnaryData<ListItem>): void;
        abstract ItemCreate(call: grpc_1.ServerUnaryCall<ProductItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract ItemDelete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract ItemModify(call: grpc_1.ServerUnaryCall<ModifyRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract ItemBatchOp(call: grpc_1.ServerUnaryCall<OpRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract SpecFetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, SpecReply>, callback: grpc_1.sendUnaryData<SpecReply>): void;
        abstract SpecCreate(call: grpc_1.ServerUnaryCall<SpecItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract SpecModify(call: grpc_1.ServerUnaryCall<SpecItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract SpecDelete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract SpecDetail(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, SpecItem>, callback: grpc_1.sendUnaryData<SpecItem>): void;
        abstract PhotoCreate(call: grpc_1.ServerUnaryCall<PhotoItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract PhotoDelete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract PhotoList(call: grpc_1.ServerUnaryCall<PhotoItem, PhotoReply>, callback: grpc_1.sendUnaryData<PhotoReply>): void;
        abstract CommentFetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, CommentListReply>, callback: grpc_1.sendUnaryData<CommentListReply>): void;
        abstract CommentCreate(call: grpc_1.ServerUnaryCall<CommentItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract CommentRe(call: grpc_1.ServerUnaryCall<CommentItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract CommentDelete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract CommentModify(call: grpc_1.ServerUnaryCall<CommentItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
    }
    export class ProductClient extends grpc_1.makeGenericClientConstructor(UnimplementedProductService.definition, "Product", {}) {
        constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
            super(address, credentials, options);
        }
        ItemFetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, ListReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ListReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ListReply>, callback?: grpc_1.requestCallback<ListReply>): grpc_1.ClientUnaryCall => {
            return super.ItemFetch(message, metadata, options, callback);
        };
        ItemDetail: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, ProductItem> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ProductItem>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ProductItem>, callback?: grpc_1.requestCallback<ProductItem>): grpc_1.ClientUnaryCall => {
            return super.ItemDetail(message, metadata, options, callback);
        };
        ItemDetailBySerial: GrpcUnaryServiceInterface<dependency_1.mall.StoreSerialRequest, ListReply> = (message: dependency_1.mall.StoreSerialRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ListReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ListReply>, callback?: grpc_1.requestCallback<ListReply>): grpc_1.ClientUnaryCall => {
            return super.ItemDetailBySerial(message, metadata, options, callback);
        };
        ItemDetailBySpec: GrpcUnaryServiceInterface<DetailBySpecRequest, ListItem> = (message: DetailBySpecRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ListItem>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ListItem>, callback?: grpc_1.requestCallback<ListItem>): grpc_1.ClientUnaryCall => {
            return super.ItemDetailBySpec(message, metadata, options, callback);
        };
        ItemCreate: GrpcUnaryServiceInterface<ProductItem, dependency_1.mall.StatusReply> = (message: ProductItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.ItemCreate(message, metadata, options, callback);
        };
        ItemDelete: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.ItemDelete(message, metadata, options, callback);
        };
        ItemModify: GrpcUnaryServiceInterface<ModifyRequest, dependency_1.mall.StatusReply> = (message: ModifyRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.ItemModify(message, metadata, options, callback);
        };
        ItemBatchOp: GrpcUnaryServiceInterface<OpRequest, dependency_1.mall.StatusReply> = (message: OpRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.ItemBatchOp(message, metadata, options, callback);
        };
        SpecFetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, SpecReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<SpecReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<SpecReply>, callback?: grpc_1.requestCallback<SpecReply>): grpc_1.ClientUnaryCall => {
            return super.SpecFetch(message, metadata, options, callback);
        };
        SpecCreate: GrpcUnaryServiceInterface<SpecItem, dependency_1.mall.StatusReply> = (message: SpecItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.SpecCreate(message, metadata, options, callback);
        };
        SpecModify: GrpcUnaryServiceInterface<SpecItem, dependency_1.mall.StatusReply> = (message: SpecItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.SpecModify(message, metadata, options, callback);
        };
        SpecDelete: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.SpecDelete(message, metadata, options, callback);
        };
        SpecDetail: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, SpecItem> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<SpecItem>, options?: grpc_1.CallOptions | grpc_1.requestCallback<SpecItem>, callback?: grpc_1.requestCallback<SpecItem>): grpc_1.ClientUnaryCall => {
            return super.SpecDetail(message, metadata, options, callback);
        };
        PhotoCreate: GrpcUnaryServiceInterface<PhotoItem, dependency_1.mall.StatusReply> = (message: PhotoItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.PhotoCreate(message, metadata, options, callback);
        };
        PhotoDelete: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.PhotoDelete(message, metadata, options, callback);
        };
        PhotoList: GrpcUnaryServiceInterface<PhotoItem, PhotoReply> = (message: PhotoItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<PhotoReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<PhotoReply>, callback?: grpc_1.requestCallback<PhotoReply>): grpc_1.ClientUnaryCall => {
            return super.PhotoList(message, metadata, options, callback);
        };
        CommentFetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, CommentListReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<CommentListReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<CommentListReply>, callback?: grpc_1.requestCallback<CommentListReply>): grpc_1.ClientUnaryCall => {
            return super.CommentFetch(message, metadata, options, callback);
        };
        CommentCreate: GrpcUnaryServiceInterface<CommentItem, dependency_1.mall.StatusReply> = (message: CommentItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.CommentCreate(message, metadata, options, callback);
        };
        CommentRe: GrpcUnaryServiceInterface<CommentItem, dependency_1.mall.StatusReply> = (message: CommentItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.CommentRe(message, metadata, options, callback);
        };
        CommentDelete: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.CommentDelete(message, metadata, options, callback);
        };
        CommentModify: GrpcUnaryServiceInterface<CommentItem, dependency_1.mall.StatusReply> = (message: CommentItem, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<dependency_1.mall.StatusReply>, callback?: grpc_1.requestCallback<dependency_1.mall.StatusReply>): grpc_1.ClientUnaryCall => {
            return super.CommentModify(message, metadata, options, callback);
        };
    }
}
