@gitpod/supervisor-api-grpc 0.1.5-se-career-tip.1 → 0.1.5-se-better-ts-api.2

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.
@@ -2,39 +2,57 @@
2
2
  // file: control.proto
3
3
 
4
4
  /* tslint:disable */
5
+ /* eslint-disable */
5
6
 
6
- import * as grpc from "grpc";
7
+ import * as grpc from "@grpc/grpc-js";
7
8
  import * as control_pb from "./control_pb";
8
9
 
9
10
  interface IControlServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
10
11
  exposePort: IControlServiceService_IExposePort;
12
+ createSSHKeyPair: IControlServiceService_ICreateSSHKeyPair;
11
13
  }
12
14
 
13
15
  interface IControlServiceService_IExposePort extends grpc.MethodDefinition<control_pb.ExposePortRequest, control_pb.ExposePortResponse> {
14
- path: string; // "/supervisor.ControlService/ExposePort"
15
- requestStream: boolean; // false
16
- responseStream: boolean; // false
16
+ path: "/supervisor.ControlService/ExposePort";
17
+ requestStream: false;
18
+ responseStream: false;
17
19
  requestSerialize: grpc.serialize<control_pb.ExposePortRequest>;
18
20
  requestDeserialize: grpc.deserialize<control_pb.ExposePortRequest>;
19
21
  responseSerialize: grpc.serialize<control_pb.ExposePortResponse>;
20
22
  responseDeserialize: grpc.deserialize<control_pb.ExposePortResponse>;
21
23
  }
24
+ interface IControlServiceService_ICreateSSHKeyPair extends grpc.MethodDefinition<control_pb.CreateSSHKeyPairRequest, control_pb.CreateSSHKeyPairResponse> {
25
+ path: "/supervisor.ControlService/CreateSSHKeyPair";
26
+ requestStream: false;
27
+ responseStream: false;
28
+ requestSerialize: grpc.serialize<control_pb.CreateSSHKeyPairRequest>;
29
+ requestDeserialize: grpc.deserialize<control_pb.CreateSSHKeyPairRequest>;
30
+ responseSerialize: grpc.serialize<control_pb.CreateSSHKeyPairResponse>;
31
+ responseDeserialize: grpc.deserialize<control_pb.CreateSSHKeyPairResponse>;
32
+ }
22
33
 
23
34
  export const ControlServiceService: IControlServiceService;
24
35
 
25
- export interface IControlServiceServer {
36
+ export interface IControlServiceServer extends grpc.UntypedServiceImplementation {
26
37
  exposePort: grpc.handleUnaryCall<control_pb.ExposePortRequest, control_pb.ExposePortResponse>;
38
+ createSSHKeyPair: grpc.handleUnaryCall<control_pb.CreateSSHKeyPairRequest, control_pb.CreateSSHKeyPairResponse>;
27
39
  }
28
40
 
29
41
  export interface IControlServiceClient {
30
42
  exposePort(request: control_pb.ExposePortRequest, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
31
43
  exposePort(request: control_pb.ExposePortRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
32
44
  exposePort(request: control_pb.ExposePortRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
45
+ createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
46
+ createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
47
+ createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
33
48
  }
34
49
 
35
50
  export class ControlServiceClient extends grpc.Client implements IControlServiceClient {
36
- constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
51
+ constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
37
52
  public exposePort(request: control_pb.ExposePortRequest, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
38
53
  public exposePort(request: control_pb.ExposePortRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
39
54
  public exposePort(request: control_pb.ExposePortRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: control_pb.ExposePortResponse) => void): grpc.ClientUnaryCall;
55
+ public createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
56
+ public createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
57
+ public createSSHKeyPair(request: control_pb.CreateSSHKeyPairRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: control_pb.CreateSSHKeyPairResponse) => void): grpc.ClientUnaryCall;
40
58
  }
@@ -9,6 +9,28 @@
9
9
  var grpc = require('@grpc/grpc-js');
10
10
  var control_pb = require('./control_pb.js');
11
11
 
12
+ function serialize_supervisor_CreateSSHKeyPairRequest(arg) {
13
+ if (!(arg instanceof control_pb.CreateSSHKeyPairRequest)) {
14
+ throw new Error('Expected argument of type supervisor.CreateSSHKeyPairRequest');
15
+ }
16
+ return Buffer.from(arg.serializeBinary());
17
+ }
18
+
19
+ function deserialize_supervisor_CreateSSHKeyPairRequest(buffer_arg) {
20
+ return control_pb.CreateSSHKeyPairRequest.deserializeBinary(new Uint8Array(buffer_arg));
21
+ }
22
+
23
+ function serialize_supervisor_CreateSSHKeyPairResponse(arg) {
24
+ if (!(arg instanceof control_pb.CreateSSHKeyPairResponse)) {
25
+ throw new Error('Expected argument of type supervisor.CreateSSHKeyPairResponse');
26
+ }
27
+ return Buffer.from(arg.serializeBinary());
28
+ }
29
+
30
+ function deserialize_supervisor_CreateSSHKeyPairResponse(buffer_arg) {
31
+ return control_pb.CreateSSHKeyPairResponse.deserializeBinary(new Uint8Array(buffer_arg));
32
+ }
33
+
12
34
  function serialize_supervisor_ExposePortRequest(arg) {
13
35
  if (!(arg instanceof control_pb.ExposePortRequest)) {
14
36
  throw new Error('Expected argument of type supervisor.ExposePortRequest');
@@ -46,6 +68,18 @@ exposePort: {
46
68
  responseSerialize: serialize_supervisor_ExposePortResponse,
47
69
  responseDeserialize: deserialize_supervisor_ExposePortResponse,
48
70
  },
71
+ // CreateSSHKeyPair Create a pair of SSH Keys and put them in ~/.ssh/authorized_keys, this will only be generated once in the entire workspace lifecycle
72
+ createSSHKeyPair: {
73
+ path: '/supervisor.ControlService/CreateSSHKeyPair',
74
+ requestStream: false,
75
+ responseStream: false,
76
+ requestType: control_pb.CreateSSHKeyPairRequest,
77
+ responseType: control_pb.CreateSSHKeyPairResponse,
78
+ requestSerialize: serialize_supervisor_CreateSSHKeyPairRequest,
79
+ requestDeserialize: deserialize_supervisor_CreateSSHKeyPairRequest,
80
+ responseSerialize: serialize_supervisor_CreateSSHKeyPairResponse,
81
+ responseDeserialize: deserialize_supervisor_CreateSSHKeyPairResponse,
82
+ },
49
83
  };
50
84
 
51
85
  exports.ControlServiceClient = grpc.makeGenericClientConstructor(ControlServiceService);
@@ -2,16 +2,13 @@
2
2
  // file: control.proto
3
3
 
4
4
  /* tslint:disable */
5
+ /* eslint-disable */
5
6
 
6
7
  import * as jspb from "google-protobuf";
7
8
 
8
9
  export class ExposePortRequest extends jspb.Message {
9
10
  getPort(): number;
10
- setPort(value: number): void;
11
-
12
- getTargetPort(): number;
13
- setTargetPort(value: number): void;
14
-
11
+ setPort(value: number): ExposePortRequest;
15
12
 
16
13
  serializeBinary(): Uint8Array;
17
14
  toObject(includeInstance?: boolean): ExposePortRequest.AsObject;
@@ -26,7 +23,6 @@ export class ExposePortRequest extends jspb.Message {
26
23
  export namespace ExposePortRequest {
27
24
  export type AsObject = {
28
25
  port: number,
29
- targetPort: number,
30
26
  }
31
27
  }
32
28
 
@@ -46,3 +42,40 @@ export namespace ExposePortResponse {
46
42
  export type AsObject = {
47
43
  }
48
44
  }
45
+
46
+ export class CreateSSHKeyPairRequest extends jspb.Message {
47
+
48
+ serializeBinary(): Uint8Array;
49
+ toObject(includeInstance?: boolean): CreateSSHKeyPairRequest.AsObject;
50
+ static toObject(includeInstance: boolean, msg: CreateSSHKeyPairRequest): CreateSSHKeyPairRequest.AsObject;
51
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
52
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
53
+ static serializeBinaryToWriter(message: CreateSSHKeyPairRequest, writer: jspb.BinaryWriter): void;
54
+ static deserializeBinary(bytes: Uint8Array): CreateSSHKeyPairRequest;
55
+ static deserializeBinaryFromReader(message: CreateSSHKeyPairRequest, reader: jspb.BinaryReader): CreateSSHKeyPairRequest;
56
+ }
57
+
58
+ export namespace CreateSSHKeyPairRequest {
59
+ export type AsObject = {
60
+ }
61
+ }
62
+
63
+ export class CreateSSHKeyPairResponse extends jspb.Message {
64
+ getPrivateKey(): string;
65
+ setPrivateKey(value: string): CreateSSHKeyPairResponse;
66
+
67
+ serializeBinary(): Uint8Array;
68
+ toObject(includeInstance?: boolean): CreateSSHKeyPairResponse.AsObject;
69
+ static toObject(includeInstance: boolean, msg: CreateSSHKeyPairResponse): CreateSSHKeyPairResponse.AsObject;
70
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
71
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
72
+ static serializeBinaryToWriter(message: CreateSSHKeyPairResponse, writer: jspb.BinaryWriter): void;
73
+ static deserializeBinary(bytes: Uint8Array): CreateSSHKeyPairResponse;
74
+ static deserializeBinaryFromReader(message: CreateSSHKeyPairResponse, reader: jspb.BinaryReader): CreateSSHKeyPairResponse;
75
+ }
76
+
77
+ export namespace CreateSSHKeyPairResponse {
78
+ export type AsObject = {
79
+ privateKey: string,
80
+ }
81
+ }
package/lib/control_pb.js CHANGED
@@ -1,16 +1,22 @@
1
+ // source: control.proto
1
2
  /**
2
3
  * @fileoverview
3
4
  * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
4
6
  * @suppress {messageConventions} JS Compiler reports an error if a variable or
5
7
  * field starts with 'MSG_' and isn't a translatable message.
6
8
  * @public
7
9
  */
8
10
  // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
9
13
 
10
14
  var jspb = require('google-protobuf');
11
15
  var goog = jspb;
12
- var global = Function('return this')();
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
13
17
 
18
+ goog.exportSymbol('proto.supervisor.CreateSSHKeyPairRequest', null, global);
19
+ goog.exportSymbol('proto.supervisor.CreateSSHKeyPairResponse', null, global);
14
20
  goog.exportSymbol('proto.supervisor.ExposePortRequest', null, global);
15
21
  goog.exportSymbol('proto.supervisor.ExposePortResponse', null, global);
16
22
  /**
@@ -55,18 +61,62 @@ if (goog.DEBUG && !COMPILED) {
55
61
  */
56
62
  proto.supervisor.ExposePortResponse.displayName = 'proto.supervisor.ExposePortResponse';
57
63
  }
64
+ /**
65
+ * Generated by JsPbCodeGenerator.
66
+ * @param {Array=} opt_data Optional initial data array, typically from a
67
+ * server response, or constructed directly in Javascript. The array is used
68
+ * in place and becomes part of the constructed object. It is not cloned.
69
+ * If no data is provided, the constructed object will be empty, but still
70
+ * valid.
71
+ * @extends {jspb.Message}
72
+ * @constructor
73
+ */
74
+ proto.supervisor.CreateSSHKeyPairRequest = function(opt_data) {
75
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
76
+ };
77
+ goog.inherits(proto.supervisor.CreateSSHKeyPairRequest, jspb.Message);
78
+ if (goog.DEBUG && !COMPILED) {
79
+ /**
80
+ * @public
81
+ * @override
82
+ */
83
+ proto.supervisor.CreateSSHKeyPairRequest.displayName = 'proto.supervisor.CreateSSHKeyPairRequest';
84
+ }
85
+ /**
86
+ * Generated by JsPbCodeGenerator.
87
+ * @param {Array=} opt_data Optional initial data array, typically from a
88
+ * server response, or constructed directly in Javascript. The array is used
89
+ * in place and becomes part of the constructed object. It is not cloned.
90
+ * If no data is provided, the constructed object will be empty, but still
91
+ * valid.
92
+ * @extends {jspb.Message}
93
+ * @constructor
94
+ */
95
+ proto.supervisor.CreateSSHKeyPairResponse = function(opt_data) {
96
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
97
+ };
98
+ goog.inherits(proto.supervisor.CreateSSHKeyPairResponse, jspb.Message);
99
+ if (goog.DEBUG && !COMPILED) {
100
+ /**
101
+ * @public
102
+ * @override
103
+ */
104
+ proto.supervisor.CreateSSHKeyPairResponse.displayName = 'proto.supervisor.CreateSSHKeyPairResponse';
105
+ }
58
106
 
59
107
 
60
108
 
61
109
  if (jspb.Message.GENERATE_TO_OBJECT) {
62
110
  /**
63
- * Creates an object representation of this proto suitable for use in Soy templates.
111
+ * Creates an object representation of this proto.
64
112
  * Field names that are reserved in JavaScript and will be renamed to pb_name.
113
+ * Optional fields that are not set will be set to undefined.
65
114
  * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
66
115
  * For the list of reserved names please see:
67
- * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
68
- * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
69
- * for transitional soy proto support: http://goto/soy-param-migration
116
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
117
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
118
+ * JSPB instance for transitional soy proto support:
119
+ * http://goto/soy-param-migration
70
120
  * @return {!Object}
71
121
  */
72
122
  proto.supervisor.ExposePortRequest.prototype.toObject = function(opt_includeInstance) {
@@ -76,8 +126,8 @@ proto.supervisor.ExposePortRequest.prototype.toObject = function(opt_includeInst
76
126
 
77
127
  /**
78
128
  * Static version of the {@see toObject} method.
79
- * @param {boolean|undefined} includeInstance Whether to include the JSPB
80
- * instance for transitional soy proto support:
129
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
130
+ * the JSPB instance for transitional soy proto support:
81
131
  * http://goto/soy-param-migration
82
132
  * @param {!proto.supervisor.ExposePortRequest} msg The msg instance to transform.
83
133
  * @return {!Object}
@@ -85,8 +135,7 @@ proto.supervisor.ExposePortRequest.prototype.toObject = function(opt_includeInst
85
135
  */
86
136
  proto.supervisor.ExposePortRequest.toObject = function(includeInstance, msg) {
87
137
  var f, obj = {
88
- port: jspb.Message.getFieldWithDefault(msg, 1, 0),
89
- targetPort: jspb.Message.getFieldWithDefault(msg, 2, 0)
138
+ port: jspb.Message.getFieldWithDefault(msg, 1, 0)
90
139
  };
91
140
 
92
141
  if (includeInstance) {
@@ -127,10 +176,6 @@ proto.supervisor.ExposePortRequest.deserializeBinaryFromReader = function(msg, r
127
176
  var value = /** @type {number} */ (reader.readUint32());
128
177
  msg.setPort(value);
129
178
  break;
130
- case 2:
131
- var value = /** @type {number} */ (reader.readUint32());
132
- msg.setTargetPort(value);
133
- break;
134
179
  default:
135
180
  reader.skipField();
136
181
  break;
@@ -167,13 +212,6 @@ proto.supervisor.ExposePortRequest.serializeBinaryToWriter = function(message, w
167
212
  f
168
213
  );
169
214
  }
170
- f = message.getTargetPort();
171
- if (f !== 0) {
172
- writer.writeUint32(
173
- 2,
174
- f
175
- );
176
- }
177
215
  };
178
216
 
179
217
 
@@ -186,24 +224,12 @@ proto.supervisor.ExposePortRequest.prototype.getPort = function() {
186
224
  };
187
225
 
188
226
 
189
- /** @param {number} value */
190
- proto.supervisor.ExposePortRequest.prototype.setPort = function(value) {
191
- jspb.Message.setProto3IntField(this, 1, value);
192
- };
193
-
194
-
195
227
  /**
196
- * optional uint32 target_port = 2;
197
- * @return {number}
228
+ * @param {number} value
229
+ * @return {!proto.supervisor.ExposePortRequest} returns this
198
230
  */
199
- proto.supervisor.ExposePortRequest.prototype.getTargetPort = function() {
200
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
201
- };
202
-
203
-
204
- /** @param {number} value */
205
- proto.supervisor.ExposePortRequest.prototype.setTargetPort = function(value) {
206
- jspb.Message.setProto3IntField(this, 2, value);
231
+ proto.supervisor.ExposePortRequest.prototype.setPort = function(value) {
232
+ return jspb.Message.setProto3IntField(this, 1, value);
207
233
  };
208
234
 
209
235
 
@@ -212,13 +238,15 @@ proto.supervisor.ExposePortRequest.prototype.setTargetPort = function(value) {
212
238
 
213
239
  if (jspb.Message.GENERATE_TO_OBJECT) {
214
240
  /**
215
- * Creates an object representation of this proto suitable for use in Soy templates.
241
+ * Creates an object representation of this proto.
216
242
  * Field names that are reserved in JavaScript and will be renamed to pb_name.
243
+ * Optional fields that are not set will be set to undefined.
217
244
  * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
218
245
  * For the list of reserved names please see:
219
- * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
220
- * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
221
- * for transitional soy proto support: http://goto/soy-param-migration
246
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
247
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
248
+ * JSPB instance for transitional soy proto support:
249
+ * http://goto/soy-param-migration
222
250
  * @return {!Object}
223
251
  */
224
252
  proto.supervisor.ExposePortResponse.prototype.toObject = function(opt_includeInstance) {
@@ -228,8 +256,8 @@ proto.supervisor.ExposePortResponse.prototype.toObject = function(opt_includeIns
228
256
 
229
257
  /**
230
258
  * Static version of the {@see toObject} method.
231
- * @param {boolean|undefined} includeInstance Whether to include the JSPB
232
- * instance for transitional soy proto support:
259
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
260
+ * the JSPB instance for transitional soy proto support:
233
261
  * http://goto/soy-param-migration
234
262
  * @param {!proto.supervisor.ExposePortResponse} msg The msg instance to transform.
235
263
  * @return {!Object}
@@ -306,4 +334,235 @@ proto.supervisor.ExposePortResponse.serializeBinaryToWriter = function(message,
306
334
  };
307
335
 
308
336
 
337
+
338
+
339
+
340
+ if (jspb.Message.GENERATE_TO_OBJECT) {
341
+ /**
342
+ * Creates an object representation of this proto.
343
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
344
+ * Optional fields that are not set will be set to undefined.
345
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
346
+ * For the list of reserved names please see:
347
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
348
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
349
+ * JSPB instance for transitional soy proto support:
350
+ * http://goto/soy-param-migration
351
+ * @return {!Object}
352
+ */
353
+ proto.supervisor.CreateSSHKeyPairRequest.prototype.toObject = function(opt_includeInstance) {
354
+ return proto.supervisor.CreateSSHKeyPairRequest.toObject(opt_includeInstance, this);
355
+ };
356
+
357
+
358
+ /**
359
+ * Static version of the {@see toObject} method.
360
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
361
+ * the JSPB instance for transitional soy proto support:
362
+ * http://goto/soy-param-migration
363
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} msg The msg instance to transform.
364
+ * @return {!Object}
365
+ * @suppress {unusedLocalVariables} f is only used for nested messages
366
+ */
367
+ proto.supervisor.CreateSSHKeyPairRequest.toObject = function(includeInstance, msg) {
368
+ var f, obj = {
369
+
370
+ };
371
+
372
+ if (includeInstance) {
373
+ obj.$jspbMessageInstance = msg;
374
+ }
375
+ return obj;
376
+ };
377
+ }
378
+
379
+
380
+ /**
381
+ * Deserializes binary data (in protobuf wire format).
382
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
383
+ * @return {!proto.supervisor.CreateSSHKeyPairRequest}
384
+ */
385
+ proto.supervisor.CreateSSHKeyPairRequest.deserializeBinary = function(bytes) {
386
+ var reader = new jspb.BinaryReader(bytes);
387
+ var msg = new proto.supervisor.CreateSSHKeyPairRequest;
388
+ return proto.supervisor.CreateSSHKeyPairRequest.deserializeBinaryFromReader(msg, reader);
389
+ };
390
+
391
+
392
+ /**
393
+ * Deserializes binary data (in protobuf wire format) from the
394
+ * given reader into the given message object.
395
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} msg The message object to deserialize into.
396
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
397
+ * @return {!proto.supervisor.CreateSSHKeyPairRequest}
398
+ */
399
+ proto.supervisor.CreateSSHKeyPairRequest.deserializeBinaryFromReader = function(msg, reader) {
400
+ while (reader.nextField()) {
401
+ if (reader.isEndGroup()) {
402
+ break;
403
+ }
404
+ var field = reader.getFieldNumber();
405
+ switch (field) {
406
+ default:
407
+ reader.skipField();
408
+ break;
409
+ }
410
+ }
411
+ return msg;
412
+ };
413
+
414
+
415
+ /**
416
+ * Serializes the message to binary data (in protobuf wire format).
417
+ * @return {!Uint8Array}
418
+ */
419
+ proto.supervisor.CreateSSHKeyPairRequest.prototype.serializeBinary = function() {
420
+ var writer = new jspb.BinaryWriter();
421
+ proto.supervisor.CreateSSHKeyPairRequest.serializeBinaryToWriter(this, writer);
422
+ return writer.getResultBuffer();
423
+ };
424
+
425
+
426
+ /**
427
+ * Serializes the given message to binary data (in protobuf wire
428
+ * format), writing to the given BinaryWriter.
429
+ * @param {!proto.supervisor.CreateSSHKeyPairRequest} message
430
+ * @param {!jspb.BinaryWriter} writer
431
+ * @suppress {unusedLocalVariables} f is only used for nested messages
432
+ */
433
+ proto.supervisor.CreateSSHKeyPairRequest.serializeBinaryToWriter = function(message, writer) {
434
+ var f = undefined;
435
+ };
436
+
437
+
438
+
439
+
440
+
441
+ if (jspb.Message.GENERATE_TO_OBJECT) {
442
+ /**
443
+ * Creates an object representation of this proto.
444
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
445
+ * Optional fields that are not set will be set to undefined.
446
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
447
+ * For the list of reserved names please see:
448
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
449
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
450
+ * JSPB instance for transitional soy proto support:
451
+ * http://goto/soy-param-migration
452
+ * @return {!Object}
453
+ */
454
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.toObject = function(opt_includeInstance) {
455
+ return proto.supervisor.CreateSSHKeyPairResponse.toObject(opt_includeInstance, this);
456
+ };
457
+
458
+
459
+ /**
460
+ * Static version of the {@see toObject} method.
461
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
462
+ * the JSPB instance for transitional soy proto support:
463
+ * http://goto/soy-param-migration
464
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} msg The msg instance to transform.
465
+ * @return {!Object}
466
+ * @suppress {unusedLocalVariables} f is only used for nested messages
467
+ */
468
+ proto.supervisor.CreateSSHKeyPairResponse.toObject = function(includeInstance, msg) {
469
+ var f, obj = {
470
+ privateKey: jspb.Message.getFieldWithDefault(msg, 1, "")
471
+ };
472
+
473
+ if (includeInstance) {
474
+ obj.$jspbMessageInstance = msg;
475
+ }
476
+ return obj;
477
+ };
478
+ }
479
+
480
+
481
+ /**
482
+ * Deserializes binary data (in protobuf wire format).
483
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
484
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse}
485
+ */
486
+ proto.supervisor.CreateSSHKeyPairResponse.deserializeBinary = function(bytes) {
487
+ var reader = new jspb.BinaryReader(bytes);
488
+ var msg = new proto.supervisor.CreateSSHKeyPairResponse;
489
+ return proto.supervisor.CreateSSHKeyPairResponse.deserializeBinaryFromReader(msg, reader);
490
+ };
491
+
492
+
493
+ /**
494
+ * Deserializes binary data (in protobuf wire format) from the
495
+ * given reader into the given message object.
496
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} msg The message object to deserialize into.
497
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
498
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse}
499
+ */
500
+ proto.supervisor.CreateSSHKeyPairResponse.deserializeBinaryFromReader = function(msg, reader) {
501
+ while (reader.nextField()) {
502
+ if (reader.isEndGroup()) {
503
+ break;
504
+ }
505
+ var field = reader.getFieldNumber();
506
+ switch (field) {
507
+ case 1:
508
+ var value = /** @type {string} */ (reader.readString());
509
+ msg.setPrivateKey(value);
510
+ break;
511
+ default:
512
+ reader.skipField();
513
+ break;
514
+ }
515
+ }
516
+ return msg;
517
+ };
518
+
519
+
520
+ /**
521
+ * Serializes the message to binary data (in protobuf wire format).
522
+ * @return {!Uint8Array}
523
+ */
524
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.serializeBinary = function() {
525
+ var writer = new jspb.BinaryWriter();
526
+ proto.supervisor.CreateSSHKeyPairResponse.serializeBinaryToWriter(this, writer);
527
+ return writer.getResultBuffer();
528
+ };
529
+
530
+
531
+ /**
532
+ * Serializes the given message to binary data (in protobuf wire
533
+ * format), writing to the given BinaryWriter.
534
+ * @param {!proto.supervisor.CreateSSHKeyPairResponse} message
535
+ * @param {!jspb.BinaryWriter} writer
536
+ * @suppress {unusedLocalVariables} f is only used for nested messages
537
+ */
538
+ proto.supervisor.CreateSSHKeyPairResponse.serializeBinaryToWriter = function(message, writer) {
539
+ var f = undefined;
540
+ f = message.getPrivateKey();
541
+ if (f.length > 0) {
542
+ writer.writeString(
543
+ 1,
544
+ f
545
+ );
546
+ }
547
+ };
548
+
549
+
550
+ /**
551
+ * optional string private_key = 1;
552
+ * @return {string}
553
+ */
554
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.getPrivateKey = function() {
555
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
556
+ };
557
+
558
+
559
+ /**
560
+ * @param {string} value
561
+ * @return {!proto.supervisor.CreateSSHKeyPairResponse} returns this
562
+ */
563
+ proto.supervisor.CreateSSHKeyPairResponse.prototype.setPrivateKey = function(value) {
564
+ return jspb.Message.setProto3StringField(this, 1, value);
565
+ };
566
+
567
+
309
568
  goog.object.extend(exports, proto.supervisor);
@@ -2,8 +2,9 @@
2
2
  // file: info.proto
3
3
 
4
4
  /* tslint:disable */
5
+ /* eslint-disable */
5
6
 
6
- import * as grpc from "grpc";
7
+ import * as grpc from "@grpc/grpc-js";
7
8
  import * as info_pb from "./info_pb";
8
9
 
9
10
  interface IInfoServiceService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
@@ -11,9 +12,9 @@ interface IInfoServiceService extends grpc.ServiceDefinition<grpc.UntypedService
11
12
  }
12
13
 
13
14
  interface IInfoServiceService_IWorkspaceInfo extends grpc.MethodDefinition<info_pb.WorkspaceInfoRequest, info_pb.WorkspaceInfoResponse> {
14
- path: string; // "/supervisor.InfoService/WorkspaceInfo"
15
- requestStream: boolean; // false
16
- responseStream: boolean; // false
15
+ path: "/supervisor.InfoService/WorkspaceInfo";
16
+ requestStream: false;
17
+ responseStream: false;
17
18
  requestSerialize: grpc.serialize<info_pb.WorkspaceInfoRequest>;
18
19
  requestDeserialize: grpc.deserialize<info_pb.WorkspaceInfoRequest>;
19
20
  responseSerialize: grpc.serialize<info_pb.WorkspaceInfoResponse>;
@@ -22,7 +23,7 @@ interface IInfoServiceService_IWorkspaceInfo extends grpc.MethodDefinition<info_
22
23
 
23
24
  export const InfoServiceService: IInfoServiceService;
24
25
 
25
- export interface IInfoServiceServer {
26
+ export interface IInfoServiceServer extends grpc.UntypedServiceImplementation {
26
27
  workspaceInfo: grpc.handleUnaryCall<info_pb.WorkspaceInfoRequest, info_pb.WorkspaceInfoResponse>;
27
28
  }
28
29
 
@@ -33,7 +34,7 @@ export interface IInfoServiceClient {
33
34
  }
34
35
 
35
36
  export class InfoServiceClient extends grpc.Client implements IInfoServiceClient {
36
- constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
37
+ constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial<grpc.ClientOptions>);
37
38
  public workspaceInfo(request: info_pb.WorkspaceInfoRequest, callback: (error: grpc.ServiceError | null, response: info_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall;
38
39
  public workspaceInfo(request: info_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: info_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall;
39
40
  public workspaceInfo(request: info_pb.WorkspaceInfoRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: info_pb.WorkspaceInfoResponse) => void): grpc.ClientUnaryCall;