This change includes a lot more functionality. Enough to actually run the webserver-py example through previews, updates, and destroys! * Actually wire up the gRPC connections to the engine/monitor. * Move the Node.js and Python generated Protobuf/gRPC files underneath the actual SDK directories to simplify this generally. No more copying during `make` and, in fact, this was required to give a smoother experience with good packages/modules for the Python's SDK development. * Build the Python egg during `make build`. * Add support for program stacks. Just like with the Node.js runtime, we will auto-parent any resources without explicit parents to a single top-level resource component. * Add support for component resource output properties. * Add get_project() and get_stack() functions for retrieving the current project and stack names. * Properly use UNKNOWN sentinels. * Add a set_outputs() function on Resource. This is defined by the code-generator and allows custom logic for output property setting. This is cleaner than the way we do this in Node.js, and gives us a way to ensure that output properties are "real" properties, complete with member documentation. This also gives us a hook to perform name demangling, which the code-generator typically controls anyway. * Add package dependencies to setuptools.py and requirements.txt.
543 lines
17 KiB
JavaScript
543 lines
17 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 global = Function('return this')();
|
|
|
|
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.AnalyzeFailure', 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_ = [1];
|
|
|
|
|
|
|
|
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 = {
|
|
failuresList: jspb.Message.toObjectList(msg.getFailuresList(),
|
|
proto.pulumirpc.AnalyzeFailure.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 1:
|
|
var value = new proto.pulumirpc.AnalyzeFailure;
|
|
reader.readMessage(value,proto.pulumirpc.AnalyzeFailure.deserializeBinaryFromReader);
|
|
msg.addFailures(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.getFailuresList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedMessage(
|
|
1,
|
|
f,
|
|
proto.pulumirpc.AnalyzeFailure.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated AnalyzeFailure failures = 1;
|
|
* @return {!Array.<!proto.pulumirpc.AnalyzeFailure>}
|
|
*/
|
|
proto.pulumirpc.AnalyzeResponse.prototype.getFailuresList = function() {
|
|
return /** @type{!Array.<!proto.pulumirpc.AnalyzeFailure>} */ (
|
|
jspb.Message.getRepeatedWrapperField(this, proto.pulumirpc.AnalyzeFailure, 1));
|
|
};
|
|
|
|
|
|
/** @param {!Array.<!proto.pulumirpc.AnalyzeFailure>} value */
|
|
proto.pulumirpc.AnalyzeResponse.prototype.setFailuresList = function(value) {
|
|
jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.pulumirpc.AnalyzeFailure=} opt_value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.pulumirpc.AnalyzeFailure}
|
|
*/
|
|
proto.pulumirpc.AnalyzeResponse.prototype.addFailures = function(opt_value, opt_index) {
|
|
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pulumirpc.AnalyzeFailure, opt_index);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.AnalyzeResponse.prototype.clearFailuresList = function() {
|
|
this.setFailuresList([]);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* 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.AnalyzeFailure = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.AnalyzeFailure, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.AnalyzeFailure.displayName = 'proto.pulumirpc.AnalyzeFailure';
|
|
}
|
|
|
|
|
|
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.AnalyzeFailure.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.AnalyzeFailure.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.AnalyzeFailure} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
property: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
reason: jspb.Message.getFieldWithDefault(msg, 2, "")
|
|
};
|
|
|
|
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.AnalyzeFailure}
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.AnalyzeFailure;
|
|
return proto.pulumirpc.AnalyzeFailure.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.AnalyzeFailure} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.AnalyzeFailure}
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.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.setProperty(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setReason(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.AnalyzeFailure.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.AnalyzeFailure} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getProperty();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getReason();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string property = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.prototype.getProperty = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.AnalyzeFailure.prototype.setProperty = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string reason = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.AnalyzeFailure.prototype.getReason = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.AnalyzeFailure.prototype.setReason = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.pulumirpc);
|