Skip to content

Commit 950ccd2

Browse files
authored
APP-8055 add optional field to verify last known update for updating robot parts and fragments (#670)
1 parent 4b588a3 commit 950ccd2

File tree

6 files changed

+2661
-2288
lines changed

6 files changed

+2661
-2288
lines changed

app/v1/app.pb.go

Lines changed: 2316 additions & 2285 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/js/app/v1/app_pb.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,11 @@ export class UpdateRobotPartRequest extends jspb.Message {
24292429
getRobotConfig(): google_protobuf_struct_pb.Struct | undefined;
24302430
setRobotConfig(value?: google_protobuf_struct_pb.Struct): void;
24312431

2432+
hasLastKnownUpdate(): boolean;
2433+
clearLastKnownUpdate(): void;
2434+
getLastKnownUpdate(): google_protobuf_timestamp_pb.Timestamp | undefined;
2435+
setLastKnownUpdate(value?: google_protobuf_timestamp_pb.Timestamp): void;
2436+
24322437
serializeBinary(): Uint8Array;
24332438
toObject(includeInstance?: boolean): UpdateRobotPartRequest.AsObject;
24342439
static toObject(includeInstance: boolean, msg: UpdateRobotPartRequest): UpdateRobotPartRequest.AsObject;
@@ -2444,6 +2449,7 @@ export namespace UpdateRobotPartRequest {
24442449
id: string,
24452450
name: string,
24462451
robotConfig?: google_protobuf_struct_pb.Struct.AsObject,
2452+
lastKnownUpdate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
24472453
}
24482454
}
24492455

@@ -3191,6 +3197,11 @@ export class UpdateFragmentRequest extends jspb.Message {
31913197
getVisibility(): FragmentVisibilityMap[keyof FragmentVisibilityMap];
31923198
setVisibility(value: FragmentVisibilityMap[keyof FragmentVisibilityMap]): void;
31933199

3200+
hasLastKnownUpdate(): boolean;
3201+
clearLastKnownUpdate(): void;
3202+
getLastKnownUpdate(): google_protobuf_timestamp_pb.Timestamp | undefined;
3203+
setLastKnownUpdate(value?: google_protobuf_timestamp_pb.Timestamp): void;
3204+
31943205
serializeBinary(): Uint8Array;
31953206
toObject(includeInstance?: boolean): UpdateFragmentRequest.AsObject;
31963207
static toObject(includeInstance: boolean, msg: UpdateFragmentRequest): UpdateFragmentRequest.AsObject;
@@ -3208,6 +3219,7 @@ export namespace UpdateFragmentRequest {
32083219
config?: google_protobuf_struct_pb.Struct.AsObject,
32093220
pb_public: boolean,
32103221
visibility: FragmentVisibilityMap[keyof FragmentVisibilityMap],
3222+
lastKnownUpdate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
32113223
}
32123224
}
32133225

gen/js/app/v1/app_pb.js

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22454,7 +22454,8 @@ proto.viam.app.v1.UpdateRobotPartRequest.toObject = function(includeInstance, ms
2245422454
var f, obj = {
2245522455
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
2245622456
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
22457-
robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f)
22457+
robotConfig: (f = msg.getRobotConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
22458+
lastKnownUpdate: (f = msg.getLastKnownUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2245822459
};
2245922460

2246022461
if (includeInstance) {
@@ -22504,6 +22505,11 @@ proto.viam.app.v1.UpdateRobotPartRequest.deserializeBinaryFromReader = function(
2250422505
reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
2250522506
msg.setRobotConfig(value);
2250622507
break;
22508+
case 4:
22509+
var value = new google_protobuf_timestamp_pb.Timestamp;
22510+
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
22511+
msg.setLastKnownUpdate(value);
22512+
break;
2250722513
default:
2250822514
reader.skipField();
2250922515
break;
@@ -22555,6 +22561,14 @@ proto.viam.app.v1.UpdateRobotPartRequest.serializeBinaryToWriter = function(mess
2255522561
google_protobuf_struct_pb.Struct.serializeBinaryToWriter
2255622562
);
2255722563
}
22564+
f = message.getLastKnownUpdate();
22565+
if (f != null) {
22566+
writer.writeMessage(
22567+
4,
22568+
f,
22569+
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
22570+
);
22571+
}
2255822572
};
2255922573

2256022574

@@ -22631,6 +22645,43 @@ proto.viam.app.v1.UpdateRobotPartRequest.prototype.hasRobotConfig = function() {
2263122645
};
2263222646

2263322647

22648+
/**
22649+
* optional google.protobuf.Timestamp last_known_update = 4;
22650+
* @return {?proto.google.protobuf.Timestamp}
22651+
*/
22652+
proto.viam.app.v1.UpdateRobotPartRequest.prototype.getLastKnownUpdate = function() {
22653+
return /** @type{?proto.google.protobuf.Timestamp} */ (
22654+
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
22655+
};
22656+
22657+
22658+
/**
22659+
* @param {?proto.google.protobuf.Timestamp|undefined} value
22660+
* @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this
22661+
*/
22662+
proto.viam.app.v1.UpdateRobotPartRequest.prototype.setLastKnownUpdate = function(value) {
22663+
return jspb.Message.setWrapperField(this, 4, value);
22664+
};
22665+
22666+
22667+
/**
22668+
* Clears the message field making it undefined.
22669+
* @return {!proto.viam.app.v1.UpdateRobotPartRequest} returns this
22670+
*/
22671+
proto.viam.app.v1.UpdateRobotPartRequest.prototype.clearLastKnownUpdate = function() {
22672+
return this.setLastKnownUpdate(undefined);
22673+
};
22674+
22675+
22676+
/**
22677+
* Returns whether this field is set.
22678+
* @return {boolean}
22679+
*/
22680+
proto.viam.app.v1.UpdateRobotPartRequest.prototype.hasLastKnownUpdate = function() {
22681+
return jspb.Message.getField(this, 4) != null;
22682+
};
22683+
22684+
2263422685

2263522686

2263622687

@@ -27775,7 +27826,8 @@ proto.viam.app.v1.UpdateFragmentRequest.toObject = function(includeInstance, msg
2777527826
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
2777627827
config: (f = msg.getConfig()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
2777727828
pb_public: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
27778-
visibility: jspb.Message.getFieldWithDefault(msg, 5, 0)
27829+
visibility: jspb.Message.getFieldWithDefault(msg, 5, 0),
27830+
lastKnownUpdate: (f = msg.getLastKnownUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2777927831
};
2778027832

2778127833
if (includeInstance) {
@@ -27833,6 +27885,11 @@ proto.viam.app.v1.UpdateFragmentRequest.deserializeBinaryFromReader = function(m
2783327885
var value = /** @type {!proto.viam.app.v1.FragmentVisibility} */ (reader.readEnum());
2783427886
msg.setVisibility(value);
2783527887
break;
27888+
case 6:
27889+
var value = new google_protobuf_timestamp_pb.Timestamp;
27890+
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
27891+
msg.setLastKnownUpdate(value);
27892+
break;
2783627893
default:
2783727894
reader.skipField();
2783827895
break;
@@ -27898,6 +27955,14 @@ proto.viam.app.v1.UpdateFragmentRequest.serializeBinaryToWriter = function(messa
2789827955
f
2789927956
);
2790027957
}
27958+
f = message.getLastKnownUpdate();
27959+
if (f != null) {
27960+
writer.writeMessage(
27961+
6,
27962+
f,
27963+
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
27964+
);
27965+
}
2790127966
};
2790227967

2790327968

@@ -28046,6 +28111,43 @@ proto.viam.app.v1.UpdateFragmentRequest.prototype.hasVisibility = function() {
2804628111
};
2804728112

2804828113

28114+
/**
28115+
* optional google.protobuf.Timestamp last_known_update = 6;
28116+
* @return {?proto.google.protobuf.Timestamp}
28117+
*/
28118+
proto.viam.app.v1.UpdateFragmentRequest.prototype.getLastKnownUpdate = function() {
28119+
return /** @type{?proto.google.protobuf.Timestamp} */ (
28120+
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
28121+
};
28122+
28123+
28124+
/**
28125+
* @param {?proto.google.protobuf.Timestamp|undefined} value
28126+
* @return {!proto.viam.app.v1.UpdateFragmentRequest} returns this
28127+
*/
28128+
proto.viam.app.v1.UpdateFragmentRequest.prototype.setLastKnownUpdate = function(value) {
28129+
return jspb.Message.setWrapperField(this, 6, value);
28130+
};
28131+
28132+
28133+
/**
28134+
* Clears the message field making it undefined.
28135+
* @return {!proto.viam.app.v1.UpdateFragmentRequest} returns this
28136+
*/
28137+
proto.viam.app.v1.UpdateFragmentRequest.prototype.clearLastKnownUpdate = function() {
28138+
return this.setLastKnownUpdate(undefined);
28139+
};
28140+
28141+
28142+
/**
28143+
* Returns whether this field is set.
28144+
* @return {boolean}
28145+
*/
28146+
proto.viam.app.v1.UpdateFragmentRequest.prototype.hasLastKnownUpdate = function() {
28147+
return jspb.Message.getField(this, 6) != null;
28148+
};
28149+
28150+
2804928151

2805028152

2805128153

gen/js/google/rpc/error_details_pb.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,25 @@ export namespace QuotaFailure {
107107
getDescription(): string;
108108
setDescription(value: string): void;
109109

110+
getApiService(): string;
111+
setApiService(value: string): void;
112+
113+
getQuotaMetric(): string;
114+
setQuotaMetric(value: string): void;
115+
116+
getQuotaId(): string;
117+
setQuotaId(value: string): void;
118+
119+
getQuotaDimensionsMap(): jspb.Map<string, string>;
120+
clearQuotaDimensionsMap(): void;
121+
getQuotaValue(): number;
122+
setQuotaValue(value: number): void;
123+
124+
hasFutureQuotaValue(): boolean;
125+
clearFutureQuotaValue(): void;
126+
getFutureQuotaValue(): number;
127+
setFutureQuotaValue(value: number): void;
128+
110129
serializeBinary(): Uint8Array;
111130
toObject(includeInstance?: boolean): Violation.AsObject;
112131
static toObject(includeInstance: boolean, msg: Violation): Violation.AsObject;
@@ -121,6 +140,12 @@ export namespace QuotaFailure {
121140
export type AsObject = {
122141
subject: string,
123142
description: string,
143+
apiService: string,
144+
quotaMetric: string,
145+
quotaId: string,
146+
quotaDimensionsMap: Array<[string, string]>,
147+
quotaValue: number,
148+
futureQuotaValue: number,
124149
}
125150
}
126151
}

0 commit comments

Comments
 (0)