Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSDK-8765 - add cloud meta data to resource status #581

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1151,6 +1151,11 @@ export class ResourceStatus extends jspb.Message {
getError(): string;
setError(value: string): void;

hasCloudMetadata(): boolean;
clearCloudMetadata(): void;
getCloudMetadata(): GetCloudMetadataResponse | undefined;
setCloudMetadata(value?: GetCloudMetadataResponse): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ResourceStatus.AsObject;
static toObject(includeInstance: boolean, msg: ResourceStatus): ResourceStatus.AsObject;
Expand All @@ -1168,6 +1173,7 @@ export namespace ResourceStatus {
lastUpdated?: google_protobuf_timestamp_pb.Timestamp.AsObject,
revision: string,
error: string,
cloudMetadata?: GetCloudMetadataResponse.AsObject,
}

export interface StateMap {
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 @@ -9047,7 +9047,8 @@ proto.viam.robot.v1.ResourceStatus.toObject = function(includeInstance, msg) {
state: jspb.Message.getFieldWithDefault(msg, 2, 0),
lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
revision: jspb.Message.getFieldWithDefault(msg, 4, ""),
error: jspb.Message.getFieldWithDefault(msg, 5, "")
error: jspb.Message.getFieldWithDefault(msg, 5, ""),
cloudMetadata: (f = msg.getCloudMetadata()) && proto.viam.robot.v1.GetCloudMetadataResponse.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -9106,6 +9107,11 @@ proto.viam.robot.v1.ResourceStatus.deserializeBinaryFromReader = function(msg, r
var value = /** @type {string} */ (reader.readString());
msg.setError(value);
break;
case 6:
var value = new proto.viam.robot.v1.GetCloudMetadataResponse;
reader.readMessage(value,proto.viam.robot.v1.GetCloudMetadataResponse.deserializeBinaryFromReader);
msg.setCloudMetadata(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -9172,6 +9178,14 @@ proto.viam.robot.v1.ResourceStatus.serializeBinaryToWriter = function(message, w
f
);
}
f = message.getCloudMetadata();
if (f != null) {
writer.writeMessage(
6,
f,
proto.viam.robot.v1.GetCloudMetadataResponse.serializeBinaryToWriter
);
}
};


Expand Down Expand Up @@ -9315,6 +9329,43 @@ proto.viam.robot.v1.ResourceStatus.prototype.setError = function(value) {
};


/**
* optional GetCloudMetadataResponse cloud_metadata = 6;
* @return {?proto.viam.robot.v1.GetCloudMetadataResponse}
*/
proto.viam.robot.v1.ResourceStatus.prototype.getCloudMetadata = function() {
return /** @type{?proto.viam.robot.v1.GetCloudMetadataResponse} */ (
jspb.Message.getWrapperField(this, proto.viam.robot.v1.GetCloudMetadataResponse, 6));
};


/**
* @param {?proto.viam.robot.v1.GetCloudMetadataResponse|undefined} value
* @return {!proto.viam.robot.v1.ResourceStatus} returns this
*/
proto.viam.robot.v1.ResourceStatus.prototype.setCloudMetadata = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};


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


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





Expand Down
3 changes: 3 additions & 0 deletions proto/viam/robot/v1/robot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ message ResourceStatus {
// error details for a resource. This is guaranteed to be null if the
// resource is ready and non-null if the resource unhealthy.
string error = 5;

// infomation about resource orgID, locationID and partID
optional GetCloudMetadataResponse cloud_metadata = 6;
}

message ConfigStatus {
Expand Down
Loading
Loading