/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 0.0.0
 * source: staff.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 LoginRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            account?: string;
            password?: string;
            phone?: string;
            verify_code?: string;
            login_genre?: 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 ("account" in data && data.account != undefined) {
                    this.account = data.account;
                }
                if ("password" in data && data.password != undefined) {
                    this.password = data.password;
                }
                if ("phone" in data && data.phone != undefined) {
                    this.phone = data.phone;
                }
                if ("verify_code" in data && data.verify_code != undefined) {
                    this.verify_code = data.verify_code;
                }
                if ("login_genre" in data && data.login_genre != undefined) {
                    this.login_genre = data.login_genre;
                }
            }
        }
        get account() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set account(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get password() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set password(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get phone() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set phone(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get verify_code() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set verify_code(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get login_genre() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set login_genre(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        static fromObject(data: {
            account?: string;
            password?: string;
            phone?: string;
            verify_code?: string;
            login_genre?: number;
        }): LoginRequest {
            const message = new LoginRequest({});
            if (data.account != null) {
                message.account = data.account;
            }
            if (data.password != null) {
                message.password = data.password;
            }
            if (data.phone != null) {
                message.phone = data.phone;
            }
            if (data.verify_code != null) {
                message.verify_code = data.verify_code;
            }
            if (data.login_genre != null) {
                message.login_genre = data.login_genre;
            }
            return message;
        }
        toObject() {
            const data: {
                account?: string;
                password?: string;
                phone?: string;
                verify_code?: string;
                login_genre?: number;
            } = {};
            if (this.account != null) {
                data.account = this.account;
            }
            if (this.password != null) {
                data.password = this.password;
            }
            if (this.phone != null) {
                data.phone = this.phone;
            }
            if (this.verify_code != null) {
                data.verify_code = this.verify_code;
            }
            if (this.login_genre != null) {
                data.login_genre = this.login_genre;
            }
            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.account.length)
                writer.writeString(1, this.account);
            if (this.password.length)
                writer.writeString(2, this.password);
            if (this.phone.length)
                writer.writeString(3, this.phone);
            if (this.verify_code.length)
                writer.writeString(4, this.verify_code);
            if (this.login_genre != 0)
                writer.writeInt32(5, this.login_genre);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LoginRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LoginRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.account = reader.readString();
                        break;
                    case 2:
                        message.password = reader.readString();
                        break;
                    case 3:
                        message.phone = reader.readString();
                        break;
                    case 4:
                        message.verify_code = reader.readString();
                        break;
                    case 5:
                        message.login_genre = reader.readInt32();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): LoginRequest {
            return LoginRequest.deserialize(bytes);
        }
    }
    export class LoginReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            token?: string;
            identity?: string;
            store_identity?: string;
            name?: string;
            account?: string;
            role?: string;
            status?: number;
            created_at?: string;
            store_name?: 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 ("token" in data && data.token != undefined) {
                    this.token = data.token;
                }
                if ("identity" in data && data.identity != undefined) {
                    this.identity = data.identity;
                }
                if ("store_identity" in data && data.store_identity != undefined) {
                    this.store_identity = data.store_identity;
                }
                if ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("account" in data && data.account != undefined) {
                    this.account = data.account;
                }
                if ("role" in data && data.role != undefined) {
                    this.role = data.role;
                }
                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 ("store_name" in data && data.store_name != undefined) {
                    this.store_name = data.store_name;
                }
            }
        }
        get token() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set token(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 store_identity() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set store_identity(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get name() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set name(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get account() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set account(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get role() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set role(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get status() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get store_name() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set store_name(value: string) {
            pb_1.Message.setField(this, 9, value);
        }
        static fromObject(data: {
            token?: string;
            identity?: string;
            store_identity?: string;
            name?: string;
            account?: string;
            role?: string;
            status?: number;
            created_at?: string;
            store_name?: string;
        }): LoginReply {
            const message = new LoginReply({});
            if (data.token != null) {
                message.token = data.token;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.store_identity != null) {
                message.store_identity = data.store_identity;
            }
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.account != null) {
                message.account = data.account;
            }
            if (data.role != null) {
                message.role = data.role;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            if (data.store_name != null) {
                message.store_name = data.store_name;
            }
            return message;
        }
        toObject() {
            const data: {
                token?: string;
                identity?: string;
                store_identity?: string;
                name?: string;
                account?: string;
                role?: string;
                status?: number;
                created_at?: string;
                store_name?: string;
            } = {};
            if (this.token != null) {
                data.token = this.token;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.store_identity != null) {
                data.store_identity = this.store_identity;
            }
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.account != null) {
                data.account = this.account;
            }
            if (this.role != null) {
                data.role = this.role;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            if (this.store_name != null) {
                data.store_name = this.store_name;
            }
            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.token.length)
                writer.writeString(1, this.token);
            if (this.identity.length)
                writer.writeString(2, this.identity);
            if (this.store_identity.length)
                writer.writeString(3, this.store_identity);
            if (this.name.length)
                writer.writeString(4, this.name);
            if (this.account.length)
                writer.writeString(5, this.account);
            if (this.role.length)
                writer.writeString(6, this.role);
            if (this.status != 0)
                writer.writeInt32(7, this.status);
            if (this.created_at.length)
                writer.writeString(8, this.created_at);
            if (this.store_name.length)
                writer.writeString(9, this.store_name);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LoginReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LoginReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.token = reader.readString();
                        break;
                    case 2:
                        message.identity = reader.readString();
                        break;
                    case 3:
                        message.store_identity = reader.readString();
                        break;
                    case 4:
                        message.name = reader.readString();
                        break;
                    case 5:
                        message.account = reader.readString();
                        break;
                    case 6:
                        message.role = reader.readString();
                        break;
                    case 7:
                        message.status = reader.readInt32();
                        break;
                    case 8:
                        message.created_at = reader.readString();
                        break;
                    case 9:
                        message.store_name = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): LoginReply {
            return LoginReply.deserialize(bytes);
        }
    }
    export class SetAccountRequest extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            account?: string;
            password?: string;
            password_confirmed?: 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 ("account" in data && data.account != undefined) {
                    this.account = data.account;
                }
                if ("password" in data && data.password != undefined) {
                    this.password = data.password;
                }
                if ("password_confirmed" in data && data.password_confirmed != undefined) {
                    this.password_confirmed = data.password_confirmed;
                }
            }
        }
        get account() {
            return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
        }
        set account(value: string) {
            pb_1.Message.setField(this, 1, value);
        }
        get password() {
            return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
        }
        set password(value: string) {
            pb_1.Message.setField(this, 2, value);
        }
        get password_confirmed() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set password_confirmed(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        static fromObject(data: {
            account?: string;
            password?: string;
            password_confirmed?: string;
        }): SetAccountRequest {
            const message = new SetAccountRequest({});
            if (data.account != null) {
                message.account = data.account;
            }
            if (data.password != null) {
                message.password = data.password;
            }
            if (data.password_confirmed != null) {
                message.password_confirmed = data.password_confirmed;
            }
            return message;
        }
        toObject() {
            const data: {
                account?: string;
                password?: string;
                password_confirmed?: string;
            } = {};
            if (this.account != null) {
                data.account = this.account;
            }
            if (this.password != null) {
                data.password = this.password;
            }
            if (this.password_confirmed != null) {
                data.password_confirmed = this.password_confirmed;
            }
            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.account.length)
                writer.writeString(1, this.account);
            if (this.password.length)
                writer.writeString(2, this.password);
            if (this.password_confirmed.length)
                writer.writeString(3, this.password_confirmed);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SetAccountRequest {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SetAccountRequest();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.account = reader.readString();
                        break;
                    case 2:
                        message.password = reader.readString();
                        break;
                    case 3:
                        message.password_confirmed = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): SetAccountRequest {
            return SetAccountRequest.deserialize(bytes);
        }
    }
    export class StaffItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            name?: string;
            account?: string;
            password?: string;
            profile?: string;
            role?: string;
            phone?: string;
            email?: string;
            status?: number;
            avatar?: string;
            created_at?: 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 ("name" in data && data.name != undefined) {
                    this.name = data.name;
                }
                if ("account" in data && data.account != undefined) {
                    this.account = data.account;
                }
                if ("password" in data && data.password != undefined) {
                    this.password = data.password;
                }
                if ("profile" in data && data.profile != undefined) {
                    this.profile = data.profile;
                }
                if ("role" in data && data.role != undefined) {
                    this.role = data.role;
                }
                if ("phone" in data && data.phone != undefined) {
                    this.phone = data.phone;
                }
                if ("email" in data && data.email != undefined) {
                    this.email = data.email;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("avatar" in data && data.avatar != undefined) {
                    this.avatar = data.avatar;
                }
                if ("created_at" in data && data.created_at != undefined) {
                    this.created_at = data.created_at;
                }
            }
        }
        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 name() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set name(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get account() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set account(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get password() {
            return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
        }
        set password(value: string) {
            pb_1.Message.setField(this, 5, value);
        }
        get profile() {
            return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
        }
        set profile(value: string) {
            pb_1.Message.setField(this, 6, value);
        }
        get role() {
            return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
        }
        set role(value: string) {
            pb_1.Message.setField(this, 7, value);
        }
        get phone() {
            return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
        }
        set phone(value: string) {
            pb_1.Message.setField(this, 8, value);
        }
        get email() {
            return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
        }
        set email(value: string) {
            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 avatar() {
            return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
        }
        set avatar(value: string) {
            pb_1.Message.setField(this, 11, value);
        }
        get created_at() {
            return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
        }
        set created_at(value: string) {
            pb_1.Message.setField(this, 12, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            name?: string;
            account?: string;
            password?: string;
            profile?: string;
            role?: string;
            phone?: string;
            email?: string;
            status?: number;
            avatar?: string;
            created_at?: string;
        }): StaffItem {
            const message = new StaffItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.account != null) {
                message.account = data.account;
            }
            if (data.password != null) {
                message.password = data.password;
            }
            if (data.profile != null) {
                message.profile = data.profile;
            }
            if (data.role != null) {
                message.role = data.role;
            }
            if (data.phone != null) {
                message.phone = data.phone;
            }
            if (data.email != null) {
                message.email = data.email;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.avatar != null) {
                message.avatar = data.avatar;
            }
            if (data.created_at != null) {
                message.created_at = data.created_at;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                name?: string;
                account?: string;
                password?: string;
                profile?: string;
                role?: string;
                phone?: string;
                email?: string;
                status?: number;
                avatar?: string;
                created_at?: string;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.account != null) {
                data.account = this.account;
            }
            if (this.password != null) {
                data.password = this.password;
            }
            if (this.profile != null) {
                data.profile = this.profile;
            }
            if (this.role != null) {
                data.role = this.role;
            }
            if (this.phone != null) {
                data.phone = this.phone;
            }
            if (this.email != null) {
                data.email = this.email;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.avatar != null) {
                data.avatar = this.avatar;
            }
            if (this.created_at != null) {
                data.created_at = this.created_at;
            }
            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.name.length)
                writer.writeString(3, this.name);
            if (this.account.length)
                writer.writeString(4, this.account);
            if (this.password.length)
                writer.writeString(5, this.password);
            if (this.profile.length)
                writer.writeString(6, this.profile);
            if (this.role.length)
                writer.writeString(7, this.role);
            if (this.phone.length)
                writer.writeString(8, this.phone);
            if (this.email.length)
                writer.writeString(9, this.email);
            if (this.status != 0)
                writer.writeInt32(10, this.status);
            if (this.avatar.length)
                writer.writeString(11, this.avatar);
            if (this.created_at.length)
                writer.writeString(12, this.created_at);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StaffItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StaffItem();
            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.name = reader.readString();
                        break;
                    case 4:
                        message.account = reader.readString();
                        break;
                    case 5:
                        message.password = reader.readString();
                        break;
                    case 6:
                        message.profile = reader.readString();
                        break;
                    case 7:
                        message.role = reader.readString();
                        break;
                    case 8:
                        message.phone = reader.readString();
                        break;
                    case 9:
                        message.email = reader.readString();
                        break;
                    case 10:
                        message.status = reader.readInt32();
                        break;
                    case 11:
                        message.avatar = reader.readString();
                        break;
                    case 12:
                        message.created_at = reader.readString();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): StaffItem {
            return StaffItem.deserialize(bytes);
        }
    }
    export class StaffListReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            data?: StaffItem[];
            count?: 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 ("data" in data && data.data != undefined) {
                    this.data = data.data;
                }
                if ("count" in data && data.count != undefined) {
                    this.count = data.count;
                }
            }
        }
        get data() {
            return pb_1.Message.getRepeatedWrapperField(this, StaffItem, 1) as StaffItem[];
        }
        set data(value: StaffItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 1, value);
        }
        get count() {
            return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
        }
        set count(value: number) {
            pb_1.Message.setField(this, 2, value);
        }
        static fromObject(data: {
            data?: ReturnType<typeof StaffItem.prototype.toObject>[];
            count?: number;
        }): StaffListReply {
            const message = new StaffListReply({});
            if (data.data != null) {
                message.data = data.data.map(item => StaffItem.fromObject(item));
            }
            if (data.count != null) {
                message.count = data.count;
            }
            return message;
        }
        toObject() {
            const data: {
                data?: ReturnType<typeof StaffItem.prototype.toObject>[];
                count?: number;
            } = {};
            if (this.data != null) {
                data.data = this.data.map((item: StaffItem) => item.toObject());
            }
            if (this.count != null) {
                data.count = this.count;
            }
            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: StaffItem) => item.serialize(writer));
            if (this.count != 0)
                writer.writeInt64(2, this.count);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StaffListReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StaffListReply();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 1, StaffItem.deserialize(reader), StaffItem));
                        break;
                    case 2:
                        message.count = reader.readInt64();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): StaffListReply {
            return StaffListReply.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 UnimplementedStaffService {
        static definition = {
            Login: {
                path: "/mall.Staff/Login",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: LoginRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => LoginRequest.deserialize(new Uint8Array(bytes)),
                responseSerialize: (message: LoginReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => LoginReply.deserialize(new Uint8Array(bytes))
            },
            Fetch: {
                path: "/mall.Staff/Fetch",
                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: StaffListReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => StaffListReply.deserialize(new Uint8Array(bytes))
            },
            Create: {
                path: "/mall.Staff/Create",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: StaffItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => StaffItem.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))
            },
            Delete: {
                path: "/mall.Staff/Delete",
                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))
            },
            GetProfile: {
                path: "/mall.Staff/GetProfile",
                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: StaffItem) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => StaffItem.deserialize(new Uint8Array(bytes))
            },
            SetProfile: {
                path: "/mall.Staff/SetProfile",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: StaffItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => StaffItem.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))
            },
            SetPassword: {
                path: "/mall.Staff/SetPassword",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: SetAccountRequest) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => SetAccountRequest.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 Login(call: grpc_1.ServerUnaryCall<LoginRequest, LoginReply>, callback: grpc_1.sendUnaryData<LoginReply>): void;
        abstract Fetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, StaffListReply>, callback: grpc_1.sendUnaryData<StaffListReply>): void;
        abstract Create(call: grpc_1.ServerUnaryCall<StaffItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract Delete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract GetProfile(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, StaffItem>, callback: grpc_1.sendUnaryData<StaffItem>): void;
        abstract SetProfile(call: grpc_1.ServerUnaryCall<StaffItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract SetPassword(call: grpc_1.ServerUnaryCall<SetAccountRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
    }
    export class StaffClient extends grpc_1.makeGenericClientConstructor(UnimplementedStaffService.definition, "Staff", {}) {
        constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
            super(address, credentials, options);
        }
        Login: GrpcUnaryServiceInterface<LoginRequest, LoginReply> = (message: LoginRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<LoginReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<LoginReply>, callback?: grpc_1.requestCallback<LoginReply>): grpc_1.ClientUnaryCall => {
            return super.Login(message, metadata, options, callback);
        };
        Fetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, StaffListReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<StaffListReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<StaffListReply>, callback?: grpc_1.requestCallback<StaffListReply>): grpc_1.ClientUnaryCall => {
            return super.Fetch(message, metadata, options, callback);
        };
        Create: GrpcUnaryServiceInterface<StaffItem, dependency_1.mall.StatusReply> = (message: StaffItem, 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.Create(message, metadata, options, callback);
        };
        Delete: 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.Delete(message, metadata, options, callback);
        };
        GetProfile: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, StaffItem> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<StaffItem>, options?: grpc_1.CallOptions | grpc_1.requestCallback<StaffItem>, callback?: grpc_1.requestCallback<StaffItem>): grpc_1.ClientUnaryCall => {
            return super.GetProfile(message, metadata, options, callback);
        };
        SetProfile: GrpcUnaryServiceInterface<StaffItem, dependency_1.mall.StatusReply> = (message: StaffItem, 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.SetProfile(message, metadata, options, callback);
        };
        SetPassword: GrpcUnaryServiceInterface<SetAccountRequest, dependency_1.mall.StatusReply> = (message: SetAccountRequest, 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.SetPassword(message, metadata, options, callback);
        };
    }
}
