a222705143
### First-Class Providers These changes implement support for first-class providers. First-class providers are provider plugins that are exposed as resources via the Pulumi programming model so that they may be explicitly and multiply instantiated. Each instance of a provider resource may be configured differently, and configuration parameters may be source from the outputs of other resources. ### Provider Plugin Changes In order to accommodate the need to verify and diff provider configuration and configure providers without complete configuration information, these changes adjust the high-level provider plugin interface. Two new methods for validating a provider's configuration and diffing changes to the same have been added (`CheckConfig` and `DiffConfig`, respectively), and the type of the configuration bag accepted by `Configure` has been changed to a `PropertyMap`. These changes have not yet been reflected in the provider plugin gRPC interface. We will do this in a set of follow-up changes. Until then, these methods are implemented by adapters: - `CheckConfig` validates that all configuration parameters are string or unknown properties. This is necessary because existing plugins only accept string-typed configuration values. - `DiffConfig` either returns "never replace" if all configuration values are known or "must replace" if any configuration value is unknown. The justification for this behavior is given [here](https://github.com/pulumi/pulumi/pull/1695/files#diff-a6cd5c7f337665f5bb22e92ca5f07537R106) - `Configure` converts the config bag to a legacy config map and configures the provider plugin if all config values are known. If any config value is unknown, the underlying plugin is not configured and the provider may only perform `Check`, `Read`, and `Invoke`, all of which return empty results. We justify this behavior becuase it is only possible during a preview and provides the best experience we can manage with the existing gRPC interface. ### Resource Model Changes Providers are now exposed as resources that participate in a stack's dependency graph. Like other resources, they are explicitly created, may have multiple instances, and may have dependencies on other resources. Providers are referred to using provider references, which are a combination of the provider's URN and its ID. This design addresses the need during a preview to refer to providers that have not yet been physically created and therefore have no ID. All custom resources that are not themselves providers must specify a single provider via a provider reference. The named provider will be used to manage that resource's CRUD operations. If a resource's provider reference changes, the resource must be replaced. Though its URN is not present in the resource's dependency list, the provider should be treated as a dependency of the resource when topologically sorting the dependency graph. Finally, `Invoke` operations must now specify a provider to use for the invocation via a provider reference. ### Engine Changes First-class providers support requires a few changes to the engine: - The engine must have some way to map from provider references to provider plugins. It must be possible to add providers from a stack's checkpoint to this map and to register new/updated providers during the execution of a plan in response to CRUD operations on provider resources. - In order to support updating existing stacks using existing Pulumi programs that may not explicitly instantiate providers, the engine must be able to manage the "default" providers for each package referenced by a checkpoint or Pulumi program. The configuration for a "default" provider is taken from the stack's configuration data. The former need is addressed by adding a provider registry type that is responsible for managing all of the plugins required by a plan. In addition to loading plugins froma checkpoint and providing the ability to map from a provider reference to a provider plugin, this type serves as the provider plugin for providers themselves (i.e. it is the "provider provider"). The latter need is solved via two relatively self-contained changes to plan setup and the eval source. During plan setup, the old checkpoint is scanned for custom resources that do not have a provider reference in order to compute the set of packages that require a default provider. Once this set has been computed, the required default provider definitions are conjured and prepended to the checkpoint's resource list. Each resource that requires a default provider is then updated to refer to the default provider for its package. While an eval source is running, each custom resource registration, resource read, and invoke that does not name a provider is trapped before being returned by the source iterator. If no default provider for the appropriate package has been registered, the eval source synthesizes an appropriate registration, waits for it to complete, and records the registered provider's reference. This reference is injected into the original request, which is then processed as usual. If a default provider was already registered, the recorded reference is used and no new registration occurs. ### SDK Changes These changes only expose first-class providers from the Node.JS SDK. - A new abstract class, `ProviderResource`, can be subclassed and used to instantiate first-class providers. - A new field in `ResourceOptions`, `provider`, can be used to supply a particular provider instance to manage a `CustomResource`'s CRUD operations. - A new type, `InvokeOptions`, can be used to specify options that control the behavior of a call to `pulumi.runtime.invoke`. This type includes a `provider` field that is analogous to `ResourceOptions.provider`.
1399 lines
41 KiB
JavaScript
1399 lines
41 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 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');
|
|
var provider_pb = require('./provider_pb.js');
|
|
goog.exportSymbol('proto.pulumirpc.ReadResourceRequest', null, global);
|
|
goog.exportSymbol('proto.pulumirpc.ReadResourceResponse', null, global);
|
|
goog.exportSymbol('proto.pulumirpc.RegisterResourceOutputsRequest', null, global);
|
|
goog.exportSymbol('proto.pulumirpc.RegisterResourceRequest', null, global);
|
|
goog.exportSymbol('proto.pulumirpc.RegisterResourceResponse', 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.ReadResourceRequest = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.ReadResourceRequest.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.ReadResourceRequest, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.ReadResourceRequest.displayName = 'proto.pulumirpc.ReadResourceRequest';
|
|
}
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.repeatedFields_ = [6];
|
|
|
|
|
|
|
|
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.ReadResourceRequest.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.ReadResourceRequest.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.ReadResourceRequest} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
type: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
parent: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
properties: (f = msg.getProperties()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
|
|
dependenciesList: jspb.Message.getRepeatedField(msg, 6),
|
|
provider: jspb.Message.getFieldWithDefault(msg, 7, "")
|
|
};
|
|
|
|
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.ReadResourceRequest}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.ReadResourceRequest;
|
|
return proto.pulumirpc.ReadResourceRequest.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.ReadResourceRequest} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.ReadResourceRequest}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.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.setType(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setName(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setParent(value);
|
|
break;
|
|
case 5:
|
|
var value = new google_protobuf_struct_pb.Struct;
|
|
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
msg.setProperties(value);
|
|
break;
|
|
case 6:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.addDependencies(value);
|
|
break;
|
|
case 7:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setProvider(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.ReadResourceRequest.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.ReadResourceRequest} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getType();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getParent();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getProperties();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
5,
|
|
f,
|
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getDependenciesList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedString(
|
|
6,
|
|
f
|
|
);
|
|
}
|
|
f = message.getProvider();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
7,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string id = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setId = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string type = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getType = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setType = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string name = 3;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setName = function(value) {
|
|
jspb.Message.setProto3StringField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string parent = 4;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getParent = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setParent = function(value) {
|
|
jspb.Message.setProto3StringField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.protobuf.Struct properties = 5;
|
|
* @return {?proto.google.protobuf.Struct}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getProperties = function() {
|
|
return /** @type{?proto.google.protobuf.Struct} */ (
|
|
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5));
|
|
};
|
|
|
|
|
|
/** @param {?proto.google.protobuf.Struct|undefined} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setProperties = function(value) {
|
|
jspb.Message.setWrapperField(this, 5, value);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.ReadResourceRequest.prototype.clearProperties = function() {
|
|
this.setProperties(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.hasProperties = function() {
|
|
return jspb.Message.getField(this, 5) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated string dependencies = 6;
|
|
* @return {!Array.<string>}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getDependenciesList = function() {
|
|
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 6));
|
|
};
|
|
|
|
|
|
/** @param {!Array.<string>} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setDependenciesList = function(value) {
|
|
jspb.Message.setField(this, 6, value || []);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!string} value
|
|
* @param {number=} opt_index
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.addDependencies = function(value, opt_index) {
|
|
jspb.Message.addToRepeatedField(this, 6, value, opt_index);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.ReadResourceRequest.prototype.clearDependenciesList = function() {
|
|
this.setDependenciesList([]);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string provider = 7;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceRequest.prototype.getProvider = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceRequest.prototype.setProvider = function(value) {
|
|
jspb.Message.setProto3StringField(this, 7, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* 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.ReadResourceResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.ReadResourceResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.ReadResourceResponse.displayName = 'proto.pulumirpc.ReadResourceResponse';
|
|
}
|
|
|
|
|
|
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.ReadResourceResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.ReadResourceResponse.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.ReadResourceResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
urn: 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.ReadResourceResponse}
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.ReadResourceResponse;
|
|
return proto.pulumirpc.ReadResourceResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.ReadResourceResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.ReadResourceResponse}
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.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.setUrn(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.ReadResourceResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.ReadResourceResponse.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.ReadResourceResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getUrn();
|
|
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 urn = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.prototype.getUrn = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.ReadResourceResponse.prototype.setUrn = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.protobuf.Struct properties = 2;
|
|
* @return {?proto.google.protobuf.Struct}
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.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.ReadResourceResponse.prototype.setProperties = function(value) {
|
|
jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.ReadResourceResponse.prototype.clearProperties = function() {
|
|
this.setProperties(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.pulumirpc.ReadResourceResponse.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.RegisterResourceRequest = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.RegisterResourceRequest.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.RegisterResourceRequest, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.RegisterResourceRequest.displayName = 'proto.pulumirpc.RegisterResourceRequest';
|
|
}
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.repeatedFields_ = [7];
|
|
|
|
|
|
|
|
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.RegisterResourceRequest.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.RegisterResourceRequest.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.RegisterResourceRequest} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
type: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
parent: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
custom: jspb.Message.getFieldWithDefault(msg, 4, false),
|
|
object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
|
|
protect: jspb.Message.getFieldWithDefault(msg, 6, false),
|
|
dependenciesList: jspb.Message.getRepeatedField(msg, 7),
|
|
provider: jspb.Message.getFieldWithDefault(msg, 8, "")
|
|
};
|
|
|
|
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.RegisterResourceRequest}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.RegisterResourceRequest;
|
|
return proto.pulumirpc.RegisterResourceRequest.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.RegisterResourceRequest} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.RegisterResourceRequest}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.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 = /** @type {string} */ (reader.readString());
|
|
msg.setName(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setParent(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setCustom(value);
|
|
break;
|
|
case 5:
|
|
var value = new google_protobuf_struct_pb.Struct;
|
|
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
msg.setObject(value);
|
|
break;
|
|
case 6:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setProtect(value);
|
|
break;
|
|
case 7:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.addDependencies(value);
|
|
break;
|
|
case 8:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setProvider(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.RegisterResourceRequest.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.RegisterResourceRequest} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getType();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getParent();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getCustom();
|
|
if (f) {
|
|
writer.writeBool(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getObject();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
5,
|
|
f,
|
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getProtect();
|
|
if (f) {
|
|
writer.writeBool(
|
|
6,
|
|
f
|
|
);
|
|
}
|
|
f = message.getDependenciesList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedString(
|
|
7,
|
|
f
|
|
);
|
|
}
|
|
f = message.getProvider();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
8,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string type = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getType = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setType = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string name = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setName = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string parent = 3;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getParent = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setParent = function(value) {
|
|
jspb.Message.setProto3StringField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool custom = 4;
|
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
|
* @return {boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getCustom = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false));
|
|
};
|
|
|
|
|
|
/** @param {boolean} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setCustom = function(value) {
|
|
jspb.Message.setProto3BooleanField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.protobuf.Struct object = 5;
|
|
* @return {?proto.google.protobuf.Struct}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getObject = function() {
|
|
return /** @type{?proto.google.protobuf.Struct} */ (
|
|
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5));
|
|
};
|
|
|
|
|
|
/** @param {?proto.google.protobuf.Struct|undefined} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setObject = function(value) {
|
|
jspb.Message.setWrapperField(this, 5, value);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.clearObject = function() {
|
|
this.setObject(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.hasObject = function() {
|
|
return jspb.Message.getField(this, 5) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool protect = 6;
|
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
|
* @return {boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getProtect = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false));
|
|
};
|
|
|
|
|
|
/** @param {boolean} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setProtect = function(value) {
|
|
jspb.Message.setProto3BooleanField(this, 6, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated string dependencies = 7;
|
|
* @return {!Array.<string>}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getDependenciesList = function() {
|
|
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 7));
|
|
};
|
|
|
|
|
|
/** @param {!Array.<string>} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setDependenciesList = function(value) {
|
|
jspb.Message.setField(this, 7, value || []);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!string} value
|
|
* @param {number=} opt_index
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.addDependencies = function(value, opt_index) {
|
|
jspb.Message.addToRepeatedField(this, 7, value, opt_index);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.clearDependenciesList = function() {
|
|
this.setDependenciesList([]);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string provider = 8;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.getProvider = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceRequest.prototype.setProvider = function(value) {
|
|
jspb.Message.setProto3StringField(this, 8, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* 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.RegisterResourceResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.pulumirpc.RegisterResourceResponse.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.RegisterResourceResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.RegisterResourceResponse.displayName = 'proto.pulumirpc.RegisterResourceResponse';
|
|
}
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.repeatedFields_ = [5];
|
|
|
|
|
|
|
|
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.RegisterResourceResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.RegisterResourceResponse.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.RegisterResourceResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
urn: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
object: (f = msg.getObject()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
|
|
stable: jspb.Message.getFieldWithDefault(msg, 4, false),
|
|
stablesList: jspb.Message.getRepeatedField(msg, 5)
|
|
};
|
|
|
|
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.RegisterResourceResponse}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.RegisterResourceResponse;
|
|
return proto.pulumirpc.RegisterResourceResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.RegisterResourceResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.RegisterResourceResponse}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.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.setUrn(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setId(value);
|
|
break;
|
|
case 3:
|
|
var value = new google_protobuf_struct_pb.Struct;
|
|
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
msg.setObject(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setStable(value);
|
|
break;
|
|
case 5:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.addStables(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.RegisterResourceResponse.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.RegisterResourceResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getUrn();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getObject();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getStable();
|
|
if (f) {
|
|
writer.writeBool(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getStablesList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedString(
|
|
5,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string urn = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.getUrn = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.setUrn = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string id = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.getId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.setId = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.protobuf.Struct object = 3;
|
|
* @return {?proto.google.protobuf.Struct}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.getObject = function() {
|
|
return /** @type{?proto.google.protobuf.Struct} */ (
|
|
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3));
|
|
};
|
|
|
|
|
|
/** @param {?proto.google.protobuf.Struct|undefined} value */
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.setObject = function(value) {
|
|
jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.clearObject = function() {
|
|
this.setObject(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.hasObject = function() {
|
|
return jspb.Message.getField(this, 3) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool stable = 4;
|
|
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
|
|
* You should avoid comparisons like {@code val === true/false} in those cases.
|
|
* @return {boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.getStable = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false));
|
|
};
|
|
|
|
|
|
/** @param {boolean} value */
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.setStable = function(value) {
|
|
jspb.Message.setProto3BooleanField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated string stables = 5;
|
|
* @return {!Array.<string>}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.getStablesList = function() {
|
|
return /** @type {!Array.<string>} */ (jspb.Message.getRepeatedField(this, 5));
|
|
};
|
|
|
|
|
|
/** @param {!Array.<string>} value */
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.setStablesList = function(value) {
|
|
jspb.Message.setField(this, 5, value || []);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!string} value
|
|
* @param {number=} opt_index
|
|
*/
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.addStables = function(value, opt_index) {
|
|
jspb.Message.addToRepeatedField(this, 5, value, opt_index);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.RegisterResourceResponse.prototype.clearStablesList = function() {
|
|
this.setStablesList([]);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* 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.RegisterResourceOutputsRequest = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.pulumirpc.RegisterResourceOutputsRequest, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.displayName = 'proto.pulumirpc.RegisterResourceOutputsRequest';
|
|
}
|
|
|
|
|
|
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.RegisterResourceOutputsRequest.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.pulumirpc.RegisterResourceOutputsRequest.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.RegisterResourceOutputsRequest} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
urn: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
outputs: (f = msg.getOutputs()) && 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.RegisterResourceOutputsRequest}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.pulumirpc.RegisterResourceOutputsRequest;
|
|
return proto.pulumirpc.RegisterResourceOutputsRequest.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.pulumirpc.RegisterResourceOutputsRequest} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.pulumirpc.RegisterResourceOutputsRequest}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.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.setUrn(value);
|
|
break;
|
|
case 2:
|
|
var value = new google_protobuf_struct_pb.Struct;
|
|
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
|
|
msg.setOutputs(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.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.RegisterResourceOutputsRequest} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getUrn();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getOutputs();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string urn = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.getUrn = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.setUrn = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.protobuf.Struct outputs = 2;
|
|
* @return {?proto.google.protobuf.Struct}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.getOutputs = 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.RegisterResourceOutputsRequest.prototype.setOutputs = function(value) {
|
|
jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.clearOutputs = function() {
|
|
this.setOutputs(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {!boolean}
|
|
*/
|
|
proto.pulumirpc.RegisterResourceOutputsRequest.prototype.hasOutputs = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.pulumirpc);
|