Skip to content

Commit b693142

Browse files
committed
Re-add ServiceID for old provider store in state
1 parent 026e332 commit b693142

File tree

3 files changed

+213
-1
lines changed

3 files changed

+213
-1
lines changed

io/defang/v1/fabric.proto

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,13 @@ enum Platform {
399399
LINUX_ANY = 2;
400400
}
401401

402-
message GetRequest { // was GetRequest
402+
message GetRequest { // was ServiceID
403+
string name = 1;
404+
string project = 2;
405+
}
406+
407+
message ServiceID {
408+
option deprecated = true; // still used by the old pulumi-defang provider
403409
string name = 1;
404410
string project = 2;
405411
}

protos/io/defang/v1/fabric_pb.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,30 @@ export namespace GetRequest {
12501250
}
12511251
}
12521252

1253+
export class ServiceID extends jspb.Message {
1254+
getName(): string;
1255+
setName(value: string): void;
1256+
1257+
getProject(): string;
1258+
setProject(value: string): void;
1259+
1260+
serializeBinary(): Uint8Array;
1261+
toObject(includeInstance?: boolean): ServiceID.AsObject;
1262+
static toObject(includeInstance: boolean, msg: ServiceID): ServiceID.AsObject;
1263+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
1264+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
1265+
static serializeBinaryToWriter(message: ServiceID, writer: jspb.BinaryWriter): void;
1266+
static deserializeBinary(bytes: Uint8Array): ServiceID;
1267+
static deserializeBinaryFromReader(message: ServiceID, reader: jspb.BinaryReader): ServiceID;
1268+
}
1269+
1270+
export namespace ServiceID {
1271+
export type AsObject = {
1272+
name: string,
1273+
project: string,
1274+
}
1275+
}
1276+
12531277
export class Device extends jspb.Message {
12541278
clearCapabilitiesList(): void;
12551279
getCapabilitiesList(): Array<string>;

protos/io/defang/v1/fabric_pb.js

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ goog.exportSymbol('proto.io.defang.v1.Secret', null, global);
7878
goog.exportSymbol('proto.io.defang.v1.SecretValue', null, global);
7979
goog.exportSymbol('proto.io.defang.v1.Secrets', null, global);
8080
goog.exportSymbol('proto.io.defang.v1.Service', null, global);
81+
goog.exportSymbol('proto.io.defang.v1.ServiceID', null, global);
8182
goog.exportSymbol('proto.io.defang.v1.ServiceInfo', null, global);
8283
goog.exportSymbol('proto.io.defang.v1.ServiceState', null, global);
8384
goog.exportSymbol('proto.io.defang.v1.SetSelectedProviderRequest', null, global);
@@ -1000,6 +1001,27 @@ if (goog.DEBUG && !COMPILED) {
10001001
*/
10011002
proto.io.defang.v1.GetRequest.displayName = 'proto.io.defang.v1.GetRequest';
10021003
}
1004+
/**
1005+
* Generated by JsPbCodeGenerator.
1006+
* @param {Array=} opt_data Optional initial data array, typically from a
1007+
* server response, or constructed directly in Javascript. The array is used
1008+
* in place and becomes part of the constructed object. It is not cloned.
1009+
* If no data is provided, the constructed object will be empty, but still
1010+
* valid.
1011+
* @extends {jspb.Message}
1012+
* @constructor
1013+
*/
1014+
proto.io.defang.v1.ServiceID = function(opt_data) {
1015+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1016+
};
1017+
goog.inherits(proto.io.defang.v1.ServiceID, jspb.Message);
1018+
if (goog.DEBUG && !COMPILED) {
1019+
/**
1020+
* @public
1021+
* @override
1022+
*/
1023+
proto.io.defang.v1.ServiceID.displayName = 'proto.io.defang.v1.ServiceID';
1024+
}
10031025
/**
10041026
* Generated by JsPbCodeGenerator.
10051027
* @param {Array=} opt_data Optional initial data array, typically from a
@@ -10240,6 +10262,166 @@ proto.io.defang.v1.GetRequest.prototype.setProject = function(value) {
1024010262

1024110263

1024210264

10265+
10266+
10267+
if (jspb.Message.GENERATE_TO_OBJECT) {
10268+
/**
10269+
* Creates an object representation of this proto.
10270+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
10271+
* Optional fields that are not set will be set to undefined.
10272+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10273+
* For the list of reserved names please see:
10274+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
10275+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
10276+
* JSPB instance for transitional soy proto support:
10277+
* http://goto/soy-param-migration
10278+
* @return {!Object}
10279+
*/
10280+
proto.io.defang.v1.ServiceID.prototype.toObject = function(opt_includeInstance) {
10281+
return proto.io.defang.v1.ServiceID.toObject(opt_includeInstance, this);
10282+
};
10283+
10284+
10285+
/**
10286+
* Static version of the {@see toObject} method.
10287+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
10288+
* the JSPB instance for transitional soy proto support:
10289+
* http://goto/soy-param-migration
10290+
* @param {!proto.io.defang.v1.ServiceID} msg The msg instance to transform.
10291+
* @return {!Object}
10292+
* @suppress {unusedLocalVariables} f is only used for nested messages
10293+
*/
10294+
proto.io.defang.v1.ServiceID.toObject = function(includeInstance, msg) {
10295+
var f, obj = {
10296+
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
10297+
project: jspb.Message.getFieldWithDefault(msg, 2, "")
10298+
};
10299+
10300+
if (includeInstance) {
10301+
obj.$jspbMessageInstance = msg;
10302+
}
10303+
return obj;
10304+
};
10305+
}
10306+
10307+
10308+
/**
10309+
* Deserializes binary data (in protobuf wire format).
10310+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
10311+
* @return {!proto.io.defang.v1.ServiceID}
10312+
*/
10313+
proto.io.defang.v1.ServiceID.deserializeBinary = function(bytes) {
10314+
var reader = new jspb.BinaryReader(bytes);
10315+
var msg = new proto.io.defang.v1.ServiceID;
10316+
return proto.io.defang.v1.ServiceID.deserializeBinaryFromReader(msg, reader);
10317+
};
10318+
10319+
10320+
/**
10321+
* Deserializes binary data (in protobuf wire format) from the
10322+
* given reader into the given message object.
10323+
* @param {!proto.io.defang.v1.ServiceID} msg The message object to deserialize into.
10324+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
10325+
* @return {!proto.io.defang.v1.ServiceID}
10326+
*/
10327+
proto.io.defang.v1.ServiceID.deserializeBinaryFromReader = function(msg, reader) {
10328+
while (reader.nextField()) {
10329+
if (reader.isEndGroup()) {
10330+
break;
10331+
}
10332+
var field = reader.getFieldNumber();
10333+
switch (field) {
10334+
case 1:
10335+
var value = /** @type {string} */ (reader.readString());
10336+
msg.setName(value);
10337+
break;
10338+
case 2:
10339+
var value = /** @type {string} */ (reader.readString());
10340+
msg.setProject(value);
10341+
break;
10342+
default:
10343+
reader.skipField();
10344+
break;
10345+
}
10346+
}
10347+
return msg;
10348+
};
10349+
10350+
10351+
/**
10352+
* Serializes the message to binary data (in protobuf wire format).
10353+
* @return {!Uint8Array}
10354+
*/
10355+
proto.io.defang.v1.ServiceID.prototype.serializeBinary = function() {
10356+
var writer = new jspb.BinaryWriter();
10357+
proto.io.defang.v1.ServiceID.serializeBinaryToWriter(this, writer);
10358+
return writer.getResultBuffer();
10359+
};
10360+
10361+
10362+
/**
10363+
* Serializes the given message to binary data (in protobuf wire
10364+
* format), writing to the given BinaryWriter.
10365+
* @param {!proto.io.defang.v1.ServiceID} message
10366+
* @param {!jspb.BinaryWriter} writer
10367+
* @suppress {unusedLocalVariables} f is only used for nested messages
10368+
*/
10369+
proto.io.defang.v1.ServiceID.serializeBinaryToWriter = function(message, writer) {
10370+
var f = undefined;
10371+
f = message.getName();
10372+
if (f.length > 0) {
10373+
writer.writeString(
10374+
1,
10375+
f
10376+
);
10377+
}
10378+
f = message.getProject();
10379+
if (f.length > 0) {
10380+
writer.writeString(
10381+
2,
10382+
f
10383+
);
10384+
}
10385+
};
10386+
10387+
10388+
/**
10389+
* optional string name = 1;
10390+
* @return {string}
10391+
*/
10392+
proto.io.defang.v1.ServiceID.prototype.getName = function() {
10393+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
10394+
};
10395+
10396+
10397+
/**
10398+
* @param {string} value
10399+
* @return {!proto.io.defang.v1.ServiceID} returns this
10400+
*/
10401+
proto.io.defang.v1.ServiceID.prototype.setName = function(value) {
10402+
return jspb.Message.setProto3StringField(this, 1, value);
10403+
};
10404+
10405+
10406+
/**
10407+
* optional string project = 2;
10408+
* @return {string}
10409+
*/
10410+
proto.io.defang.v1.ServiceID.prototype.getProject = function() {
10411+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
10412+
};
10413+
10414+
10415+
/**
10416+
* @param {string} value
10417+
* @return {!proto.io.defang.v1.ServiceID} returns this
10418+
*/
10419+
proto.io.defang.v1.ServiceID.prototype.setProject = function(value) {
10420+
return jspb.Message.setProto3StringField(this, 2, value);
10421+
};
10422+
10423+
10424+
1024310425
/**
1024410426
* List of repeated fields within this message type.
1024510427
* @private {!Array<number>}

0 commit comments

Comments
 (0)