pulumi/sdk/nodejs/proto/analyzer_pb.js
2019-06-13 16:04:13 -07:00

655 lines
20 KiB
JavaScript

/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var proto = { pulumirpc: {} }, global = proto;
var plugin_pb = require('./plugin_pb.js');
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.exportSymbol('proto.pulumirpc.AnalyzeDiagnostic', null, global);
goog.exportSymbol('proto.pulumirpc.AnalyzeDiagnostic.LogSeverity', null, global);
goog.exportSymbol('proto.pulumirpc.AnalyzeRequest', null, global);
goog.exportSymbol('proto.pulumirpc.AnalyzeResponse', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.AnalyzeRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pulumirpc.AnalyzeRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.AnalyzeRequest.displayName = 'proto.pulumirpc.AnalyzeRequest';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.AnalyzeRequest.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.AnalyzeRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.AnalyzeRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeRequest.toObject = function(includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.AnalyzeRequest}
*/
proto.pulumirpc.AnalyzeRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.AnalyzeRequest;
return proto.pulumirpc.AnalyzeRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.AnalyzeRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.AnalyzeRequest}
*/
proto.pulumirpc.AnalyzeRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setType(value);
break;
case 2:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setProperties(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.AnalyzeRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.AnalyzeRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.AnalyzeRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getType();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getProperties();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
};
/**
* optional string type = 1;
* @return {string}
*/
proto.pulumirpc.AnalyzeRequest.prototype.getType = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.pulumirpc.AnalyzeRequest.prototype.setType = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional google.protobuf.Struct properties = 2;
* @return {?proto.google.protobuf.Struct}
*/
proto.pulumirpc.AnalyzeRequest.prototype.getProperties = function() {
return /** @type{?proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2));
};
/** @param {?proto.google.protobuf.Struct|undefined} value */
proto.pulumirpc.AnalyzeRequest.prototype.setProperties = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.pulumirpc.AnalyzeRequest.prototype.clearProperties = function() {
this.setProperties(undefined);
};
/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.pulumirpc.AnalyzeRequest.prototype.hasProperties = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.AnalyzeResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.AnalyzeResponse.repeatedFields_, null);
};
goog.inherits(proto.pulumirpc.AnalyzeResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.AnalyzeResponse.displayName = 'proto.pulumirpc.AnalyzeResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.pulumirpc.AnalyzeResponse.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.AnalyzeResponse.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.AnalyzeResponse.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.AnalyzeResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeResponse.toObject = function(includeInstance, msg) {
var f, obj = {
diagnosticsList: jspb.Message.toObjectList(msg.getDiagnosticsList(),
proto.pulumirpc.AnalyzeDiagnostic.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.AnalyzeResponse}
*/
proto.pulumirpc.AnalyzeResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.AnalyzeResponse;
return proto.pulumirpc.AnalyzeResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.AnalyzeResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.AnalyzeResponse}
*/
proto.pulumirpc.AnalyzeResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new proto.pulumirpc.AnalyzeDiagnostic;
reader.readMessage(value,proto.pulumirpc.AnalyzeDiagnostic.deserializeBinaryFromReader);
msg.addDiagnostics(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.AnalyzeResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.AnalyzeResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.AnalyzeResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDiagnosticsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.pulumirpc.AnalyzeDiagnostic.serializeBinaryToWriter
);
}
};
/**
* repeated AnalyzeDiagnostic diagnostics = 2;
* @return {!Array.<!proto.pulumirpc.AnalyzeDiagnostic>}
*/
proto.pulumirpc.AnalyzeResponse.prototype.getDiagnosticsList = function() {
return /** @type{!Array.<!proto.pulumirpc.AnalyzeDiagnostic>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.AnalyzeDiagnostic, 2));
};
/** @param {!Array.<!proto.pulumirpc.AnalyzeDiagnostic>} value */
proto.pulumirpc.AnalyzeResponse.prototype.setDiagnosticsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.pulumirpc.AnalyzeDiagnostic=} opt_value
* @param {number=} opt_index
* @return {!proto.pulumirpc.AnalyzeDiagnostic}
*/
proto.pulumirpc.AnalyzeResponse.prototype.addDiagnostics = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pulumirpc.AnalyzeDiagnostic, opt_index);
};
proto.pulumirpc.AnalyzeResponse.prototype.clearDiagnosticsList = function() {
this.setDiagnosticsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.pulumirpc.AnalyzeDiagnostic = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.AnalyzeDiagnostic.repeatedFields_, null);
};
goog.inherits(proto.pulumirpc.AnalyzeDiagnostic, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.pulumirpc.AnalyzeDiagnostic.displayName = 'proto.pulumirpc.AnalyzeDiagnostic';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.pulumirpc.AnalyzeDiagnostic.repeatedFields_ = [4];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.toObject = function(opt_includeInstance) {
return proto.pulumirpc.AnalyzeDiagnostic.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.pulumirpc.AnalyzeDiagnostic} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeDiagnostic.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
message: jspb.Message.getFieldWithDefault(msg, 3, ""),
tagsList: jspb.Message.getRepeatedField(msg, 4),
enforcementlevel: jspb.Message.getFieldWithDefault(msg, 5, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pulumirpc.AnalyzeDiagnostic}
*/
proto.pulumirpc.AnalyzeDiagnostic.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pulumirpc.AnalyzeDiagnostic;
return proto.pulumirpc.AnalyzeDiagnostic.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pulumirpc.AnalyzeDiagnostic} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pulumirpc.AnalyzeDiagnostic}
*/
proto.pulumirpc.AnalyzeDiagnostic.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.addTags(value);
break;
case 5:
var value = /** @type {!proto.pulumirpc.AnalyzeDiagnostic.LogSeverity} */ (reader.readEnum());
msg.setEnforcementlevel(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pulumirpc.AnalyzeDiagnostic.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pulumirpc.AnalyzeDiagnostic} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pulumirpc.AnalyzeDiagnostic.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getTagsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
f = message.getEnforcementlevel();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
};
/**
* @enum {number}
*/
proto.pulumirpc.AnalyzeDiagnostic.LogSeverity = {
WARNING: 0,
MANDATORY: 2
};
/**
* optional string id = 1;
* @return {string}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.pulumirpc.AnalyzeDiagnostic.prototype.setId = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.pulumirpc.AnalyzeDiagnostic.prototype.setDescription = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string message = 3;
* @return {string}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.pulumirpc.AnalyzeDiagnostic.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* repeated string tags = 4;
* @return {!Array.<string>}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.getTagsList = function() {
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/** @param {!Array.<string>} value */
proto.pulumirpc.AnalyzeDiagnostic.prototype.setTagsList = function(value) {
jspb.Message.setField(this, 4, value || []);
};
/**
* @param {!string} value
* @param {number=} opt_index
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.addTags = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
proto.pulumirpc.AnalyzeDiagnostic.prototype.clearTagsList = function() {
this.setTagsList([]);
};
/**
* optional LogSeverity enforcementLevel = 5;
* @return {!proto.pulumirpc.AnalyzeDiagnostic.LogSeverity}
*/
proto.pulumirpc.AnalyzeDiagnostic.prototype.getEnforcementlevel = function() {
return /** @type {!proto.pulumirpc.AnalyzeDiagnostic.LogSeverity} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {!proto.pulumirpc.AnalyzeDiagnostic.LogSeverity} value */
proto.pulumirpc.AnalyzeDiagnostic.prototype.setEnforcementlevel = function(value) {
jspb.Message.setProto3EnumField(this, 5, value);
};
goog.object.extend(exports, proto.pulumirpc);