@pulumi/pulumi 3.66.0 → 3.67.0

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.
@@ -0,0 +1,808 @@
1
+ // source: pulumi/codegen/hcl.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.pulumirpc.codegen.Diagnostic', null, global);
19
+ goog.exportSymbol('proto.pulumirpc.codegen.DiagnosticSeverity', null, global);
20
+ goog.exportSymbol('proto.pulumirpc.codegen.Pos', null, global);
21
+ goog.exportSymbol('proto.pulumirpc.codegen.Range', null, global);
22
+ /**
23
+ * Generated by JsPbCodeGenerator.
24
+ * @param {Array=} opt_data Optional initial data array, typically from a
25
+ * server response, or constructed directly in Javascript. The array is used
26
+ * in place and becomes part of the constructed object. It is not cloned.
27
+ * If no data is provided, the constructed object will be empty, but still
28
+ * valid.
29
+ * @extends {jspb.Message}
30
+ * @constructor
31
+ */
32
+ proto.pulumirpc.codegen.Pos = function(opt_data) {
33
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
34
+ };
35
+ goog.inherits(proto.pulumirpc.codegen.Pos, jspb.Message);
36
+ if (goog.DEBUG && !COMPILED) {
37
+ /**
38
+ * @public
39
+ * @override
40
+ */
41
+ proto.pulumirpc.codegen.Pos.displayName = 'proto.pulumirpc.codegen.Pos';
42
+ }
43
+ /**
44
+ * Generated by JsPbCodeGenerator.
45
+ * @param {Array=} opt_data Optional initial data array, typically from a
46
+ * server response, or constructed directly in Javascript. The array is used
47
+ * in place and becomes part of the constructed object. It is not cloned.
48
+ * If no data is provided, the constructed object will be empty, but still
49
+ * valid.
50
+ * @extends {jspb.Message}
51
+ * @constructor
52
+ */
53
+ proto.pulumirpc.codegen.Range = function(opt_data) {
54
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
55
+ };
56
+ goog.inherits(proto.pulumirpc.codegen.Range, jspb.Message);
57
+ if (goog.DEBUG && !COMPILED) {
58
+ /**
59
+ * @public
60
+ * @override
61
+ */
62
+ proto.pulumirpc.codegen.Range.displayName = 'proto.pulumirpc.codegen.Range';
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.pulumirpc.codegen.Diagnostic = function(opt_data) {
75
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
76
+ };
77
+ goog.inherits(proto.pulumirpc.codegen.Diagnostic, jspb.Message);
78
+ if (goog.DEBUG && !COMPILED) {
79
+ /**
80
+ * @public
81
+ * @override
82
+ */
83
+ proto.pulumirpc.codegen.Diagnostic.displayName = 'proto.pulumirpc.codegen.Diagnostic';
84
+ }
85
+
86
+
87
+
88
+ if (jspb.Message.GENERATE_TO_OBJECT) {
89
+ /**
90
+ * Creates an object representation of this proto.
91
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
92
+ * Optional fields that are not set will be set to undefined.
93
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
94
+ * For the list of reserved names please see:
95
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
96
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
97
+ * JSPB instance for transitional soy proto support:
98
+ * http://goto/soy-param-migration
99
+ * @return {!Object}
100
+ */
101
+ proto.pulumirpc.codegen.Pos.prototype.toObject = function(opt_includeInstance) {
102
+ return proto.pulumirpc.codegen.Pos.toObject(opt_includeInstance, this);
103
+ };
104
+
105
+
106
+ /**
107
+ * Static version of the {@see toObject} method.
108
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
109
+ * the JSPB instance for transitional soy proto support:
110
+ * http://goto/soy-param-migration
111
+ * @param {!proto.pulumirpc.codegen.Pos} msg The msg instance to transform.
112
+ * @return {!Object}
113
+ * @suppress {unusedLocalVariables} f is only used for nested messages
114
+ */
115
+ proto.pulumirpc.codegen.Pos.toObject = function(includeInstance, msg) {
116
+ var f, obj = {
117
+ line: jspb.Message.getFieldWithDefault(msg, 1, 0),
118
+ column: jspb.Message.getFieldWithDefault(msg, 2, 0),
119
+ pb_byte: jspb.Message.getFieldWithDefault(msg, 3, 0)
120
+ };
121
+
122
+ if (includeInstance) {
123
+ obj.$jspbMessageInstance = msg;
124
+ }
125
+ return obj;
126
+ };
127
+ }
128
+
129
+
130
+ /**
131
+ * Deserializes binary data (in protobuf wire format).
132
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
133
+ * @return {!proto.pulumirpc.codegen.Pos}
134
+ */
135
+ proto.pulumirpc.codegen.Pos.deserializeBinary = function(bytes) {
136
+ var reader = new jspb.BinaryReader(bytes);
137
+ var msg = new proto.pulumirpc.codegen.Pos;
138
+ return proto.pulumirpc.codegen.Pos.deserializeBinaryFromReader(msg, reader);
139
+ };
140
+
141
+
142
+ /**
143
+ * Deserializes binary data (in protobuf wire format) from the
144
+ * given reader into the given message object.
145
+ * @param {!proto.pulumirpc.codegen.Pos} msg The message object to deserialize into.
146
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
147
+ * @return {!proto.pulumirpc.codegen.Pos}
148
+ */
149
+ proto.pulumirpc.codegen.Pos.deserializeBinaryFromReader = function(msg, reader) {
150
+ while (reader.nextField()) {
151
+ if (reader.isEndGroup()) {
152
+ break;
153
+ }
154
+ var field = reader.getFieldNumber();
155
+ switch (field) {
156
+ case 1:
157
+ var value = /** @type {number} */ (reader.readInt64());
158
+ msg.setLine(value);
159
+ break;
160
+ case 2:
161
+ var value = /** @type {number} */ (reader.readInt64());
162
+ msg.setColumn(value);
163
+ break;
164
+ case 3:
165
+ var value = /** @type {number} */ (reader.readInt64());
166
+ msg.setByte(value);
167
+ break;
168
+ default:
169
+ reader.skipField();
170
+ break;
171
+ }
172
+ }
173
+ return msg;
174
+ };
175
+
176
+
177
+ /**
178
+ * Serializes the message to binary data (in protobuf wire format).
179
+ * @return {!Uint8Array}
180
+ */
181
+ proto.pulumirpc.codegen.Pos.prototype.serializeBinary = function() {
182
+ var writer = new jspb.BinaryWriter();
183
+ proto.pulumirpc.codegen.Pos.serializeBinaryToWriter(this, writer);
184
+ return writer.getResultBuffer();
185
+ };
186
+
187
+
188
+ /**
189
+ * Serializes the given message to binary data (in protobuf wire
190
+ * format), writing to the given BinaryWriter.
191
+ * @param {!proto.pulumirpc.codegen.Pos} message
192
+ * @param {!jspb.BinaryWriter} writer
193
+ * @suppress {unusedLocalVariables} f is only used for nested messages
194
+ */
195
+ proto.pulumirpc.codegen.Pos.serializeBinaryToWriter = function(message, writer) {
196
+ var f = undefined;
197
+ f = message.getLine();
198
+ if (f !== 0) {
199
+ writer.writeInt64(
200
+ 1,
201
+ f
202
+ );
203
+ }
204
+ f = message.getColumn();
205
+ if (f !== 0) {
206
+ writer.writeInt64(
207
+ 2,
208
+ f
209
+ );
210
+ }
211
+ f = message.getByte();
212
+ if (f !== 0) {
213
+ writer.writeInt64(
214
+ 3,
215
+ f
216
+ );
217
+ }
218
+ };
219
+
220
+
221
+ /**
222
+ * optional int64 line = 1;
223
+ * @return {number}
224
+ */
225
+ proto.pulumirpc.codegen.Pos.prototype.getLine = function() {
226
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
227
+ };
228
+
229
+
230
+ /**
231
+ * @param {number} value
232
+ * @return {!proto.pulumirpc.codegen.Pos} returns this
233
+ */
234
+ proto.pulumirpc.codegen.Pos.prototype.setLine = function(value) {
235
+ return jspb.Message.setProto3IntField(this, 1, value);
236
+ };
237
+
238
+
239
+ /**
240
+ * optional int64 column = 2;
241
+ * @return {number}
242
+ */
243
+ proto.pulumirpc.codegen.Pos.prototype.getColumn = function() {
244
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
245
+ };
246
+
247
+
248
+ /**
249
+ * @param {number} value
250
+ * @return {!proto.pulumirpc.codegen.Pos} returns this
251
+ */
252
+ proto.pulumirpc.codegen.Pos.prototype.setColumn = function(value) {
253
+ return jspb.Message.setProto3IntField(this, 2, value);
254
+ };
255
+
256
+
257
+ /**
258
+ * optional int64 byte = 3;
259
+ * @return {number}
260
+ */
261
+ proto.pulumirpc.codegen.Pos.prototype.getByte = function() {
262
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
263
+ };
264
+
265
+
266
+ /**
267
+ * @param {number} value
268
+ * @return {!proto.pulumirpc.codegen.Pos} returns this
269
+ */
270
+ proto.pulumirpc.codegen.Pos.prototype.setByte = function(value) {
271
+ return jspb.Message.setProto3IntField(this, 3, value);
272
+ };
273
+
274
+
275
+
276
+
277
+
278
+ if (jspb.Message.GENERATE_TO_OBJECT) {
279
+ /**
280
+ * Creates an object representation of this proto.
281
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
282
+ * Optional fields that are not set will be set to undefined.
283
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
284
+ * For the list of reserved names please see:
285
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
286
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
287
+ * JSPB instance for transitional soy proto support:
288
+ * http://goto/soy-param-migration
289
+ * @return {!Object}
290
+ */
291
+ proto.pulumirpc.codegen.Range.prototype.toObject = function(opt_includeInstance) {
292
+ return proto.pulumirpc.codegen.Range.toObject(opt_includeInstance, this);
293
+ };
294
+
295
+
296
+ /**
297
+ * Static version of the {@see toObject} method.
298
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
299
+ * the JSPB instance for transitional soy proto support:
300
+ * http://goto/soy-param-migration
301
+ * @param {!proto.pulumirpc.codegen.Range} msg The msg instance to transform.
302
+ * @return {!Object}
303
+ * @suppress {unusedLocalVariables} f is only used for nested messages
304
+ */
305
+ proto.pulumirpc.codegen.Range.toObject = function(includeInstance, msg) {
306
+ var f, obj = {
307
+ filename: jspb.Message.getFieldWithDefault(msg, 1, ""),
308
+ start: (f = msg.getStart()) && proto.pulumirpc.codegen.Pos.toObject(includeInstance, f),
309
+ end: (f = msg.getEnd()) && proto.pulumirpc.codegen.Pos.toObject(includeInstance, f)
310
+ };
311
+
312
+ if (includeInstance) {
313
+ obj.$jspbMessageInstance = msg;
314
+ }
315
+ return obj;
316
+ };
317
+ }
318
+
319
+
320
+ /**
321
+ * Deserializes binary data (in protobuf wire format).
322
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
323
+ * @return {!proto.pulumirpc.codegen.Range}
324
+ */
325
+ proto.pulumirpc.codegen.Range.deserializeBinary = function(bytes) {
326
+ var reader = new jspb.BinaryReader(bytes);
327
+ var msg = new proto.pulumirpc.codegen.Range;
328
+ return proto.pulumirpc.codegen.Range.deserializeBinaryFromReader(msg, reader);
329
+ };
330
+
331
+
332
+ /**
333
+ * Deserializes binary data (in protobuf wire format) from the
334
+ * given reader into the given message object.
335
+ * @param {!proto.pulumirpc.codegen.Range} msg The message object to deserialize into.
336
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
337
+ * @return {!proto.pulumirpc.codegen.Range}
338
+ */
339
+ proto.pulumirpc.codegen.Range.deserializeBinaryFromReader = function(msg, reader) {
340
+ while (reader.nextField()) {
341
+ if (reader.isEndGroup()) {
342
+ break;
343
+ }
344
+ var field = reader.getFieldNumber();
345
+ switch (field) {
346
+ case 1:
347
+ var value = /** @type {string} */ (reader.readString());
348
+ msg.setFilename(value);
349
+ break;
350
+ case 2:
351
+ var value = new proto.pulumirpc.codegen.Pos;
352
+ reader.readMessage(value,proto.pulumirpc.codegen.Pos.deserializeBinaryFromReader);
353
+ msg.setStart(value);
354
+ break;
355
+ case 3:
356
+ var value = new proto.pulumirpc.codegen.Pos;
357
+ reader.readMessage(value,proto.pulumirpc.codegen.Pos.deserializeBinaryFromReader);
358
+ msg.setEnd(value);
359
+ break;
360
+ default:
361
+ reader.skipField();
362
+ break;
363
+ }
364
+ }
365
+ return msg;
366
+ };
367
+
368
+
369
+ /**
370
+ * Serializes the message to binary data (in protobuf wire format).
371
+ * @return {!Uint8Array}
372
+ */
373
+ proto.pulumirpc.codegen.Range.prototype.serializeBinary = function() {
374
+ var writer = new jspb.BinaryWriter();
375
+ proto.pulumirpc.codegen.Range.serializeBinaryToWriter(this, writer);
376
+ return writer.getResultBuffer();
377
+ };
378
+
379
+
380
+ /**
381
+ * Serializes the given message to binary data (in protobuf wire
382
+ * format), writing to the given BinaryWriter.
383
+ * @param {!proto.pulumirpc.codegen.Range} message
384
+ * @param {!jspb.BinaryWriter} writer
385
+ * @suppress {unusedLocalVariables} f is only used for nested messages
386
+ */
387
+ proto.pulumirpc.codegen.Range.serializeBinaryToWriter = function(message, writer) {
388
+ var f = undefined;
389
+ f = message.getFilename();
390
+ if (f.length > 0) {
391
+ writer.writeString(
392
+ 1,
393
+ f
394
+ );
395
+ }
396
+ f = message.getStart();
397
+ if (f != null) {
398
+ writer.writeMessage(
399
+ 2,
400
+ f,
401
+ proto.pulumirpc.codegen.Pos.serializeBinaryToWriter
402
+ );
403
+ }
404
+ f = message.getEnd();
405
+ if (f != null) {
406
+ writer.writeMessage(
407
+ 3,
408
+ f,
409
+ proto.pulumirpc.codegen.Pos.serializeBinaryToWriter
410
+ );
411
+ }
412
+ };
413
+
414
+
415
+ /**
416
+ * optional string filename = 1;
417
+ * @return {string}
418
+ */
419
+ proto.pulumirpc.codegen.Range.prototype.getFilename = function() {
420
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
421
+ };
422
+
423
+
424
+ /**
425
+ * @param {string} value
426
+ * @return {!proto.pulumirpc.codegen.Range} returns this
427
+ */
428
+ proto.pulumirpc.codegen.Range.prototype.setFilename = function(value) {
429
+ return jspb.Message.setProto3StringField(this, 1, value);
430
+ };
431
+
432
+
433
+ /**
434
+ * optional Pos start = 2;
435
+ * @return {?proto.pulumirpc.codegen.Pos}
436
+ */
437
+ proto.pulumirpc.codegen.Range.prototype.getStart = function() {
438
+ return /** @type{?proto.pulumirpc.codegen.Pos} */ (
439
+ jspb.Message.getWrapperField(this, proto.pulumirpc.codegen.Pos, 2));
440
+ };
441
+
442
+
443
+ /**
444
+ * @param {?proto.pulumirpc.codegen.Pos|undefined} value
445
+ * @return {!proto.pulumirpc.codegen.Range} returns this
446
+ */
447
+ proto.pulumirpc.codegen.Range.prototype.setStart = function(value) {
448
+ return jspb.Message.setWrapperField(this, 2, value);
449
+ };
450
+
451
+
452
+ /**
453
+ * Clears the message field making it undefined.
454
+ * @return {!proto.pulumirpc.codegen.Range} returns this
455
+ */
456
+ proto.pulumirpc.codegen.Range.prototype.clearStart = function() {
457
+ return this.setStart(undefined);
458
+ };
459
+
460
+
461
+ /**
462
+ * Returns whether this field is set.
463
+ * @return {boolean}
464
+ */
465
+ proto.pulumirpc.codegen.Range.prototype.hasStart = function() {
466
+ return jspb.Message.getField(this, 2) != null;
467
+ };
468
+
469
+
470
+ /**
471
+ * optional Pos end = 3;
472
+ * @return {?proto.pulumirpc.codegen.Pos}
473
+ */
474
+ proto.pulumirpc.codegen.Range.prototype.getEnd = function() {
475
+ return /** @type{?proto.pulumirpc.codegen.Pos} */ (
476
+ jspb.Message.getWrapperField(this, proto.pulumirpc.codegen.Pos, 3));
477
+ };
478
+
479
+
480
+ /**
481
+ * @param {?proto.pulumirpc.codegen.Pos|undefined} value
482
+ * @return {!proto.pulumirpc.codegen.Range} returns this
483
+ */
484
+ proto.pulumirpc.codegen.Range.prototype.setEnd = function(value) {
485
+ return jspb.Message.setWrapperField(this, 3, value);
486
+ };
487
+
488
+
489
+ /**
490
+ * Clears the message field making it undefined.
491
+ * @return {!proto.pulumirpc.codegen.Range} returns this
492
+ */
493
+ proto.pulumirpc.codegen.Range.prototype.clearEnd = function() {
494
+ return this.setEnd(undefined);
495
+ };
496
+
497
+
498
+ /**
499
+ * Returns whether this field is set.
500
+ * @return {boolean}
501
+ */
502
+ proto.pulumirpc.codegen.Range.prototype.hasEnd = function() {
503
+ return jspb.Message.getField(this, 3) != null;
504
+ };
505
+
506
+
507
+
508
+
509
+
510
+ if (jspb.Message.GENERATE_TO_OBJECT) {
511
+ /**
512
+ * Creates an object representation of this proto.
513
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
514
+ * Optional fields that are not set will be set to undefined.
515
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
516
+ * For the list of reserved names please see:
517
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
518
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
519
+ * JSPB instance for transitional soy proto support:
520
+ * http://goto/soy-param-migration
521
+ * @return {!Object}
522
+ */
523
+ proto.pulumirpc.codegen.Diagnostic.prototype.toObject = function(opt_includeInstance) {
524
+ return proto.pulumirpc.codegen.Diagnostic.toObject(opt_includeInstance, this);
525
+ };
526
+
527
+
528
+ /**
529
+ * Static version of the {@see toObject} method.
530
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
531
+ * the JSPB instance for transitional soy proto support:
532
+ * http://goto/soy-param-migration
533
+ * @param {!proto.pulumirpc.codegen.Diagnostic} msg The msg instance to transform.
534
+ * @return {!Object}
535
+ * @suppress {unusedLocalVariables} f is only used for nested messages
536
+ */
537
+ proto.pulumirpc.codegen.Diagnostic.toObject = function(includeInstance, msg) {
538
+ var f, obj = {
539
+ severity: jspb.Message.getFieldWithDefault(msg, 1, 0),
540
+ summary: jspb.Message.getFieldWithDefault(msg, 2, ""),
541
+ detail: jspb.Message.getFieldWithDefault(msg, 3, ""),
542
+ subject: (f = msg.getSubject()) && proto.pulumirpc.codegen.Range.toObject(includeInstance, f),
543
+ context: (f = msg.getContext()) && proto.pulumirpc.codegen.Range.toObject(includeInstance, f)
544
+ };
545
+
546
+ if (includeInstance) {
547
+ obj.$jspbMessageInstance = msg;
548
+ }
549
+ return obj;
550
+ };
551
+ }
552
+
553
+
554
+ /**
555
+ * Deserializes binary data (in protobuf wire format).
556
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
557
+ * @return {!proto.pulumirpc.codegen.Diagnostic}
558
+ */
559
+ proto.pulumirpc.codegen.Diagnostic.deserializeBinary = function(bytes) {
560
+ var reader = new jspb.BinaryReader(bytes);
561
+ var msg = new proto.pulumirpc.codegen.Diagnostic;
562
+ return proto.pulumirpc.codegen.Diagnostic.deserializeBinaryFromReader(msg, reader);
563
+ };
564
+
565
+
566
+ /**
567
+ * Deserializes binary data (in protobuf wire format) from the
568
+ * given reader into the given message object.
569
+ * @param {!proto.pulumirpc.codegen.Diagnostic} msg The message object to deserialize into.
570
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
571
+ * @return {!proto.pulumirpc.codegen.Diagnostic}
572
+ */
573
+ proto.pulumirpc.codegen.Diagnostic.deserializeBinaryFromReader = function(msg, reader) {
574
+ while (reader.nextField()) {
575
+ if (reader.isEndGroup()) {
576
+ break;
577
+ }
578
+ var field = reader.getFieldNumber();
579
+ switch (field) {
580
+ case 1:
581
+ var value = /** @type {!proto.pulumirpc.codegen.DiagnosticSeverity} */ (reader.readEnum());
582
+ msg.setSeverity(value);
583
+ break;
584
+ case 2:
585
+ var value = /** @type {string} */ (reader.readString());
586
+ msg.setSummary(value);
587
+ break;
588
+ case 3:
589
+ var value = /** @type {string} */ (reader.readString());
590
+ msg.setDetail(value);
591
+ break;
592
+ case 4:
593
+ var value = new proto.pulumirpc.codegen.Range;
594
+ reader.readMessage(value,proto.pulumirpc.codegen.Range.deserializeBinaryFromReader);
595
+ msg.setSubject(value);
596
+ break;
597
+ case 5:
598
+ var value = new proto.pulumirpc.codegen.Range;
599
+ reader.readMessage(value,proto.pulumirpc.codegen.Range.deserializeBinaryFromReader);
600
+ msg.setContext(value);
601
+ break;
602
+ default:
603
+ reader.skipField();
604
+ break;
605
+ }
606
+ }
607
+ return msg;
608
+ };
609
+
610
+
611
+ /**
612
+ * Serializes the message to binary data (in protobuf wire format).
613
+ * @return {!Uint8Array}
614
+ */
615
+ proto.pulumirpc.codegen.Diagnostic.prototype.serializeBinary = function() {
616
+ var writer = new jspb.BinaryWriter();
617
+ proto.pulumirpc.codegen.Diagnostic.serializeBinaryToWriter(this, writer);
618
+ return writer.getResultBuffer();
619
+ };
620
+
621
+
622
+ /**
623
+ * Serializes the given message to binary data (in protobuf wire
624
+ * format), writing to the given BinaryWriter.
625
+ * @param {!proto.pulumirpc.codegen.Diagnostic} message
626
+ * @param {!jspb.BinaryWriter} writer
627
+ * @suppress {unusedLocalVariables} f is only used for nested messages
628
+ */
629
+ proto.pulumirpc.codegen.Diagnostic.serializeBinaryToWriter = function(message, writer) {
630
+ var f = undefined;
631
+ f = message.getSeverity();
632
+ if (f !== 0.0) {
633
+ writer.writeEnum(
634
+ 1,
635
+ f
636
+ );
637
+ }
638
+ f = message.getSummary();
639
+ if (f.length > 0) {
640
+ writer.writeString(
641
+ 2,
642
+ f
643
+ );
644
+ }
645
+ f = message.getDetail();
646
+ if (f.length > 0) {
647
+ writer.writeString(
648
+ 3,
649
+ f
650
+ );
651
+ }
652
+ f = message.getSubject();
653
+ if (f != null) {
654
+ writer.writeMessage(
655
+ 4,
656
+ f,
657
+ proto.pulumirpc.codegen.Range.serializeBinaryToWriter
658
+ );
659
+ }
660
+ f = message.getContext();
661
+ if (f != null) {
662
+ writer.writeMessage(
663
+ 5,
664
+ f,
665
+ proto.pulumirpc.codegen.Range.serializeBinaryToWriter
666
+ );
667
+ }
668
+ };
669
+
670
+
671
+ /**
672
+ * optional DiagnosticSeverity severity = 1;
673
+ * @return {!proto.pulumirpc.codegen.DiagnosticSeverity}
674
+ */
675
+ proto.pulumirpc.codegen.Diagnostic.prototype.getSeverity = function() {
676
+ return /** @type {!proto.pulumirpc.codegen.DiagnosticSeverity} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
677
+ };
678
+
679
+
680
+ /**
681
+ * @param {!proto.pulumirpc.codegen.DiagnosticSeverity} value
682
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
683
+ */
684
+ proto.pulumirpc.codegen.Diagnostic.prototype.setSeverity = function(value) {
685
+ return jspb.Message.setProto3EnumField(this, 1, value);
686
+ };
687
+
688
+
689
+ /**
690
+ * optional string summary = 2;
691
+ * @return {string}
692
+ */
693
+ proto.pulumirpc.codegen.Diagnostic.prototype.getSummary = function() {
694
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
695
+ };
696
+
697
+
698
+ /**
699
+ * @param {string} value
700
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
701
+ */
702
+ proto.pulumirpc.codegen.Diagnostic.prototype.setSummary = function(value) {
703
+ return jspb.Message.setProto3StringField(this, 2, value);
704
+ };
705
+
706
+
707
+ /**
708
+ * optional string detail = 3;
709
+ * @return {string}
710
+ */
711
+ proto.pulumirpc.codegen.Diagnostic.prototype.getDetail = function() {
712
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
713
+ };
714
+
715
+
716
+ /**
717
+ * @param {string} value
718
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
719
+ */
720
+ proto.pulumirpc.codegen.Diagnostic.prototype.setDetail = function(value) {
721
+ return jspb.Message.setProto3StringField(this, 3, value);
722
+ };
723
+
724
+
725
+ /**
726
+ * optional Range subject = 4;
727
+ * @return {?proto.pulumirpc.codegen.Range}
728
+ */
729
+ proto.pulumirpc.codegen.Diagnostic.prototype.getSubject = function() {
730
+ return /** @type{?proto.pulumirpc.codegen.Range} */ (
731
+ jspb.Message.getWrapperField(this, proto.pulumirpc.codegen.Range, 4));
732
+ };
733
+
734
+
735
+ /**
736
+ * @param {?proto.pulumirpc.codegen.Range|undefined} value
737
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
738
+ */
739
+ proto.pulumirpc.codegen.Diagnostic.prototype.setSubject = function(value) {
740
+ return jspb.Message.setWrapperField(this, 4, value);
741
+ };
742
+
743
+
744
+ /**
745
+ * Clears the message field making it undefined.
746
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
747
+ */
748
+ proto.pulumirpc.codegen.Diagnostic.prototype.clearSubject = function() {
749
+ return this.setSubject(undefined);
750
+ };
751
+
752
+
753
+ /**
754
+ * Returns whether this field is set.
755
+ * @return {boolean}
756
+ */
757
+ proto.pulumirpc.codegen.Diagnostic.prototype.hasSubject = function() {
758
+ return jspb.Message.getField(this, 4) != null;
759
+ };
760
+
761
+
762
+ /**
763
+ * optional Range context = 5;
764
+ * @return {?proto.pulumirpc.codegen.Range}
765
+ */
766
+ proto.pulumirpc.codegen.Diagnostic.prototype.getContext = function() {
767
+ return /** @type{?proto.pulumirpc.codegen.Range} */ (
768
+ jspb.Message.getWrapperField(this, proto.pulumirpc.codegen.Range, 5));
769
+ };
770
+
771
+
772
+ /**
773
+ * @param {?proto.pulumirpc.codegen.Range|undefined} value
774
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
775
+ */
776
+ proto.pulumirpc.codegen.Diagnostic.prototype.setContext = function(value) {
777
+ return jspb.Message.setWrapperField(this, 5, value);
778
+ };
779
+
780
+
781
+ /**
782
+ * Clears the message field making it undefined.
783
+ * @return {!proto.pulumirpc.codegen.Diagnostic} returns this
784
+ */
785
+ proto.pulumirpc.codegen.Diagnostic.prototype.clearContext = function() {
786
+ return this.setContext(undefined);
787
+ };
788
+
789
+
790
+ /**
791
+ * Returns whether this field is set.
792
+ * @return {boolean}
793
+ */
794
+ proto.pulumirpc.codegen.Diagnostic.prototype.hasContext = function() {
795
+ return jspb.Message.getField(this, 5) != null;
796
+ };
797
+
798
+
799
+ /**
800
+ * @enum {number}
801
+ */
802
+ proto.pulumirpc.codegen.DiagnosticSeverity = {
803
+ DIAG_INVALID: 0,
804
+ DIAG_ERROR: 1,
805
+ DIAG_WARNING: 2
806
+ };
807
+
808
+ goog.object.extend(exports, proto.pulumirpc.codegen);