Skip to content

Commit

Permalink
add last updated to fragment proto (#540)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pranav Puranam <pranav.puranam@gmail.com>
  • Loading branch information
2 people authored and abe-winter committed Aug 14, 2024
1 parent ca63408 commit 4c89137
Show file tree
Hide file tree
Showing 6 changed files with 2,075 additions and 1,926 deletions.
3,859 changes: 1,945 additions & 1,914 deletions app/v1/app.pb.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions component/audioinput/v1/audioinput.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.

12 changes: 12 additions & 0 deletions gen/js/app/v1/app_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ export class RobotPart extends jspb.Message {
setSecretsList(value: Array<SharedSecret>): void;
addSecrets(value?: SharedSecret, index?: number): SharedSecret;

hasLastUpdated(): boolean;
clearLastUpdated(): void;
getLastUpdated(): google_protobuf_timestamp_pb.Timestamp | undefined;
setLastUpdated(value?: google_protobuf_timestamp_pb.Timestamp): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RobotPart.AsObject;
static toObject(includeInstance: boolean, msg: RobotPart): RobotPart.AsObject;
Expand All @@ -128,6 +133,7 @@ export namespace RobotPart {
localFqdn: string,
createdOn?: google_protobuf_timestamp_pb.Timestamp.AsObject,
secretsList: Array<SharedSecret.AsObject>,
lastUpdated?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}

Expand Down Expand Up @@ -2187,6 +2193,11 @@ export class Fragment extends jspb.Message {
getVisibility(): FragmentVisibilityMap[keyof FragmentVisibilityMap];
setVisibility(value: FragmentVisibilityMap[keyof FragmentVisibilityMap]): void;

hasLastUpdated(): boolean;
clearLastUpdated(): void;
getLastUpdated(): google_protobuf_timestamp_pb.Timestamp | undefined;
setLastUpdated(value?: google_protobuf_timestamp_pb.Timestamp): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Fragment.AsObject;
static toObject(includeInstance: boolean, msg: Fragment): Fragment.AsObject;
Expand All @@ -2210,6 +2221,7 @@ export namespace Fragment {
organizationCount: number,
onlyUsedByOwner: boolean,
visibility: FragmentVisibilityMap[keyof FragmentVisibilityMap],
lastUpdated?: google_protobuf_timestamp_pb.Timestamp.AsObject,
}
}

Expand Down
106 changes: 104 additions & 2 deletions gen/js/app/v1/app_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4317,7 +4317,8 @@ proto.viam.app.v1.RobotPart.toObject = function(includeInstance, msg) {
localFqdn: jspb.Message.getFieldWithDefault(msg, 11, ""),
createdOn: (f = msg.getCreatedOn()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
secretsList: jspb.Message.toObjectList(msg.getSecretsList(),
proto.viam.app.v1.SharedSecret.toObject, includeInstance)
proto.viam.app.v1.SharedSecret.toObject, includeInstance),
lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -4415,6 +4416,11 @@ proto.viam.app.v1.RobotPart.deserializeBinaryFromReader = function(msg, reader)
reader.readMessage(value,proto.viam.app.v1.SharedSecret.deserializeBinaryFromReader);
msg.addSecrets(value);
break;
case 15:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastUpdated(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -4547,6 +4553,14 @@ proto.viam.app.v1.RobotPart.serializeBinaryToWriter = function(message, writer)
proto.viam.app.v1.SharedSecret.serializeBinaryToWriter
);
}
f = message.getLastUpdated();
if (f != null) {
writer.writeMessage(
15,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -4898,6 +4912,43 @@ proto.viam.app.v1.RobotPart.prototype.clearSecretsList = function() {
};


/**
* optional google.protobuf.Timestamp last_updated = 15;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.viam.app.v1.RobotPart.prototype.getLastUpdated = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15));
};


/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.viam.app.v1.RobotPart} returns this
*/
proto.viam.app.v1.RobotPart.prototype.setLastUpdated = function(value) {
return jspb.Message.setWrapperField(this, 15, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.viam.app.v1.RobotPart} returns this
*/
proto.viam.app.v1.RobotPart.prototype.clearLastUpdated = function() {
return this.setLastUpdated(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.viam.app.v1.RobotPart.prototype.hasLastUpdated = function() {
return jspb.Message.getField(this, 15) != null;
};





Expand Down Expand Up @@ -18895,7 +18946,8 @@ proto.viam.app.v1.Fragment.toObject = function(includeInstance, msg) {
robotPartCount: jspb.Message.getFieldWithDefault(msg, 9, 0),
organizationCount: jspb.Message.getFieldWithDefault(msg, 10, 0),
onlyUsedByOwner: jspb.Message.getBooleanFieldWithDefault(msg, 11, false),
visibility: jspb.Message.getFieldWithDefault(msg, 12, 0)
visibility: jspb.Message.getFieldWithDefault(msg, 12, 0),
lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -18978,6 +19030,11 @@ proto.viam.app.v1.Fragment.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {!proto.viam.app.v1.FragmentVisibility} */ (reader.readEnum());
msg.setVisibility(value);
break;
case 13:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setLastUpdated(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -19086,6 +19143,14 @@ proto.viam.app.v1.Fragment.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getLastUpdated();
if (f != null) {
writer.writeMessage(
13,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -19325,6 +19390,43 @@ proto.viam.app.v1.Fragment.prototype.setVisibility = function(value) {
};


/**
* optional google.protobuf.Timestamp last_updated = 13;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.viam.app.v1.Fragment.prototype.getLastUpdated = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13));
};


/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.viam.app.v1.Fragment} returns this
*/
proto.viam.app.v1.Fragment.prototype.setLastUpdated = function(value) {
return jspb.Message.setWrapperField(this, 13, value);
};


/**
* Clears the message field making it undefined.
* @return {!proto.viam.app.v1.Fragment} returns this
*/
proto.viam.app.v1.Fragment.prototype.clearLastUpdated = function() {
return this.setLastUpdated(undefined);
};


/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.viam.app.v1.Fragment.prototype.hasLastUpdated = function() {
return jspb.Message.getField(this, 13) != null;
};





Expand Down
4 changes: 4 additions & 0 deletions proto/viam/app/v1/app.proto
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ message RobotPart {

// List of secrets allowed for authentication.
repeated SharedSecret secrets = 14 [(tagger.v1.tags) = "bson:\"secrets\""];
// latest timestamp when a robot part was updated
google.protobuf.Timestamp last_updated = 15 [(tagger.v1.tags) = "bson:\"last_updated_at\""];
}

message RobotPartHistoryEntry {
Expand Down Expand Up @@ -725,6 +727,8 @@ message Fragment {
bool only_used_by_owner = 11;
// the visibility of a fragment; public, private or unlisted
FragmentVisibility visibility = 12;
// latest timestamp when fragment was updated
google.protobuf.Timestamp last_updated = 13 [(tagger.v1.tags) = "bson:\"last_updated_at\""];
}

message FragmentHistoryEntry {
Expand Down

0 comments on commit 4c89137

Please sign in to comment.