Skip to content

Commit

Permalink
[RSDK-8921] Add extra field to DiscoveryQuery (#562)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
hexbabe and github-actions[bot] authored Oct 11, 2024
1 parent 9c47f4c commit ee61810
Show file tree
Hide file tree
Showing 9 changed files with 502 additions and 432 deletions.
10 changes: 5 additions & 5 deletions component/generic/v1/generic.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/inputcontroller/v1/input_controller.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/posetracker/v1/pose_tracker.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/servo/v1/servo.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions gen/js/robot/v1/robot_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ export class DiscoveryQuery extends jspb.Message {
getModel(): string;
setModel(value: string): void;

hasExtra(): boolean;
clearExtra(): void;
getExtra(): google_protobuf_struct_pb.Struct | undefined;
setExtra(value?: google_protobuf_struct_pb.Struct): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DiscoveryQuery.AsObject;
static toObject(includeInstance: boolean, msg: DiscoveryQuery): DiscoveryQuery.AsObject;
Expand All @@ -557,6 +562,7 @@ export namespace DiscoveryQuery {
export type AsObject = {
subtype: string,
model: string,
extra?: google_protobuf_struct_pb.Struct.AsObject,
}
}

Expand Down
53 changes: 52 additions & 1 deletion gen/js/robot/v1/robot_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4913,7 +4913,8 @@ proto.viam.robot.v1.DiscoveryQuery.prototype.toObject = function(opt_includeInst
proto.viam.robot.v1.DiscoveryQuery.toObject = function(includeInstance, msg) {
var f, obj = {
subtype: jspb.Message.getFieldWithDefault(msg, 1, ""),
model: jspb.Message.getFieldWithDefault(msg, 2, "")
model: jspb.Message.getFieldWithDefault(msg, 2, ""),
extra: (f = msg.getExtra()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -4958,6 +4959,11 @@ proto.viam.robot.v1.DiscoveryQuery.deserializeBinaryFromReader = function(msg, r
var value = /** @type {string} */ (reader.readString());
msg.setModel(value);
break;
case 99:
var value = new google_protobuf_struct_pb.Struct;
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
msg.setExtra(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -5001,6 +5007,14 @@ proto.viam.robot.v1.DiscoveryQuery.serializeBinaryToWriter = function(message, w
f
);
}
f = message.getExtra();
if (f != null) {
writer.writeMessage(
99,
f,
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -5040,6 +5054,43 @@ proto.viam.robot.v1.DiscoveryQuery.prototype.setModel = function(value) {
};


/**
* optional google.protobuf.Struct extra = 99;
* @return {?proto.google.protobuf.Struct}
*/
proto.viam.robot.v1.DiscoveryQuery.prototype.getExtra = function() {
return /** @type{?proto.google.protobuf.Struct} */ (
jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 99));
};


/**
* @param {?proto.google.protobuf.Struct|undefined} value
* @return {!proto.viam.robot.v1.DiscoveryQuery} returns this
*/
proto.viam.robot.v1.DiscoveryQuery.prototype.setExtra = function(value) {
return jspb.Message.setWrapperField(this, 99, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.viam.robot.v1.DiscoveryQuery} returns this
*/
proto.viam.robot.v1.DiscoveryQuery.prototype.clearExtra = function() {
return this.setExtra(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.viam.robot.v1.DiscoveryQuery.prototype.hasExtra = function() {
return jspb.Message.getField(this, 99) != null;
};





Expand Down
1 change: 1 addition & 0 deletions proto/viam/robot/v1/robot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ message GetSessionsResponse {
message DiscoveryQuery {
string subtype = 1;
string model = 2;
google.protobuf.Struct extra = 99;
}

message Discovery {
Expand Down
Loading

0 comments on commit ee61810

Please sign in to comment.