@fonoster/sdk 0.7.4 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -13
- package/dist/node/Calls.d.ts +2 -2
- package/dist/node/Calls.js +2 -2
- package/dist/node/Workspaces.js +0 -6
- package/dist/node/client/makeRpcRequest.js +0 -1
- package/dist/node/client/types/common.d.ts +1 -1
- package/dist/node/client/types/index.d.ts +3 -3
- package/dist/node/client/types/index.js +5 -5
- package/dist/node/client/utils.d.ts +1 -1
- package/dist/node/client/utils.js +2 -2
- package/dist/node/generated/node/applications_pb.js +1 -1
- package/dist/node/generated/web/applications_pb.d.ts +1 -1
- package/dist/node/generated/web/applications_pb.js +1 -1
- package/dist/node/node.d.ts +8 -8
- package/dist/node/node.js +12 -12
- package/dist/node/tsconfig.node.tsbuildinfo +1 -1
- package/dist/node/utils.js +0 -1
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
- package/dist/node/generated/node/acls.ts +0 -1054
- package/dist/node/generated/node/agents.ts +0 -1388
- package/dist/node/generated/node/applications.ts +0 -1411
- package/dist/node/generated/node/calls.ts +0 -1123
- package/dist/node/generated/node/credentials.ts +0 -1054
- package/dist/node/generated/node/domains.ts +0 -1144
- package/dist/node/generated/node/google/protobuf/empty.ts +0 -48
- package/dist/node/generated/node/google/protobuf/struct.ts +0 -408
- package/dist/node/generated/node/identity.ts +0 -4267
- package/dist/node/generated/node/numbers.ts +0 -1371
- package/dist/node/generated/node/secrets.ts +0 -985
- package/dist/node/generated/node/trunks.ts +0 -1546
- package/dist/node/generated/web/acls.ts +0 -1054
- package/dist/node/generated/web/agents.ts +0 -1388
- package/dist/node/generated/web/applications.ts +0 -1411
- package/dist/node/generated/web/calls.ts +0 -1123
- package/dist/node/generated/web/credentials.ts +0 -1054
- package/dist/node/generated/web/domains.ts +0 -1144
- package/dist/node/generated/web/google/protobuf/empty.ts +0 -48
- package/dist/node/generated/web/google/protobuf/struct.ts +0 -408
- package/dist/node/generated/web/identity.ts +0 -4267
- package/dist/node/generated/web/numbers.ts +0 -1371
- package/dist/node/generated/web/secrets.ts +0 -985
- package/dist/node/generated/web/trunks.ts +0 -1546
|
@@ -1,1546 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
3
|
-
* compiler version: 3.20.3
|
|
4
|
-
* source: trunks.proto
|
|
5
|
-
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
6
|
-
import * as dependency_1 from "./acls";
|
|
7
|
-
import * as dependency_2 from "./credentials";
|
|
8
|
-
import * as pb_1 from "google-protobuf";
|
|
9
|
-
import * as grpc_1 from "@grpc/grpc-js";
|
|
10
|
-
export namespace fonoster.trunks.v1beta2 {
|
|
11
|
-
export class TrunkURI extends pb_1.Message {
|
|
12
|
-
#one_of_decls: number[][] = [];
|
|
13
|
-
constructor(data?: any[] | {
|
|
14
|
-
host?: string;
|
|
15
|
-
port?: number;
|
|
16
|
-
transport?: string;
|
|
17
|
-
user?: string;
|
|
18
|
-
weight?: number;
|
|
19
|
-
priority?: number;
|
|
20
|
-
enabled?: boolean;
|
|
21
|
-
}) {
|
|
22
|
-
super();
|
|
23
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
24
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
25
|
-
if ("host" in data && data.host != undefined) {
|
|
26
|
-
this.host = data.host;
|
|
27
|
-
}
|
|
28
|
-
if ("port" in data && data.port != undefined) {
|
|
29
|
-
this.port = data.port;
|
|
30
|
-
}
|
|
31
|
-
if ("transport" in data && data.transport != undefined) {
|
|
32
|
-
this.transport = data.transport;
|
|
33
|
-
}
|
|
34
|
-
if ("user" in data && data.user != undefined) {
|
|
35
|
-
this.user = data.user;
|
|
36
|
-
}
|
|
37
|
-
if ("weight" in data && data.weight != undefined) {
|
|
38
|
-
this.weight = data.weight;
|
|
39
|
-
}
|
|
40
|
-
if ("priority" in data && data.priority != undefined) {
|
|
41
|
-
this.priority = data.priority;
|
|
42
|
-
}
|
|
43
|
-
if ("enabled" in data && data.enabled != undefined) {
|
|
44
|
-
this.enabled = data.enabled;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
get host() {
|
|
49
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
50
|
-
}
|
|
51
|
-
set host(value: string) {
|
|
52
|
-
pb_1.Message.setField(this, 1, value);
|
|
53
|
-
}
|
|
54
|
-
get port() {
|
|
55
|
-
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
|
56
|
-
}
|
|
57
|
-
set port(value: number) {
|
|
58
|
-
pb_1.Message.setField(this, 2, value);
|
|
59
|
-
}
|
|
60
|
-
get transport() {
|
|
61
|
-
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
62
|
-
}
|
|
63
|
-
set transport(value: string) {
|
|
64
|
-
pb_1.Message.setField(this, 3, value);
|
|
65
|
-
}
|
|
66
|
-
get user() {
|
|
67
|
-
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
68
|
-
}
|
|
69
|
-
set user(value: string) {
|
|
70
|
-
pb_1.Message.setField(this, 4, value);
|
|
71
|
-
}
|
|
72
|
-
get weight() {
|
|
73
|
-
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
|
|
74
|
-
}
|
|
75
|
-
set weight(value: number) {
|
|
76
|
-
pb_1.Message.setField(this, 5, value);
|
|
77
|
-
}
|
|
78
|
-
get priority() {
|
|
79
|
-
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
|
|
80
|
-
}
|
|
81
|
-
set priority(value: number) {
|
|
82
|
-
pb_1.Message.setField(this, 6, value);
|
|
83
|
-
}
|
|
84
|
-
get enabled() {
|
|
85
|
-
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
|
86
|
-
}
|
|
87
|
-
set enabled(value: boolean) {
|
|
88
|
-
pb_1.Message.setField(this, 7, value);
|
|
89
|
-
}
|
|
90
|
-
static fromObject(data: {
|
|
91
|
-
host?: string;
|
|
92
|
-
port?: number;
|
|
93
|
-
transport?: string;
|
|
94
|
-
user?: string;
|
|
95
|
-
weight?: number;
|
|
96
|
-
priority?: number;
|
|
97
|
-
enabled?: boolean;
|
|
98
|
-
}): TrunkURI {
|
|
99
|
-
const message = new TrunkURI({});
|
|
100
|
-
if (data.host != null) {
|
|
101
|
-
message.host = data.host;
|
|
102
|
-
}
|
|
103
|
-
if (data.port != null) {
|
|
104
|
-
message.port = data.port;
|
|
105
|
-
}
|
|
106
|
-
if (data.transport != null) {
|
|
107
|
-
message.transport = data.transport;
|
|
108
|
-
}
|
|
109
|
-
if (data.user != null) {
|
|
110
|
-
message.user = data.user;
|
|
111
|
-
}
|
|
112
|
-
if (data.weight != null) {
|
|
113
|
-
message.weight = data.weight;
|
|
114
|
-
}
|
|
115
|
-
if (data.priority != null) {
|
|
116
|
-
message.priority = data.priority;
|
|
117
|
-
}
|
|
118
|
-
if (data.enabled != null) {
|
|
119
|
-
message.enabled = data.enabled;
|
|
120
|
-
}
|
|
121
|
-
return message;
|
|
122
|
-
}
|
|
123
|
-
toObject() {
|
|
124
|
-
const data: {
|
|
125
|
-
host?: string;
|
|
126
|
-
port?: number;
|
|
127
|
-
transport?: string;
|
|
128
|
-
user?: string;
|
|
129
|
-
weight?: number;
|
|
130
|
-
priority?: number;
|
|
131
|
-
enabled?: boolean;
|
|
132
|
-
} = {};
|
|
133
|
-
if (this.host != null) {
|
|
134
|
-
data.host = this.host;
|
|
135
|
-
}
|
|
136
|
-
if (this.port != null) {
|
|
137
|
-
data.port = this.port;
|
|
138
|
-
}
|
|
139
|
-
if (this.transport != null) {
|
|
140
|
-
data.transport = this.transport;
|
|
141
|
-
}
|
|
142
|
-
if (this.user != null) {
|
|
143
|
-
data.user = this.user;
|
|
144
|
-
}
|
|
145
|
-
if (this.weight != null) {
|
|
146
|
-
data.weight = this.weight;
|
|
147
|
-
}
|
|
148
|
-
if (this.priority != null) {
|
|
149
|
-
data.priority = this.priority;
|
|
150
|
-
}
|
|
151
|
-
if (this.enabled != null) {
|
|
152
|
-
data.enabled = this.enabled;
|
|
153
|
-
}
|
|
154
|
-
return data;
|
|
155
|
-
}
|
|
156
|
-
serialize(): Uint8Array;
|
|
157
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
158
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
159
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
160
|
-
if (this.host.length)
|
|
161
|
-
writer.writeString(1, this.host);
|
|
162
|
-
if (this.port != 0)
|
|
163
|
-
writer.writeInt32(2, this.port);
|
|
164
|
-
if (this.transport.length)
|
|
165
|
-
writer.writeString(3, this.transport);
|
|
166
|
-
if (this.user.length)
|
|
167
|
-
writer.writeString(4, this.user);
|
|
168
|
-
if (this.weight != 0)
|
|
169
|
-
writer.writeInt32(5, this.weight);
|
|
170
|
-
if (this.priority != 0)
|
|
171
|
-
writer.writeInt32(6, this.priority);
|
|
172
|
-
if (this.enabled != false)
|
|
173
|
-
writer.writeBool(7, this.enabled);
|
|
174
|
-
if (!w)
|
|
175
|
-
return writer.getResultBuffer();
|
|
176
|
-
}
|
|
177
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TrunkURI {
|
|
178
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TrunkURI();
|
|
179
|
-
while (reader.nextField()) {
|
|
180
|
-
if (reader.isEndGroup())
|
|
181
|
-
break;
|
|
182
|
-
switch (reader.getFieldNumber()) {
|
|
183
|
-
case 1:
|
|
184
|
-
message.host = reader.readString();
|
|
185
|
-
break;
|
|
186
|
-
case 2:
|
|
187
|
-
message.port = reader.readInt32();
|
|
188
|
-
break;
|
|
189
|
-
case 3:
|
|
190
|
-
message.transport = reader.readString();
|
|
191
|
-
break;
|
|
192
|
-
case 4:
|
|
193
|
-
message.user = reader.readString();
|
|
194
|
-
break;
|
|
195
|
-
case 5:
|
|
196
|
-
message.weight = reader.readInt32();
|
|
197
|
-
break;
|
|
198
|
-
case 6:
|
|
199
|
-
message.priority = reader.readInt32();
|
|
200
|
-
break;
|
|
201
|
-
case 7:
|
|
202
|
-
message.enabled = reader.readBool();
|
|
203
|
-
break;
|
|
204
|
-
default: reader.skipField();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
return message;
|
|
208
|
-
}
|
|
209
|
-
serializeBinary(): Uint8Array {
|
|
210
|
-
return this.serialize();
|
|
211
|
-
}
|
|
212
|
-
static deserializeBinary(bytes: Uint8Array): TrunkURI {
|
|
213
|
-
return TrunkURI.deserialize(bytes);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
export class Trunk extends pb_1.Message {
|
|
217
|
-
#one_of_decls: number[][] = [];
|
|
218
|
-
constructor(data?: any[] | {
|
|
219
|
-
ref?: string;
|
|
220
|
-
name?: string;
|
|
221
|
-
send_register?: boolean;
|
|
222
|
-
inbound_uri?: string;
|
|
223
|
-
created_at?: number;
|
|
224
|
-
updated_at?: number;
|
|
225
|
-
access_control_list?: dependency_1.fonoster.acls.v1beta2.Acl;
|
|
226
|
-
inbound_credentials?: dependency_2.fonoster.credentials.v1beta2.Credentials;
|
|
227
|
-
outbound_credentials?: dependency_2.fonoster.credentials.v1beta2.Credentials;
|
|
228
|
-
uris?: TrunkURI[];
|
|
229
|
-
}) {
|
|
230
|
-
super();
|
|
231
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [10], this.#one_of_decls);
|
|
232
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
233
|
-
if ("ref" in data && data.ref != undefined) {
|
|
234
|
-
this.ref = data.ref;
|
|
235
|
-
}
|
|
236
|
-
if ("name" in data && data.name != undefined) {
|
|
237
|
-
this.name = data.name;
|
|
238
|
-
}
|
|
239
|
-
if ("send_register" in data && data.send_register != undefined) {
|
|
240
|
-
this.send_register = data.send_register;
|
|
241
|
-
}
|
|
242
|
-
if ("inbound_uri" in data && data.inbound_uri != undefined) {
|
|
243
|
-
this.inbound_uri = data.inbound_uri;
|
|
244
|
-
}
|
|
245
|
-
if ("created_at" in data && data.created_at != undefined) {
|
|
246
|
-
this.created_at = data.created_at;
|
|
247
|
-
}
|
|
248
|
-
if ("updated_at" in data && data.updated_at != undefined) {
|
|
249
|
-
this.updated_at = data.updated_at;
|
|
250
|
-
}
|
|
251
|
-
if ("access_control_list" in data && data.access_control_list != undefined) {
|
|
252
|
-
this.access_control_list = data.access_control_list;
|
|
253
|
-
}
|
|
254
|
-
if ("inbound_credentials" in data && data.inbound_credentials != undefined) {
|
|
255
|
-
this.inbound_credentials = data.inbound_credentials;
|
|
256
|
-
}
|
|
257
|
-
if ("outbound_credentials" in data && data.outbound_credentials != undefined) {
|
|
258
|
-
this.outbound_credentials = data.outbound_credentials;
|
|
259
|
-
}
|
|
260
|
-
if ("uris" in data && data.uris != undefined) {
|
|
261
|
-
this.uris = data.uris;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
get ref() {
|
|
266
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
267
|
-
}
|
|
268
|
-
set ref(value: string) {
|
|
269
|
-
pb_1.Message.setField(this, 1, value);
|
|
270
|
-
}
|
|
271
|
-
get name() {
|
|
272
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
273
|
-
}
|
|
274
|
-
set name(value: string) {
|
|
275
|
-
pb_1.Message.setField(this, 2, value);
|
|
276
|
-
}
|
|
277
|
-
get send_register() {
|
|
278
|
-
return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean;
|
|
279
|
-
}
|
|
280
|
-
set send_register(value: boolean) {
|
|
281
|
-
pb_1.Message.setField(this, 3, value);
|
|
282
|
-
}
|
|
283
|
-
get inbound_uri() {
|
|
284
|
-
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
285
|
-
}
|
|
286
|
-
set inbound_uri(value: string) {
|
|
287
|
-
pb_1.Message.setField(this, 4, value);
|
|
288
|
-
}
|
|
289
|
-
get created_at() {
|
|
290
|
-
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
|
|
291
|
-
}
|
|
292
|
-
set created_at(value: number) {
|
|
293
|
-
pb_1.Message.setField(this, 5, value);
|
|
294
|
-
}
|
|
295
|
-
get updated_at() {
|
|
296
|
-
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
|
|
297
|
-
}
|
|
298
|
-
set updated_at(value: number) {
|
|
299
|
-
pb_1.Message.setField(this, 6, value);
|
|
300
|
-
}
|
|
301
|
-
get access_control_list() {
|
|
302
|
-
return pb_1.Message.getWrapperField(this, dependency_1.fonoster.acls.v1beta2.Acl, 7) as dependency_1.fonoster.acls.v1beta2.Acl;
|
|
303
|
-
}
|
|
304
|
-
set access_control_list(value: dependency_1.fonoster.acls.v1beta2.Acl) {
|
|
305
|
-
pb_1.Message.setWrapperField(this, 7, value);
|
|
306
|
-
}
|
|
307
|
-
get has_access_control_list() {
|
|
308
|
-
return pb_1.Message.getField(this, 7) != null;
|
|
309
|
-
}
|
|
310
|
-
get inbound_credentials() {
|
|
311
|
-
return pb_1.Message.getWrapperField(this, dependency_2.fonoster.credentials.v1beta2.Credentials, 8) as dependency_2.fonoster.credentials.v1beta2.Credentials;
|
|
312
|
-
}
|
|
313
|
-
set inbound_credentials(value: dependency_2.fonoster.credentials.v1beta2.Credentials) {
|
|
314
|
-
pb_1.Message.setWrapperField(this, 8, value);
|
|
315
|
-
}
|
|
316
|
-
get has_inbound_credentials() {
|
|
317
|
-
return pb_1.Message.getField(this, 8) != null;
|
|
318
|
-
}
|
|
319
|
-
get outbound_credentials() {
|
|
320
|
-
return pb_1.Message.getWrapperField(this, dependency_2.fonoster.credentials.v1beta2.Credentials, 9) as dependency_2.fonoster.credentials.v1beta2.Credentials;
|
|
321
|
-
}
|
|
322
|
-
set outbound_credentials(value: dependency_2.fonoster.credentials.v1beta2.Credentials) {
|
|
323
|
-
pb_1.Message.setWrapperField(this, 9, value);
|
|
324
|
-
}
|
|
325
|
-
get has_outbound_credentials() {
|
|
326
|
-
return pb_1.Message.getField(this, 9) != null;
|
|
327
|
-
}
|
|
328
|
-
get uris() {
|
|
329
|
-
return pb_1.Message.getRepeatedWrapperField(this, TrunkURI, 10) as TrunkURI[];
|
|
330
|
-
}
|
|
331
|
-
set uris(value: TrunkURI[]) {
|
|
332
|
-
pb_1.Message.setRepeatedWrapperField(this, 10, value);
|
|
333
|
-
}
|
|
334
|
-
static fromObject(data: {
|
|
335
|
-
ref?: string;
|
|
336
|
-
name?: string;
|
|
337
|
-
send_register?: boolean;
|
|
338
|
-
inbound_uri?: string;
|
|
339
|
-
created_at?: number;
|
|
340
|
-
updated_at?: number;
|
|
341
|
-
access_control_list?: ReturnType<typeof dependency_1.fonoster.acls.v1beta2.Acl.prototype.toObject>;
|
|
342
|
-
inbound_credentials?: ReturnType<typeof dependency_2.fonoster.credentials.v1beta2.Credentials.prototype.toObject>;
|
|
343
|
-
outbound_credentials?: ReturnType<typeof dependency_2.fonoster.credentials.v1beta2.Credentials.prototype.toObject>;
|
|
344
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
345
|
-
}): Trunk {
|
|
346
|
-
const message = new Trunk({});
|
|
347
|
-
if (data.ref != null) {
|
|
348
|
-
message.ref = data.ref;
|
|
349
|
-
}
|
|
350
|
-
if (data.name != null) {
|
|
351
|
-
message.name = data.name;
|
|
352
|
-
}
|
|
353
|
-
if (data.send_register != null) {
|
|
354
|
-
message.send_register = data.send_register;
|
|
355
|
-
}
|
|
356
|
-
if (data.inbound_uri != null) {
|
|
357
|
-
message.inbound_uri = data.inbound_uri;
|
|
358
|
-
}
|
|
359
|
-
if (data.created_at != null) {
|
|
360
|
-
message.created_at = data.created_at;
|
|
361
|
-
}
|
|
362
|
-
if (data.updated_at != null) {
|
|
363
|
-
message.updated_at = data.updated_at;
|
|
364
|
-
}
|
|
365
|
-
if (data.access_control_list != null) {
|
|
366
|
-
message.access_control_list = dependency_1.fonoster.acls.v1beta2.Acl.fromObject(data.access_control_list);
|
|
367
|
-
}
|
|
368
|
-
if (data.inbound_credentials != null) {
|
|
369
|
-
message.inbound_credentials = dependency_2.fonoster.credentials.v1beta2.Credentials.fromObject(data.inbound_credentials);
|
|
370
|
-
}
|
|
371
|
-
if (data.outbound_credentials != null) {
|
|
372
|
-
message.outbound_credentials = dependency_2.fonoster.credentials.v1beta2.Credentials.fromObject(data.outbound_credentials);
|
|
373
|
-
}
|
|
374
|
-
if (data.uris != null) {
|
|
375
|
-
message.uris = data.uris.map(item => TrunkURI.fromObject(item));
|
|
376
|
-
}
|
|
377
|
-
return message;
|
|
378
|
-
}
|
|
379
|
-
toObject() {
|
|
380
|
-
const data: {
|
|
381
|
-
ref?: string;
|
|
382
|
-
name?: string;
|
|
383
|
-
send_register?: boolean;
|
|
384
|
-
inbound_uri?: string;
|
|
385
|
-
created_at?: number;
|
|
386
|
-
updated_at?: number;
|
|
387
|
-
access_control_list?: ReturnType<typeof dependency_1.fonoster.acls.v1beta2.Acl.prototype.toObject>;
|
|
388
|
-
inbound_credentials?: ReturnType<typeof dependency_2.fonoster.credentials.v1beta2.Credentials.prototype.toObject>;
|
|
389
|
-
outbound_credentials?: ReturnType<typeof dependency_2.fonoster.credentials.v1beta2.Credentials.prototype.toObject>;
|
|
390
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
391
|
-
} = {};
|
|
392
|
-
if (this.ref != null) {
|
|
393
|
-
data.ref = this.ref;
|
|
394
|
-
}
|
|
395
|
-
if (this.name != null) {
|
|
396
|
-
data.name = this.name;
|
|
397
|
-
}
|
|
398
|
-
if (this.send_register != null) {
|
|
399
|
-
data.send_register = this.send_register;
|
|
400
|
-
}
|
|
401
|
-
if (this.inbound_uri != null) {
|
|
402
|
-
data.inbound_uri = this.inbound_uri;
|
|
403
|
-
}
|
|
404
|
-
if (this.created_at != null) {
|
|
405
|
-
data.created_at = this.created_at;
|
|
406
|
-
}
|
|
407
|
-
if (this.updated_at != null) {
|
|
408
|
-
data.updated_at = this.updated_at;
|
|
409
|
-
}
|
|
410
|
-
if (this.access_control_list != null) {
|
|
411
|
-
data.access_control_list = this.access_control_list.toObject();
|
|
412
|
-
}
|
|
413
|
-
if (this.inbound_credentials != null) {
|
|
414
|
-
data.inbound_credentials = this.inbound_credentials.toObject();
|
|
415
|
-
}
|
|
416
|
-
if (this.outbound_credentials != null) {
|
|
417
|
-
data.outbound_credentials = this.outbound_credentials.toObject();
|
|
418
|
-
}
|
|
419
|
-
if (this.uris != null) {
|
|
420
|
-
data.uris = this.uris.map((item: TrunkURI) => item.toObject());
|
|
421
|
-
}
|
|
422
|
-
return data;
|
|
423
|
-
}
|
|
424
|
-
serialize(): Uint8Array;
|
|
425
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
426
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
427
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
428
|
-
if (this.ref.length)
|
|
429
|
-
writer.writeString(1, this.ref);
|
|
430
|
-
if (this.name.length)
|
|
431
|
-
writer.writeString(2, this.name);
|
|
432
|
-
if (this.send_register != false)
|
|
433
|
-
writer.writeBool(3, this.send_register);
|
|
434
|
-
if (this.inbound_uri.length)
|
|
435
|
-
writer.writeString(4, this.inbound_uri);
|
|
436
|
-
if (this.created_at != 0)
|
|
437
|
-
writer.writeInt64(5, this.created_at);
|
|
438
|
-
if (this.updated_at != 0)
|
|
439
|
-
writer.writeInt64(6, this.updated_at);
|
|
440
|
-
if (this.has_access_control_list)
|
|
441
|
-
writer.writeMessage(7, this.access_control_list, () => this.access_control_list.serialize(writer));
|
|
442
|
-
if (this.has_inbound_credentials)
|
|
443
|
-
writer.writeMessage(8, this.inbound_credentials, () => this.inbound_credentials.serialize(writer));
|
|
444
|
-
if (this.has_outbound_credentials)
|
|
445
|
-
writer.writeMessage(9, this.outbound_credentials, () => this.outbound_credentials.serialize(writer));
|
|
446
|
-
if (this.uris.length)
|
|
447
|
-
writer.writeRepeatedMessage(10, this.uris, (item: TrunkURI) => item.serialize(writer));
|
|
448
|
-
if (!w)
|
|
449
|
-
return writer.getResultBuffer();
|
|
450
|
-
}
|
|
451
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Trunk {
|
|
452
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Trunk();
|
|
453
|
-
while (reader.nextField()) {
|
|
454
|
-
if (reader.isEndGroup())
|
|
455
|
-
break;
|
|
456
|
-
switch (reader.getFieldNumber()) {
|
|
457
|
-
case 1:
|
|
458
|
-
message.ref = reader.readString();
|
|
459
|
-
break;
|
|
460
|
-
case 2:
|
|
461
|
-
message.name = reader.readString();
|
|
462
|
-
break;
|
|
463
|
-
case 3:
|
|
464
|
-
message.send_register = reader.readBool();
|
|
465
|
-
break;
|
|
466
|
-
case 4:
|
|
467
|
-
message.inbound_uri = reader.readString();
|
|
468
|
-
break;
|
|
469
|
-
case 5:
|
|
470
|
-
message.created_at = reader.readInt64();
|
|
471
|
-
break;
|
|
472
|
-
case 6:
|
|
473
|
-
message.updated_at = reader.readInt64();
|
|
474
|
-
break;
|
|
475
|
-
case 7:
|
|
476
|
-
reader.readMessage(message.access_control_list, () => message.access_control_list = dependency_1.fonoster.acls.v1beta2.Acl.deserialize(reader));
|
|
477
|
-
break;
|
|
478
|
-
case 8:
|
|
479
|
-
reader.readMessage(message.inbound_credentials, () => message.inbound_credentials = dependency_2.fonoster.credentials.v1beta2.Credentials.deserialize(reader));
|
|
480
|
-
break;
|
|
481
|
-
case 9:
|
|
482
|
-
reader.readMessage(message.outbound_credentials, () => message.outbound_credentials = dependency_2.fonoster.credentials.v1beta2.Credentials.deserialize(reader));
|
|
483
|
-
break;
|
|
484
|
-
case 10:
|
|
485
|
-
reader.readMessage(message.uris, () => pb_1.Message.addToRepeatedWrapperField(message, 10, TrunkURI.deserialize(reader), TrunkURI));
|
|
486
|
-
break;
|
|
487
|
-
default: reader.skipField();
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
return message;
|
|
491
|
-
}
|
|
492
|
-
serializeBinary(): Uint8Array {
|
|
493
|
-
return this.serialize();
|
|
494
|
-
}
|
|
495
|
-
static deserializeBinary(bytes: Uint8Array): Trunk {
|
|
496
|
-
return Trunk.deserialize(bytes);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
export class CreateTrunkRequest extends pb_1.Message {
|
|
500
|
-
#one_of_decls: number[][] = [];
|
|
501
|
-
constructor(data?: any[] | {
|
|
502
|
-
name?: string;
|
|
503
|
-
send_register?: boolean;
|
|
504
|
-
inbound_uri?: string;
|
|
505
|
-
access_control_list_ref?: string;
|
|
506
|
-
inbound_credentials_ref?: string;
|
|
507
|
-
outbound_credentials_ref?: string;
|
|
508
|
-
uris?: TrunkURI[];
|
|
509
|
-
}) {
|
|
510
|
-
super();
|
|
511
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls);
|
|
512
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
513
|
-
if ("name" in data && data.name != undefined) {
|
|
514
|
-
this.name = data.name;
|
|
515
|
-
}
|
|
516
|
-
if ("send_register" in data && data.send_register != undefined) {
|
|
517
|
-
this.send_register = data.send_register;
|
|
518
|
-
}
|
|
519
|
-
if ("inbound_uri" in data && data.inbound_uri != undefined) {
|
|
520
|
-
this.inbound_uri = data.inbound_uri;
|
|
521
|
-
}
|
|
522
|
-
if ("access_control_list_ref" in data && data.access_control_list_ref != undefined) {
|
|
523
|
-
this.access_control_list_ref = data.access_control_list_ref;
|
|
524
|
-
}
|
|
525
|
-
if ("inbound_credentials_ref" in data && data.inbound_credentials_ref != undefined) {
|
|
526
|
-
this.inbound_credentials_ref = data.inbound_credentials_ref;
|
|
527
|
-
}
|
|
528
|
-
if ("outbound_credentials_ref" in data && data.outbound_credentials_ref != undefined) {
|
|
529
|
-
this.outbound_credentials_ref = data.outbound_credentials_ref;
|
|
530
|
-
}
|
|
531
|
-
if ("uris" in data && data.uris != undefined) {
|
|
532
|
-
this.uris = data.uris;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
get name() {
|
|
537
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
538
|
-
}
|
|
539
|
-
set name(value: string) {
|
|
540
|
-
pb_1.Message.setField(this, 1, value);
|
|
541
|
-
}
|
|
542
|
-
get send_register() {
|
|
543
|
-
return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean;
|
|
544
|
-
}
|
|
545
|
-
set send_register(value: boolean) {
|
|
546
|
-
pb_1.Message.setField(this, 2, value);
|
|
547
|
-
}
|
|
548
|
-
get inbound_uri() {
|
|
549
|
-
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
550
|
-
}
|
|
551
|
-
set inbound_uri(value: string) {
|
|
552
|
-
pb_1.Message.setField(this, 3, value);
|
|
553
|
-
}
|
|
554
|
-
get access_control_list_ref() {
|
|
555
|
-
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
556
|
-
}
|
|
557
|
-
set access_control_list_ref(value: string) {
|
|
558
|
-
pb_1.Message.setField(this, 4, value);
|
|
559
|
-
}
|
|
560
|
-
get inbound_credentials_ref() {
|
|
561
|
-
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
562
|
-
}
|
|
563
|
-
set inbound_credentials_ref(value: string) {
|
|
564
|
-
pb_1.Message.setField(this, 5, value);
|
|
565
|
-
}
|
|
566
|
-
get outbound_credentials_ref() {
|
|
567
|
-
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
568
|
-
}
|
|
569
|
-
set outbound_credentials_ref(value: string) {
|
|
570
|
-
pb_1.Message.setField(this, 6, value);
|
|
571
|
-
}
|
|
572
|
-
get uris() {
|
|
573
|
-
return pb_1.Message.getRepeatedWrapperField(this, TrunkURI, 7) as TrunkURI[];
|
|
574
|
-
}
|
|
575
|
-
set uris(value: TrunkURI[]) {
|
|
576
|
-
pb_1.Message.setRepeatedWrapperField(this, 7, value);
|
|
577
|
-
}
|
|
578
|
-
static fromObject(data: {
|
|
579
|
-
name?: string;
|
|
580
|
-
send_register?: boolean;
|
|
581
|
-
inbound_uri?: string;
|
|
582
|
-
access_control_list_ref?: string;
|
|
583
|
-
inbound_credentials_ref?: string;
|
|
584
|
-
outbound_credentials_ref?: string;
|
|
585
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
586
|
-
}): CreateTrunkRequest {
|
|
587
|
-
const message = new CreateTrunkRequest({});
|
|
588
|
-
if (data.name != null) {
|
|
589
|
-
message.name = data.name;
|
|
590
|
-
}
|
|
591
|
-
if (data.send_register != null) {
|
|
592
|
-
message.send_register = data.send_register;
|
|
593
|
-
}
|
|
594
|
-
if (data.inbound_uri != null) {
|
|
595
|
-
message.inbound_uri = data.inbound_uri;
|
|
596
|
-
}
|
|
597
|
-
if (data.access_control_list_ref != null) {
|
|
598
|
-
message.access_control_list_ref = data.access_control_list_ref;
|
|
599
|
-
}
|
|
600
|
-
if (data.inbound_credentials_ref != null) {
|
|
601
|
-
message.inbound_credentials_ref = data.inbound_credentials_ref;
|
|
602
|
-
}
|
|
603
|
-
if (data.outbound_credentials_ref != null) {
|
|
604
|
-
message.outbound_credentials_ref = data.outbound_credentials_ref;
|
|
605
|
-
}
|
|
606
|
-
if (data.uris != null) {
|
|
607
|
-
message.uris = data.uris.map(item => TrunkURI.fromObject(item));
|
|
608
|
-
}
|
|
609
|
-
return message;
|
|
610
|
-
}
|
|
611
|
-
toObject() {
|
|
612
|
-
const data: {
|
|
613
|
-
name?: string;
|
|
614
|
-
send_register?: boolean;
|
|
615
|
-
inbound_uri?: string;
|
|
616
|
-
access_control_list_ref?: string;
|
|
617
|
-
inbound_credentials_ref?: string;
|
|
618
|
-
outbound_credentials_ref?: string;
|
|
619
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
620
|
-
} = {};
|
|
621
|
-
if (this.name != null) {
|
|
622
|
-
data.name = this.name;
|
|
623
|
-
}
|
|
624
|
-
if (this.send_register != null) {
|
|
625
|
-
data.send_register = this.send_register;
|
|
626
|
-
}
|
|
627
|
-
if (this.inbound_uri != null) {
|
|
628
|
-
data.inbound_uri = this.inbound_uri;
|
|
629
|
-
}
|
|
630
|
-
if (this.access_control_list_ref != null) {
|
|
631
|
-
data.access_control_list_ref = this.access_control_list_ref;
|
|
632
|
-
}
|
|
633
|
-
if (this.inbound_credentials_ref != null) {
|
|
634
|
-
data.inbound_credentials_ref = this.inbound_credentials_ref;
|
|
635
|
-
}
|
|
636
|
-
if (this.outbound_credentials_ref != null) {
|
|
637
|
-
data.outbound_credentials_ref = this.outbound_credentials_ref;
|
|
638
|
-
}
|
|
639
|
-
if (this.uris != null) {
|
|
640
|
-
data.uris = this.uris.map((item: TrunkURI) => item.toObject());
|
|
641
|
-
}
|
|
642
|
-
return data;
|
|
643
|
-
}
|
|
644
|
-
serialize(): Uint8Array;
|
|
645
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
646
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
647
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
648
|
-
if (this.name.length)
|
|
649
|
-
writer.writeString(1, this.name);
|
|
650
|
-
if (this.send_register != false)
|
|
651
|
-
writer.writeBool(2, this.send_register);
|
|
652
|
-
if (this.inbound_uri.length)
|
|
653
|
-
writer.writeString(3, this.inbound_uri);
|
|
654
|
-
if (this.access_control_list_ref.length)
|
|
655
|
-
writer.writeString(4, this.access_control_list_ref);
|
|
656
|
-
if (this.inbound_credentials_ref.length)
|
|
657
|
-
writer.writeString(5, this.inbound_credentials_ref);
|
|
658
|
-
if (this.outbound_credentials_ref.length)
|
|
659
|
-
writer.writeString(6, this.outbound_credentials_ref);
|
|
660
|
-
if (this.uris.length)
|
|
661
|
-
writer.writeRepeatedMessage(7, this.uris, (item: TrunkURI) => item.serialize(writer));
|
|
662
|
-
if (!w)
|
|
663
|
-
return writer.getResultBuffer();
|
|
664
|
-
}
|
|
665
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateTrunkRequest {
|
|
666
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateTrunkRequest();
|
|
667
|
-
while (reader.nextField()) {
|
|
668
|
-
if (reader.isEndGroup())
|
|
669
|
-
break;
|
|
670
|
-
switch (reader.getFieldNumber()) {
|
|
671
|
-
case 1:
|
|
672
|
-
message.name = reader.readString();
|
|
673
|
-
break;
|
|
674
|
-
case 2:
|
|
675
|
-
message.send_register = reader.readBool();
|
|
676
|
-
break;
|
|
677
|
-
case 3:
|
|
678
|
-
message.inbound_uri = reader.readString();
|
|
679
|
-
break;
|
|
680
|
-
case 4:
|
|
681
|
-
message.access_control_list_ref = reader.readString();
|
|
682
|
-
break;
|
|
683
|
-
case 5:
|
|
684
|
-
message.inbound_credentials_ref = reader.readString();
|
|
685
|
-
break;
|
|
686
|
-
case 6:
|
|
687
|
-
message.outbound_credentials_ref = reader.readString();
|
|
688
|
-
break;
|
|
689
|
-
case 7:
|
|
690
|
-
reader.readMessage(message.uris, () => pb_1.Message.addToRepeatedWrapperField(message, 7, TrunkURI.deserialize(reader), TrunkURI));
|
|
691
|
-
break;
|
|
692
|
-
default: reader.skipField();
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
return message;
|
|
696
|
-
}
|
|
697
|
-
serializeBinary(): Uint8Array {
|
|
698
|
-
return this.serialize();
|
|
699
|
-
}
|
|
700
|
-
static deserializeBinary(bytes: Uint8Array): CreateTrunkRequest {
|
|
701
|
-
return CreateTrunkRequest.deserialize(bytes);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
export class CreateTrunkResponse extends pb_1.Message {
|
|
705
|
-
#one_of_decls: number[][] = [];
|
|
706
|
-
constructor(data?: any[] | {
|
|
707
|
-
ref?: string;
|
|
708
|
-
}) {
|
|
709
|
-
super();
|
|
710
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
711
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
712
|
-
if ("ref" in data && data.ref != undefined) {
|
|
713
|
-
this.ref = data.ref;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
get ref() {
|
|
718
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
719
|
-
}
|
|
720
|
-
set ref(value: string) {
|
|
721
|
-
pb_1.Message.setField(this, 1, value);
|
|
722
|
-
}
|
|
723
|
-
static fromObject(data: {
|
|
724
|
-
ref?: string;
|
|
725
|
-
}): CreateTrunkResponse {
|
|
726
|
-
const message = new CreateTrunkResponse({});
|
|
727
|
-
if (data.ref != null) {
|
|
728
|
-
message.ref = data.ref;
|
|
729
|
-
}
|
|
730
|
-
return message;
|
|
731
|
-
}
|
|
732
|
-
toObject() {
|
|
733
|
-
const data: {
|
|
734
|
-
ref?: string;
|
|
735
|
-
} = {};
|
|
736
|
-
if (this.ref != null) {
|
|
737
|
-
data.ref = this.ref;
|
|
738
|
-
}
|
|
739
|
-
return data;
|
|
740
|
-
}
|
|
741
|
-
serialize(): Uint8Array;
|
|
742
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
743
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
744
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
745
|
-
if (this.ref.length)
|
|
746
|
-
writer.writeString(1, this.ref);
|
|
747
|
-
if (!w)
|
|
748
|
-
return writer.getResultBuffer();
|
|
749
|
-
}
|
|
750
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CreateTrunkResponse {
|
|
751
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CreateTrunkResponse();
|
|
752
|
-
while (reader.nextField()) {
|
|
753
|
-
if (reader.isEndGroup())
|
|
754
|
-
break;
|
|
755
|
-
switch (reader.getFieldNumber()) {
|
|
756
|
-
case 1:
|
|
757
|
-
message.ref = reader.readString();
|
|
758
|
-
break;
|
|
759
|
-
default: reader.skipField();
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
return message;
|
|
763
|
-
}
|
|
764
|
-
serializeBinary(): Uint8Array {
|
|
765
|
-
return this.serialize();
|
|
766
|
-
}
|
|
767
|
-
static deserializeBinary(bytes: Uint8Array): CreateTrunkResponse {
|
|
768
|
-
return CreateTrunkResponse.deserialize(bytes);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
export class UpdateTrunkRequest extends pb_1.Message {
|
|
772
|
-
#one_of_decls: number[][] = [];
|
|
773
|
-
constructor(data?: any[] | {
|
|
774
|
-
ref?: string;
|
|
775
|
-
name?: string;
|
|
776
|
-
send_register?: boolean;
|
|
777
|
-
inbound_uri?: string;
|
|
778
|
-
access_control_list_ref?: string;
|
|
779
|
-
inbound_credentials_ref?: string;
|
|
780
|
-
outbound_credentials_ref?: string;
|
|
781
|
-
uris?: TrunkURI[];
|
|
782
|
-
}) {
|
|
783
|
-
super();
|
|
784
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8], this.#one_of_decls);
|
|
785
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
786
|
-
if ("ref" in data && data.ref != undefined) {
|
|
787
|
-
this.ref = data.ref;
|
|
788
|
-
}
|
|
789
|
-
if ("name" in data && data.name != undefined) {
|
|
790
|
-
this.name = data.name;
|
|
791
|
-
}
|
|
792
|
-
if ("send_register" in data && data.send_register != undefined) {
|
|
793
|
-
this.send_register = data.send_register;
|
|
794
|
-
}
|
|
795
|
-
if ("inbound_uri" in data && data.inbound_uri != undefined) {
|
|
796
|
-
this.inbound_uri = data.inbound_uri;
|
|
797
|
-
}
|
|
798
|
-
if ("access_control_list_ref" in data && data.access_control_list_ref != undefined) {
|
|
799
|
-
this.access_control_list_ref = data.access_control_list_ref;
|
|
800
|
-
}
|
|
801
|
-
if ("inbound_credentials_ref" in data && data.inbound_credentials_ref != undefined) {
|
|
802
|
-
this.inbound_credentials_ref = data.inbound_credentials_ref;
|
|
803
|
-
}
|
|
804
|
-
if ("outbound_credentials_ref" in data && data.outbound_credentials_ref != undefined) {
|
|
805
|
-
this.outbound_credentials_ref = data.outbound_credentials_ref;
|
|
806
|
-
}
|
|
807
|
-
if ("uris" in data && data.uris != undefined) {
|
|
808
|
-
this.uris = data.uris;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
get ref() {
|
|
813
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
814
|
-
}
|
|
815
|
-
set ref(value: string) {
|
|
816
|
-
pb_1.Message.setField(this, 1, value);
|
|
817
|
-
}
|
|
818
|
-
get name() {
|
|
819
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
820
|
-
}
|
|
821
|
-
set name(value: string) {
|
|
822
|
-
pb_1.Message.setField(this, 2, value);
|
|
823
|
-
}
|
|
824
|
-
get send_register() {
|
|
825
|
-
return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean;
|
|
826
|
-
}
|
|
827
|
-
set send_register(value: boolean) {
|
|
828
|
-
pb_1.Message.setField(this, 3, value);
|
|
829
|
-
}
|
|
830
|
-
get inbound_uri() {
|
|
831
|
-
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
832
|
-
}
|
|
833
|
-
set inbound_uri(value: string) {
|
|
834
|
-
pb_1.Message.setField(this, 4, value);
|
|
835
|
-
}
|
|
836
|
-
get access_control_list_ref() {
|
|
837
|
-
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
838
|
-
}
|
|
839
|
-
set access_control_list_ref(value: string) {
|
|
840
|
-
pb_1.Message.setField(this, 5, value);
|
|
841
|
-
}
|
|
842
|
-
get inbound_credentials_ref() {
|
|
843
|
-
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
844
|
-
}
|
|
845
|
-
set inbound_credentials_ref(value: string) {
|
|
846
|
-
pb_1.Message.setField(this, 6, value);
|
|
847
|
-
}
|
|
848
|
-
get outbound_credentials_ref() {
|
|
849
|
-
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
|
850
|
-
}
|
|
851
|
-
set outbound_credentials_ref(value: string) {
|
|
852
|
-
pb_1.Message.setField(this, 7, value);
|
|
853
|
-
}
|
|
854
|
-
get uris() {
|
|
855
|
-
return pb_1.Message.getRepeatedWrapperField(this, TrunkURI, 8) as TrunkURI[];
|
|
856
|
-
}
|
|
857
|
-
set uris(value: TrunkURI[]) {
|
|
858
|
-
pb_1.Message.setRepeatedWrapperField(this, 8, value);
|
|
859
|
-
}
|
|
860
|
-
static fromObject(data: {
|
|
861
|
-
ref?: string;
|
|
862
|
-
name?: string;
|
|
863
|
-
send_register?: boolean;
|
|
864
|
-
inbound_uri?: string;
|
|
865
|
-
access_control_list_ref?: string;
|
|
866
|
-
inbound_credentials_ref?: string;
|
|
867
|
-
outbound_credentials_ref?: string;
|
|
868
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
869
|
-
}): UpdateTrunkRequest {
|
|
870
|
-
const message = new UpdateTrunkRequest({});
|
|
871
|
-
if (data.ref != null) {
|
|
872
|
-
message.ref = data.ref;
|
|
873
|
-
}
|
|
874
|
-
if (data.name != null) {
|
|
875
|
-
message.name = data.name;
|
|
876
|
-
}
|
|
877
|
-
if (data.send_register != null) {
|
|
878
|
-
message.send_register = data.send_register;
|
|
879
|
-
}
|
|
880
|
-
if (data.inbound_uri != null) {
|
|
881
|
-
message.inbound_uri = data.inbound_uri;
|
|
882
|
-
}
|
|
883
|
-
if (data.access_control_list_ref != null) {
|
|
884
|
-
message.access_control_list_ref = data.access_control_list_ref;
|
|
885
|
-
}
|
|
886
|
-
if (data.inbound_credentials_ref != null) {
|
|
887
|
-
message.inbound_credentials_ref = data.inbound_credentials_ref;
|
|
888
|
-
}
|
|
889
|
-
if (data.outbound_credentials_ref != null) {
|
|
890
|
-
message.outbound_credentials_ref = data.outbound_credentials_ref;
|
|
891
|
-
}
|
|
892
|
-
if (data.uris != null) {
|
|
893
|
-
message.uris = data.uris.map(item => TrunkURI.fromObject(item));
|
|
894
|
-
}
|
|
895
|
-
return message;
|
|
896
|
-
}
|
|
897
|
-
toObject() {
|
|
898
|
-
const data: {
|
|
899
|
-
ref?: string;
|
|
900
|
-
name?: string;
|
|
901
|
-
send_register?: boolean;
|
|
902
|
-
inbound_uri?: string;
|
|
903
|
-
access_control_list_ref?: string;
|
|
904
|
-
inbound_credentials_ref?: string;
|
|
905
|
-
outbound_credentials_ref?: string;
|
|
906
|
-
uris?: ReturnType<typeof TrunkURI.prototype.toObject>[];
|
|
907
|
-
} = {};
|
|
908
|
-
if (this.ref != null) {
|
|
909
|
-
data.ref = this.ref;
|
|
910
|
-
}
|
|
911
|
-
if (this.name != null) {
|
|
912
|
-
data.name = this.name;
|
|
913
|
-
}
|
|
914
|
-
if (this.send_register != null) {
|
|
915
|
-
data.send_register = this.send_register;
|
|
916
|
-
}
|
|
917
|
-
if (this.inbound_uri != null) {
|
|
918
|
-
data.inbound_uri = this.inbound_uri;
|
|
919
|
-
}
|
|
920
|
-
if (this.access_control_list_ref != null) {
|
|
921
|
-
data.access_control_list_ref = this.access_control_list_ref;
|
|
922
|
-
}
|
|
923
|
-
if (this.inbound_credentials_ref != null) {
|
|
924
|
-
data.inbound_credentials_ref = this.inbound_credentials_ref;
|
|
925
|
-
}
|
|
926
|
-
if (this.outbound_credentials_ref != null) {
|
|
927
|
-
data.outbound_credentials_ref = this.outbound_credentials_ref;
|
|
928
|
-
}
|
|
929
|
-
if (this.uris != null) {
|
|
930
|
-
data.uris = this.uris.map((item: TrunkURI) => item.toObject());
|
|
931
|
-
}
|
|
932
|
-
return data;
|
|
933
|
-
}
|
|
934
|
-
serialize(): Uint8Array;
|
|
935
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
936
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
937
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
938
|
-
if (this.ref.length)
|
|
939
|
-
writer.writeString(1, this.ref);
|
|
940
|
-
if (this.name.length)
|
|
941
|
-
writer.writeString(2, this.name);
|
|
942
|
-
if (this.send_register != false)
|
|
943
|
-
writer.writeBool(3, this.send_register);
|
|
944
|
-
if (this.inbound_uri.length)
|
|
945
|
-
writer.writeString(4, this.inbound_uri);
|
|
946
|
-
if (this.access_control_list_ref.length)
|
|
947
|
-
writer.writeString(5, this.access_control_list_ref);
|
|
948
|
-
if (this.inbound_credentials_ref.length)
|
|
949
|
-
writer.writeString(6, this.inbound_credentials_ref);
|
|
950
|
-
if (this.outbound_credentials_ref.length)
|
|
951
|
-
writer.writeString(7, this.outbound_credentials_ref);
|
|
952
|
-
if (this.uris.length)
|
|
953
|
-
writer.writeRepeatedMessage(8, this.uris, (item: TrunkURI) => item.serialize(writer));
|
|
954
|
-
if (!w)
|
|
955
|
-
return writer.getResultBuffer();
|
|
956
|
-
}
|
|
957
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateTrunkRequest {
|
|
958
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateTrunkRequest();
|
|
959
|
-
while (reader.nextField()) {
|
|
960
|
-
if (reader.isEndGroup())
|
|
961
|
-
break;
|
|
962
|
-
switch (reader.getFieldNumber()) {
|
|
963
|
-
case 1:
|
|
964
|
-
message.ref = reader.readString();
|
|
965
|
-
break;
|
|
966
|
-
case 2:
|
|
967
|
-
message.name = reader.readString();
|
|
968
|
-
break;
|
|
969
|
-
case 3:
|
|
970
|
-
message.send_register = reader.readBool();
|
|
971
|
-
break;
|
|
972
|
-
case 4:
|
|
973
|
-
message.inbound_uri = reader.readString();
|
|
974
|
-
break;
|
|
975
|
-
case 5:
|
|
976
|
-
message.access_control_list_ref = reader.readString();
|
|
977
|
-
break;
|
|
978
|
-
case 6:
|
|
979
|
-
message.inbound_credentials_ref = reader.readString();
|
|
980
|
-
break;
|
|
981
|
-
case 7:
|
|
982
|
-
message.outbound_credentials_ref = reader.readString();
|
|
983
|
-
break;
|
|
984
|
-
case 8:
|
|
985
|
-
reader.readMessage(message.uris, () => pb_1.Message.addToRepeatedWrapperField(message, 8, TrunkURI.deserialize(reader), TrunkURI));
|
|
986
|
-
break;
|
|
987
|
-
default: reader.skipField();
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
return message;
|
|
991
|
-
}
|
|
992
|
-
serializeBinary(): Uint8Array {
|
|
993
|
-
return this.serialize();
|
|
994
|
-
}
|
|
995
|
-
static deserializeBinary(bytes: Uint8Array): UpdateTrunkRequest {
|
|
996
|
-
return UpdateTrunkRequest.deserialize(bytes);
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
export class UpdateTrunkResponse extends pb_1.Message {
|
|
1000
|
-
#one_of_decls: number[][] = [];
|
|
1001
|
-
constructor(data?: any[] | {
|
|
1002
|
-
ref?: string;
|
|
1003
|
-
}) {
|
|
1004
|
-
super();
|
|
1005
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1006
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1007
|
-
if ("ref" in data && data.ref != undefined) {
|
|
1008
|
-
this.ref = data.ref;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
get ref() {
|
|
1013
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
1014
|
-
}
|
|
1015
|
-
set ref(value: string) {
|
|
1016
|
-
pb_1.Message.setField(this, 1, value);
|
|
1017
|
-
}
|
|
1018
|
-
static fromObject(data: {
|
|
1019
|
-
ref?: string;
|
|
1020
|
-
}): UpdateTrunkResponse {
|
|
1021
|
-
const message = new UpdateTrunkResponse({});
|
|
1022
|
-
if (data.ref != null) {
|
|
1023
|
-
message.ref = data.ref;
|
|
1024
|
-
}
|
|
1025
|
-
return message;
|
|
1026
|
-
}
|
|
1027
|
-
toObject() {
|
|
1028
|
-
const data: {
|
|
1029
|
-
ref?: string;
|
|
1030
|
-
} = {};
|
|
1031
|
-
if (this.ref != null) {
|
|
1032
|
-
data.ref = this.ref;
|
|
1033
|
-
}
|
|
1034
|
-
return data;
|
|
1035
|
-
}
|
|
1036
|
-
serialize(): Uint8Array;
|
|
1037
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1038
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1039
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1040
|
-
if (this.ref.length)
|
|
1041
|
-
writer.writeString(1, this.ref);
|
|
1042
|
-
if (!w)
|
|
1043
|
-
return writer.getResultBuffer();
|
|
1044
|
-
}
|
|
1045
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UpdateTrunkResponse {
|
|
1046
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UpdateTrunkResponse();
|
|
1047
|
-
while (reader.nextField()) {
|
|
1048
|
-
if (reader.isEndGroup())
|
|
1049
|
-
break;
|
|
1050
|
-
switch (reader.getFieldNumber()) {
|
|
1051
|
-
case 1:
|
|
1052
|
-
message.ref = reader.readString();
|
|
1053
|
-
break;
|
|
1054
|
-
default: reader.skipField();
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
return message;
|
|
1058
|
-
}
|
|
1059
|
-
serializeBinary(): Uint8Array {
|
|
1060
|
-
return this.serialize();
|
|
1061
|
-
}
|
|
1062
|
-
static deserializeBinary(bytes: Uint8Array): UpdateTrunkResponse {
|
|
1063
|
-
return UpdateTrunkResponse.deserialize(bytes);
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
export class GetTrunkRequest extends pb_1.Message {
|
|
1067
|
-
#one_of_decls: number[][] = [];
|
|
1068
|
-
constructor(data?: any[] | {
|
|
1069
|
-
ref?: string;
|
|
1070
|
-
}) {
|
|
1071
|
-
super();
|
|
1072
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1073
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1074
|
-
if ("ref" in data && data.ref != undefined) {
|
|
1075
|
-
this.ref = data.ref;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
get ref() {
|
|
1080
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
1081
|
-
}
|
|
1082
|
-
set ref(value: string) {
|
|
1083
|
-
pb_1.Message.setField(this, 1, value);
|
|
1084
|
-
}
|
|
1085
|
-
static fromObject(data: {
|
|
1086
|
-
ref?: string;
|
|
1087
|
-
}): GetTrunkRequest {
|
|
1088
|
-
const message = new GetTrunkRequest({});
|
|
1089
|
-
if (data.ref != null) {
|
|
1090
|
-
message.ref = data.ref;
|
|
1091
|
-
}
|
|
1092
|
-
return message;
|
|
1093
|
-
}
|
|
1094
|
-
toObject() {
|
|
1095
|
-
const data: {
|
|
1096
|
-
ref?: string;
|
|
1097
|
-
} = {};
|
|
1098
|
-
if (this.ref != null) {
|
|
1099
|
-
data.ref = this.ref;
|
|
1100
|
-
}
|
|
1101
|
-
return data;
|
|
1102
|
-
}
|
|
1103
|
-
serialize(): Uint8Array;
|
|
1104
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1105
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1106
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1107
|
-
if (this.ref.length)
|
|
1108
|
-
writer.writeString(1, this.ref);
|
|
1109
|
-
if (!w)
|
|
1110
|
-
return writer.getResultBuffer();
|
|
1111
|
-
}
|
|
1112
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetTrunkRequest {
|
|
1113
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetTrunkRequest();
|
|
1114
|
-
while (reader.nextField()) {
|
|
1115
|
-
if (reader.isEndGroup())
|
|
1116
|
-
break;
|
|
1117
|
-
switch (reader.getFieldNumber()) {
|
|
1118
|
-
case 1:
|
|
1119
|
-
message.ref = reader.readString();
|
|
1120
|
-
break;
|
|
1121
|
-
default: reader.skipField();
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
return message;
|
|
1125
|
-
}
|
|
1126
|
-
serializeBinary(): Uint8Array {
|
|
1127
|
-
return this.serialize();
|
|
1128
|
-
}
|
|
1129
|
-
static deserializeBinary(bytes: Uint8Array): GetTrunkRequest {
|
|
1130
|
-
return GetTrunkRequest.deserialize(bytes);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
export class DeleteTrunkRequest extends pb_1.Message {
|
|
1134
|
-
#one_of_decls: number[][] = [];
|
|
1135
|
-
constructor(data?: any[] | {
|
|
1136
|
-
ref?: string;
|
|
1137
|
-
}) {
|
|
1138
|
-
super();
|
|
1139
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1140
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1141
|
-
if ("ref" in data && data.ref != undefined) {
|
|
1142
|
-
this.ref = data.ref;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
get ref() {
|
|
1147
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
1148
|
-
}
|
|
1149
|
-
set ref(value: string) {
|
|
1150
|
-
pb_1.Message.setField(this, 1, value);
|
|
1151
|
-
}
|
|
1152
|
-
static fromObject(data: {
|
|
1153
|
-
ref?: string;
|
|
1154
|
-
}): DeleteTrunkRequest {
|
|
1155
|
-
const message = new DeleteTrunkRequest({});
|
|
1156
|
-
if (data.ref != null) {
|
|
1157
|
-
message.ref = data.ref;
|
|
1158
|
-
}
|
|
1159
|
-
return message;
|
|
1160
|
-
}
|
|
1161
|
-
toObject() {
|
|
1162
|
-
const data: {
|
|
1163
|
-
ref?: string;
|
|
1164
|
-
} = {};
|
|
1165
|
-
if (this.ref != null) {
|
|
1166
|
-
data.ref = this.ref;
|
|
1167
|
-
}
|
|
1168
|
-
return data;
|
|
1169
|
-
}
|
|
1170
|
-
serialize(): Uint8Array;
|
|
1171
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1172
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1173
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1174
|
-
if (this.ref.length)
|
|
1175
|
-
writer.writeString(1, this.ref);
|
|
1176
|
-
if (!w)
|
|
1177
|
-
return writer.getResultBuffer();
|
|
1178
|
-
}
|
|
1179
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteTrunkRequest {
|
|
1180
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteTrunkRequest();
|
|
1181
|
-
while (reader.nextField()) {
|
|
1182
|
-
if (reader.isEndGroup())
|
|
1183
|
-
break;
|
|
1184
|
-
switch (reader.getFieldNumber()) {
|
|
1185
|
-
case 1:
|
|
1186
|
-
message.ref = reader.readString();
|
|
1187
|
-
break;
|
|
1188
|
-
default: reader.skipField();
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
return message;
|
|
1192
|
-
}
|
|
1193
|
-
serializeBinary(): Uint8Array {
|
|
1194
|
-
return this.serialize();
|
|
1195
|
-
}
|
|
1196
|
-
static deserializeBinary(bytes: Uint8Array): DeleteTrunkRequest {
|
|
1197
|
-
return DeleteTrunkRequest.deserialize(bytes);
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
export class DeleteTrunkResponse extends pb_1.Message {
|
|
1201
|
-
#one_of_decls: number[][] = [];
|
|
1202
|
-
constructor(data?: any[] | {
|
|
1203
|
-
ref?: string;
|
|
1204
|
-
}) {
|
|
1205
|
-
super();
|
|
1206
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1207
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1208
|
-
if ("ref" in data && data.ref != undefined) {
|
|
1209
|
-
this.ref = data.ref;
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
get ref() {
|
|
1214
|
-
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
1215
|
-
}
|
|
1216
|
-
set ref(value: string) {
|
|
1217
|
-
pb_1.Message.setField(this, 1, value);
|
|
1218
|
-
}
|
|
1219
|
-
static fromObject(data: {
|
|
1220
|
-
ref?: string;
|
|
1221
|
-
}): DeleteTrunkResponse {
|
|
1222
|
-
const message = new DeleteTrunkResponse({});
|
|
1223
|
-
if (data.ref != null) {
|
|
1224
|
-
message.ref = data.ref;
|
|
1225
|
-
}
|
|
1226
|
-
return message;
|
|
1227
|
-
}
|
|
1228
|
-
toObject() {
|
|
1229
|
-
const data: {
|
|
1230
|
-
ref?: string;
|
|
1231
|
-
} = {};
|
|
1232
|
-
if (this.ref != null) {
|
|
1233
|
-
data.ref = this.ref;
|
|
1234
|
-
}
|
|
1235
|
-
return data;
|
|
1236
|
-
}
|
|
1237
|
-
serialize(): Uint8Array;
|
|
1238
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1239
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1240
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1241
|
-
if (this.ref.length)
|
|
1242
|
-
writer.writeString(1, this.ref);
|
|
1243
|
-
if (!w)
|
|
1244
|
-
return writer.getResultBuffer();
|
|
1245
|
-
}
|
|
1246
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeleteTrunkResponse {
|
|
1247
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeleteTrunkResponse();
|
|
1248
|
-
while (reader.nextField()) {
|
|
1249
|
-
if (reader.isEndGroup())
|
|
1250
|
-
break;
|
|
1251
|
-
switch (reader.getFieldNumber()) {
|
|
1252
|
-
case 1:
|
|
1253
|
-
message.ref = reader.readString();
|
|
1254
|
-
break;
|
|
1255
|
-
default: reader.skipField();
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
return message;
|
|
1259
|
-
}
|
|
1260
|
-
serializeBinary(): Uint8Array {
|
|
1261
|
-
return this.serialize();
|
|
1262
|
-
}
|
|
1263
|
-
static deserializeBinary(bytes: Uint8Array): DeleteTrunkResponse {
|
|
1264
|
-
return DeleteTrunkResponse.deserialize(bytes);
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
export class ListTrunkRequest extends pb_1.Message {
|
|
1268
|
-
#one_of_decls: number[][] = [];
|
|
1269
|
-
constructor(data?: any[] | {
|
|
1270
|
-
page_size?: number;
|
|
1271
|
-
page_token?: string;
|
|
1272
|
-
}) {
|
|
1273
|
-
super();
|
|
1274
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
1275
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1276
|
-
if ("page_size" in data && data.page_size != undefined) {
|
|
1277
|
-
this.page_size = data.page_size;
|
|
1278
|
-
}
|
|
1279
|
-
if ("page_token" in data && data.page_token != undefined) {
|
|
1280
|
-
this.page_token = data.page_token;
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
get page_size() {
|
|
1285
|
-
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
|
1286
|
-
}
|
|
1287
|
-
set page_size(value: number) {
|
|
1288
|
-
pb_1.Message.setField(this, 1, value);
|
|
1289
|
-
}
|
|
1290
|
-
get page_token() {
|
|
1291
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
1292
|
-
}
|
|
1293
|
-
set page_token(value: string) {
|
|
1294
|
-
pb_1.Message.setField(this, 2, value);
|
|
1295
|
-
}
|
|
1296
|
-
static fromObject(data: {
|
|
1297
|
-
page_size?: number;
|
|
1298
|
-
page_token?: string;
|
|
1299
|
-
}): ListTrunkRequest {
|
|
1300
|
-
const message = new ListTrunkRequest({});
|
|
1301
|
-
if (data.page_size != null) {
|
|
1302
|
-
message.page_size = data.page_size;
|
|
1303
|
-
}
|
|
1304
|
-
if (data.page_token != null) {
|
|
1305
|
-
message.page_token = data.page_token;
|
|
1306
|
-
}
|
|
1307
|
-
return message;
|
|
1308
|
-
}
|
|
1309
|
-
toObject() {
|
|
1310
|
-
const data: {
|
|
1311
|
-
page_size?: number;
|
|
1312
|
-
page_token?: string;
|
|
1313
|
-
} = {};
|
|
1314
|
-
if (this.page_size != null) {
|
|
1315
|
-
data.page_size = this.page_size;
|
|
1316
|
-
}
|
|
1317
|
-
if (this.page_token != null) {
|
|
1318
|
-
data.page_token = this.page_token;
|
|
1319
|
-
}
|
|
1320
|
-
return data;
|
|
1321
|
-
}
|
|
1322
|
-
serialize(): Uint8Array;
|
|
1323
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1324
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1325
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1326
|
-
if (this.page_size != 0)
|
|
1327
|
-
writer.writeInt32(1, this.page_size);
|
|
1328
|
-
if (this.page_token.length)
|
|
1329
|
-
writer.writeString(2, this.page_token);
|
|
1330
|
-
if (!w)
|
|
1331
|
-
return writer.getResultBuffer();
|
|
1332
|
-
}
|
|
1333
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListTrunkRequest {
|
|
1334
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListTrunkRequest();
|
|
1335
|
-
while (reader.nextField()) {
|
|
1336
|
-
if (reader.isEndGroup())
|
|
1337
|
-
break;
|
|
1338
|
-
switch (reader.getFieldNumber()) {
|
|
1339
|
-
case 1:
|
|
1340
|
-
message.page_size = reader.readInt32();
|
|
1341
|
-
break;
|
|
1342
|
-
case 2:
|
|
1343
|
-
message.page_token = reader.readString();
|
|
1344
|
-
break;
|
|
1345
|
-
default: reader.skipField();
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
return message;
|
|
1349
|
-
}
|
|
1350
|
-
serializeBinary(): Uint8Array {
|
|
1351
|
-
return this.serialize();
|
|
1352
|
-
}
|
|
1353
|
-
static deserializeBinary(bytes: Uint8Array): ListTrunkRequest {
|
|
1354
|
-
return ListTrunkRequest.deserialize(bytes);
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
export class ListTrunksResponse extends pb_1.Message {
|
|
1358
|
-
#one_of_decls: number[][] = [];
|
|
1359
|
-
constructor(data?: any[] | {
|
|
1360
|
-
items?: Trunk[];
|
|
1361
|
-
next_page_token?: string;
|
|
1362
|
-
}) {
|
|
1363
|
-
super();
|
|
1364
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
|
|
1365
|
-
if (!Array.isArray(data) && typeof data == "object") {
|
|
1366
|
-
if ("items" in data && data.items != undefined) {
|
|
1367
|
-
this.items = data.items;
|
|
1368
|
-
}
|
|
1369
|
-
if ("next_page_token" in data && data.next_page_token != undefined) {
|
|
1370
|
-
this.next_page_token = data.next_page_token;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
get items() {
|
|
1375
|
-
return pb_1.Message.getRepeatedWrapperField(this, Trunk, 1) as Trunk[];
|
|
1376
|
-
}
|
|
1377
|
-
set items(value: Trunk[]) {
|
|
1378
|
-
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
|
1379
|
-
}
|
|
1380
|
-
get next_page_token() {
|
|
1381
|
-
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
1382
|
-
}
|
|
1383
|
-
set next_page_token(value: string) {
|
|
1384
|
-
pb_1.Message.setField(this, 2, value);
|
|
1385
|
-
}
|
|
1386
|
-
static fromObject(data: {
|
|
1387
|
-
items?: ReturnType<typeof Trunk.prototype.toObject>[];
|
|
1388
|
-
next_page_token?: string;
|
|
1389
|
-
}): ListTrunksResponse {
|
|
1390
|
-
const message = new ListTrunksResponse({});
|
|
1391
|
-
if (data.items != null) {
|
|
1392
|
-
message.items = data.items.map(item => Trunk.fromObject(item));
|
|
1393
|
-
}
|
|
1394
|
-
if (data.next_page_token != null) {
|
|
1395
|
-
message.next_page_token = data.next_page_token;
|
|
1396
|
-
}
|
|
1397
|
-
return message;
|
|
1398
|
-
}
|
|
1399
|
-
toObject() {
|
|
1400
|
-
const data: {
|
|
1401
|
-
items?: ReturnType<typeof Trunk.prototype.toObject>[];
|
|
1402
|
-
next_page_token?: string;
|
|
1403
|
-
} = {};
|
|
1404
|
-
if (this.items != null) {
|
|
1405
|
-
data.items = this.items.map((item: Trunk) => item.toObject());
|
|
1406
|
-
}
|
|
1407
|
-
if (this.next_page_token != null) {
|
|
1408
|
-
data.next_page_token = this.next_page_token;
|
|
1409
|
-
}
|
|
1410
|
-
return data;
|
|
1411
|
-
}
|
|
1412
|
-
serialize(): Uint8Array;
|
|
1413
|
-
serialize(w: pb_1.BinaryWriter): void;
|
|
1414
|
-
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1415
|
-
const writer = w || new pb_1.BinaryWriter();
|
|
1416
|
-
if (this.items.length)
|
|
1417
|
-
writer.writeRepeatedMessage(1, this.items, (item: Trunk) => item.serialize(writer));
|
|
1418
|
-
if (this.next_page_token.length)
|
|
1419
|
-
writer.writeString(2, this.next_page_token);
|
|
1420
|
-
if (!w)
|
|
1421
|
-
return writer.getResultBuffer();
|
|
1422
|
-
}
|
|
1423
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ListTrunksResponse {
|
|
1424
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ListTrunksResponse();
|
|
1425
|
-
while (reader.nextField()) {
|
|
1426
|
-
if (reader.isEndGroup())
|
|
1427
|
-
break;
|
|
1428
|
-
switch (reader.getFieldNumber()) {
|
|
1429
|
-
case 1:
|
|
1430
|
-
reader.readMessage(message.items, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Trunk.deserialize(reader), Trunk));
|
|
1431
|
-
break;
|
|
1432
|
-
case 2:
|
|
1433
|
-
message.next_page_token = reader.readString();
|
|
1434
|
-
break;
|
|
1435
|
-
default: reader.skipField();
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
return message;
|
|
1439
|
-
}
|
|
1440
|
-
serializeBinary(): Uint8Array {
|
|
1441
|
-
return this.serialize();
|
|
1442
|
-
}
|
|
1443
|
-
static deserializeBinary(bytes: Uint8Array): ListTrunksResponse {
|
|
1444
|
-
return ListTrunksResponse.deserialize(bytes);
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
interface GrpcUnaryServiceInterface<P, R> {
|
|
1448
|
-
(message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1449
|
-
(message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1450
|
-
(message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1451
|
-
(message: P, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
1452
|
-
}
|
|
1453
|
-
interface GrpcStreamServiceInterface<P, R> {
|
|
1454
|
-
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
1455
|
-
(message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
1456
|
-
}
|
|
1457
|
-
interface GrpWritableServiceInterface<P, R> {
|
|
1458
|
-
(metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1459
|
-
(metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1460
|
-
(options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1461
|
-
(callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
1462
|
-
}
|
|
1463
|
-
interface GrpcChunkServiceInterface<P, R> {
|
|
1464
|
-
(metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
1465
|
-
(options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
1466
|
-
}
|
|
1467
|
-
interface GrpcPromiseServiceInterface<P, R> {
|
|
1468
|
-
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
|
|
1469
|
-
(message: P, options?: grpc_1.CallOptions): Promise<R>;
|
|
1470
|
-
}
|
|
1471
|
-
export abstract class UnimplementedTrunksService {
|
|
1472
|
-
static definition = {
|
|
1473
|
-
CreateTrunk: {
|
|
1474
|
-
path: "/fonoster.trunks.v1beta2.Trunks/CreateTrunk",
|
|
1475
|
-
requestStream: false,
|
|
1476
|
-
responseStream: false,
|
|
1477
|
-
requestSerialize: (message: CreateTrunkRequest) => Buffer.from(message.serialize()),
|
|
1478
|
-
requestDeserialize: (bytes: Buffer) => CreateTrunkRequest.deserialize(new Uint8Array(bytes)),
|
|
1479
|
-
responseSerialize: (message: CreateTrunkResponse) => Buffer.from(message.serialize()),
|
|
1480
|
-
responseDeserialize: (bytes: Buffer) => CreateTrunkResponse.deserialize(new Uint8Array(bytes))
|
|
1481
|
-
},
|
|
1482
|
-
UpdateTrunk: {
|
|
1483
|
-
path: "/fonoster.trunks.v1beta2.Trunks/UpdateTrunk",
|
|
1484
|
-
requestStream: false,
|
|
1485
|
-
responseStream: false,
|
|
1486
|
-
requestSerialize: (message: UpdateTrunkRequest) => Buffer.from(message.serialize()),
|
|
1487
|
-
requestDeserialize: (bytes: Buffer) => UpdateTrunkRequest.deserialize(new Uint8Array(bytes)),
|
|
1488
|
-
responseSerialize: (message: UpdateTrunkResponse) => Buffer.from(message.serialize()),
|
|
1489
|
-
responseDeserialize: (bytes: Buffer) => UpdateTrunkResponse.deserialize(new Uint8Array(bytes))
|
|
1490
|
-
},
|
|
1491
|
-
GetTrunk: {
|
|
1492
|
-
path: "/fonoster.trunks.v1beta2.Trunks/GetTrunk",
|
|
1493
|
-
requestStream: false,
|
|
1494
|
-
responseStream: false,
|
|
1495
|
-
requestSerialize: (message: GetTrunkRequest) => Buffer.from(message.serialize()),
|
|
1496
|
-
requestDeserialize: (bytes: Buffer) => GetTrunkRequest.deserialize(new Uint8Array(bytes)),
|
|
1497
|
-
responseSerialize: (message: Trunk) => Buffer.from(message.serialize()),
|
|
1498
|
-
responseDeserialize: (bytes: Buffer) => Trunk.deserialize(new Uint8Array(bytes))
|
|
1499
|
-
},
|
|
1500
|
-
DeleteTrunk: {
|
|
1501
|
-
path: "/fonoster.trunks.v1beta2.Trunks/DeleteTrunk",
|
|
1502
|
-
requestStream: false,
|
|
1503
|
-
responseStream: false,
|
|
1504
|
-
requestSerialize: (message: DeleteTrunkRequest) => Buffer.from(message.serialize()),
|
|
1505
|
-
requestDeserialize: (bytes: Buffer) => DeleteTrunkRequest.deserialize(new Uint8Array(bytes)),
|
|
1506
|
-
responseSerialize: (message: DeleteTrunkResponse) => Buffer.from(message.serialize()),
|
|
1507
|
-
responseDeserialize: (bytes: Buffer) => DeleteTrunkResponse.deserialize(new Uint8Array(bytes))
|
|
1508
|
-
},
|
|
1509
|
-
ListTrunks: {
|
|
1510
|
-
path: "/fonoster.trunks.v1beta2.Trunks/ListTrunks",
|
|
1511
|
-
requestStream: false,
|
|
1512
|
-
responseStream: false,
|
|
1513
|
-
requestSerialize: (message: ListTrunkRequest) => Buffer.from(message.serialize()),
|
|
1514
|
-
requestDeserialize: (bytes: Buffer) => ListTrunkRequest.deserialize(new Uint8Array(bytes)),
|
|
1515
|
-
responseSerialize: (message: ListTrunksResponse) => Buffer.from(message.serialize()),
|
|
1516
|
-
responseDeserialize: (bytes: Buffer) => ListTrunksResponse.deserialize(new Uint8Array(bytes))
|
|
1517
|
-
}
|
|
1518
|
-
};
|
|
1519
|
-
[method: string]: grpc_1.UntypedHandleCall;
|
|
1520
|
-
abstract CreateTrunk(call: grpc_1.ServerUnaryCall<CreateTrunkRequest, CreateTrunkResponse>, callback: grpc_1.sendUnaryData<CreateTrunkResponse>): void;
|
|
1521
|
-
abstract UpdateTrunk(call: grpc_1.ServerUnaryCall<UpdateTrunkRequest, UpdateTrunkResponse>, callback: grpc_1.sendUnaryData<UpdateTrunkResponse>): void;
|
|
1522
|
-
abstract GetTrunk(call: grpc_1.ServerUnaryCall<GetTrunkRequest, Trunk>, callback: grpc_1.sendUnaryData<Trunk>): void;
|
|
1523
|
-
abstract DeleteTrunk(call: grpc_1.ServerUnaryCall<DeleteTrunkRequest, DeleteTrunkResponse>, callback: grpc_1.sendUnaryData<DeleteTrunkResponse>): void;
|
|
1524
|
-
abstract ListTrunks(call: grpc_1.ServerUnaryCall<ListTrunkRequest, ListTrunksResponse>, callback: grpc_1.sendUnaryData<ListTrunksResponse>): void;
|
|
1525
|
-
}
|
|
1526
|
-
export class TrunksClient extends grpc_1.makeGenericClientConstructor(UnimplementedTrunksService.definition, "Trunks", {}) {
|
|
1527
|
-
constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
|
|
1528
|
-
super(address, credentials, options);
|
|
1529
|
-
}
|
|
1530
|
-
CreateTrunk: GrpcUnaryServiceInterface<CreateTrunkRequest, CreateTrunkResponse> = (message: CreateTrunkRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<CreateTrunkResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<CreateTrunkResponse>, callback?: grpc_1.requestCallback<CreateTrunkResponse>): grpc_1.ClientUnaryCall => {
|
|
1531
|
-
return super.CreateTrunk(message, metadata, options, callback);
|
|
1532
|
-
};
|
|
1533
|
-
UpdateTrunk: GrpcUnaryServiceInterface<UpdateTrunkRequest, UpdateTrunkResponse> = (message: UpdateTrunkRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<UpdateTrunkResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<UpdateTrunkResponse>, callback?: grpc_1.requestCallback<UpdateTrunkResponse>): grpc_1.ClientUnaryCall => {
|
|
1534
|
-
return super.UpdateTrunk(message, metadata, options, callback);
|
|
1535
|
-
};
|
|
1536
|
-
GetTrunk: GrpcUnaryServiceInterface<GetTrunkRequest, Trunk> = (message: GetTrunkRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<Trunk>, options?: grpc_1.CallOptions | grpc_1.requestCallback<Trunk>, callback?: grpc_1.requestCallback<Trunk>): grpc_1.ClientUnaryCall => {
|
|
1537
|
-
return super.GetTrunk(message, metadata, options, callback);
|
|
1538
|
-
};
|
|
1539
|
-
DeleteTrunk: GrpcUnaryServiceInterface<DeleteTrunkRequest, DeleteTrunkResponse> = (message: DeleteTrunkRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<DeleteTrunkResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<DeleteTrunkResponse>, callback?: grpc_1.requestCallback<DeleteTrunkResponse>): grpc_1.ClientUnaryCall => {
|
|
1540
|
-
return super.DeleteTrunk(message, metadata, options, callback);
|
|
1541
|
-
};
|
|
1542
|
-
ListTrunks: GrpcUnaryServiceInterface<ListTrunkRequest, ListTrunksResponse> = (message: ListTrunkRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<ListTrunksResponse>, options?: grpc_1.CallOptions | grpc_1.requestCallback<ListTrunksResponse>, callback?: grpc_1.requestCallback<ListTrunksResponse>): grpc_1.ClientUnaryCall => {
|
|
1543
|
-
return super.ListTrunks(message, metadata, options, callback);
|
|
1544
|
-
};
|
|
1545
|
-
}
|
|
1546
|
-
}
|