/**
 * Generated by the protoc-gen-ts.  DO NOT EDIT!
 * compiler version: 0.0.0
 * source: freight.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 DenyRegionItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            mall_identity?: string;
            title?: string;
            region?: RegionItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], 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 ("mall_identity" in data && data.mall_identity != undefined) {
                    this.mall_identity = data.mall_identity;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("region" in data && data.region != undefined) {
                    this.region = data.region;
                }
            }
        }
        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 mall_identity() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set mall_identity(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get region() {
            return pb_1.Message.getRepeatedWrapperField(this, RegionItem, 5) as RegionItem[];
        }
        set region(value: RegionItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 5, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            mall_identity?: string;
            title?: string;
            region?: ReturnType<typeof RegionItem.prototype.toObject>[];
        }): DenyRegionItem {
            const message = new DenyRegionItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.mall_identity != null) {
                message.mall_identity = data.mall_identity;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.region != null) {
                message.region = data.region.map(item => RegionItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                mall_identity?: string;
                title?: string;
                region?: ReturnType<typeof RegionItem.prototype.toObject>[];
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.mall_identity != null) {
                data.mall_identity = this.mall_identity;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.region != null) {
                data.region = this.region.map((item: RegionItem) => 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.mall_identity.length)
                writer.writeString(3, this.mall_identity);
            if (this.title.length)
                writer.writeString(4, this.title);
            if (this.region.length)
                writer.writeRepeatedMessage(5, this.region, (item: RegionItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DenyRegionItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DenyRegionItem();
            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.mall_identity = reader.readString();
                        break;
                    case 4:
                        message.title = reader.readString();
                        break;
                    case 5:
                        reader.readMessage(message.region, () => pb_1.Message.addToRepeatedWrapperField(message, 5, RegionItem.deserialize(reader), RegionItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): DenyRegionItem {
            return DenyRegionItem.deserialize(bytes);
        }
    }
    export class FreightItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            status?: number;
            title?: string;
            post_type?: number;
            quota?: number;
            cost_type?: number;
            region_type?: number;
            rules?: FreightAttrItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [9], 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 ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("title" in data && data.title != undefined) {
                    this.title = data.title;
                }
                if ("post_type" in data && data.post_type != undefined) {
                    this.post_type = data.post_type;
                }
                if ("quota" in data && data.quota != undefined) {
                    this.quota = data.quota;
                }
                if ("cost_type" in data && data.cost_type != undefined) {
                    this.cost_type = data.cost_type;
                }
                if ("region_type" in data && data.region_type != undefined) {
                    this.region_type = data.region_type;
                }
                if ("rules" in data && data.rules != undefined) {
                    this.rules = data.rules;
                }
            }
        }
        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 status() {
            return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
        }
        set status(value: number) {
            pb_1.Message.setField(this, 3, value);
        }
        get title() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set title(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get post_type() {
            return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
        }
        set post_type(value: number) {
            pb_1.Message.setField(this, 5, value);
        }
        get quota() {
            return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
        }
        set quota(value: number) {
            pb_1.Message.setField(this, 6, value);
        }
        get cost_type() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set cost_type(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get region_type() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set region_type(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get rules() {
            return pb_1.Message.getRepeatedWrapperField(this, FreightAttrItem, 9) as FreightAttrItem[];
        }
        set rules(value: FreightAttrItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 9, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            status?: number;
            title?: string;
            post_type?: number;
            quota?: number;
            cost_type?: number;
            region_type?: number;
            rules?: ReturnType<typeof FreightAttrItem.prototype.toObject>[];
        }): FreightItem {
            const message = new FreightItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.title != null) {
                message.title = data.title;
            }
            if (data.post_type != null) {
                message.post_type = data.post_type;
            }
            if (data.quota != null) {
                message.quota = data.quota;
            }
            if (data.cost_type != null) {
                message.cost_type = data.cost_type;
            }
            if (data.region_type != null) {
                message.region_type = data.region_type;
            }
            if (data.rules != null) {
                message.rules = data.rules.map(item => FreightAttrItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                status?: number;
                title?: string;
                post_type?: number;
                quota?: number;
                cost_type?: number;
                region_type?: number;
                rules?: ReturnType<typeof FreightAttrItem.prototype.toObject>[];
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.title != null) {
                data.title = this.title;
            }
            if (this.post_type != null) {
                data.post_type = this.post_type;
            }
            if (this.quota != null) {
                data.quota = this.quota;
            }
            if (this.cost_type != null) {
                data.cost_type = this.cost_type;
            }
            if (this.region_type != null) {
                data.region_type = this.region_type;
            }
            if (this.rules != null) {
                data.rules = this.rules.map((item: FreightAttrItem) => 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.status != 0)
                writer.writeInt32(3, this.status);
            if (this.title.length)
                writer.writeString(4, this.title);
            if (this.post_type != 0)
                writer.writeInt32(5, this.post_type);
            if (this.quota != 0)
                writer.writeInt64(6, this.quota);
            if (this.cost_type != 0)
                writer.writeInt32(7, this.cost_type);
            if (this.region_type != 0)
                writer.writeInt32(8, this.region_type);
            if (this.rules.length)
                writer.writeRepeatedMessage(9, this.rules, (item: FreightAttrItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FreightItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FreightItem();
            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.status = reader.readInt32();
                        break;
                    case 4:
                        message.title = reader.readString();
                        break;
                    case 5:
                        message.post_type = reader.readInt32();
                        break;
                    case 6:
                        message.quota = reader.readInt64();
                        break;
                    case 7:
                        message.cost_type = reader.readInt32();
                        break;
                    case 8:
                        message.region_type = reader.readInt32();
                        break;
                    case 9:
                        reader.readMessage(message.rules, () => pb_1.Message.addToRepeatedWrapperField(message, 9, FreightAttrItem.deserialize(reader), FreightAttrItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): FreightItem {
            return FreightItem.deserialize(bytes);
        }
    }
    export class RegionItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            name?: string;
            second?: RegionItem[];
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], 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 ("second" in data && data.second != undefined) {
                    this.second = data.second;
                }
            }
        }
        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 second() {
            return pb_1.Message.getRepeatedWrapperField(this, RegionItem, 3) as RegionItem[];
        }
        set second(value: RegionItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 3, value);
        }
        static fromObject(data: {
            id?: number;
            name?: string;
            second?: ReturnType<typeof RegionItem.prototype.toObject>[];
        }): RegionItem {
            const message = new RegionItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.name != null) {
                message.name = data.name;
            }
            if (data.second != null) {
                message.second = data.second.map(item => RegionItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                name?: string;
                second?: ReturnType<typeof RegionItem.prototype.toObject>[];
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.name != null) {
                data.name = this.name;
            }
            if (this.second != null) {
                data.second = this.second.map((item: RegionItem) => 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.writeInt32(1, this.id);
            if (this.name.length)
                writer.writeString(2, this.name);
            if (this.second.length)
                writer.writeRepeatedMessage(3, this.second, (item: RegionItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RegionItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RegionItem();
            while (reader.nextField()) {
                if (reader.isEndGroup())
                    break;
                switch (reader.getFieldNumber()) {
                    case 1:
                        message.id = reader.readInt32();
                        break;
                    case 2:
                        message.name = reader.readString();
                        break;
                    case 3:
                        reader.readMessage(message.second, () => pb_1.Message.addToRepeatedWrapperField(message, 3, RegionItem.deserialize(reader), RegionItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): RegionItem {
            return RegionItem.deserialize(bytes);
        }
    }
    export class FreightAttrItem extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            id?: number;
            identity?: string;
            freight_identity?: string;
            region_str?: string;
            region?: RegionItem[];
            price_basic?: number;
            count_basic?: number;
            count_extra?: number;
            price_extra?: number;
            status?: number;
            is_default?: number;
        }) {
            super();
            pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], 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 ("freight_identity" in data && data.freight_identity != undefined) {
                    this.freight_identity = data.freight_identity;
                }
                if ("region_str" in data && data.region_str != undefined) {
                    this.region_str = data.region_str;
                }
                if ("region" in data && data.region != undefined) {
                    this.region = data.region;
                }
                if ("price_basic" in data && data.price_basic != undefined) {
                    this.price_basic = data.price_basic;
                }
                if ("count_basic" in data && data.count_basic != undefined) {
                    this.count_basic = data.count_basic;
                }
                if ("count_extra" in data && data.count_extra != undefined) {
                    this.count_extra = data.count_extra;
                }
                if ("price_extra" in data && data.price_extra != undefined) {
                    this.price_extra = data.price_extra;
                }
                if ("status" in data && data.status != undefined) {
                    this.status = data.status;
                }
                if ("is_default" in data && data.is_default != undefined) {
                    this.is_default = data.is_default;
                }
            }
        }
        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 freight_identity() {
            return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
        }
        set freight_identity(value: string) {
            pb_1.Message.setField(this, 3, value);
        }
        get region_str() {
            return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
        }
        set region_str(value: string) {
            pb_1.Message.setField(this, 4, value);
        }
        get region() {
            return pb_1.Message.getRepeatedWrapperField(this, RegionItem, 5) as RegionItem[];
        }
        set region(value: RegionItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 5, value);
        }
        get price_basic() {
            return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
        }
        set price_basic(value: number) {
            pb_1.Message.setField(this, 6, value);
        }
        get count_basic() {
            return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
        }
        set count_basic(value: number) {
            pb_1.Message.setField(this, 7, value);
        }
        get count_extra() {
            return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
        }
        set count_extra(value: number) {
            pb_1.Message.setField(this, 8, value);
        }
        get price_extra() {
            return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
        }
        set price_extra(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 is_default() {
            return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
        }
        set is_default(value: number) {
            pb_1.Message.setField(this, 11, value);
        }
        static fromObject(data: {
            id?: number;
            identity?: string;
            freight_identity?: string;
            region_str?: string;
            region?: ReturnType<typeof RegionItem.prototype.toObject>[];
            price_basic?: number;
            count_basic?: number;
            count_extra?: number;
            price_extra?: number;
            status?: number;
            is_default?: number;
        }): FreightAttrItem {
            const message = new FreightAttrItem({});
            if (data.id != null) {
                message.id = data.id;
            }
            if (data.identity != null) {
                message.identity = data.identity;
            }
            if (data.freight_identity != null) {
                message.freight_identity = data.freight_identity;
            }
            if (data.region_str != null) {
                message.region_str = data.region_str;
            }
            if (data.region != null) {
                message.region = data.region.map(item => RegionItem.fromObject(item));
            }
            if (data.price_basic != null) {
                message.price_basic = data.price_basic;
            }
            if (data.count_basic != null) {
                message.count_basic = data.count_basic;
            }
            if (data.count_extra != null) {
                message.count_extra = data.count_extra;
            }
            if (data.price_extra != null) {
                message.price_extra = data.price_extra;
            }
            if (data.status != null) {
                message.status = data.status;
            }
            if (data.is_default != null) {
                message.is_default = data.is_default;
            }
            return message;
        }
        toObject() {
            const data: {
                id?: number;
                identity?: string;
                freight_identity?: string;
                region_str?: string;
                region?: ReturnType<typeof RegionItem.prototype.toObject>[];
                price_basic?: number;
                count_basic?: number;
                count_extra?: number;
                price_extra?: number;
                status?: number;
                is_default?: number;
            } = {};
            if (this.id != null) {
                data.id = this.id;
            }
            if (this.identity != null) {
                data.identity = this.identity;
            }
            if (this.freight_identity != null) {
                data.freight_identity = this.freight_identity;
            }
            if (this.region_str != null) {
                data.region_str = this.region_str;
            }
            if (this.region != null) {
                data.region = this.region.map((item: RegionItem) => item.toObject());
            }
            if (this.price_basic != null) {
                data.price_basic = this.price_basic;
            }
            if (this.count_basic != null) {
                data.count_basic = this.count_basic;
            }
            if (this.count_extra != null) {
                data.count_extra = this.count_extra;
            }
            if (this.price_extra != null) {
                data.price_extra = this.price_extra;
            }
            if (this.status != null) {
                data.status = this.status;
            }
            if (this.is_default != null) {
                data.is_default = this.is_default;
            }
            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.freight_identity.length)
                writer.writeString(3, this.freight_identity);
            if (this.region_str.length)
                writer.writeString(4, this.region_str);
            if (this.region.length)
                writer.writeRepeatedMessage(5, this.region, (item: RegionItem) => item.serialize(writer));
            if (this.price_basic != 0)
                writer.writeInt64(6, this.price_basic);
            if (this.count_basic != 0)
                writer.writeInt64(7, this.count_basic);
            if (this.count_extra != 0)
                writer.writeInt64(8, this.count_extra);
            if (this.price_extra != 0)
                writer.writeInt64(9, this.price_extra);
            if (this.status != 0)
                writer.writeInt32(10, this.status);
            if (this.is_default != 0)
                writer.writeInt32(11, this.is_default);
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FreightAttrItem {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FreightAttrItem();
            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.freight_identity = reader.readString();
                        break;
                    case 4:
                        message.region_str = reader.readString();
                        break;
                    case 5:
                        reader.readMessage(message.region, () => pb_1.Message.addToRepeatedWrapperField(message, 5, RegionItem.deserialize(reader), RegionItem));
                        break;
                    case 6:
                        message.price_basic = reader.readInt64();
                        break;
                    case 7:
                        message.count_basic = reader.readInt64();
                        break;
                    case 8:
                        message.count_extra = reader.readInt64();
                        break;
                    case 9:
                        message.price_extra = reader.readInt64();
                        break;
                    case 10:
                        message.status = reader.readInt32();
                        break;
                    case 11:
                        message.is_default = reader.readInt32();
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): FreightAttrItem {
            return FreightAttrItem.deserialize(bytes);
        }
    }
    export class FreightReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: FreightItem[];
        }) {
            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, FreightItem, 2) as FreightItem[];
        }
        set data(value: FreightItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof FreightItem.prototype.toObject>[];
        }): FreightReply {
            const message = new FreightReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => FreightItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof FreightItem.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: FreightItem) => 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: FreightItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FreightReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FreightReply();
            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, FreightItem.deserialize(reader), FreightItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): FreightReply {
            return FreightReply.deserialize(bytes);
        }
    }
    export class DenyRegionReply extends pb_1.Message {
        #one_of_decls: number[][] = [];
        constructor(data?: any[] | {
            count?: number;
            data?: DenyRegionItem[];
        }) {
            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, DenyRegionItem, 2) as DenyRegionItem[];
        }
        set data(value: DenyRegionItem[]) {
            pb_1.Message.setRepeatedWrapperField(this, 2, value);
        }
        static fromObject(data: {
            count?: number;
            data?: ReturnType<typeof DenyRegionItem.prototype.toObject>[];
        }): DenyRegionReply {
            const message = new DenyRegionReply({});
            if (data.count != null) {
                message.count = data.count;
            }
            if (data.data != null) {
                message.data = data.data.map(item => DenyRegionItem.fromObject(item));
            }
            return message;
        }
        toObject() {
            const data: {
                count?: number;
                data?: ReturnType<typeof DenyRegionItem.prototype.toObject>[];
            } = {};
            if (this.count != null) {
                data.count = this.count;
            }
            if (this.data != null) {
                data.data = this.data.map((item: DenyRegionItem) => 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: DenyRegionItem) => item.serialize(writer));
            if (!w)
                return writer.getResultBuffer();
        }
        static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DenyRegionReply {
            const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DenyRegionReply();
            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, DenyRegionItem.deserialize(reader), DenyRegionItem));
                        break;
                    default: reader.skipField();
                }
            }
            return message;
        }
        serializeBinary(): Uint8Array {
            return this.serialize();
        }
        static deserializeBinary(bytes: Uint8Array): DenyRegionReply {
            return DenyRegionReply.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 UnimplementedFreightService {
        static definition = {
            Fetch: {
                path: "/mall.Freight/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: FreightReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => FreightReply.deserialize(new Uint8Array(bytes))
            },
            Modify: {
                path: "/mall.Freight/Modify",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: FreightItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => FreightItem.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.Freight/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))
            },
            Create: {
                path: "/mall.Freight/Create",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: FreightItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => FreightItem.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))
            },
            Detail: {
                path: "/mall.Freight/Detail",
                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: FreightItem) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => FreightItem.deserialize(new Uint8Array(bytes))
            },
            DenyRegionFetch: {
                path: "/mall.Freight/DenyRegionFetch",
                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: DenyRegionReply) => Buffer.from(message.serialize()),
                responseDeserialize: (bytes: Buffer) => DenyRegionReply.deserialize(new Uint8Array(bytes))
            },
            DenyRegionCreate: {
                path: "/mall.Freight/DenyRegionCreate",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: DenyRegionItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => DenyRegionItem.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))
            },
            DenyRegionDelete: {
                path: "/mall.Freight/DenyRegionDelete",
                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))
            },
            DenyRegionModify: {
                path: "/mall.Freight/DenyRegionModify",
                requestStream: false,
                responseStream: false,
                requestSerialize: (message: DenyRegionItem) => Buffer.from(message.serialize()),
                requestDeserialize: (bytes: Buffer) => DenyRegionItem.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 Fetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, FreightReply>, callback: grpc_1.sendUnaryData<FreightReply>): void;
        abstract Modify(call: grpc_1.ServerUnaryCall<FreightItem, 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 Create(call: grpc_1.ServerUnaryCall<FreightItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract Detail(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, FreightItem>, callback: grpc_1.sendUnaryData<FreightItem>): void;
        abstract DenyRegionFetch(call: grpc_1.ServerUnaryCall<dependency_1.mall.FetchRequest, DenyRegionReply>, callback: grpc_1.sendUnaryData<DenyRegionReply>): void;
        abstract DenyRegionCreate(call: grpc_1.ServerUnaryCall<DenyRegionItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract DenyRegionDelete(call: grpc_1.ServerUnaryCall<dependency_1.mall.IdentRequest, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
        abstract DenyRegionModify(call: grpc_1.ServerUnaryCall<DenyRegionItem, dependency_1.mall.StatusReply>, callback: grpc_1.sendUnaryData<dependency_1.mall.StatusReply>): void;
    }
    export class FreightClient extends grpc_1.makeGenericClientConstructor(UnimplementedFreightService.definition, "Freight", {}) {
        constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
            super(address, credentials, options);
        }
        Fetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, FreightReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<FreightReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<FreightReply>, callback?: grpc_1.requestCallback<FreightReply>): grpc_1.ClientUnaryCall => {
            return super.Fetch(message, metadata, options, callback);
        };
        Modify: GrpcUnaryServiceInterface<FreightItem, dependency_1.mall.StatusReply> = (message: FreightItem, 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.Modify(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);
        };
        Create: GrpcUnaryServiceInterface<FreightItem, dependency_1.mall.StatusReply> = (message: FreightItem, 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);
        };
        Detail: GrpcUnaryServiceInterface<dependency_1.mall.IdentRequest, FreightItem> = (message: dependency_1.mall.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<FreightItem>, options?: grpc_1.CallOptions | grpc_1.requestCallback<FreightItem>, callback?: grpc_1.requestCallback<FreightItem>): grpc_1.ClientUnaryCall => {
            return super.Detail(message, metadata, options, callback);
        };
        DenyRegionFetch: GrpcUnaryServiceInterface<dependency_1.mall.FetchRequest, DenyRegionReply> = (message: dependency_1.mall.FetchRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<DenyRegionReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<DenyRegionReply>, callback?: grpc_1.requestCallback<DenyRegionReply>): grpc_1.ClientUnaryCall => {
            return super.DenyRegionFetch(message, metadata, options, callback);
        };
        DenyRegionCreate: GrpcUnaryServiceInterface<DenyRegionItem, dependency_1.mall.StatusReply> = (message: DenyRegionItem, 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.DenyRegionCreate(message, metadata, options, callback);
        };
        DenyRegionDelete: 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.DenyRegionDelete(message, metadata, options, callback);
        };
        DenyRegionModify: GrpcUnaryServiceInterface<DenyRegionItem, dependency_1.mall.StatusReply> = (message: DenyRegionItem, 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.DenyRegionModify(message, metadata, options, callback);
        };
    }
}
