927 lines
39 KiB
TypeScript
927 lines
39 KiB
TypeScript
/**
|
|
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
* compiler version: 0.0.0
|
|
* source: alipay.proto
|
|
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
import * as pb_1 from "google-protobuf";
|
|
import * as grpc_1 from "@grpc/grpc-js";
|
|
export namespace wallet {
|
|
export class AlipayTradeWapPayRequest extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
quit_url?: 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 ("user_identification" in data && data.user_identification != undefined) {
|
|
this.user_identification = data.user_identification;
|
|
}
|
|
if ("amount" in data && data.amount != undefined) {
|
|
this.amount = data.amount;
|
|
}
|
|
if ("description" in data && data.description != undefined) {
|
|
this.description = data.description;
|
|
}
|
|
if ("notify_url" in data && data.notify_url != undefined) {
|
|
this.notify_url = data.notify_url;
|
|
}
|
|
if ("quit_url" in data && data.quit_url != undefined) {
|
|
this.quit_url = data.quit_url;
|
|
}
|
|
}
|
|
}
|
|
get user_identification() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set user_identification(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get amount() {
|
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
|
}
|
|
set amount(value: number) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get description() {
|
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
}
|
|
set description(value: string) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get notify_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
}
|
|
set notify_url(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
get quit_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
}
|
|
set quit_url(value: string) {
|
|
pb_1.Message.setField(this, 5, value);
|
|
}
|
|
static fromObject(data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
quit_url?: string;
|
|
}): AlipayTradeWapPayRequest {
|
|
const message = new AlipayTradeWapPayRequest({});
|
|
if (data.user_identification != null) {
|
|
message.user_identification = data.user_identification;
|
|
}
|
|
if (data.amount != null) {
|
|
message.amount = data.amount;
|
|
}
|
|
if (data.description != null) {
|
|
message.description = data.description;
|
|
}
|
|
if (data.notify_url != null) {
|
|
message.notify_url = data.notify_url;
|
|
}
|
|
if (data.quit_url != null) {
|
|
message.quit_url = data.quit_url;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
quit_url?: string;
|
|
} = {};
|
|
if (this.user_identification != null) {
|
|
data.user_identification = this.user_identification;
|
|
}
|
|
if (this.amount != null) {
|
|
data.amount = this.amount;
|
|
}
|
|
if (this.description != null) {
|
|
data.description = this.description;
|
|
}
|
|
if (this.notify_url != null) {
|
|
data.notify_url = this.notify_url;
|
|
}
|
|
if (this.quit_url != null) {
|
|
data.quit_url = this.quit_url;
|
|
}
|
|
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.user_identification.length)
|
|
writer.writeString(1, this.user_identification);
|
|
if (this.amount != 0)
|
|
writer.writeInt64(2, this.amount);
|
|
if (this.description.length)
|
|
writer.writeString(3, this.description);
|
|
if (this.notify_url.length)
|
|
writer.writeString(4, this.notify_url);
|
|
if (this.quit_url.length)
|
|
writer.writeString(5, this.quit_url);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeWapPayRequest {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeWapPayRequest();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.user_identification = reader.readString();
|
|
break;
|
|
case 2:
|
|
message.amount = reader.readInt64();
|
|
break;
|
|
case 3:
|
|
message.description = reader.readString();
|
|
break;
|
|
case 4:
|
|
message.notify_url = reader.readString();
|
|
break;
|
|
case 5:
|
|
message.quit_url = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradeWapPayRequest {
|
|
return AlipayTradeWapPayRequest.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayTradeWapPayReply extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
pay_url?: 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 ("pay_url" in data && data.pay_url != undefined) {
|
|
this.pay_url = data.pay_url;
|
|
}
|
|
}
|
|
}
|
|
get pay_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set pay_url(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
static fromObject(data: {
|
|
pay_url?: string;
|
|
}): AlipayTradeWapPayReply {
|
|
const message = new AlipayTradeWapPayReply({});
|
|
if (data.pay_url != null) {
|
|
message.pay_url = data.pay_url;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
pay_url?: string;
|
|
} = {};
|
|
if (this.pay_url != null) {
|
|
data.pay_url = this.pay_url;
|
|
}
|
|
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.pay_url.length)
|
|
writer.writeString(1, this.pay_url);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeWapPayReply {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeWapPayReply();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.pay_url = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradeWapPayReply {
|
|
return AlipayTradeWapPayReply.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayTradePagePayRequest extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
return_url?: 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 ("user_identification" in data && data.user_identification != undefined) {
|
|
this.user_identification = data.user_identification;
|
|
}
|
|
if ("amount" in data && data.amount != undefined) {
|
|
this.amount = data.amount;
|
|
}
|
|
if ("description" in data && data.description != undefined) {
|
|
this.description = data.description;
|
|
}
|
|
if ("notify_url" in data && data.notify_url != undefined) {
|
|
this.notify_url = data.notify_url;
|
|
}
|
|
if ("return_url" in data && data.return_url != undefined) {
|
|
this.return_url = data.return_url;
|
|
}
|
|
}
|
|
}
|
|
get user_identification() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set user_identification(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get amount() {
|
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
|
}
|
|
set amount(value: number) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get description() {
|
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
}
|
|
set description(value: string) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get notify_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
}
|
|
set notify_url(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
get return_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
}
|
|
set return_url(value: string) {
|
|
pb_1.Message.setField(this, 5, value);
|
|
}
|
|
static fromObject(data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
return_url?: string;
|
|
}): AlipayTradePagePayRequest {
|
|
const message = new AlipayTradePagePayRequest({});
|
|
if (data.user_identification != null) {
|
|
message.user_identification = data.user_identification;
|
|
}
|
|
if (data.amount != null) {
|
|
message.amount = data.amount;
|
|
}
|
|
if (data.description != null) {
|
|
message.description = data.description;
|
|
}
|
|
if (data.notify_url != null) {
|
|
message.notify_url = data.notify_url;
|
|
}
|
|
if (data.return_url != null) {
|
|
message.return_url = data.return_url;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
return_url?: string;
|
|
} = {};
|
|
if (this.user_identification != null) {
|
|
data.user_identification = this.user_identification;
|
|
}
|
|
if (this.amount != null) {
|
|
data.amount = this.amount;
|
|
}
|
|
if (this.description != null) {
|
|
data.description = this.description;
|
|
}
|
|
if (this.notify_url != null) {
|
|
data.notify_url = this.notify_url;
|
|
}
|
|
if (this.return_url != null) {
|
|
data.return_url = this.return_url;
|
|
}
|
|
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.user_identification.length)
|
|
writer.writeString(1, this.user_identification);
|
|
if (this.amount != 0)
|
|
writer.writeInt64(2, this.amount);
|
|
if (this.description.length)
|
|
writer.writeString(3, this.description);
|
|
if (this.notify_url.length)
|
|
writer.writeString(4, this.notify_url);
|
|
if (this.return_url.length)
|
|
writer.writeString(5, this.return_url);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradePagePayRequest {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradePagePayRequest();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.user_identification = reader.readString();
|
|
break;
|
|
case 2:
|
|
message.amount = reader.readInt64();
|
|
break;
|
|
case 3:
|
|
message.description = reader.readString();
|
|
break;
|
|
case 4:
|
|
message.notify_url = reader.readString();
|
|
break;
|
|
case 5:
|
|
message.return_url = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradePagePayRequest {
|
|
return AlipayTradePagePayRequest.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayTradePagePayReply extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
pay_url?: 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 ("pay_url" in data && data.pay_url != undefined) {
|
|
this.pay_url = data.pay_url;
|
|
}
|
|
}
|
|
}
|
|
get pay_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set pay_url(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
static fromObject(data: {
|
|
pay_url?: string;
|
|
}): AlipayTradePagePayReply {
|
|
const message = new AlipayTradePagePayReply({});
|
|
if (data.pay_url != null) {
|
|
message.pay_url = data.pay_url;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
pay_url?: string;
|
|
} = {};
|
|
if (this.pay_url != null) {
|
|
data.pay_url = this.pay_url;
|
|
}
|
|
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.pay_url.length)
|
|
writer.writeString(1, this.pay_url);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradePagePayReply {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradePagePayReply();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.pay_url = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradePagePayReply {
|
|
return AlipayTradePagePayReply.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayTradeAppPayRequest extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: 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 ("user_identification" in data && data.user_identification != undefined) {
|
|
this.user_identification = data.user_identification;
|
|
}
|
|
if ("amount" in data && data.amount != undefined) {
|
|
this.amount = data.amount;
|
|
}
|
|
if ("description" in data && data.description != undefined) {
|
|
this.description = data.description;
|
|
}
|
|
if ("notify_url" in data && data.notify_url != undefined) {
|
|
this.notify_url = data.notify_url;
|
|
}
|
|
}
|
|
}
|
|
get user_identification() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set user_identification(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get amount() {
|
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
|
}
|
|
set amount(value: number) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get description() {
|
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
}
|
|
set description(value: string) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get notify_url() {
|
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
}
|
|
set notify_url(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
static fromObject(data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
}): AlipayTradeAppPayRequest {
|
|
const message = new AlipayTradeAppPayRequest({});
|
|
if (data.user_identification != null) {
|
|
message.user_identification = data.user_identification;
|
|
}
|
|
if (data.amount != null) {
|
|
message.amount = data.amount;
|
|
}
|
|
if (data.description != null) {
|
|
message.description = data.description;
|
|
}
|
|
if (data.notify_url != null) {
|
|
message.notify_url = data.notify_url;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
description?: string;
|
|
notify_url?: string;
|
|
} = {};
|
|
if (this.user_identification != null) {
|
|
data.user_identification = this.user_identification;
|
|
}
|
|
if (this.amount != null) {
|
|
data.amount = this.amount;
|
|
}
|
|
if (this.description != null) {
|
|
data.description = this.description;
|
|
}
|
|
if (this.notify_url != null) {
|
|
data.notify_url = this.notify_url;
|
|
}
|
|
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.user_identification.length)
|
|
writer.writeString(1, this.user_identification);
|
|
if (this.amount != 0)
|
|
writer.writeInt64(2, this.amount);
|
|
if (this.description.length)
|
|
writer.writeString(3, this.description);
|
|
if (this.notify_url.length)
|
|
writer.writeString(4, this.notify_url);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeAppPayRequest {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeAppPayRequest();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.user_identification = reader.readString();
|
|
break;
|
|
case 2:
|
|
message.amount = reader.readInt64();
|
|
break;
|
|
case 3:
|
|
message.description = reader.readString();
|
|
break;
|
|
case 4:
|
|
message.notify_url = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradeAppPayRequest {
|
|
return AlipayTradeAppPayRequest.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayTradeAppPayReply extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
pay_param?: 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 ("pay_param" in data && data.pay_param != undefined) {
|
|
this.pay_param = data.pay_param;
|
|
}
|
|
}
|
|
}
|
|
get pay_param() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set pay_param(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
static fromObject(data: {
|
|
pay_param?: string;
|
|
}): AlipayTradeAppPayReply {
|
|
const message = new AlipayTradeAppPayReply({});
|
|
if (data.pay_param != null) {
|
|
message.pay_param = data.pay_param;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
pay_param?: string;
|
|
} = {};
|
|
if (this.pay_param != null) {
|
|
data.pay_param = this.pay_param;
|
|
}
|
|
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.pay_param.length)
|
|
writer.writeString(1, this.pay_param);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeAppPayReply {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeAppPayReply();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.pay_param = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayTradeAppPayReply {
|
|
return AlipayTradeAppPayReply.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayUniTransferRequest extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
fee?: number;
|
|
description?: 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 ("user_identification" in data && data.user_identification != undefined) {
|
|
this.user_identification = data.user_identification;
|
|
}
|
|
if ("amount" in data && data.amount != undefined) {
|
|
this.amount = data.amount;
|
|
}
|
|
if ("fee" in data && data.fee != undefined) {
|
|
this.fee = data.fee;
|
|
}
|
|
if ("description" in data && data.description != undefined) {
|
|
this.description = data.description;
|
|
}
|
|
}
|
|
}
|
|
get user_identification() {
|
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
}
|
|
set user_identification(value: string) {
|
|
pb_1.Message.setField(this, 1, value);
|
|
}
|
|
get amount() {
|
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
|
}
|
|
set amount(value: number) {
|
|
pb_1.Message.setField(this, 2, value);
|
|
}
|
|
get fee() {
|
|
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
|
|
}
|
|
set fee(value: number) {
|
|
pb_1.Message.setField(this, 3, value);
|
|
}
|
|
get description() {
|
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
}
|
|
set description(value: string) {
|
|
pb_1.Message.setField(this, 4, value);
|
|
}
|
|
static fromObject(data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
fee?: number;
|
|
description?: string;
|
|
}): AlipayUniTransferRequest {
|
|
const message = new AlipayUniTransferRequest({});
|
|
if (data.user_identification != null) {
|
|
message.user_identification = data.user_identification;
|
|
}
|
|
if (data.amount != null) {
|
|
message.amount = data.amount;
|
|
}
|
|
if (data.fee != null) {
|
|
message.fee = data.fee;
|
|
}
|
|
if (data.description != null) {
|
|
message.description = data.description;
|
|
}
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {
|
|
user_identification?: string;
|
|
amount?: number;
|
|
fee?: number;
|
|
description?: string;
|
|
} = {};
|
|
if (this.user_identification != null) {
|
|
data.user_identification = this.user_identification;
|
|
}
|
|
if (this.amount != null) {
|
|
data.amount = this.amount;
|
|
}
|
|
if (this.fee != null) {
|
|
data.fee = this.fee;
|
|
}
|
|
if (this.description != null) {
|
|
data.description = this.description;
|
|
}
|
|
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.user_identification.length)
|
|
writer.writeString(1, this.user_identification);
|
|
if (this.amount != 0)
|
|
writer.writeInt64(2, this.amount);
|
|
if (this.fee != 0)
|
|
writer.writeInt64(3, this.fee);
|
|
if (this.description.length)
|
|
writer.writeString(4, this.description);
|
|
if (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayUniTransferRequest {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayUniTransferRequest();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
case 1:
|
|
message.user_identification = reader.readString();
|
|
break;
|
|
case 2:
|
|
message.amount = reader.readInt64();
|
|
break;
|
|
case 3:
|
|
message.fee = reader.readInt64();
|
|
break;
|
|
case 4:
|
|
message.description = reader.readString();
|
|
break;
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayUniTransferRequest {
|
|
return AlipayUniTransferRequest.deserialize(bytes);
|
|
}
|
|
}
|
|
export class AlipayUniTransferReply extends pb_1.Message {
|
|
#one_of_decls: number[][] = [];
|
|
constructor(data?: any[] | {}) {
|
|
super();
|
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
if (!Array.isArray(data) && typeof data == "object") { }
|
|
}
|
|
static fromObject(data: {}): AlipayUniTransferReply {
|
|
const message = new AlipayUniTransferReply({});
|
|
return message;
|
|
}
|
|
toObject() {
|
|
const data: {} = {};
|
|
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 (!w)
|
|
return writer.getResultBuffer();
|
|
}
|
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayUniTransferReply {
|
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayUniTransferReply();
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup())
|
|
break;
|
|
switch (reader.getFieldNumber()) {
|
|
default: reader.skipField();
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
serializeBinary(): Uint8Array {
|
|
return this.serialize();
|
|
}
|
|
static deserializeBinary(bytes: Uint8Array): AlipayUniTransferReply {
|
|
return AlipayUniTransferReply.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 UnimplementedAlipayService {
|
|
static definition = {
|
|
WapPay: {
|
|
path: "/wallet.Alipay/WapPay",
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestSerialize: (message: AlipayTradeWapPayRequest) => Buffer.from(message.serialize()),
|
|
requestDeserialize: (bytes: Buffer) => AlipayTradeWapPayRequest.deserialize(new Uint8Array(bytes)),
|
|
responseSerialize: (message: AlipayTradeWapPayReply) => Buffer.from(message.serialize()),
|
|
responseDeserialize: (bytes: Buffer) => AlipayTradeWapPayReply.deserialize(new Uint8Array(bytes))
|
|
},
|
|
PagePay: {
|
|
path: "/wallet.Alipay/PagePay",
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestSerialize: (message: AlipayTradePagePayRequest) => Buffer.from(message.serialize()),
|
|
requestDeserialize: (bytes: Buffer) => AlipayTradePagePayRequest.deserialize(new Uint8Array(bytes)),
|
|
responseSerialize: (message: AlipayTradePagePayReply) => Buffer.from(message.serialize()),
|
|
responseDeserialize: (bytes: Buffer) => AlipayTradePagePayReply.deserialize(new Uint8Array(bytes))
|
|
},
|
|
AppPay: {
|
|
path: "/wallet.Alipay/AppPay",
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestSerialize: (message: AlipayTradeAppPayRequest) => Buffer.from(message.serialize()),
|
|
requestDeserialize: (bytes: Buffer) => AlipayTradeAppPayRequest.deserialize(new Uint8Array(bytes)),
|
|
responseSerialize: (message: AlipayTradeAppPayReply) => Buffer.from(message.serialize()),
|
|
responseDeserialize: (bytes: Buffer) => AlipayTradeAppPayReply.deserialize(new Uint8Array(bytes))
|
|
},
|
|
Transfer: {
|
|
path: "/wallet.Alipay/Transfer",
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestSerialize: (message: AlipayUniTransferRequest) => Buffer.from(message.serialize()),
|
|
requestDeserialize: (bytes: Buffer) => AlipayUniTransferRequest.deserialize(new Uint8Array(bytes)),
|
|
responseSerialize: (message: AlipayUniTransferReply) => Buffer.from(message.serialize()),
|
|
responseDeserialize: (bytes: Buffer) => AlipayUniTransferReply.deserialize(new Uint8Array(bytes))
|
|
}
|
|
};
|
|
[method: string]: grpc_1.UntypedHandleCall;
|
|
abstract WapPay(call: grpc_1.ServerUnaryCall<AlipayTradeWapPayRequest, AlipayTradeWapPayReply>, callback: grpc_1.sendUnaryData<AlipayTradeWapPayReply>): void;
|
|
abstract PagePay(call: grpc_1.ServerUnaryCall<AlipayTradePagePayRequest, AlipayTradePagePayReply>, callback: grpc_1.sendUnaryData<AlipayTradePagePayReply>): void;
|
|
abstract AppPay(call: grpc_1.ServerUnaryCall<AlipayTradeAppPayRequest, AlipayTradeAppPayReply>, callback: grpc_1.sendUnaryData<AlipayTradeAppPayReply>): void;
|
|
abstract Transfer(call: grpc_1.ServerUnaryCall<AlipayUniTransferRequest, AlipayUniTransferReply>, callback: grpc_1.sendUnaryData<AlipayUniTransferReply>): void;
|
|
}
|
|
export class AlipayClient extends grpc_1.makeGenericClientConstructor(UnimplementedAlipayService.definition, "Alipay", {}) {
|
|
constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
|
|
super(address, credentials, options);
|
|
}
|
|
WapPay: GrpcUnaryServiceInterface<AlipayTradeWapPayRequest, AlipayTradeWapPayReply> = (message: AlipayTradeWapPayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradeWapPayReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradeWapPayReply>, callback?: grpc_1.requestCallback<AlipayTradeWapPayReply>): grpc_1.ClientUnaryCall => {
|
|
return super.WapPay(message, metadata, options, callback);
|
|
};
|
|
PagePay: GrpcUnaryServiceInterface<AlipayTradePagePayRequest, AlipayTradePagePayReply> = (message: AlipayTradePagePayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradePagePayReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradePagePayReply>, callback?: grpc_1.requestCallback<AlipayTradePagePayReply>): grpc_1.ClientUnaryCall => {
|
|
return super.PagePay(message, metadata, options, callback);
|
|
};
|
|
AppPay: GrpcUnaryServiceInterface<AlipayTradeAppPayRequest, AlipayTradeAppPayReply> = (message: AlipayTradeAppPayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradeAppPayReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<AlipayTradeAppPayReply>, callback?: grpc_1.requestCallback<AlipayTradeAppPayReply>): grpc_1.ClientUnaryCall => {
|
|
return super.AppPay(message, metadata, options, callback);
|
|
};
|
|
Transfer: GrpcUnaryServiceInterface<AlipayUniTransferRequest, AlipayUniTransferReply> = (message: AlipayUniTransferRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<AlipayUniTransferReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<AlipayUniTransferReply>, callback?: grpc_1.requestCallback<AlipayUniTransferReply>): grpc_1.ClientUnaryCall => {
|
|
return super.Transfer(message, metadata, options, callback);
|
|
};
|
|
}
|
|
}
|