@marleena/trb-proto 1.0.30 → 1.0.31

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.
@@ -1157,5 +1157,48 @@ export class ClickHouse_AdminClient {
1157
1157
  this.methodDescriptorGetTableOptions);
1158
1158
  }
1159
1159
 
1160
+ methodDescriptorListConnections = new grpcWeb.MethodDescriptor(
1161
+ '/trb.clickhouse.v1.ClickHouse_Admin/ListConnections',
1162
+ grpcWeb.MethodType.UNARY,
1163
+ clickhouse_admin_pb.ListConnectionsRequest,
1164
+ clickhouse_admin_pb.ConnectionList,
1165
+ (request: clickhouse_admin_pb.ListConnectionsRequest) => {
1166
+ return request.serializeBinary();
1167
+ },
1168
+ clickhouse_admin_pb.ConnectionList.deserializeBinary
1169
+ );
1170
+
1171
+ listConnections(
1172
+ request: clickhouse_admin_pb.ListConnectionsRequest,
1173
+ metadata?: grpcWeb.Metadata | null): Promise<clickhouse_admin_pb.ConnectionList>;
1174
+
1175
+ listConnections(
1176
+ request: clickhouse_admin_pb.ListConnectionsRequest,
1177
+ metadata: grpcWeb.Metadata | null,
1178
+ callback: (err: grpcWeb.RpcError,
1179
+ response: clickhouse_admin_pb.ConnectionList) => void): grpcWeb.ClientReadableStream<clickhouse_admin_pb.ConnectionList>;
1180
+
1181
+ listConnections(
1182
+ request: clickhouse_admin_pb.ListConnectionsRequest,
1183
+ metadata?: grpcWeb.Metadata | null,
1184
+ callback?: (err: grpcWeb.RpcError,
1185
+ response: clickhouse_admin_pb.ConnectionList) => void) {
1186
+ if (callback !== undefined) {
1187
+ return this.client_.rpcCall(
1188
+ this.hostname_ +
1189
+ '/trb.clickhouse.v1.ClickHouse_Admin/ListConnections',
1190
+ request,
1191
+ metadata || {},
1192
+ this.methodDescriptorListConnections,
1193
+ callback);
1194
+ }
1195
+ return this.client_.unaryCall(
1196
+ this.hostname_ +
1197
+ '/trb.clickhouse.v1.ClickHouse_Admin/ListConnections',
1198
+ request,
1199
+ metadata || {},
1200
+ this.methodDescriptorListConnections);
1201
+ }
1202
+
1160
1203
  }
1161
1204
 
@@ -5,6 +5,70 @@ import * as google_api_field_behavior_pb from '../google/api/field_behavior_pb';
5
5
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
6
6
 
7
7
 
8
+ export class Connection extends jspb.Message {
9
+ getName(): string;
10
+ setName(value: string): Connection;
11
+
12
+ getHost(): string;
13
+ setHost(value: string): Connection;
14
+
15
+ getDatabase(): string;
16
+ setDatabase(value: string): Connection;
17
+
18
+ getIsDefault(): boolean;
19
+ setIsDefault(value: boolean): Connection;
20
+
21
+ serializeBinary(): Uint8Array;
22
+ toObject(includeInstance?: boolean): Connection.AsObject;
23
+ static toObject(includeInstance: boolean, msg: Connection): Connection.AsObject;
24
+ static serializeBinaryToWriter(message: Connection, writer: jspb.BinaryWriter): void;
25
+ static deserializeBinary(bytes: Uint8Array): Connection;
26
+ static deserializeBinaryFromReader(message: Connection, reader: jspb.BinaryReader): Connection;
27
+ }
28
+
29
+ export namespace Connection {
30
+ export type AsObject = {
31
+ name: string,
32
+ host: string,
33
+ database: string,
34
+ isDefault: boolean,
35
+ }
36
+ }
37
+
38
+ export class ListConnectionsRequest extends jspb.Message {
39
+ serializeBinary(): Uint8Array;
40
+ toObject(includeInstance?: boolean): ListConnectionsRequest.AsObject;
41
+ static toObject(includeInstance: boolean, msg: ListConnectionsRequest): ListConnectionsRequest.AsObject;
42
+ static serializeBinaryToWriter(message: ListConnectionsRequest, writer: jspb.BinaryWriter): void;
43
+ static deserializeBinary(bytes: Uint8Array): ListConnectionsRequest;
44
+ static deserializeBinaryFromReader(message: ListConnectionsRequest, reader: jspb.BinaryReader): ListConnectionsRequest;
45
+ }
46
+
47
+ export namespace ListConnectionsRequest {
48
+ export type AsObject = {
49
+ }
50
+ }
51
+
52
+ export class ConnectionList extends jspb.Message {
53
+ getItemsList(): Array<Connection>;
54
+ setItemsList(value: Array<Connection>): ConnectionList;
55
+ clearItemsList(): ConnectionList;
56
+ addItems(value?: Connection, index?: number): Connection;
57
+
58
+ serializeBinary(): Uint8Array;
59
+ toObject(includeInstance?: boolean): ConnectionList.AsObject;
60
+ static toObject(includeInstance: boolean, msg: ConnectionList): ConnectionList.AsObject;
61
+ static serializeBinaryToWriter(message: ConnectionList, writer: jspb.BinaryWriter): void;
62
+ static deserializeBinary(bytes: Uint8Array): ConnectionList;
63
+ static deserializeBinaryFromReader(message: ConnectionList, reader: jspb.BinaryReader): ConnectionList;
64
+ }
65
+
66
+ export namespace ConnectionList {
67
+ export type AsObject = {
68
+ itemsList: Array<Connection.AsObject>,
69
+ }
70
+ }
71
+
8
72
  export class Status extends jspb.Message {
9
73
  getSuccess(): boolean;
10
74
  setSuccess(value: boolean): Status;
@@ -29,6 +29,8 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time
29
29
  goog.object.extend(proto, google_protobuf_timestamp_pb);
30
30
  goog.exportSymbol('proto.trb.clickhouse.v1.AddColumnRequest', null, global);
31
31
  goog.exportSymbol('proto.trb.clickhouse.v1.Column', null, global);
32
+ goog.exportSymbol('proto.trb.clickhouse.v1.Connection', null, global);
33
+ goog.exportSymbol('proto.trb.clickhouse.v1.ConnectionList', null, global);
32
34
  goog.exportSymbol('proto.trb.clickhouse.v1.Database', null, global);
33
35
  goog.exportSymbol('proto.trb.clickhouse.v1.DatabaseList', null, global);
34
36
  goog.exportSymbol('proto.trb.clickhouse.v1.DatabaseName', null, global);
@@ -41,6 +43,7 @@ goog.exportSymbol('proto.trb.clickhouse.v1.ExecuteQueryRequest', null, global);
41
43
  goog.exportSymbol('proto.trb.clickhouse.v1.ExecuteQueryResponse', null, global);
42
44
  goog.exportSymbol('proto.trb.clickhouse.v1.GetMetricsRequest', null, global);
43
45
  goog.exportSymbol('proto.trb.clickhouse.v1.KillProcessRequest', null, global);
46
+ goog.exportSymbol('proto.trb.clickhouse.v1.ListConnectionsRequest', null, global);
44
47
  goog.exportSymbol('proto.trb.clickhouse.v1.ListDatabasesRequest', null, global);
45
48
  goog.exportSymbol('proto.trb.clickhouse.v1.ListDisksRequest', null, global);
46
49
  goog.exportSymbol('proto.trb.clickhouse.v1.ListPartsRequest', null, global);
@@ -70,6 +73,69 @@ goog.exportSymbol('proto.trb.clickhouse.v1.TableOptionsRequest', null, global);
70
73
  goog.exportSymbol('proto.trb.clickhouse.v1.TableOptionsResponse', null, global);
71
74
  goog.exportSymbol('proto.trb.clickhouse.v1.TablePart', null, global);
72
75
  goog.exportSymbol('proto.trb.clickhouse.v1.TableSpec', null, global);
76
+ /**
77
+ * Generated by JsPbCodeGenerator.
78
+ * @param {Array=} opt_data Optional initial data array, typically from a
79
+ * server response, or constructed directly in Javascript. The array is used
80
+ * in place and becomes part of the constructed object. It is not cloned.
81
+ * If no data is provided, the constructed object will be empty, but still
82
+ * valid.
83
+ * @extends {jspb.Message}
84
+ * @constructor
85
+ */
86
+ proto.trb.clickhouse.v1.Connection = function(opt_data) {
87
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
88
+ };
89
+ goog.inherits(proto.trb.clickhouse.v1.Connection, jspb.Message);
90
+ if (goog.DEBUG && !COMPILED) {
91
+ /**
92
+ * @public
93
+ * @override
94
+ */
95
+ proto.trb.clickhouse.v1.Connection.displayName = 'proto.trb.clickhouse.v1.Connection';
96
+ }
97
+ /**
98
+ * Generated by JsPbCodeGenerator.
99
+ * @param {Array=} opt_data Optional initial data array, typically from a
100
+ * server response, or constructed directly in Javascript. The array is used
101
+ * in place and becomes part of the constructed object. It is not cloned.
102
+ * If no data is provided, the constructed object will be empty, but still
103
+ * valid.
104
+ * @extends {jspb.Message}
105
+ * @constructor
106
+ */
107
+ proto.trb.clickhouse.v1.ListConnectionsRequest = function(opt_data) {
108
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
109
+ };
110
+ goog.inherits(proto.trb.clickhouse.v1.ListConnectionsRequest, jspb.Message);
111
+ if (goog.DEBUG && !COMPILED) {
112
+ /**
113
+ * @public
114
+ * @override
115
+ */
116
+ proto.trb.clickhouse.v1.ListConnectionsRequest.displayName = 'proto.trb.clickhouse.v1.ListConnectionsRequest';
117
+ }
118
+ /**
119
+ * Generated by JsPbCodeGenerator.
120
+ * @param {Array=} opt_data Optional initial data array, typically from a
121
+ * server response, or constructed directly in Javascript. The array is used
122
+ * in place and becomes part of the constructed object. It is not cloned.
123
+ * If no data is provided, the constructed object will be empty, but still
124
+ * valid.
125
+ * @extends {jspb.Message}
126
+ * @constructor
127
+ */
128
+ proto.trb.clickhouse.v1.ConnectionList = function(opt_data) {
129
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.clickhouse.v1.ConnectionList.repeatedFields_, null);
130
+ };
131
+ goog.inherits(proto.trb.clickhouse.v1.ConnectionList, jspb.Message);
132
+ if (goog.DEBUG && !COMPILED) {
133
+ /**
134
+ * @public
135
+ * @override
136
+ */
137
+ proto.trb.clickhouse.v1.ConnectionList.displayName = 'proto.trb.clickhouse.v1.ConnectionList';
138
+ }
73
139
  /**
74
140
  * Generated by JsPbCodeGenerator.
75
141
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -976,6 +1042,487 @@ if (goog.DEBUG && !COMPILED) {
976
1042
 
977
1043
 
978
1044
 
1045
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1046
+ /**
1047
+ * Creates an object representation of this proto.
1048
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1049
+ * Optional fields that are not set will be set to undefined.
1050
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1051
+ * For the list of reserved names please see:
1052
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1053
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1054
+ * JSPB instance for transitional soy proto support:
1055
+ * http://goto/soy-param-migration
1056
+ * @return {!Object}
1057
+ */
1058
+ proto.trb.clickhouse.v1.Connection.prototype.toObject = function(opt_includeInstance) {
1059
+ return proto.trb.clickhouse.v1.Connection.toObject(opt_includeInstance, this);
1060
+ };
1061
+
1062
+
1063
+ /**
1064
+ * Static version of the {@see toObject} method.
1065
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1066
+ * the JSPB instance for transitional soy proto support:
1067
+ * http://goto/soy-param-migration
1068
+ * @param {!proto.trb.clickhouse.v1.Connection} msg The msg instance to transform.
1069
+ * @return {!Object}
1070
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1071
+ */
1072
+ proto.trb.clickhouse.v1.Connection.toObject = function(includeInstance, msg) {
1073
+ var f, obj = {
1074
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1075
+ host: jspb.Message.getFieldWithDefault(msg, 2, ""),
1076
+ database: jspb.Message.getFieldWithDefault(msg, 3, ""),
1077
+ isDefault: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
1078
+ };
1079
+
1080
+ if (includeInstance) {
1081
+ obj.$jspbMessageInstance = msg;
1082
+ }
1083
+ return obj;
1084
+ };
1085
+ }
1086
+
1087
+
1088
+ /**
1089
+ * Deserializes binary data (in protobuf wire format).
1090
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1091
+ * @return {!proto.trb.clickhouse.v1.Connection}
1092
+ */
1093
+ proto.trb.clickhouse.v1.Connection.deserializeBinary = function(bytes) {
1094
+ var reader = new jspb.BinaryReader(bytes);
1095
+ var msg = new proto.trb.clickhouse.v1.Connection;
1096
+ return proto.trb.clickhouse.v1.Connection.deserializeBinaryFromReader(msg, reader);
1097
+ };
1098
+
1099
+
1100
+ /**
1101
+ * Deserializes binary data (in protobuf wire format) from the
1102
+ * given reader into the given message object.
1103
+ * @param {!proto.trb.clickhouse.v1.Connection} msg The message object to deserialize into.
1104
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1105
+ * @return {!proto.trb.clickhouse.v1.Connection}
1106
+ */
1107
+ proto.trb.clickhouse.v1.Connection.deserializeBinaryFromReader = function(msg, reader) {
1108
+ while (reader.nextField()) {
1109
+ if (reader.isEndGroup()) {
1110
+ break;
1111
+ }
1112
+ var field = reader.getFieldNumber();
1113
+ switch (field) {
1114
+ case 1:
1115
+ var value = /** @type {string} */ (reader.readString());
1116
+ msg.setName(value);
1117
+ break;
1118
+ case 2:
1119
+ var value = /** @type {string} */ (reader.readString());
1120
+ msg.setHost(value);
1121
+ break;
1122
+ case 3:
1123
+ var value = /** @type {string} */ (reader.readString());
1124
+ msg.setDatabase(value);
1125
+ break;
1126
+ case 4:
1127
+ var value = /** @type {boolean} */ (reader.readBool());
1128
+ msg.setIsDefault(value);
1129
+ break;
1130
+ default:
1131
+ reader.skipField();
1132
+ break;
1133
+ }
1134
+ }
1135
+ return msg;
1136
+ };
1137
+
1138
+
1139
+ /**
1140
+ * Serializes the message to binary data (in protobuf wire format).
1141
+ * @return {!Uint8Array}
1142
+ */
1143
+ proto.trb.clickhouse.v1.Connection.prototype.serializeBinary = function() {
1144
+ var writer = new jspb.BinaryWriter();
1145
+ proto.trb.clickhouse.v1.Connection.serializeBinaryToWriter(this, writer);
1146
+ return writer.getResultBuffer();
1147
+ };
1148
+
1149
+
1150
+ /**
1151
+ * Serializes the given message to binary data (in protobuf wire
1152
+ * format), writing to the given BinaryWriter.
1153
+ * @param {!proto.trb.clickhouse.v1.Connection} message
1154
+ * @param {!jspb.BinaryWriter} writer
1155
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1156
+ */
1157
+ proto.trb.clickhouse.v1.Connection.serializeBinaryToWriter = function(message, writer) {
1158
+ var f = undefined;
1159
+ f = message.getName();
1160
+ if (f.length > 0) {
1161
+ writer.writeString(
1162
+ 1,
1163
+ f
1164
+ );
1165
+ }
1166
+ f = message.getHost();
1167
+ if (f.length > 0) {
1168
+ writer.writeString(
1169
+ 2,
1170
+ f
1171
+ );
1172
+ }
1173
+ f = message.getDatabase();
1174
+ if (f.length > 0) {
1175
+ writer.writeString(
1176
+ 3,
1177
+ f
1178
+ );
1179
+ }
1180
+ f = message.getIsDefault();
1181
+ if (f) {
1182
+ writer.writeBool(
1183
+ 4,
1184
+ f
1185
+ );
1186
+ }
1187
+ };
1188
+
1189
+
1190
+ /**
1191
+ * optional string name = 1;
1192
+ * @return {string}
1193
+ */
1194
+ proto.trb.clickhouse.v1.Connection.prototype.getName = function() {
1195
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1196
+ };
1197
+
1198
+
1199
+ /**
1200
+ * @param {string} value
1201
+ * @return {!proto.trb.clickhouse.v1.Connection} returns this
1202
+ */
1203
+ proto.trb.clickhouse.v1.Connection.prototype.setName = function(value) {
1204
+ return jspb.Message.setProto3StringField(this, 1, value);
1205
+ };
1206
+
1207
+
1208
+ /**
1209
+ * optional string host = 2;
1210
+ * @return {string}
1211
+ */
1212
+ proto.trb.clickhouse.v1.Connection.prototype.getHost = function() {
1213
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1214
+ };
1215
+
1216
+
1217
+ /**
1218
+ * @param {string} value
1219
+ * @return {!proto.trb.clickhouse.v1.Connection} returns this
1220
+ */
1221
+ proto.trb.clickhouse.v1.Connection.prototype.setHost = function(value) {
1222
+ return jspb.Message.setProto3StringField(this, 2, value);
1223
+ };
1224
+
1225
+
1226
+ /**
1227
+ * optional string database = 3;
1228
+ * @return {string}
1229
+ */
1230
+ proto.trb.clickhouse.v1.Connection.prototype.getDatabase = function() {
1231
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1232
+ };
1233
+
1234
+
1235
+ /**
1236
+ * @param {string} value
1237
+ * @return {!proto.trb.clickhouse.v1.Connection} returns this
1238
+ */
1239
+ proto.trb.clickhouse.v1.Connection.prototype.setDatabase = function(value) {
1240
+ return jspb.Message.setProto3StringField(this, 3, value);
1241
+ };
1242
+
1243
+
1244
+ /**
1245
+ * optional bool is_default = 4;
1246
+ * @return {boolean}
1247
+ */
1248
+ proto.trb.clickhouse.v1.Connection.prototype.getIsDefault = function() {
1249
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1250
+ };
1251
+
1252
+
1253
+ /**
1254
+ * @param {boolean} value
1255
+ * @return {!proto.trb.clickhouse.v1.Connection} returns this
1256
+ */
1257
+ proto.trb.clickhouse.v1.Connection.prototype.setIsDefault = function(value) {
1258
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1259
+ };
1260
+
1261
+
1262
+
1263
+
1264
+
1265
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1266
+ /**
1267
+ * Creates an object representation of this proto.
1268
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1269
+ * Optional fields that are not set will be set to undefined.
1270
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1271
+ * For the list of reserved names please see:
1272
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1273
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1274
+ * JSPB instance for transitional soy proto support:
1275
+ * http://goto/soy-param-migration
1276
+ * @return {!Object}
1277
+ */
1278
+ proto.trb.clickhouse.v1.ListConnectionsRequest.prototype.toObject = function(opt_includeInstance) {
1279
+ return proto.trb.clickhouse.v1.ListConnectionsRequest.toObject(opt_includeInstance, this);
1280
+ };
1281
+
1282
+
1283
+ /**
1284
+ * Static version of the {@see toObject} method.
1285
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1286
+ * the JSPB instance for transitional soy proto support:
1287
+ * http://goto/soy-param-migration
1288
+ * @param {!proto.trb.clickhouse.v1.ListConnectionsRequest} msg The msg instance to transform.
1289
+ * @return {!Object}
1290
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1291
+ */
1292
+ proto.trb.clickhouse.v1.ListConnectionsRequest.toObject = function(includeInstance, msg) {
1293
+ var f, obj = {
1294
+
1295
+ };
1296
+
1297
+ if (includeInstance) {
1298
+ obj.$jspbMessageInstance = msg;
1299
+ }
1300
+ return obj;
1301
+ };
1302
+ }
1303
+
1304
+
1305
+ /**
1306
+ * Deserializes binary data (in protobuf wire format).
1307
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1308
+ * @return {!proto.trb.clickhouse.v1.ListConnectionsRequest}
1309
+ */
1310
+ proto.trb.clickhouse.v1.ListConnectionsRequest.deserializeBinary = function(bytes) {
1311
+ var reader = new jspb.BinaryReader(bytes);
1312
+ var msg = new proto.trb.clickhouse.v1.ListConnectionsRequest;
1313
+ return proto.trb.clickhouse.v1.ListConnectionsRequest.deserializeBinaryFromReader(msg, reader);
1314
+ };
1315
+
1316
+
1317
+ /**
1318
+ * Deserializes binary data (in protobuf wire format) from the
1319
+ * given reader into the given message object.
1320
+ * @param {!proto.trb.clickhouse.v1.ListConnectionsRequest} msg The message object to deserialize into.
1321
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1322
+ * @return {!proto.trb.clickhouse.v1.ListConnectionsRequest}
1323
+ */
1324
+ proto.trb.clickhouse.v1.ListConnectionsRequest.deserializeBinaryFromReader = function(msg, reader) {
1325
+ while (reader.nextField()) {
1326
+ if (reader.isEndGroup()) {
1327
+ break;
1328
+ }
1329
+ var field = reader.getFieldNumber();
1330
+ switch (field) {
1331
+ default:
1332
+ reader.skipField();
1333
+ break;
1334
+ }
1335
+ }
1336
+ return msg;
1337
+ };
1338
+
1339
+
1340
+ /**
1341
+ * Serializes the message to binary data (in protobuf wire format).
1342
+ * @return {!Uint8Array}
1343
+ */
1344
+ proto.trb.clickhouse.v1.ListConnectionsRequest.prototype.serializeBinary = function() {
1345
+ var writer = new jspb.BinaryWriter();
1346
+ proto.trb.clickhouse.v1.ListConnectionsRequest.serializeBinaryToWriter(this, writer);
1347
+ return writer.getResultBuffer();
1348
+ };
1349
+
1350
+
1351
+ /**
1352
+ * Serializes the given message to binary data (in protobuf wire
1353
+ * format), writing to the given BinaryWriter.
1354
+ * @param {!proto.trb.clickhouse.v1.ListConnectionsRequest} message
1355
+ * @param {!jspb.BinaryWriter} writer
1356
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1357
+ */
1358
+ proto.trb.clickhouse.v1.ListConnectionsRequest.serializeBinaryToWriter = function(message, writer) {
1359
+ var f = undefined;
1360
+ };
1361
+
1362
+
1363
+
1364
+ /**
1365
+ * List of repeated fields within this message type.
1366
+ * @private {!Array<number>}
1367
+ * @const
1368
+ */
1369
+ proto.trb.clickhouse.v1.ConnectionList.repeatedFields_ = [1];
1370
+
1371
+
1372
+
1373
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1374
+ /**
1375
+ * Creates an object representation of this proto.
1376
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1377
+ * Optional fields that are not set will be set to undefined.
1378
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1379
+ * For the list of reserved names please see:
1380
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1381
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1382
+ * JSPB instance for transitional soy proto support:
1383
+ * http://goto/soy-param-migration
1384
+ * @return {!Object}
1385
+ */
1386
+ proto.trb.clickhouse.v1.ConnectionList.prototype.toObject = function(opt_includeInstance) {
1387
+ return proto.trb.clickhouse.v1.ConnectionList.toObject(opt_includeInstance, this);
1388
+ };
1389
+
1390
+
1391
+ /**
1392
+ * Static version of the {@see toObject} method.
1393
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1394
+ * the JSPB instance for transitional soy proto support:
1395
+ * http://goto/soy-param-migration
1396
+ * @param {!proto.trb.clickhouse.v1.ConnectionList} msg The msg instance to transform.
1397
+ * @return {!Object}
1398
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1399
+ */
1400
+ proto.trb.clickhouse.v1.ConnectionList.toObject = function(includeInstance, msg) {
1401
+ var f, obj = {
1402
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1403
+ proto.trb.clickhouse.v1.Connection.toObject, includeInstance)
1404
+ };
1405
+
1406
+ if (includeInstance) {
1407
+ obj.$jspbMessageInstance = msg;
1408
+ }
1409
+ return obj;
1410
+ };
1411
+ }
1412
+
1413
+
1414
+ /**
1415
+ * Deserializes binary data (in protobuf wire format).
1416
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1417
+ * @return {!proto.trb.clickhouse.v1.ConnectionList}
1418
+ */
1419
+ proto.trb.clickhouse.v1.ConnectionList.deserializeBinary = function(bytes) {
1420
+ var reader = new jspb.BinaryReader(bytes);
1421
+ var msg = new proto.trb.clickhouse.v1.ConnectionList;
1422
+ return proto.trb.clickhouse.v1.ConnectionList.deserializeBinaryFromReader(msg, reader);
1423
+ };
1424
+
1425
+
1426
+ /**
1427
+ * Deserializes binary data (in protobuf wire format) from the
1428
+ * given reader into the given message object.
1429
+ * @param {!proto.trb.clickhouse.v1.ConnectionList} msg The message object to deserialize into.
1430
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1431
+ * @return {!proto.trb.clickhouse.v1.ConnectionList}
1432
+ */
1433
+ proto.trb.clickhouse.v1.ConnectionList.deserializeBinaryFromReader = function(msg, reader) {
1434
+ while (reader.nextField()) {
1435
+ if (reader.isEndGroup()) {
1436
+ break;
1437
+ }
1438
+ var field = reader.getFieldNumber();
1439
+ switch (field) {
1440
+ case 1:
1441
+ var value = new proto.trb.clickhouse.v1.Connection;
1442
+ reader.readMessage(value,proto.trb.clickhouse.v1.Connection.deserializeBinaryFromReader);
1443
+ msg.addItems(value);
1444
+ break;
1445
+ default:
1446
+ reader.skipField();
1447
+ break;
1448
+ }
1449
+ }
1450
+ return msg;
1451
+ };
1452
+
1453
+
1454
+ /**
1455
+ * Serializes the message to binary data (in protobuf wire format).
1456
+ * @return {!Uint8Array}
1457
+ */
1458
+ proto.trb.clickhouse.v1.ConnectionList.prototype.serializeBinary = function() {
1459
+ var writer = new jspb.BinaryWriter();
1460
+ proto.trb.clickhouse.v1.ConnectionList.serializeBinaryToWriter(this, writer);
1461
+ return writer.getResultBuffer();
1462
+ };
1463
+
1464
+
1465
+ /**
1466
+ * Serializes the given message to binary data (in protobuf wire
1467
+ * format), writing to the given BinaryWriter.
1468
+ * @param {!proto.trb.clickhouse.v1.ConnectionList} message
1469
+ * @param {!jspb.BinaryWriter} writer
1470
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1471
+ */
1472
+ proto.trb.clickhouse.v1.ConnectionList.serializeBinaryToWriter = function(message, writer) {
1473
+ var f = undefined;
1474
+ f = message.getItemsList();
1475
+ if (f.length > 0) {
1476
+ writer.writeRepeatedMessage(
1477
+ 1,
1478
+ f,
1479
+ proto.trb.clickhouse.v1.Connection.serializeBinaryToWriter
1480
+ );
1481
+ }
1482
+ };
1483
+
1484
+
1485
+ /**
1486
+ * repeated Connection items = 1;
1487
+ * @return {!Array<!proto.trb.clickhouse.v1.Connection>}
1488
+ */
1489
+ proto.trb.clickhouse.v1.ConnectionList.prototype.getItemsList = function() {
1490
+ return /** @type{!Array<!proto.trb.clickhouse.v1.Connection>} */ (
1491
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.clickhouse.v1.Connection, 1));
1492
+ };
1493
+
1494
+
1495
+ /**
1496
+ * @param {!Array<!proto.trb.clickhouse.v1.Connection>} value
1497
+ * @return {!proto.trb.clickhouse.v1.ConnectionList} returns this
1498
+ */
1499
+ proto.trb.clickhouse.v1.ConnectionList.prototype.setItemsList = function(value) {
1500
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * @param {!proto.trb.clickhouse.v1.Connection=} opt_value
1506
+ * @param {number=} opt_index
1507
+ * @return {!proto.trb.clickhouse.v1.Connection}
1508
+ */
1509
+ proto.trb.clickhouse.v1.ConnectionList.prototype.addItems = function(opt_value, opt_index) {
1510
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.clickhouse.v1.Connection, opt_index);
1511
+ };
1512
+
1513
+
1514
+ /**
1515
+ * Clears the list making it empty but non-null.
1516
+ * @return {!proto.trb.clickhouse.v1.ConnectionList} returns this
1517
+ */
1518
+ proto.trb.clickhouse.v1.ConnectionList.prototype.clearItemsList = function() {
1519
+ return this.setItemsList([]);
1520
+ };
1521
+
1522
+
1523
+
1524
+
1525
+
979
1526
  if (jspb.Message.GENERATE_TO_OBJECT) {
980
1527
  /**
981
1528
  * Creates an object representation of this proto.
@@ -1587,5 +1587,48 @@ export class PostgreSQL_AdminClient {
1587
1587
  this.methodDescriptorGetTableOptions);
1588
1588
  }
1589
1589
 
1590
+ methodDescriptorListConnections = new grpcWeb.MethodDescriptor(
1591
+ '/trb.postgresql.v1.PostgreSQL_Admin/ListConnections',
1592
+ grpcWeb.MethodType.UNARY,
1593
+ postgresql_admin_pb.ListConnectionsRequest,
1594
+ postgresql_admin_pb.ConnectionList,
1595
+ (request: postgresql_admin_pb.ListConnectionsRequest) => {
1596
+ return request.serializeBinary();
1597
+ },
1598
+ postgresql_admin_pb.ConnectionList.deserializeBinary
1599
+ );
1600
+
1601
+ listConnections(
1602
+ request: postgresql_admin_pb.ListConnectionsRequest,
1603
+ metadata?: grpcWeb.Metadata | null): Promise<postgresql_admin_pb.ConnectionList>;
1604
+
1605
+ listConnections(
1606
+ request: postgresql_admin_pb.ListConnectionsRequest,
1607
+ metadata: grpcWeb.Metadata | null,
1608
+ callback: (err: grpcWeb.RpcError,
1609
+ response: postgresql_admin_pb.ConnectionList) => void): grpcWeb.ClientReadableStream<postgresql_admin_pb.ConnectionList>;
1610
+
1611
+ listConnections(
1612
+ request: postgresql_admin_pb.ListConnectionsRequest,
1613
+ metadata?: grpcWeb.Metadata | null,
1614
+ callback?: (err: grpcWeb.RpcError,
1615
+ response: postgresql_admin_pb.ConnectionList) => void) {
1616
+ if (callback !== undefined) {
1617
+ return this.client_.rpcCall(
1618
+ this.hostname_ +
1619
+ '/trb.postgresql.v1.PostgreSQL_Admin/ListConnections',
1620
+ request,
1621
+ metadata || {},
1622
+ this.methodDescriptorListConnections,
1623
+ callback);
1624
+ }
1625
+ return this.client_.unaryCall(
1626
+ this.hostname_ +
1627
+ '/trb.postgresql.v1.PostgreSQL_Admin/ListConnections',
1628
+ request,
1629
+ metadata || {},
1630
+ this.methodDescriptorListConnections);
1631
+ }
1632
+
1590
1633
  }
1591
1634
 
@@ -5,6 +5,70 @@ import * as google_api_field_behavior_pb from '../google/api/field_behavior_pb';
5
5
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; // proto import: "google/protobuf/timestamp.proto"
6
6
 
7
7
 
8
+ export class Connection extends jspb.Message {
9
+ getName(): string;
10
+ setName(value: string): Connection;
11
+
12
+ getHost(): string;
13
+ setHost(value: string): Connection;
14
+
15
+ getDatabase(): string;
16
+ setDatabase(value: string): Connection;
17
+
18
+ getIsDefault(): boolean;
19
+ setIsDefault(value: boolean): Connection;
20
+
21
+ serializeBinary(): Uint8Array;
22
+ toObject(includeInstance?: boolean): Connection.AsObject;
23
+ static toObject(includeInstance: boolean, msg: Connection): Connection.AsObject;
24
+ static serializeBinaryToWriter(message: Connection, writer: jspb.BinaryWriter): void;
25
+ static deserializeBinary(bytes: Uint8Array): Connection;
26
+ static deserializeBinaryFromReader(message: Connection, reader: jspb.BinaryReader): Connection;
27
+ }
28
+
29
+ export namespace Connection {
30
+ export type AsObject = {
31
+ name: string,
32
+ host: string,
33
+ database: string,
34
+ isDefault: boolean,
35
+ }
36
+ }
37
+
38
+ export class ListConnectionsRequest extends jspb.Message {
39
+ serializeBinary(): Uint8Array;
40
+ toObject(includeInstance?: boolean): ListConnectionsRequest.AsObject;
41
+ static toObject(includeInstance: boolean, msg: ListConnectionsRequest): ListConnectionsRequest.AsObject;
42
+ static serializeBinaryToWriter(message: ListConnectionsRequest, writer: jspb.BinaryWriter): void;
43
+ static deserializeBinary(bytes: Uint8Array): ListConnectionsRequest;
44
+ static deserializeBinaryFromReader(message: ListConnectionsRequest, reader: jspb.BinaryReader): ListConnectionsRequest;
45
+ }
46
+
47
+ export namespace ListConnectionsRequest {
48
+ export type AsObject = {
49
+ }
50
+ }
51
+
52
+ export class ConnectionList extends jspb.Message {
53
+ getItemsList(): Array<Connection>;
54
+ setItemsList(value: Array<Connection>): ConnectionList;
55
+ clearItemsList(): ConnectionList;
56
+ addItems(value?: Connection, index?: number): Connection;
57
+
58
+ serializeBinary(): Uint8Array;
59
+ toObject(includeInstance?: boolean): ConnectionList.AsObject;
60
+ static toObject(includeInstance: boolean, msg: ConnectionList): ConnectionList.AsObject;
61
+ static serializeBinaryToWriter(message: ConnectionList, writer: jspb.BinaryWriter): void;
62
+ static deserializeBinary(bytes: Uint8Array): ConnectionList;
63
+ static deserializeBinaryFromReader(message: ConnectionList, reader: jspb.BinaryReader): ConnectionList;
64
+ }
65
+
66
+ export namespace ConnectionList {
67
+ export type AsObject = {
68
+ itemsList: Array<Connection.AsObject>,
69
+ }
70
+ }
71
+
8
72
  export class Status extends jspb.Message {
9
73
  getSuccess(): boolean;
10
74
  setSuccess(value: boolean): Status;
@@ -30,6 +30,8 @@ goog.object.extend(proto, google_protobuf_timestamp_pb);
30
30
  goog.exportSymbol('proto.trb.postgresql.v1.AddColumnRequest', null, global);
31
31
  goog.exportSymbol('proto.trb.postgresql.v1.AnalyzeTableRequest', null, global);
32
32
  goog.exportSymbol('proto.trb.postgresql.v1.Column', null, global);
33
+ goog.exportSymbol('proto.trb.postgresql.v1.Connection', null, global);
34
+ goog.exportSymbol('proto.trb.postgresql.v1.ConnectionList', null, global);
33
35
  goog.exportSymbol('proto.trb.postgresql.v1.Database', null, global);
34
36
  goog.exportSymbol('proto.trb.postgresql.v1.DatabaseList', null, global);
35
37
  goog.exportSymbol('proto.trb.postgresql.v1.DatabaseName', null, global);
@@ -44,6 +46,7 @@ goog.exportSymbol('proto.trb.postgresql.v1.IndexList', null, global);
44
46
  goog.exportSymbol('proto.trb.postgresql.v1.IndexName', null, global);
45
47
  goog.exportSymbol('proto.trb.postgresql.v1.IndexSpec', null, global);
46
48
  goog.exportSymbol('proto.trb.postgresql.v1.KillProcessRequest', null, global);
49
+ goog.exportSymbol('proto.trb.postgresql.v1.ListConnectionsRequest', null, global);
47
50
  goog.exportSymbol('proto.trb.postgresql.v1.ListDatabasesRequest', null, global);
48
51
  goog.exportSymbol('proto.trb.postgresql.v1.ListIndexesRequest', null, global);
49
52
  goog.exportSymbol('proto.trb.postgresql.v1.ListLocksRequest', null, global);
@@ -84,6 +87,69 @@ goog.exportSymbol('proto.trb.postgresql.v1.TableSpec', null, global);
84
87
  goog.exportSymbol('proto.trb.postgresql.v1.TablespaceInfo', null, global);
85
88
  goog.exportSymbol('proto.trb.postgresql.v1.TablespaceList', null, global);
86
89
  goog.exportSymbol('proto.trb.postgresql.v1.VacuumTableRequest', null, global);
90
+ /**
91
+ * Generated by JsPbCodeGenerator.
92
+ * @param {Array=} opt_data Optional initial data array, typically from a
93
+ * server response, or constructed directly in Javascript. The array is used
94
+ * in place and becomes part of the constructed object. It is not cloned.
95
+ * If no data is provided, the constructed object will be empty, but still
96
+ * valid.
97
+ * @extends {jspb.Message}
98
+ * @constructor
99
+ */
100
+ proto.trb.postgresql.v1.Connection = function(opt_data) {
101
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
102
+ };
103
+ goog.inherits(proto.trb.postgresql.v1.Connection, jspb.Message);
104
+ if (goog.DEBUG && !COMPILED) {
105
+ /**
106
+ * @public
107
+ * @override
108
+ */
109
+ proto.trb.postgresql.v1.Connection.displayName = 'proto.trb.postgresql.v1.Connection';
110
+ }
111
+ /**
112
+ * Generated by JsPbCodeGenerator.
113
+ * @param {Array=} opt_data Optional initial data array, typically from a
114
+ * server response, or constructed directly in Javascript. The array is used
115
+ * in place and becomes part of the constructed object. It is not cloned.
116
+ * If no data is provided, the constructed object will be empty, but still
117
+ * valid.
118
+ * @extends {jspb.Message}
119
+ * @constructor
120
+ */
121
+ proto.trb.postgresql.v1.ListConnectionsRequest = function(opt_data) {
122
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
123
+ };
124
+ goog.inherits(proto.trb.postgresql.v1.ListConnectionsRequest, jspb.Message);
125
+ if (goog.DEBUG && !COMPILED) {
126
+ /**
127
+ * @public
128
+ * @override
129
+ */
130
+ proto.trb.postgresql.v1.ListConnectionsRequest.displayName = 'proto.trb.postgresql.v1.ListConnectionsRequest';
131
+ }
132
+ /**
133
+ * Generated by JsPbCodeGenerator.
134
+ * @param {Array=} opt_data Optional initial data array, typically from a
135
+ * server response, or constructed directly in Javascript. The array is used
136
+ * in place and becomes part of the constructed object. It is not cloned.
137
+ * If no data is provided, the constructed object will be empty, but still
138
+ * valid.
139
+ * @extends {jspb.Message}
140
+ * @constructor
141
+ */
142
+ proto.trb.postgresql.v1.ConnectionList = function(opt_data) {
143
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.postgresql.v1.ConnectionList.repeatedFields_, null);
144
+ };
145
+ goog.inherits(proto.trb.postgresql.v1.ConnectionList, jspb.Message);
146
+ if (goog.DEBUG && !COMPILED) {
147
+ /**
148
+ * @public
149
+ * @override
150
+ */
151
+ proto.trb.postgresql.v1.ConnectionList.displayName = 'proto.trb.postgresql.v1.ConnectionList';
152
+ }
87
153
  /**
88
154
  * Generated by JsPbCodeGenerator.
89
155
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1284,6 +1350,487 @@ if (goog.DEBUG && !COMPILED) {
1284
1350
 
1285
1351
 
1286
1352
 
1353
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1354
+ /**
1355
+ * Creates an object representation of this proto.
1356
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1357
+ * Optional fields that are not set will be set to undefined.
1358
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1359
+ * For the list of reserved names please see:
1360
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1361
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1362
+ * JSPB instance for transitional soy proto support:
1363
+ * http://goto/soy-param-migration
1364
+ * @return {!Object}
1365
+ */
1366
+ proto.trb.postgresql.v1.Connection.prototype.toObject = function(opt_includeInstance) {
1367
+ return proto.trb.postgresql.v1.Connection.toObject(opt_includeInstance, this);
1368
+ };
1369
+
1370
+
1371
+ /**
1372
+ * Static version of the {@see toObject} method.
1373
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1374
+ * the JSPB instance for transitional soy proto support:
1375
+ * http://goto/soy-param-migration
1376
+ * @param {!proto.trb.postgresql.v1.Connection} msg The msg instance to transform.
1377
+ * @return {!Object}
1378
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1379
+ */
1380
+ proto.trb.postgresql.v1.Connection.toObject = function(includeInstance, msg) {
1381
+ var f, obj = {
1382
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1383
+ host: jspb.Message.getFieldWithDefault(msg, 2, ""),
1384
+ database: jspb.Message.getFieldWithDefault(msg, 3, ""),
1385
+ isDefault: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
1386
+ };
1387
+
1388
+ if (includeInstance) {
1389
+ obj.$jspbMessageInstance = msg;
1390
+ }
1391
+ return obj;
1392
+ };
1393
+ }
1394
+
1395
+
1396
+ /**
1397
+ * Deserializes binary data (in protobuf wire format).
1398
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1399
+ * @return {!proto.trb.postgresql.v1.Connection}
1400
+ */
1401
+ proto.trb.postgresql.v1.Connection.deserializeBinary = function(bytes) {
1402
+ var reader = new jspb.BinaryReader(bytes);
1403
+ var msg = new proto.trb.postgresql.v1.Connection;
1404
+ return proto.trb.postgresql.v1.Connection.deserializeBinaryFromReader(msg, reader);
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * Deserializes binary data (in protobuf wire format) from the
1410
+ * given reader into the given message object.
1411
+ * @param {!proto.trb.postgresql.v1.Connection} msg The message object to deserialize into.
1412
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1413
+ * @return {!proto.trb.postgresql.v1.Connection}
1414
+ */
1415
+ proto.trb.postgresql.v1.Connection.deserializeBinaryFromReader = function(msg, reader) {
1416
+ while (reader.nextField()) {
1417
+ if (reader.isEndGroup()) {
1418
+ break;
1419
+ }
1420
+ var field = reader.getFieldNumber();
1421
+ switch (field) {
1422
+ case 1:
1423
+ var value = /** @type {string} */ (reader.readString());
1424
+ msg.setName(value);
1425
+ break;
1426
+ case 2:
1427
+ var value = /** @type {string} */ (reader.readString());
1428
+ msg.setHost(value);
1429
+ break;
1430
+ case 3:
1431
+ var value = /** @type {string} */ (reader.readString());
1432
+ msg.setDatabase(value);
1433
+ break;
1434
+ case 4:
1435
+ var value = /** @type {boolean} */ (reader.readBool());
1436
+ msg.setIsDefault(value);
1437
+ break;
1438
+ default:
1439
+ reader.skipField();
1440
+ break;
1441
+ }
1442
+ }
1443
+ return msg;
1444
+ };
1445
+
1446
+
1447
+ /**
1448
+ * Serializes the message to binary data (in protobuf wire format).
1449
+ * @return {!Uint8Array}
1450
+ */
1451
+ proto.trb.postgresql.v1.Connection.prototype.serializeBinary = function() {
1452
+ var writer = new jspb.BinaryWriter();
1453
+ proto.trb.postgresql.v1.Connection.serializeBinaryToWriter(this, writer);
1454
+ return writer.getResultBuffer();
1455
+ };
1456
+
1457
+
1458
+ /**
1459
+ * Serializes the given message to binary data (in protobuf wire
1460
+ * format), writing to the given BinaryWriter.
1461
+ * @param {!proto.trb.postgresql.v1.Connection} message
1462
+ * @param {!jspb.BinaryWriter} writer
1463
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1464
+ */
1465
+ proto.trb.postgresql.v1.Connection.serializeBinaryToWriter = function(message, writer) {
1466
+ var f = undefined;
1467
+ f = message.getName();
1468
+ if (f.length > 0) {
1469
+ writer.writeString(
1470
+ 1,
1471
+ f
1472
+ );
1473
+ }
1474
+ f = message.getHost();
1475
+ if (f.length > 0) {
1476
+ writer.writeString(
1477
+ 2,
1478
+ f
1479
+ );
1480
+ }
1481
+ f = message.getDatabase();
1482
+ if (f.length > 0) {
1483
+ writer.writeString(
1484
+ 3,
1485
+ f
1486
+ );
1487
+ }
1488
+ f = message.getIsDefault();
1489
+ if (f) {
1490
+ writer.writeBool(
1491
+ 4,
1492
+ f
1493
+ );
1494
+ }
1495
+ };
1496
+
1497
+
1498
+ /**
1499
+ * optional string name = 1;
1500
+ * @return {string}
1501
+ */
1502
+ proto.trb.postgresql.v1.Connection.prototype.getName = function() {
1503
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1504
+ };
1505
+
1506
+
1507
+ /**
1508
+ * @param {string} value
1509
+ * @return {!proto.trb.postgresql.v1.Connection} returns this
1510
+ */
1511
+ proto.trb.postgresql.v1.Connection.prototype.setName = function(value) {
1512
+ return jspb.Message.setProto3StringField(this, 1, value);
1513
+ };
1514
+
1515
+
1516
+ /**
1517
+ * optional string host = 2;
1518
+ * @return {string}
1519
+ */
1520
+ proto.trb.postgresql.v1.Connection.prototype.getHost = function() {
1521
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1522
+ };
1523
+
1524
+
1525
+ /**
1526
+ * @param {string} value
1527
+ * @return {!proto.trb.postgresql.v1.Connection} returns this
1528
+ */
1529
+ proto.trb.postgresql.v1.Connection.prototype.setHost = function(value) {
1530
+ return jspb.Message.setProto3StringField(this, 2, value);
1531
+ };
1532
+
1533
+
1534
+ /**
1535
+ * optional string database = 3;
1536
+ * @return {string}
1537
+ */
1538
+ proto.trb.postgresql.v1.Connection.prototype.getDatabase = function() {
1539
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1540
+ };
1541
+
1542
+
1543
+ /**
1544
+ * @param {string} value
1545
+ * @return {!proto.trb.postgresql.v1.Connection} returns this
1546
+ */
1547
+ proto.trb.postgresql.v1.Connection.prototype.setDatabase = function(value) {
1548
+ return jspb.Message.setProto3StringField(this, 3, value);
1549
+ };
1550
+
1551
+
1552
+ /**
1553
+ * optional bool is_default = 4;
1554
+ * @return {boolean}
1555
+ */
1556
+ proto.trb.postgresql.v1.Connection.prototype.getIsDefault = function() {
1557
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1558
+ };
1559
+
1560
+
1561
+ /**
1562
+ * @param {boolean} value
1563
+ * @return {!proto.trb.postgresql.v1.Connection} returns this
1564
+ */
1565
+ proto.trb.postgresql.v1.Connection.prototype.setIsDefault = function(value) {
1566
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1567
+ };
1568
+
1569
+
1570
+
1571
+
1572
+
1573
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1574
+ /**
1575
+ * Creates an object representation of this proto.
1576
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1577
+ * Optional fields that are not set will be set to undefined.
1578
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1579
+ * For the list of reserved names please see:
1580
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1581
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1582
+ * JSPB instance for transitional soy proto support:
1583
+ * http://goto/soy-param-migration
1584
+ * @return {!Object}
1585
+ */
1586
+ proto.trb.postgresql.v1.ListConnectionsRequest.prototype.toObject = function(opt_includeInstance) {
1587
+ return proto.trb.postgresql.v1.ListConnectionsRequest.toObject(opt_includeInstance, this);
1588
+ };
1589
+
1590
+
1591
+ /**
1592
+ * Static version of the {@see toObject} method.
1593
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1594
+ * the JSPB instance for transitional soy proto support:
1595
+ * http://goto/soy-param-migration
1596
+ * @param {!proto.trb.postgresql.v1.ListConnectionsRequest} msg The msg instance to transform.
1597
+ * @return {!Object}
1598
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1599
+ */
1600
+ proto.trb.postgresql.v1.ListConnectionsRequest.toObject = function(includeInstance, msg) {
1601
+ var f, obj = {
1602
+
1603
+ };
1604
+
1605
+ if (includeInstance) {
1606
+ obj.$jspbMessageInstance = msg;
1607
+ }
1608
+ return obj;
1609
+ };
1610
+ }
1611
+
1612
+
1613
+ /**
1614
+ * Deserializes binary data (in protobuf wire format).
1615
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1616
+ * @return {!proto.trb.postgresql.v1.ListConnectionsRequest}
1617
+ */
1618
+ proto.trb.postgresql.v1.ListConnectionsRequest.deserializeBinary = function(bytes) {
1619
+ var reader = new jspb.BinaryReader(bytes);
1620
+ var msg = new proto.trb.postgresql.v1.ListConnectionsRequest;
1621
+ return proto.trb.postgresql.v1.ListConnectionsRequest.deserializeBinaryFromReader(msg, reader);
1622
+ };
1623
+
1624
+
1625
+ /**
1626
+ * Deserializes binary data (in protobuf wire format) from the
1627
+ * given reader into the given message object.
1628
+ * @param {!proto.trb.postgresql.v1.ListConnectionsRequest} msg The message object to deserialize into.
1629
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1630
+ * @return {!proto.trb.postgresql.v1.ListConnectionsRequest}
1631
+ */
1632
+ proto.trb.postgresql.v1.ListConnectionsRequest.deserializeBinaryFromReader = function(msg, reader) {
1633
+ while (reader.nextField()) {
1634
+ if (reader.isEndGroup()) {
1635
+ break;
1636
+ }
1637
+ var field = reader.getFieldNumber();
1638
+ switch (field) {
1639
+ default:
1640
+ reader.skipField();
1641
+ break;
1642
+ }
1643
+ }
1644
+ return msg;
1645
+ };
1646
+
1647
+
1648
+ /**
1649
+ * Serializes the message to binary data (in protobuf wire format).
1650
+ * @return {!Uint8Array}
1651
+ */
1652
+ proto.trb.postgresql.v1.ListConnectionsRequest.prototype.serializeBinary = function() {
1653
+ var writer = new jspb.BinaryWriter();
1654
+ proto.trb.postgresql.v1.ListConnectionsRequest.serializeBinaryToWriter(this, writer);
1655
+ return writer.getResultBuffer();
1656
+ };
1657
+
1658
+
1659
+ /**
1660
+ * Serializes the given message to binary data (in protobuf wire
1661
+ * format), writing to the given BinaryWriter.
1662
+ * @param {!proto.trb.postgresql.v1.ListConnectionsRequest} message
1663
+ * @param {!jspb.BinaryWriter} writer
1664
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1665
+ */
1666
+ proto.trb.postgresql.v1.ListConnectionsRequest.serializeBinaryToWriter = function(message, writer) {
1667
+ var f = undefined;
1668
+ };
1669
+
1670
+
1671
+
1672
+ /**
1673
+ * List of repeated fields within this message type.
1674
+ * @private {!Array<number>}
1675
+ * @const
1676
+ */
1677
+ proto.trb.postgresql.v1.ConnectionList.repeatedFields_ = [1];
1678
+
1679
+
1680
+
1681
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1682
+ /**
1683
+ * Creates an object representation of this proto.
1684
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1685
+ * Optional fields that are not set will be set to undefined.
1686
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1687
+ * For the list of reserved names please see:
1688
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1689
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1690
+ * JSPB instance for transitional soy proto support:
1691
+ * http://goto/soy-param-migration
1692
+ * @return {!Object}
1693
+ */
1694
+ proto.trb.postgresql.v1.ConnectionList.prototype.toObject = function(opt_includeInstance) {
1695
+ return proto.trb.postgresql.v1.ConnectionList.toObject(opt_includeInstance, this);
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * Static version of the {@see toObject} method.
1701
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1702
+ * the JSPB instance for transitional soy proto support:
1703
+ * http://goto/soy-param-migration
1704
+ * @param {!proto.trb.postgresql.v1.ConnectionList} msg The msg instance to transform.
1705
+ * @return {!Object}
1706
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1707
+ */
1708
+ proto.trb.postgresql.v1.ConnectionList.toObject = function(includeInstance, msg) {
1709
+ var f, obj = {
1710
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1711
+ proto.trb.postgresql.v1.Connection.toObject, includeInstance)
1712
+ };
1713
+
1714
+ if (includeInstance) {
1715
+ obj.$jspbMessageInstance = msg;
1716
+ }
1717
+ return obj;
1718
+ };
1719
+ }
1720
+
1721
+
1722
+ /**
1723
+ * Deserializes binary data (in protobuf wire format).
1724
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1725
+ * @return {!proto.trb.postgresql.v1.ConnectionList}
1726
+ */
1727
+ proto.trb.postgresql.v1.ConnectionList.deserializeBinary = function(bytes) {
1728
+ var reader = new jspb.BinaryReader(bytes);
1729
+ var msg = new proto.trb.postgresql.v1.ConnectionList;
1730
+ return proto.trb.postgresql.v1.ConnectionList.deserializeBinaryFromReader(msg, reader);
1731
+ };
1732
+
1733
+
1734
+ /**
1735
+ * Deserializes binary data (in protobuf wire format) from the
1736
+ * given reader into the given message object.
1737
+ * @param {!proto.trb.postgresql.v1.ConnectionList} msg The message object to deserialize into.
1738
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1739
+ * @return {!proto.trb.postgresql.v1.ConnectionList}
1740
+ */
1741
+ proto.trb.postgresql.v1.ConnectionList.deserializeBinaryFromReader = function(msg, reader) {
1742
+ while (reader.nextField()) {
1743
+ if (reader.isEndGroup()) {
1744
+ break;
1745
+ }
1746
+ var field = reader.getFieldNumber();
1747
+ switch (field) {
1748
+ case 1:
1749
+ var value = new proto.trb.postgresql.v1.Connection;
1750
+ reader.readMessage(value,proto.trb.postgresql.v1.Connection.deserializeBinaryFromReader);
1751
+ msg.addItems(value);
1752
+ break;
1753
+ default:
1754
+ reader.skipField();
1755
+ break;
1756
+ }
1757
+ }
1758
+ return msg;
1759
+ };
1760
+
1761
+
1762
+ /**
1763
+ * Serializes the message to binary data (in protobuf wire format).
1764
+ * @return {!Uint8Array}
1765
+ */
1766
+ proto.trb.postgresql.v1.ConnectionList.prototype.serializeBinary = function() {
1767
+ var writer = new jspb.BinaryWriter();
1768
+ proto.trb.postgresql.v1.ConnectionList.serializeBinaryToWriter(this, writer);
1769
+ return writer.getResultBuffer();
1770
+ };
1771
+
1772
+
1773
+ /**
1774
+ * Serializes the given message to binary data (in protobuf wire
1775
+ * format), writing to the given BinaryWriter.
1776
+ * @param {!proto.trb.postgresql.v1.ConnectionList} message
1777
+ * @param {!jspb.BinaryWriter} writer
1778
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1779
+ */
1780
+ proto.trb.postgresql.v1.ConnectionList.serializeBinaryToWriter = function(message, writer) {
1781
+ var f = undefined;
1782
+ f = message.getItemsList();
1783
+ if (f.length > 0) {
1784
+ writer.writeRepeatedMessage(
1785
+ 1,
1786
+ f,
1787
+ proto.trb.postgresql.v1.Connection.serializeBinaryToWriter
1788
+ );
1789
+ }
1790
+ };
1791
+
1792
+
1793
+ /**
1794
+ * repeated Connection items = 1;
1795
+ * @return {!Array<!proto.trb.postgresql.v1.Connection>}
1796
+ */
1797
+ proto.trb.postgresql.v1.ConnectionList.prototype.getItemsList = function() {
1798
+ return /** @type{!Array<!proto.trb.postgresql.v1.Connection>} */ (
1799
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.postgresql.v1.Connection, 1));
1800
+ };
1801
+
1802
+
1803
+ /**
1804
+ * @param {!Array<!proto.trb.postgresql.v1.Connection>} value
1805
+ * @return {!proto.trb.postgresql.v1.ConnectionList} returns this
1806
+ */
1807
+ proto.trb.postgresql.v1.ConnectionList.prototype.setItemsList = function(value) {
1808
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1809
+ };
1810
+
1811
+
1812
+ /**
1813
+ * @param {!proto.trb.postgresql.v1.Connection=} opt_value
1814
+ * @param {number=} opt_index
1815
+ * @return {!proto.trb.postgresql.v1.Connection}
1816
+ */
1817
+ proto.trb.postgresql.v1.ConnectionList.prototype.addItems = function(opt_value, opt_index) {
1818
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.postgresql.v1.Connection, opt_index);
1819
+ };
1820
+
1821
+
1822
+ /**
1823
+ * Clears the list making it empty but non-null.
1824
+ * @return {!proto.trb.postgresql.v1.ConnectionList} returns this
1825
+ */
1826
+ proto.trb.postgresql.v1.ConnectionList.prototype.clearItemsList = function() {
1827
+ return this.setItemsList([]);
1828
+ };
1829
+
1830
+
1831
+
1832
+
1833
+
1287
1834
  if (jspb.Message.GENERATE_TO_OBJECT) {
1288
1835
  /**
1289
1836
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marleena/trb-proto",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "Generated protobuf messages and gRPC-Web clients for TrB services",
5
5
  "license": "MIT",
6
6
  "repository": {