@miradorlabs/web-grpc 2.8.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/proto/gateway/common/v1/status.ts +7 -0
- package/proto/gateway/common/v1/status_pb.js +2 -1
- package/proto/gateway/web/v1/derived_metric_gateway.ts +2451 -0
- package/proto/gateway/web/v1/derived_metric_gateway_grpc_pb.js +215 -0
- package/proto/gateway/web/v1/derived_metric_gateway_pb.js +4805 -0
|
@@ -0,0 +1,2451 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.0
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: proto/gateway/web/v1/derived_metric_gateway.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { Metadata } from "@grpc/grpc-js";
|
|
10
|
+
import { Timestamp } from "../../../../google/protobuf/timestamp";
|
|
11
|
+
import { ResponseStatus } from "../../common/v1/status";
|
|
12
|
+
|
|
13
|
+
export const protobufPackage = "gateway.web.v1";
|
|
14
|
+
|
|
15
|
+
export enum DerivedMetricOutcome {
|
|
16
|
+
DERIVED_METRIC_OUTCOME_UNSPECIFIED = 0,
|
|
17
|
+
DERIVED_METRIC_OUTCOME_EMITTED = 1,
|
|
18
|
+
DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION = 2,
|
|
19
|
+
DERIVED_METRIC_OUTCOME_POPULATION_ERROR = 3,
|
|
20
|
+
DERIVED_METRIC_OUTCOME_VALUE_MISSING = 4,
|
|
21
|
+
DERIVED_METRIC_OUTCOME_VALUE_ERROR = 5,
|
|
22
|
+
DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE = 6,
|
|
23
|
+
/** DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE - Event count exceeded the cap; never silently truncated. */
|
|
24
|
+
DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE = 7,
|
|
25
|
+
/**
|
|
26
|
+
* DERIVED_METRIC_OUTCOME_CANCELLED - Evaluation budget expired. Never emits: unlike an expression error it is not a property of the
|
|
27
|
+
* expression, so a replay could resolve differently and double-count the trace.
|
|
28
|
+
*/
|
|
29
|
+
DERIVED_METRIC_OUTCOME_CANCELLED = 8,
|
|
30
|
+
/**
|
|
31
|
+
* DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE - A stored event payload did not decode, so the trace can never be evaluated. Reported rather than
|
|
32
|
+
* omitted, because omitting it would mimic the budget-truncation signal.
|
|
33
|
+
*/
|
|
34
|
+
DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE = 9,
|
|
35
|
+
/**
|
|
36
|
+
* DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE - An integer result beyond 2^53, which the Float64 gauge column cannot hold exactly. Rejected rather
|
|
37
|
+
* than rounded: a wei-denominated amount passes 2^53 at roughly 0.01 ETH, and a silently rounded
|
|
38
|
+
* money figure is worse than no sample. Differences between wei-scale amounts are unaffected.
|
|
39
|
+
*/
|
|
40
|
+
DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE = 10,
|
|
41
|
+
UNRECOGNIZED = -1,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function derivedMetricOutcomeFromJSON(object: any): DerivedMetricOutcome {
|
|
45
|
+
switch (object) {
|
|
46
|
+
case 0:
|
|
47
|
+
case "DERIVED_METRIC_OUTCOME_UNSPECIFIED":
|
|
48
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_UNSPECIFIED;
|
|
49
|
+
case 1:
|
|
50
|
+
case "DERIVED_METRIC_OUTCOME_EMITTED":
|
|
51
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_EMITTED;
|
|
52
|
+
case 2:
|
|
53
|
+
case "DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION":
|
|
54
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION;
|
|
55
|
+
case 3:
|
|
56
|
+
case "DERIVED_METRIC_OUTCOME_POPULATION_ERROR":
|
|
57
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_POPULATION_ERROR;
|
|
58
|
+
case 4:
|
|
59
|
+
case "DERIVED_METRIC_OUTCOME_VALUE_MISSING":
|
|
60
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_MISSING;
|
|
61
|
+
case 5:
|
|
62
|
+
case "DERIVED_METRIC_OUTCOME_VALUE_ERROR":
|
|
63
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_ERROR;
|
|
64
|
+
case 6:
|
|
65
|
+
case "DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE":
|
|
66
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE;
|
|
67
|
+
case 7:
|
|
68
|
+
case "DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE":
|
|
69
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE;
|
|
70
|
+
case 8:
|
|
71
|
+
case "DERIVED_METRIC_OUTCOME_CANCELLED":
|
|
72
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_CANCELLED;
|
|
73
|
+
case 9:
|
|
74
|
+
case "DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE":
|
|
75
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE;
|
|
76
|
+
case 10:
|
|
77
|
+
case "DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE":
|
|
78
|
+
return DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE;
|
|
79
|
+
case -1:
|
|
80
|
+
case "UNRECOGNIZED":
|
|
81
|
+
default:
|
|
82
|
+
return DerivedMetricOutcome.UNRECOGNIZED;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function derivedMetricOutcomeToJSON(object: DerivedMetricOutcome): string {
|
|
87
|
+
switch (object) {
|
|
88
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_UNSPECIFIED:
|
|
89
|
+
return "DERIVED_METRIC_OUTCOME_UNSPECIFIED";
|
|
90
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_EMITTED:
|
|
91
|
+
return "DERIVED_METRIC_OUTCOME_EMITTED";
|
|
92
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION:
|
|
93
|
+
return "DERIVED_METRIC_OUTCOME_OUT_OF_POPULATION";
|
|
94
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_POPULATION_ERROR:
|
|
95
|
+
return "DERIVED_METRIC_OUTCOME_POPULATION_ERROR";
|
|
96
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_MISSING:
|
|
97
|
+
return "DERIVED_METRIC_OUTCOME_VALUE_MISSING";
|
|
98
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_ERROR:
|
|
99
|
+
return "DERIVED_METRIC_OUTCOME_VALUE_ERROR";
|
|
100
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE:
|
|
101
|
+
return "DERIVED_METRIC_OUTCOME_VALUE_NON_FINITE";
|
|
102
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE:
|
|
103
|
+
return "DERIVED_METRIC_OUTCOME_TRACE_TOO_LARGE";
|
|
104
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_CANCELLED:
|
|
105
|
+
return "DERIVED_METRIC_OUTCOME_CANCELLED";
|
|
106
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE:
|
|
107
|
+
return "DERIVED_METRIC_OUTCOME_TRACE_UNREADABLE";
|
|
108
|
+
case DerivedMetricOutcome.DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE:
|
|
109
|
+
return "DERIVED_METRIC_OUTCOME_VALUE_OUT_OF_EXACT_RANGE";
|
|
110
|
+
case DerivedMetricOutcome.UNRECOGNIZED:
|
|
111
|
+
default:
|
|
112
|
+
return "UNRECOGNIZED";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface DerivedMetric {
|
|
117
|
+
id: string;
|
|
118
|
+
organizationId: string;
|
|
119
|
+
projectId: string;
|
|
120
|
+
/** Never reusable within a project, including after deletion: it is the series identity. */
|
|
121
|
+
slug: string;
|
|
122
|
+
displayName: string;
|
|
123
|
+
description: string;
|
|
124
|
+
enabled: boolean;
|
|
125
|
+
/** The handle to pass to MetricGatewayService. */
|
|
126
|
+
metricName: string;
|
|
127
|
+
unit: string;
|
|
128
|
+
program: DerivedMetricProgram | undefined;
|
|
129
|
+
createdAt: Date | undefined;
|
|
130
|
+
updatedAt: Date | undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface DerivedMetricProgram {
|
|
134
|
+
/**
|
|
135
|
+
* Selects which finished traces CONTRIBUTE -- eligibility, never success. A success condition here
|
|
136
|
+
* would emit only the good traces and leave any ratio over them at 100% forever. Immutable after
|
|
137
|
+
* create; empty matches every finished trace.
|
|
138
|
+
*/
|
|
139
|
+
populationExpression: string;
|
|
140
|
+
/** Evaluates to a number, or to an empty optional meaning no sample. */
|
|
141
|
+
valueExpression: string;
|
|
142
|
+
/**
|
|
143
|
+
* Optional. Evaluates to a string selecting the series -- one series per distinct value, the same
|
|
144
|
+
* way any other metric groups. Empty, or unresolved, yields one unlabelled series.
|
|
145
|
+
*/
|
|
146
|
+
groupByExpression: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface CreateDerivedMetricRequest {
|
|
150
|
+
organizationId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
slug: string;
|
|
153
|
+
displayName: string;
|
|
154
|
+
description: string;
|
|
155
|
+
enabled: boolean;
|
|
156
|
+
unit: string;
|
|
157
|
+
program: DerivedMetricProgram | undefined;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface CreateDerivedMetricResponse {
|
|
161
|
+
status: ResponseStatus | undefined;
|
|
162
|
+
derivedMetric: DerivedMetric | undefined;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface GetDerivedMetricRequest {
|
|
166
|
+
organizationId: string;
|
|
167
|
+
projectId: string;
|
|
168
|
+
derivedMetricId: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface GetDerivedMetricResponse {
|
|
172
|
+
status: ResponseStatus | undefined;
|
|
173
|
+
derivedMetric: DerivedMetric | undefined;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface ListDerivedMetricsRequest {
|
|
177
|
+
organizationId: string;
|
|
178
|
+
projectId: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface ListDerivedMetricsResponse {
|
|
182
|
+
status: ResponseStatus | undefined;
|
|
183
|
+
derivedMetrics: DerivedMetric[];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface UpdateDerivedMetricRequest {
|
|
187
|
+
organizationId: string;
|
|
188
|
+
projectId: string;
|
|
189
|
+
derivedMetricId: string;
|
|
190
|
+
updates: UpdateDerivedMetricRequest_DerivedMetricUpdates | undefined;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
194
|
+
displayName?: string | undefined;
|
|
195
|
+
description?:
|
|
196
|
+
| string
|
|
197
|
+
| undefined;
|
|
198
|
+
/**
|
|
199
|
+
* The measurement (population, value, group-by, unit, slug) is immutable -- changing it
|
|
200
|
+
* means a new metric.
|
|
201
|
+
*/
|
|
202
|
+
enabled?: boolean | undefined;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface UpdateDerivedMetricResponse {
|
|
206
|
+
status: ResponseStatus | undefined;
|
|
207
|
+
derivedMetric: DerivedMetric | undefined;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface DeleteDerivedMetricRequest {
|
|
211
|
+
organizationId: string;
|
|
212
|
+
projectId: string;
|
|
213
|
+
derivedMetricId: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface DeleteDerivedMetricResponse {
|
|
217
|
+
status: ResponseStatus | undefined;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface DryRunDerivedMetricRequest {
|
|
221
|
+
organizationId: string;
|
|
222
|
+
projectId: string;
|
|
223
|
+
program: DerivedMetricProgram | undefined;
|
|
224
|
+
traceLimit: number;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface DryRunDerivedMetricResponse {
|
|
228
|
+
status:
|
|
229
|
+
| ResponseStatus
|
|
230
|
+
| undefined;
|
|
231
|
+
/**
|
|
232
|
+
* One result per trace evaluated. Fewer than traces_selected means the request budget cut the
|
|
233
|
+
* replay short.
|
|
234
|
+
*/
|
|
235
|
+
traceResults: DryRunTraceResult[];
|
|
236
|
+
outcomeCounts: DerivedMetricOutcomeCount[];
|
|
237
|
+
/**
|
|
238
|
+
* Traces the server chose to replay. Equal to trace_results when the whole sample was evaluated,
|
|
239
|
+
* so the author can tell a thin sample (the project has few finished traces) from a truncated one.
|
|
240
|
+
*/
|
|
241
|
+
tracesSelected: number;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface DryRunTraceResult {
|
|
245
|
+
traceId: string;
|
|
246
|
+
emitted?: DryRunEmission | undefined;
|
|
247
|
+
notEmitted?: DryRunNonEmission | undefined;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface DryRunEmission {
|
|
251
|
+
value: number;
|
|
252
|
+
/** The series this trace would land in. Empty when ungrouped or the group-by did not resolve. */
|
|
253
|
+
groupValue: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface DryRunNonEmission {
|
|
257
|
+
outcome: DerivedMetricOutcome;
|
|
258
|
+
/** Opaque diagnostic text; clients must not parse it. */
|
|
259
|
+
detail: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface DerivedMetricOutcomeCount {
|
|
263
|
+
outcome: DerivedMetricOutcome;
|
|
264
|
+
count: number;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function createBaseDerivedMetric(): DerivedMetric {
|
|
268
|
+
return {
|
|
269
|
+
id: "",
|
|
270
|
+
organizationId: "",
|
|
271
|
+
projectId: "",
|
|
272
|
+
slug: "",
|
|
273
|
+
displayName: "",
|
|
274
|
+
description: "",
|
|
275
|
+
enabled: false,
|
|
276
|
+
metricName: "",
|
|
277
|
+
unit: "",
|
|
278
|
+
program: undefined,
|
|
279
|
+
createdAt: undefined,
|
|
280
|
+
updatedAt: undefined,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export const DerivedMetric: MessageFns<DerivedMetric> = {
|
|
285
|
+
encode(message: DerivedMetric, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
286
|
+
if (message.id !== "") {
|
|
287
|
+
writer.uint32(10).string(message.id);
|
|
288
|
+
}
|
|
289
|
+
if (message.organizationId !== "") {
|
|
290
|
+
writer.uint32(18).string(message.organizationId);
|
|
291
|
+
}
|
|
292
|
+
if (message.projectId !== "") {
|
|
293
|
+
writer.uint32(26).string(message.projectId);
|
|
294
|
+
}
|
|
295
|
+
if (message.slug !== "") {
|
|
296
|
+
writer.uint32(34).string(message.slug);
|
|
297
|
+
}
|
|
298
|
+
if (message.displayName !== "") {
|
|
299
|
+
writer.uint32(42).string(message.displayName);
|
|
300
|
+
}
|
|
301
|
+
if (message.description !== "") {
|
|
302
|
+
writer.uint32(50).string(message.description);
|
|
303
|
+
}
|
|
304
|
+
if (message.enabled !== false) {
|
|
305
|
+
writer.uint32(56).bool(message.enabled);
|
|
306
|
+
}
|
|
307
|
+
if (message.metricName !== "") {
|
|
308
|
+
writer.uint32(66).string(message.metricName);
|
|
309
|
+
}
|
|
310
|
+
if (message.unit !== "") {
|
|
311
|
+
writer.uint32(74).string(message.unit);
|
|
312
|
+
}
|
|
313
|
+
if (message.program !== undefined) {
|
|
314
|
+
DerivedMetricProgram.encode(message.program, writer.uint32(82).fork()).join();
|
|
315
|
+
}
|
|
316
|
+
if (message.createdAt !== undefined) {
|
|
317
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
|
|
318
|
+
}
|
|
319
|
+
if (message.updatedAt !== undefined) {
|
|
320
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
|
|
321
|
+
}
|
|
322
|
+
return writer;
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetric {
|
|
326
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
327
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
328
|
+
const message = createBaseDerivedMetric();
|
|
329
|
+
while (reader.pos < end) {
|
|
330
|
+
const tag = reader.uint32();
|
|
331
|
+
switch (tag >>> 3) {
|
|
332
|
+
case 1: {
|
|
333
|
+
if (tag !== 10) {
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
message.id = reader.string();
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
case 2: {
|
|
341
|
+
if (tag !== 18) {
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
message.organizationId = reader.string();
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
case 3: {
|
|
349
|
+
if (tag !== 26) {
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
message.projectId = reader.string();
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
case 4: {
|
|
357
|
+
if (tag !== 34) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
message.slug = reader.string();
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
case 5: {
|
|
365
|
+
if (tag !== 42) {
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
message.displayName = reader.string();
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
case 6: {
|
|
373
|
+
if (tag !== 50) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
message.description = reader.string();
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
380
|
+
case 7: {
|
|
381
|
+
if (tag !== 56) {
|
|
382
|
+
break;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
message.enabled = reader.bool();
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
case 8: {
|
|
389
|
+
if (tag !== 66) {
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
message.metricName = reader.string();
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
case 9: {
|
|
397
|
+
if (tag !== 74) {
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
message.unit = reader.string();
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
case 10: {
|
|
405
|
+
if (tag !== 82) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
message.program = DerivedMetricProgram.decode(reader, reader.uint32());
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
case 11: {
|
|
413
|
+
if (tag !== 90) {
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
418
|
+
continue;
|
|
419
|
+
}
|
|
420
|
+
case 12: {
|
|
421
|
+
if (tag !== 98) {
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
reader.skip(tag & 7);
|
|
433
|
+
}
|
|
434
|
+
return message;
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
fromJSON(object: any): DerivedMetric {
|
|
438
|
+
return {
|
|
439
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
440
|
+
organizationId: isSet(object.organizationId)
|
|
441
|
+
? globalThis.String(object.organizationId)
|
|
442
|
+
: isSet(object.organization_id)
|
|
443
|
+
? globalThis.String(object.organization_id)
|
|
444
|
+
: "",
|
|
445
|
+
projectId: isSet(object.projectId)
|
|
446
|
+
? globalThis.String(object.projectId)
|
|
447
|
+
: isSet(object.project_id)
|
|
448
|
+
? globalThis.String(object.project_id)
|
|
449
|
+
: "",
|
|
450
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
451
|
+
displayName: isSet(object.displayName)
|
|
452
|
+
? globalThis.String(object.displayName)
|
|
453
|
+
: isSet(object.display_name)
|
|
454
|
+
? globalThis.String(object.display_name)
|
|
455
|
+
: "",
|
|
456
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
457
|
+
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
458
|
+
metricName: isSet(object.metricName)
|
|
459
|
+
? globalThis.String(object.metricName)
|
|
460
|
+
: isSet(object.metric_name)
|
|
461
|
+
? globalThis.String(object.metric_name)
|
|
462
|
+
: "",
|
|
463
|
+
unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
|
|
464
|
+
program: isSet(object.program) ? DerivedMetricProgram.fromJSON(object.program) : undefined,
|
|
465
|
+
createdAt: isSet(object.createdAt)
|
|
466
|
+
? fromJsonTimestamp(object.createdAt)
|
|
467
|
+
: isSet(object.created_at)
|
|
468
|
+
? fromJsonTimestamp(object.created_at)
|
|
469
|
+
: undefined,
|
|
470
|
+
updatedAt: isSet(object.updatedAt)
|
|
471
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
472
|
+
: isSet(object.updated_at)
|
|
473
|
+
? fromJsonTimestamp(object.updated_at)
|
|
474
|
+
: undefined,
|
|
475
|
+
};
|
|
476
|
+
},
|
|
477
|
+
|
|
478
|
+
toJSON(message: DerivedMetric): unknown {
|
|
479
|
+
const obj: any = {};
|
|
480
|
+
if (message.id !== "") {
|
|
481
|
+
obj.id = message.id;
|
|
482
|
+
}
|
|
483
|
+
if (message.organizationId !== "") {
|
|
484
|
+
obj.organizationId = message.organizationId;
|
|
485
|
+
}
|
|
486
|
+
if (message.projectId !== "") {
|
|
487
|
+
obj.projectId = message.projectId;
|
|
488
|
+
}
|
|
489
|
+
if (message.slug !== "") {
|
|
490
|
+
obj.slug = message.slug;
|
|
491
|
+
}
|
|
492
|
+
if (message.displayName !== "") {
|
|
493
|
+
obj.displayName = message.displayName;
|
|
494
|
+
}
|
|
495
|
+
if (message.description !== "") {
|
|
496
|
+
obj.description = message.description;
|
|
497
|
+
}
|
|
498
|
+
if (message.enabled !== false) {
|
|
499
|
+
obj.enabled = message.enabled;
|
|
500
|
+
}
|
|
501
|
+
if (message.metricName !== "") {
|
|
502
|
+
obj.metricName = message.metricName;
|
|
503
|
+
}
|
|
504
|
+
if (message.unit !== "") {
|
|
505
|
+
obj.unit = message.unit;
|
|
506
|
+
}
|
|
507
|
+
if (message.program !== undefined) {
|
|
508
|
+
obj.program = DerivedMetricProgram.toJSON(message.program);
|
|
509
|
+
}
|
|
510
|
+
if (message.createdAt !== undefined) {
|
|
511
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
512
|
+
}
|
|
513
|
+
if (message.updatedAt !== undefined) {
|
|
514
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
515
|
+
}
|
|
516
|
+
return obj;
|
|
517
|
+
},
|
|
518
|
+
|
|
519
|
+
create<I extends Exact<DeepPartial<DerivedMetric>, I>>(base?: I): DerivedMetric {
|
|
520
|
+
return DerivedMetric.fromPartial(base ?? ({} as any));
|
|
521
|
+
},
|
|
522
|
+
fromPartial<I extends Exact<DeepPartial<DerivedMetric>, I>>(object: I): DerivedMetric {
|
|
523
|
+
const message = createBaseDerivedMetric();
|
|
524
|
+
message.id = object.id ?? "";
|
|
525
|
+
message.organizationId = object.organizationId ?? "";
|
|
526
|
+
message.projectId = object.projectId ?? "";
|
|
527
|
+
message.slug = object.slug ?? "";
|
|
528
|
+
message.displayName = object.displayName ?? "";
|
|
529
|
+
message.description = object.description ?? "";
|
|
530
|
+
message.enabled = object.enabled ?? false;
|
|
531
|
+
message.metricName = object.metricName ?? "";
|
|
532
|
+
message.unit = object.unit ?? "";
|
|
533
|
+
message.program = (object.program !== undefined && object.program !== null)
|
|
534
|
+
? DerivedMetricProgram.fromPartial(object.program)
|
|
535
|
+
: undefined;
|
|
536
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
537
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
538
|
+
return message;
|
|
539
|
+
},
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
function createBaseDerivedMetricProgram(): DerivedMetricProgram {
|
|
543
|
+
return { populationExpression: "", valueExpression: "", groupByExpression: "" };
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export const DerivedMetricProgram: MessageFns<DerivedMetricProgram> = {
|
|
547
|
+
encode(message: DerivedMetricProgram, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
548
|
+
if (message.populationExpression !== "") {
|
|
549
|
+
writer.uint32(10).string(message.populationExpression);
|
|
550
|
+
}
|
|
551
|
+
if (message.valueExpression !== "") {
|
|
552
|
+
writer.uint32(18).string(message.valueExpression);
|
|
553
|
+
}
|
|
554
|
+
if (message.groupByExpression !== "") {
|
|
555
|
+
writer.uint32(26).string(message.groupByExpression);
|
|
556
|
+
}
|
|
557
|
+
return writer;
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricProgram {
|
|
561
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
562
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
563
|
+
const message = createBaseDerivedMetricProgram();
|
|
564
|
+
while (reader.pos < end) {
|
|
565
|
+
const tag = reader.uint32();
|
|
566
|
+
switch (tag >>> 3) {
|
|
567
|
+
case 1: {
|
|
568
|
+
if (tag !== 10) {
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
message.populationExpression = reader.string();
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
case 2: {
|
|
576
|
+
if (tag !== 18) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
message.valueExpression = reader.string();
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
583
|
+
case 3: {
|
|
584
|
+
if (tag !== 26) {
|
|
585
|
+
break;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
message.groupByExpression = reader.string();
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
reader.skip(tag & 7);
|
|
596
|
+
}
|
|
597
|
+
return message;
|
|
598
|
+
},
|
|
599
|
+
|
|
600
|
+
fromJSON(object: any): DerivedMetricProgram {
|
|
601
|
+
return {
|
|
602
|
+
populationExpression: isSet(object.populationExpression)
|
|
603
|
+
? globalThis.String(object.populationExpression)
|
|
604
|
+
: isSet(object.population_expression)
|
|
605
|
+
? globalThis.String(object.population_expression)
|
|
606
|
+
: "",
|
|
607
|
+
valueExpression: isSet(object.valueExpression)
|
|
608
|
+
? globalThis.String(object.valueExpression)
|
|
609
|
+
: isSet(object.value_expression)
|
|
610
|
+
? globalThis.String(object.value_expression)
|
|
611
|
+
: "",
|
|
612
|
+
groupByExpression: isSet(object.groupByExpression)
|
|
613
|
+
? globalThis.String(object.groupByExpression)
|
|
614
|
+
: isSet(object.group_by_expression)
|
|
615
|
+
? globalThis.String(object.group_by_expression)
|
|
616
|
+
: "",
|
|
617
|
+
};
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
toJSON(message: DerivedMetricProgram): unknown {
|
|
621
|
+
const obj: any = {};
|
|
622
|
+
if (message.populationExpression !== "") {
|
|
623
|
+
obj.populationExpression = message.populationExpression;
|
|
624
|
+
}
|
|
625
|
+
if (message.valueExpression !== "") {
|
|
626
|
+
obj.valueExpression = message.valueExpression;
|
|
627
|
+
}
|
|
628
|
+
if (message.groupByExpression !== "") {
|
|
629
|
+
obj.groupByExpression = message.groupByExpression;
|
|
630
|
+
}
|
|
631
|
+
return obj;
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
create<I extends Exact<DeepPartial<DerivedMetricProgram>, I>>(base?: I): DerivedMetricProgram {
|
|
635
|
+
return DerivedMetricProgram.fromPartial(base ?? ({} as any));
|
|
636
|
+
},
|
|
637
|
+
fromPartial<I extends Exact<DeepPartial<DerivedMetricProgram>, I>>(object: I): DerivedMetricProgram {
|
|
638
|
+
const message = createBaseDerivedMetricProgram();
|
|
639
|
+
message.populationExpression = object.populationExpression ?? "";
|
|
640
|
+
message.valueExpression = object.valueExpression ?? "";
|
|
641
|
+
message.groupByExpression = object.groupByExpression ?? "";
|
|
642
|
+
return message;
|
|
643
|
+
},
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
function createBaseCreateDerivedMetricRequest(): CreateDerivedMetricRequest {
|
|
647
|
+
return {
|
|
648
|
+
organizationId: "",
|
|
649
|
+
projectId: "",
|
|
650
|
+
slug: "",
|
|
651
|
+
displayName: "",
|
|
652
|
+
description: "",
|
|
653
|
+
enabled: false,
|
|
654
|
+
unit: "",
|
|
655
|
+
program: undefined,
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest> = {
|
|
660
|
+
encode(message: CreateDerivedMetricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
661
|
+
if (message.organizationId !== "") {
|
|
662
|
+
writer.uint32(10).string(message.organizationId);
|
|
663
|
+
}
|
|
664
|
+
if (message.projectId !== "") {
|
|
665
|
+
writer.uint32(18).string(message.projectId);
|
|
666
|
+
}
|
|
667
|
+
if (message.slug !== "") {
|
|
668
|
+
writer.uint32(26).string(message.slug);
|
|
669
|
+
}
|
|
670
|
+
if (message.displayName !== "") {
|
|
671
|
+
writer.uint32(34).string(message.displayName);
|
|
672
|
+
}
|
|
673
|
+
if (message.description !== "") {
|
|
674
|
+
writer.uint32(42).string(message.description);
|
|
675
|
+
}
|
|
676
|
+
if (message.enabled !== false) {
|
|
677
|
+
writer.uint32(48).bool(message.enabled);
|
|
678
|
+
}
|
|
679
|
+
if (message.unit !== "") {
|
|
680
|
+
writer.uint32(58).string(message.unit);
|
|
681
|
+
}
|
|
682
|
+
if (message.program !== undefined) {
|
|
683
|
+
DerivedMetricProgram.encode(message.program, writer.uint32(66).fork()).join();
|
|
684
|
+
}
|
|
685
|
+
return writer;
|
|
686
|
+
},
|
|
687
|
+
|
|
688
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDerivedMetricRequest {
|
|
689
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
690
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
691
|
+
const message = createBaseCreateDerivedMetricRequest();
|
|
692
|
+
while (reader.pos < end) {
|
|
693
|
+
const tag = reader.uint32();
|
|
694
|
+
switch (tag >>> 3) {
|
|
695
|
+
case 1: {
|
|
696
|
+
if (tag !== 10) {
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
message.organizationId = reader.string();
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
case 2: {
|
|
704
|
+
if (tag !== 18) {
|
|
705
|
+
break;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
message.projectId = reader.string();
|
|
709
|
+
continue;
|
|
710
|
+
}
|
|
711
|
+
case 3: {
|
|
712
|
+
if (tag !== 26) {
|
|
713
|
+
break;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
message.slug = reader.string();
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
case 4: {
|
|
720
|
+
if (tag !== 34) {
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
message.displayName = reader.string();
|
|
725
|
+
continue;
|
|
726
|
+
}
|
|
727
|
+
case 5: {
|
|
728
|
+
if (tag !== 42) {
|
|
729
|
+
break;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
message.description = reader.string();
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
735
|
+
case 6: {
|
|
736
|
+
if (tag !== 48) {
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
message.enabled = reader.bool();
|
|
741
|
+
continue;
|
|
742
|
+
}
|
|
743
|
+
case 7: {
|
|
744
|
+
if (tag !== 58) {
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
message.unit = reader.string();
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
case 8: {
|
|
752
|
+
if (tag !== 66) {
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
message.program = DerivedMetricProgram.decode(reader, reader.uint32());
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
761
|
+
break;
|
|
762
|
+
}
|
|
763
|
+
reader.skip(tag & 7);
|
|
764
|
+
}
|
|
765
|
+
return message;
|
|
766
|
+
},
|
|
767
|
+
|
|
768
|
+
fromJSON(object: any): CreateDerivedMetricRequest {
|
|
769
|
+
return {
|
|
770
|
+
organizationId: isSet(object.organizationId)
|
|
771
|
+
? globalThis.String(object.organizationId)
|
|
772
|
+
: isSet(object.organization_id)
|
|
773
|
+
? globalThis.String(object.organization_id)
|
|
774
|
+
: "",
|
|
775
|
+
projectId: isSet(object.projectId)
|
|
776
|
+
? globalThis.String(object.projectId)
|
|
777
|
+
: isSet(object.project_id)
|
|
778
|
+
? globalThis.String(object.project_id)
|
|
779
|
+
: "",
|
|
780
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
781
|
+
displayName: isSet(object.displayName)
|
|
782
|
+
? globalThis.String(object.displayName)
|
|
783
|
+
: isSet(object.display_name)
|
|
784
|
+
? globalThis.String(object.display_name)
|
|
785
|
+
: "",
|
|
786
|
+
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
787
|
+
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
788
|
+
unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
|
|
789
|
+
program: isSet(object.program) ? DerivedMetricProgram.fromJSON(object.program) : undefined,
|
|
790
|
+
};
|
|
791
|
+
},
|
|
792
|
+
|
|
793
|
+
toJSON(message: CreateDerivedMetricRequest): unknown {
|
|
794
|
+
const obj: any = {};
|
|
795
|
+
if (message.organizationId !== "") {
|
|
796
|
+
obj.organizationId = message.organizationId;
|
|
797
|
+
}
|
|
798
|
+
if (message.projectId !== "") {
|
|
799
|
+
obj.projectId = message.projectId;
|
|
800
|
+
}
|
|
801
|
+
if (message.slug !== "") {
|
|
802
|
+
obj.slug = message.slug;
|
|
803
|
+
}
|
|
804
|
+
if (message.displayName !== "") {
|
|
805
|
+
obj.displayName = message.displayName;
|
|
806
|
+
}
|
|
807
|
+
if (message.description !== "") {
|
|
808
|
+
obj.description = message.description;
|
|
809
|
+
}
|
|
810
|
+
if (message.enabled !== false) {
|
|
811
|
+
obj.enabled = message.enabled;
|
|
812
|
+
}
|
|
813
|
+
if (message.unit !== "") {
|
|
814
|
+
obj.unit = message.unit;
|
|
815
|
+
}
|
|
816
|
+
if (message.program !== undefined) {
|
|
817
|
+
obj.program = DerivedMetricProgram.toJSON(message.program);
|
|
818
|
+
}
|
|
819
|
+
return obj;
|
|
820
|
+
},
|
|
821
|
+
|
|
822
|
+
create<I extends Exact<DeepPartial<CreateDerivedMetricRequest>, I>>(base?: I): CreateDerivedMetricRequest {
|
|
823
|
+
return CreateDerivedMetricRequest.fromPartial(base ?? ({} as any));
|
|
824
|
+
},
|
|
825
|
+
fromPartial<I extends Exact<DeepPartial<CreateDerivedMetricRequest>, I>>(object: I): CreateDerivedMetricRequest {
|
|
826
|
+
const message = createBaseCreateDerivedMetricRequest();
|
|
827
|
+
message.organizationId = object.organizationId ?? "";
|
|
828
|
+
message.projectId = object.projectId ?? "";
|
|
829
|
+
message.slug = object.slug ?? "";
|
|
830
|
+
message.displayName = object.displayName ?? "";
|
|
831
|
+
message.description = object.description ?? "";
|
|
832
|
+
message.enabled = object.enabled ?? false;
|
|
833
|
+
message.unit = object.unit ?? "";
|
|
834
|
+
message.program = (object.program !== undefined && object.program !== null)
|
|
835
|
+
? DerivedMetricProgram.fromPartial(object.program)
|
|
836
|
+
: undefined;
|
|
837
|
+
return message;
|
|
838
|
+
},
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
function createBaseCreateDerivedMetricResponse(): CreateDerivedMetricResponse {
|
|
842
|
+
return { status: undefined, derivedMetric: undefined };
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
export const CreateDerivedMetricResponse: MessageFns<CreateDerivedMetricResponse> = {
|
|
846
|
+
encode(message: CreateDerivedMetricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
847
|
+
if (message.status !== undefined) {
|
|
848
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
849
|
+
}
|
|
850
|
+
if (message.derivedMetric !== undefined) {
|
|
851
|
+
DerivedMetric.encode(message.derivedMetric, writer.uint32(18).fork()).join();
|
|
852
|
+
}
|
|
853
|
+
return writer;
|
|
854
|
+
},
|
|
855
|
+
|
|
856
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateDerivedMetricResponse {
|
|
857
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
858
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
859
|
+
const message = createBaseCreateDerivedMetricResponse();
|
|
860
|
+
while (reader.pos < end) {
|
|
861
|
+
const tag = reader.uint32();
|
|
862
|
+
switch (tag >>> 3) {
|
|
863
|
+
case 1: {
|
|
864
|
+
if (tag !== 10) {
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
case 2: {
|
|
872
|
+
if (tag !== 18) {
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
message.derivedMetric = DerivedMetric.decode(reader, reader.uint32());
|
|
877
|
+
continue;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
reader.skip(tag & 7);
|
|
884
|
+
}
|
|
885
|
+
return message;
|
|
886
|
+
},
|
|
887
|
+
|
|
888
|
+
fromJSON(object: any): CreateDerivedMetricResponse {
|
|
889
|
+
return {
|
|
890
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
891
|
+
derivedMetric: isSet(object.derivedMetric)
|
|
892
|
+
? DerivedMetric.fromJSON(object.derivedMetric)
|
|
893
|
+
: isSet(object.derived_metric)
|
|
894
|
+
? DerivedMetric.fromJSON(object.derived_metric)
|
|
895
|
+
: undefined,
|
|
896
|
+
};
|
|
897
|
+
},
|
|
898
|
+
|
|
899
|
+
toJSON(message: CreateDerivedMetricResponse): unknown {
|
|
900
|
+
const obj: any = {};
|
|
901
|
+
if (message.status !== undefined) {
|
|
902
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
903
|
+
}
|
|
904
|
+
if (message.derivedMetric !== undefined) {
|
|
905
|
+
obj.derivedMetric = DerivedMetric.toJSON(message.derivedMetric);
|
|
906
|
+
}
|
|
907
|
+
return obj;
|
|
908
|
+
},
|
|
909
|
+
|
|
910
|
+
create<I extends Exact<DeepPartial<CreateDerivedMetricResponse>, I>>(base?: I): CreateDerivedMetricResponse {
|
|
911
|
+
return CreateDerivedMetricResponse.fromPartial(base ?? ({} as any));
|
|
912
|
+
},
|
|
913
|
+
fromPartial<I extends Exact<DeepPartial<CreateDerivedMetricResponse>, I>>(object: I): CreateDerivedMetricResponse {
|
|
914
|
+
const message = createBaseCreateDerivedMetricResponse();
|
|
915
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
916
|
+
? ResponseStatus.fromPartial(object.status)
|
|
917
|
+
: undefined;
|
|
918
|
+
message.derivedMetric = (object.derivedMetric !== undefined && object.derivedMetric !== null)
|
|
919
|
+
? DerivedMetric.fromPartial(object.derivedMetric)
|
|
920
|
+
: undefined;
|
|
921
|
+
return message;
|
|
922
|
+
},
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
function createBaseGetDerivedMetricRequest(): GetDerivedMetricRequest {
|
|
926
|
+
return { organizationId: "", projectId: "", derivedMetricId: "" };
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export const GetDerivedMetricRequest: MessageFns<GetDerivedMetricRequest> = {
|
|
930
|
+
encode(message: GetDerivedMetricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
931
|
+
if (message.organizationId !== "") {
|
|
932
|
+
writer.uint32(10).string(message.organizationId);
|
|
933
|
+
}
|
|
934
|
+
if (message.projectId !== "") {
|
|
935
|
+
writer.uint32(18).string(message.projectId);
|
|
936
|
+
}
|
|
937
|
+
if (message.derivedMetricId !== "") {
|
|
938
|
+
writer.uint32(26).string(message.derivedMetricId);
|
|
939
|
+
}
|
|
940
|
+
return writer;
|
|
941
|
+
},
|
|
942
|
+
|
|
943
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDerivedMetricRequest {
|
|
944
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
945
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
946
|
+
const message = createBaseGetDerivedMetricRequest();
|
|
947
|
+
while (reader.pos < end) {
|
|
948
|
+
const tag = reader.uint32();
|
|
949
|
+
switch (tag >>> 3) {
|
|
950
|
+
case 1: {
|
|
951
|
+
if (tag !== 10) {
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
message.organizationId = reader.string();
|
|
956
|
+
continue;
|
|
957
|
+
}
|
|
958
|
+
case 2: {
|
|
959
|
+
if (tag !== 18) {
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
message.projectId = reader.string();
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
case 3: {
|
|
967
|
+
if (tag !== 26) {
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
message.derivedMetricId = reader.string();
|
|
972
|
+
continue;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
reader.skip(tag & 7);
|
|
979
|
+
}
|
|
980
|
+
return message;
|
|
981
|
+
},
|
|
982
|
+
|
|
983
|
+
fromJSON(object: any): GetDerivedMetricRequest {
|
|
984
|
+
return {
|
|
985
|
+
organizationId: isSet(object.organizationId)
|
|
986
|
+
? globalThis.String(object.organizationId)
|
|
987
|
+
: isSet(object.organization_id)
|
|
988
|
+
? globalThis.String(object.organization_id)
|
|
989
|
+
: "",
|
|
990
|
+
projectId: isSet(object.projectId)
|
|
991
|
+
? globalThis.String(object.projectId)
|
|
992
|
+
: isSet(object.project_id)
|
|
993
|
+
? globalThis.String(object.project_id)
|
|
994
|
+
: "",
|
|
995
|
+
derivedMetricId: isSet(object.derivedMetricId)
|
|
996
|
+
? globalThis.String(object.derivedMetricId)
|
|
997
|
+
: isSet(object.derived_metric_id)
|
|
998
|
+
? globalThis.String(object.derived_metric_id)
|
|
999
|
+
: "",
|
|
1000
|
+
};
|
|
1001
|
+
},
|
|
1002
|
+
|
|
1003
|
+
toJSON(message: GetDerivedMetricRequest): unknown {
|
|
1004
|
+
const obj: any = {};
|
|
1005
|
+
if (message.organizationId !== "") {
|
|
1006
|
+
obj.organizationId = message.organizationId;
|
|
1007
|
+
}
|
|
1008
|
+
if (message.projectId !== "") {
|
|
1009
|
+
obj.projectId = message.projectId;
|
|
1010
|
+
}
|
|
1011
|
+
if (message.derivedMetricId !== "") {
|
|
1012
|
+
obj.derivedMetricId = message.derivedMetricId;
|
|
1013
|
+
}
|
|
1014
|
+
return obj;
|
|
1015
|
+
},
|
|
1016
|
+
|
|
1017
|
+
create<I extends Exact<DeepPartial<GetDerivedMetricRequest>, I>>(base?: I): GetDerivedMetricRequest {
|
|
1018
|
+
return GetDerivedMetricRequest.fromPartial(base ?? ({} as any));
|
|
1019
|
+
},
|
|
1020
|
+
fromPartial<I extends Exact<DeepPartial<GetDerivedMetricRequest>, I>>(object: I): GetDerivedMetricRequest {
|
|
1021
|
+
const message = createBaseGetDerivedMetricRequest();
|
|
1022
|
+
message.organizationId = object.organizationId ?? "";
|
|
1023
|
+
message.projectId = object.projectId ?? "";
|
|
1024
|
+
message.derivedMetricId = object.derivedMetricId ?? "";
|
|
1025
|
+
return message;
|
|
1026
|
+
},
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
function createBaseGetDerivedMetricResponse(): GetDerivedMetricResponse {
|
|
1030
|
+
return { status: undefined, derivedMetric: undefined };
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export const GetDerivedMetricResponse: MessageFns<GetDerivedMetricResponse> = {
|
|
1034
|
+
encode(message: GetDerivedMetricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1035
|
+
if (message.status !== undefined) {
|
|
1036
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1037
|
+
}
|
|
1038
|
+
if (message.derivedMetric !== undefined) {
|
|
1039
|
+
DerivedMetric.encode(message.derivedMetric, writer.uint32(18).fork()).join();
|
|
1040
|
+
}
|
|
1041
|
+
return writer;
|
|
1042
|
+
},
|
|
1043
|
+
|
|
1044
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDerivedMetricResponse {
|
|
1045
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1046
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1047
|
+
const message = createBaseGetDerivedMetricResponse();
|
|
1048
|
+
while (reader.pos < end) {
|
|
1049
|
+
const tag = reader.uint32();
|
|
1050
|
+
switch (tag >>> 3) {
|
|
1051
|
+
case 1: {
|
|
1052
|
+
if (tag !== 10) {
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1057
|
+
continue;
|
|
1058
|
+
}
|
|
1059
|
+
case 2: {
|
|
1060
|
+
if (tag !== 18) {
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
message.derivedMetric = DerivedMetric.decode(reader, reader.uint32());
|
|
1065
|
+
continue;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1069
|
+
break;
|
|
1070
|
+
}
|
|
1071
|
+
reader.skip(tag & 7);
|
|
1072
|
+
}
|
|
1073
|
+
return message;
|
|
1074
|
+
},
|
|
1075
|
+
|
|
1076
|
+
fromJSON(object: any): GetDerivedMetricResponse {
|
|
1077
|
+
return {
|
|
1078
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1079
|
+
derivedMetric: isSet(object.derivedMetric)
|
|
1080
|
+
? DerivedMetric.fromJSON(object.derivedMetric)
|
|
1081
|
+
: isSet(object.derived_metric)
|
|
1082
|
+
? DerivedMetric.fromJSON(object.derived_metric)
|
|
1083
|
+
: undefined,
|
|
1084
|
+
};
|
|
1085
|
+
},
|
|
1086
|
+
|
|
1087
|
+
toJSON(message: GetDerivedMetricResponse): unknown {
|
|
1088
|
+
const obj: any = {};
|
|
1089
|
+
if (message.status !== undefined) {
|
|
1090
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1091
|
+
}
|
|
1092
|
+
if (message.derivedMetric !== undefined) {
|
|
1093
|
+
obj.derivedMetric = DerivedMetric.toJSON(message.derivedMetric);
|
|
1094
|
+
}
|
|
1095
|
+
return obj;
|
|
1096
|
+
},
|
|
1097
|
+
|
|
1098
|
+
create<I extends Exact<DeepPartial<GetDerivedMetricResponse>, I>>(base?: I): GetDerivedMetricResponse {
|
|
1099
|
+
return GetDerivedMetricResponse.fromPartial(base ?? ({} as any));
|
|
1100
|
+
},
|
|
1101
|
+
fromPartial<I extends Exact<DeepPartial<GetDerivedMetricResponse>, I>>(object: I): GetDerivedMetricResponse {
|
|
1102
|
+
const message = createBaseGetDerivedMetricResponse();
|
|
1103
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1104
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1105
|
+
: undefined;
|
|
1106
|
+
message.derivedMetric = (object.derivedMetric !== undefined && object.derivedMetric !== null)
|
|
1107
|
+
? DerivedMetric.fromPartial(object.derivedMetric)
|
|
1108
|
+
: undefined;
|
|
1109
|
+
return message;
|
|
1110
|
+
},
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
function createBaseListDerivedMetricsRequest(): ListDerivedMetricsRequest {
|
|
1114
|
+
return { organizationId: "", projectId: "" };
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export const ListDerivedMetricsRequest: MessageFns<ListDerivedMetricsRequest> = {
|
|
1118
|
+
encode(message: ListDerivedMetricsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1119
|
+
if (message.organizationId !== "") {
|
|
1120
|
+
writer.uint32(10).string(message.organizationId);
|
|
1121
|
+
}
|
|
1122
|
+
if (message.projectId !== "") {
|
|
1123
|
+
writer.uint32(18).string(message.projectId);
|
|
1124
|
+
}
|
|
1125
|
+
return writer;
|
|
1126
|
+
},
|
|
1127
|
+
|
|
1128
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricsRequest {
|
|
1129
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1130
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1131
|
+
const message = createBaseListDerivedMetricsRequest();
|
|
1132
|
+
while (reader.pos < end) {
|
|
1133
|
+
const tag = reader.uint32();
|
|
1134
|
+
switch (tag >>> 3) {
|
|
1135
|
+
case 1: {
|
|
1136
|
+
if (tag !== 10) {
|
|
1137
|
+
break;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
message.organizationId = reader.string();
|
|
1141
|
+
continue;
|
|
1142
|
+
}
|
|
1143
|
+
case 2: {
|
|
1144
|
+
if (tag !== 18) {
|
|
1145
|
+
break;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
message.projectId = reader.string();
|
|
1149
|
+
continue;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1153
|
+
break;
|
|
1154
|
+
}
|
|
1155
|
+
reader.skip(tag & 7);
|
|
1156
|
+
}
|
|
1157
|
+
return message;
|
|
1158
|
+
},
|
|
1159
|
+
|
|
1160
|
+
fromJSON(object: any): ListDerivedMetricsRequest {
|
|
1161
|
+
return {
|
|
1162
|
+
organizationId: isSet(object.organizationId)
|
|
1163
|
+
? globalThis.String(object.organizationId)
|
|
1164
|
+
: isSet(object.organization_id)
|
|
1165
|
+
? globalThis.String(object.organization_id)
|
|
1166
|
+
: "",
|
|
1167
|
+
projectId: isSet(object.projectId)
|
|
1168
|
+
? globalThis.String(object.projectId)
|
|
1169
|
+
: isSet(object.project_id)
|
|
1170
|
+
? globalThis.String(object.project_id)
|
|
1171
|
+
: "",
|
|
1172
|
+
};
|
|
1173
|
+
},
|
|
1174
|
+
|
|
1175
|
+
toJSON(message: ListDerivedMetricsRequest): unknown {
|
|
1176
|
+
const obj: any = {};
|
|
1177
|
+
if (message.organizationId !== "") {
|
|
1178
|
+
obj.organizationId = message.organizationId;
|
|
1179
|
+
}
|
|
1180
|
+
if (message.projectId !== "") {
|
|
1181
|
+
obj.projectId = message.projectId;
|
|
1182
|
+
}
|
|
1183
|
+
return obj;
|
|
1184
|
+
},
|
|
1185
|
+
|
|
1186
|
+
create<I extends Exact<DeepPartial<ListDerivedMetricsRequest>, I>>(base?: I): ListDerivedMetricsRequest {
|
|
1187
|
+
return ListDerivedMetricsRequest.fromPartial(base ?? ({} as any));
|
|
1188
|
+
},
|
|
1189
|
+
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricsRequest>, I>>(object: I): ListDerivedMetricsRequest {
|
|
1190
|
+
const message = createBaseListDerivedMetricsRequest();
|
|
1191
|
+
message.organizationId = object.organizationId ?? "";
|
|
1192
|
+
message.projectId = object.projectId ?? "";
|
|
1193
|
+
return message;
|
|
1194
|
+
},
|
|
1195
|
+
};
|
|
1196
|
+
|
|
1197
|
+
function createBaseListDerivedMetricsResponse(): ListDerivedMetricsResponse {
|
|
1198
|
+
return { status: undefined, derivedMetrics: [] };
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
export const ListDerivedMetricsResponse: MessageFns<ListDerivedMetricsResponse> = {
|
|
1202
|
+
encode(message: ListDerivedMetricsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1203
|
+
if (message.status !== undefined) {
|
|
1204
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1205
|
+
}
|
|
1206
|
+
for (const v of message.derivedMetrics) {
|
|
1207
|
+
DerivedMetric.encode(v!, writer.uint32(18).fork()).join();
|
|
1208
|
+
}
|
|
1209
|
+
return writer;
|
|
1210
|
+
},
|
|
1211
|
+
|
|
1212
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricsResponse {
|
|
1213
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1214
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1215
|
+
const message = createBaseListDerivedMetricsResponse();
|
|
1216
|
+
while (reader.pos < end) {
|
|
1217
|
+
const tag = reader.uint32();
|
|
1218
|
+
switch (tag >>> 3) {
|
|
1219
|
+
case 1: {
|
|
1220
|
+
if (tag !== 10) {
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1225
|
+
continue;
|
|
1226
|
+
}
|
|
1227
|
+
case 2: {
|
|
1228
|
+
if (tag !== 18) {
|
|
1229
|
+
break;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
message.derivedMetrics.push(DerivedMetric.decode(reader, reader.uint32()));
|
|
1233
|
+
continue;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1237
|
+
break;
|
|
1238
|
+
}
|
|
1239
|
+
reader.skip(tag & 7);
|
|
1240
|
+
}
|
|
1241
|
+
return message;
|
|
1242
|
+
},
|
|
1243
|
+
|
|
1244
|
+
fromJSON(object: any): ListDerivedMetricsResponse {
|
|
1245
|
+
return {
|
|
1246
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1247
|
+
derivedMetrics: globalThis.Array.isArray(object?.derivedMetrics)
|
|
1248
|
+
? object.derivedMetrics.map((e: any) => DerivedMetric.fromJSON(e))
|
|
1249
|
+
: globalThis.Array.isArray(object?.derived_metrics)
|
|
1250
|
+
? object.derived_metrics.map((e: any) => DerivedMetric.fromJSON(e))
|
|
1251
|
+
: [],
|
|
1252
|
+
};
|
|
1253
|
+
},
|
|
1254
|
+
|
|
1255
|
+
toJSON(message: ListDerivedMetricsResponse): unknown {
|
|
1256
|
+
const obj: any = {};
|
|
1257
|
+
if (message.status !== undefined) {
|
|
1258
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1259
|
+
}
|
|
1260
|
+
if (message.derivedMetrics?.length) {
|
|
1261
|
+
obj.derivedMetrics = message.derivedMetrics.map((e) => DerivedMetric.toJSON(e));
|
|
1262
|
+
}
|
|
1263
|
+
return obj;
|
|
1264
|
+
},
|
|
1265
|
+
|
|
1266
|
+
create<I extends Exact<DeepPartial<ListDerivedMetricsResponse>, I>>(base?: I): ListDerivedMetricsResponse {
|
|
1267
|
+
return ListDerivedMetricsResponse.fromPartial(base ?? ({} as any));
|
|
1268
|
+
},
|
|
1269
|
+
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricsResponse>, I>>(object: I): ListDerivedMetricsResponse {
|
|
1270
|
+
const message = createBaseListDerivedMetricsResponse();
|
|
1271
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1272
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1273
|
+
: undefined;
|
|
1274
|
+
message.derivedMetrics = object.derivedMetrics?.map((e) => DerivedMetric.fromPartial(e)) || [];
|
|
1275
|
+
return message;
|
|
1276
|
+
},
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
function createBaseUpdateDerivedMetricRequest(): UpdateDerivedMetricRequest {
|
|
1280
|
+
return { organizationId: "", projectId: "", derivedMetricId: "", updates: undefined };
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export const UpdateDerivedMetricRequest: MessageFns<UpdateDerivedMetricRequest> = {
|
|
1284
|
+
encode(message: UpdateDerivedMetricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1285
|
+
if (message.organizationId !== "") {
|
|
1286
|
+
writer.uint32(10).string(message.organizationId);
|
|
1287
|
+
}
|
|
1288
|
+
if (message.projectId !== "") {
|
|
1289
|
+
writer.uint32(18).string(message.projectId);
|
|
1290
|
+
}
|
|
1291
|
+
if (message.derivedMetricId !== "") {
|
|
1292
|
+
writer.uint32(26).string(message.derivedMetricId);
|
|
1293
|
+
}
|
|
1294
|
+
if (message.updates !== undefined) {
|
|
1295
|
+
UpdateDerivedMetricRequest_DerivedMetricUpdates.encode(message.updates, writer.uint32(34).fork()).join();
|
|
1296
|
+
}
|
|
1297
|
+
return writer;
|
|
1298
|
+
},
|
|
1299
|
+
|
|
1300
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UpdateDerivedMetricRequest {
|
|
1301
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1302
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1303
|
+
const message = createBaseUpdateDerivedMetricRequest();
|
|
1304
|
+
while (reader.pos < end) {
|
|
1305
|
+
const tag = reader.uint32();
|
|
1306
|
+
switch (tag >>> 3) {
|
|
1307
|
+
case 1: {
|
|
1308
|
+
if (tag !== 10) {
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
message.organizationId = reader.string();
|
|
1313
|
+
continue;
|
|
1314
|
+
}
|
|
1315
|
+
case 2: {
|
|
1316
|
+
if (tag !== 18) {
|
|
1317
|
+
break;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
message.projectId = reader.string();
|
|
1321
|
+
continue;
|
|
1322
|
+
}
|
|
1323
|
+
case 3: {
|
|
1324
|
+
if (tag !== 26) {
|
|
1325
|
+
break;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
message.derivedMetricId = reader.string();
|
|
1329
|
+
continue;
|
|
1330
|
+
}
|
|
1331
|
+
case 4: {
|
|
1332
|
+
if (tag !== 34) {
|
|
1333
|
+
break;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
message.updates = UpdateDerivedMetricRequest_DerivedMetricUpdates.decode(reader, reader.uint32());
|
|
1337
|
+
continue;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1341
|
+
break;
|
|
1342
|
+
}
|
|
1343
|
+
reader.skip(tag & 7);
|
|
1344
|
+
}
|
|
1345
|
+
return message;
|
|
1346
|
+
},
|
|
1347
|
+
|
|
1348
|
+
fromJSON(object: any): UpdateDerivedMetricRequest {
|
|
1349
|
+
return {
|
|
1350
|
+
organizationId: isSet(object.organizationId)
|
|
1351
|
+
? globalThis.String(object.organizationId)
|
|
1352
|
+
: isSet(object.organization_id)
|
|
1353
|
+
? globalThis.String(object.organization_id)
|
|
1354
|
+
: "",
|
|
1355
|
+
projectId: isSet(object.projectId)
|
|
1356
|
+
? globalThis.String(object.projectId)
|
|
1357
|
+
: isSet(object.project_id)
|
|
1358
|
+
? globalThis.String(object.project_id)
|
|
1359
|
+
: "",
|
|
1360
|
+
derivedMetricId: isSet(object.derivedMetricId)
|
|
1361
|
+
? globalThis.String(object.derivedMetricId)
|
|
1362
|
+
: isSet(object.derived_metric_id)
|
|
1363
|
+
? globalThis.String(object.derived_metric_id)
|
|
1364
|
+
: "",
|
|
1365
|
+
updates: isSet(object.updates)
|
|
1366
|
+
? UpdateDerivedMetricRequest_DerivedMetricUpdates.fromJSON(object.updates)
|
|
1367
|
+
: undefined,
|
|
1368
|
+
};
|
|
1369
|
+
},
|
|
1370
|
+
|
|
1371
|
+
toJSON(message: UpdateDerivedMetricRequest): unknown {
|
|
1372
|
+
const obj: any = {};
|
|
1373
|
+
if (message.organizationId !== "") {
|
|
1374
|
+
obj.organizationId = message.organizationId;
|
|
1375
|
+
}
|
|
1376
|
+
if (message.projectId !== "") {
|
|
1377
|
+
obj.projectId = message.projectId;
|
|
1378
|
+
}
|
|
1379
|
+
if (message.derivedMetricId !== "") {
|
|
1380
|
+
obj.derivedMetricId = message.derivedMetricId;
|
|
1381
|
+
}
|
|
1382
|
+
if (message.updates !== undefined) {
|
|
1383
|
+
obj.updates = UpdateDerivedMetricRequest_DerivedMetricUpdates.toJSON(message.updates);
|
|
1384
|
+
}
|
|
1385
|
+
return obj;
|
|
1386
|
+
},
|
|
1387
|
+
|
|
1388
|
+
create<I extends Exact<DeepPartial<UpdateDerivedMetricRequest>, I>>(base?: I): UpdateDerivedMetricRequest {
|
|
1389
|
+
return UpdateDerivedMetricRequest.fromPartial(base ?? ({} as any));
|
|
1390
|
+
},
|
|
1391
|
+
fromPartial<I extends Exact<DeepPartial<UpdateDerivedMetricRequest>, I>>(object: I): UpdateDerivedMetricRequest {
|
|
1392
|
+
const message = createBaseUpdateDerivedMetricRequest();
|
|
1393
|
+
message.organizationId = object.organizationId ?? "";
|
|
1394
|
+
message.projectId = object.projectId ?? "";
|
|
1395
|
+
message.derivedMetricId = object.derivedMetricId ?? "";
|
|
1396
|
+
message.updates = (object.updates !== undefined && object.updates !== null)
|
|
1397
|
+
? UpdateDerivedMetricRequest_DerivedMetricUpdates.fromPartial(object.updates)
|
|
1398
|
+
: undefined;
|
|
1399
|
+
return message;
|
|
1400
|
+
},
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
function createBaseUpdateDerivedMetricRequest_DerivedMetricUpdates(): UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
1404
|
+
return { displayName: undefined, description: undefined, enabled: undefined };
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
export const UpdateDerivedMetricRequest_DerivedMetricUpdates: MessageFns<
|
|
1408
|
+
UpdateDerivedMetricRequest_DerivedMetricUpdates
|
|
1409
|
+
> = {
|
|
1410
|
+
encode(
|
|
1411
|
+
message: UpdateDerivedMetricRequest_DerivedMetricUpdates,
|
|
1412
|
+
writer: BinaryWriter = new BinaryWriter(),
|
|
1413
|
+
): BinaryWriter {
|
|
1414
|
+
if (message.displayName !== undefined) {
|
|
1415
|
+
writer.uint32(10).string(message.displayName);
|
|
1416
|
+
}
|
|
1417
|
+
if (message.description !== undefined) {
|
|
1418
|
+
writer.uint32(18).string(message.description);
|
|
1419
|
+
}
|
|
1420
|
+
if (message.enabled !== undefined) {
|
|
1421
|
+
writer.uint32(24).bool(message.enabled);
|
|
1422
|
+
}
|
|
1423
|
+
return writer;
|
|
1424
|
+
},
|
|
1425
|
+
|
|
1426
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
1427
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1428
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1429
|
+
const message = createBaseUpdateDerivedMetricRequest_DerivedMetricUpdates();
|
|
1430
|
+
while (reader.pos < end) {
|
|
1431
|
+
const tag = reader.uint32();
|
|
1432
|
+
switch (tag >>> 3) {
|
|
1433
|
+
case 1: {
|
|
1434
|
+
if (tag !== 10) {
|
|
1435
|
+
break;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
message.displayName = reader.string();
|
|
1439
|
+
continue;
|
|
1440
|
+
}
|
|
1441
|
+
case 2: {
|
|
1442
|
+
if (tag !== 18) {
|
|
1443
|
+
break;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
message.description = reader.string();
|
|
1447
|
+
continue;
|
|
1448
|
+
}
|
|
1449
|
+
case 3: {
|
|
1450
|
+
if (tag !== 24) {
|
|
1451
|
+
break;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
message.enabled = reader.bool();
|
|
1455
|
+
continue;
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
reader.skip(tag & 7);
|
|
1462
|
+
}
|
|
1463
|
+
return message;
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1466
|
+
fromJSON(object: any): UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
1467
|
+
return {
|
|
1468
|
+
displayName: isSet(object.displayName)
|
|
1469
|
+
? globalThis.String(object.displayName)
|
|
1470
|
+
: isSet(object.display_name)
|
|
1471
|
+
? globalThis.String(object.display_name)
|
|
1472
|
+
: undefined,
|
|
1473
|
+
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
1474
|
+
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : undefined,
|
|
1475
|
+
};
|
|
1476
|
+
},
|
|
1477
|
+
|
|
1478
|
+
toJSON(message: UpdateDerivedMetricRequest_DerivedMetricUpdates): unknown {
|
|
1479
|
+
const obj: any = {};
|
|
1480
|
+
if (message.displayName !== undefined) {
|
|
1481
|
+
obj.displayName = message.displayName;
|
|
1482
|
+
}
|
|
1483
|
+
if (message.description !== undefined) {
|
|
1484
|
+
obj.description = message.description;
|
|
1485
|
+
}
|
|
1486
|
+
if (message.enabled !== undefined) {
|
|
1487
|
+
obj.enabled = message.enabled;
|
|
1488
|
+
}
|
|
1489
|
+
return obj;
|
|
1490
|
+
},
|
|
1491
|
+
|
|
1492
|
+
create<I extends Exact<DeepPartial<UpdateDerivedMetricRequest_DerivedMetricUpdates>, I>>(
|
|
1493
|
+
base?: I,
|
|
1494
|
+
): UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
1495
|
+
return UpdateDerivedMetricRequest_DerivedMetricUpdates.fromPartial(base ?? ({} as any));
|
|
1496
|
+
},
|
|
1497
|
+
fromPartial<I extends Exact<DeepPartial<UpdateDerivedMetricRequest_DerivedMetricUpdates>, I>>(
|
|
1498
|
+
object: I,
|
|
1499
|
+
): UpdateDerivedMetricRequest_DerivedMetricUpdates {
|
|
1500
|
+
const message = createBaseUpdateDerivedMetricRequest_DerivedMetricUpdates();
|
|
1501
|
+
message.displayName = object.displayName ?? undefined;
|
|
1502
|
+
message.description = object.description ?? undefined;
|
|
1503
|
+
message.enabled = object.enabled ?? undefined;
|
|
1504
|
+
return message;
|
|
1505
|
+
},
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1508
|
+
function createBaseUpdateDerivedMetricResponse(): UpdateDerivedMetricResponse {
|
|
1509
|
+
return { status: undefined, derivedMetric: undefined };
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
export const UpdateDerivedMetricResponse: MessageFns<UpdateDerivedMetricResponse> = {
|
|
1513
|
+
encode(message: UpdateDerivedMetricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1514
|
+
if (message.status !== undefined) {
|
|
1515
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1516
|
+
}
|
|
1517
|
+
if (message.derivedMetric !== undefined) {
|
|
1518
|
+
DerivedMetric.encode(message.derivedMetric, writer.uint32(18).fork()).join();
|
|
1519
|
+
}
|
|
1520
|
+
return writer;
|
|
1521
|
+
},
|
|
1522
|
+
|
|
1523
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UpdateDerivedMetricResponse {
|
|
1524
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1525
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1526
|
+
const message = createBaseUpdateDerivedMetricResponse();
|
|
1527
|
+
while (reader.pos < end) {
|
|
1528
|
+
const tag = reader.uint32();
|
|
1529
|
+
switch (tag >>> 3) {
|
|
1530
|
+
case 1: {
|
|
1531
|
+
if (tag !== 10) {
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1538
|
+
case 2: {
|
|
1539
|
+
if (tag !== 18) {
|
|
1540
|
+
break;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
message.derivedMetric = DerivedMetric.decode(reader, reader.uint32());
|
|
1544
|
+
continue;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1548
|
+
break;
|
|
1549
|
+
}
|
|
1550
|
+
reader.skip(tag & 7);
|
|
1551
|
+
}
|
|
1552
|
+
return message;
|
|
1553
|
+
},
|
|
1554
|
+
|
|
1555
|
+
fromJSON(object: any): UpdateDerivedMetricResponse {
|
|
1556
|
+
return {
|
|
1557
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1558
|
+
derivedMetric: isSet(object.derivedMetric)
|
|
1559
|
+
? DerivedMetric.fromJSON(object.derivedMetric)
|
|
1560
|
+
: isSet(object.derived_metric)
|
|
1561
|
+
? DerivedMetric.fromJSON(object.derived_metric)
|
|
1562
|
+
: undefined,
|
|
1563
|
+
};
|
|
1564
|
+
},
|
|
1565
|
+
|
|
1566
|
+
toJSON(message: UpdateDerivedMetricResponse): unknown {
|
|
1567
|
+
const obj: any = {};
|
|
1568
|
+
if (message.status !== undefined) {
|
|
1569
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1570
|
+
}
|
|
1571
|
+
if (message.derivedMetric !== undefined) {
|
|
1572
|
+
obj.derivedMetric = DerivedMetric.toJSON(message.derivedMetric);
|
|
1573
|
+
}
|
|
1574
|
+
return obj;
|
|
1575
|
+
},
|
|
1576
|
+
|
|
1577
|
+
create<I extends Exact<DeepPartial<UpdateDerivedMetricResponse>, I>>(base?: I): UpdateDerivedMetricResponse {
|
|
1578
|
+
return UpdateDerivedMetricResponse.fromPartial(base ?? ({} as any));
|
|
1579
|
+
},
|
|
1580
|
+
fromPartial<I extends Exact<DeepPartial<UpdateDerivedMetricResponse>, I>>(object: I): UpdateDerivedMetricResponse {
|
|
1581
|
+
const message = createBaseUpdateDerivedMetricResponse();
|
|
1582
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1583
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1584
|
+
: undefined;
|
|
1585
|
+
message.derivedMetric = (object.derivedMetric !== undefined && object.derivedMetric !== null)
|
|
1586
|
+
? DerivedMetric.fromPartial(object.derivedMetric)
|
|
1587
|
+
: undefined;
|
|
1588
|
+
return message;
|
|
1589
|
+
},
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
function createBaseDeleteDerivedMetricRequest(): DeleteDerivedMetricRequest {
|
|
1593
|
+
return { organizationId: "", projectId: "", derivedMetricId: "" };
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
export const DeleteDerivedMetricRequest: MessageFns<DeleteDerivedMetricRequest> = {
|
|
1597
|
+
encode(message: DeleteDerivedMetricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1598
|
+
if (message.organizationId !== "") {
|
|
1599
|
+
writer.uint32(10).string(message.organizationId);
|
|
1600
|
+
}
|
|
1601
|
+
if (message.projectId !== "") {
|
|
1602
|
+
writer.uint32(18).string(message.projectId);
|
|
1603
|
+
}
|
|
1604
|
+
if (message.derivedMetricId !== "") {
|
|
1605
|
+
writer.uint32(26).string(message.derivedMetricId);
|
|
1606
|
+
}
|
|
1607
|
+
return writer;
|
|
1608
|
+
},
|
|
1609
|
+
|
|
1610
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DeleteDerivedMetricRequest {
|
|
1611
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1612
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1613
|
+
const message = createBaseDeleteDerivedMetricRequest();
|
|
1614
|
+
while (reader.pos < end) {
|
|
1615
|
+
const tag = reader.uint32();
|
|
1616
|
+
switch (tag >>> 3) {
|
|
1617
|
+
case 1: {
|
|
1618
|
+
if (tag !== 10) {
|
|
1619
|
+
break;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
message.organizationId = reader.string();
|
|
1623
|
+
continue;
|
|
1624
|
+
}
|
|
1625
|
+
case 2: {
|
|
1626
|
+
if (tag !== 18) {
|
|
1627
|
+
break;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
message.projectId = reader.string();
|
|
1631
|
+
continue;
|
|
1632
|
+
}
|
|
1633
|
+
case 3: {
|
|
1634
|
+
if (tag !== 26) {
|
|
1635
|
+
break;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
message.derivedMetricId = reader.string();
|
|
1639
|
+
continue;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
reader.skip(tag & 7);
|
|
1646
|
+
}
|
|
1647
|
+
return message;
|
|
1648
|
+
},
|
|
1649
|
+
|
|
1650
|
+
fromJSON(object: any): DeleteDerivedMetricRequest {
|
|
1651
|
+
return {
|
|
1652
|
+
organizationId: isSet(object.organizationId)
|
|
1653
|
+
? globalThis.String(object.organizationId)
|
|
1654
|
+
: isSet(object.organization_id)
|
|
1655
|
+
? globalThis.String(object.organization_id)
|
|
1656
|
+
: "",
|
|
1657
|
+
projectId: isSet(object.projectId)
|
|
1658
|
+
? globalThis.String(object.projectId)
|
|
1659
|
+
: isSet(object.project_id)
|
|
1660
|
+
? globalThis.String(object.project_id)
|
|
1661
|
+
: "",
|
|
1662
|
+
derivedMetricId: isSet(object.derivedMetricId)
|
|
1663
|
+
? globalThis.String(object.derivedMetricId)
|
|
1664
|
+
: isSet(object.derived_metric_id)
|
|
1665
|
+
? globalThis.String(object.derived_metric_id)
|
|
1666
|
+
: "",
|
|
1667
|
+
};
|
|
1668
|
+
},
|
|
1669
|
+
|
|
1670
|
+
toJSON(message: DeleteDerivedMetricRequest): unknown {
|
|
1671
|
+
const obj: any = {};
|
|
1672
|
+
if (message.organizationId !== "") {
|
|
1673
|
+
obj.organizationId = message.organizationId;
|
|
1674
|
+
}
|
|
1675
|
+
if (message.projectId !== "") {
|
|
1676
|
+
obj.projectId = message.projectId;
|
|
1677
|
+
}
|
|
1678
|
+
if (message.derivedMetricId !== "") {
|
|
1679
|
+
obj.derivedMetricId = message.derivedMetricId;
|
|
1680
|
+
}
|
|
1681
|
+
return obj;
|
|
1682
|
+
},
|
|
1683
|
+
|
|
1684
|
+
create<I extends Exact<DeepPartial<DeleteDerivedMetricRequest>, I>>(base?: I): DeleteDerivedMetricRequest {
|
|
1685
|
+
return DeleteDerivedMetricRequest.fromPartial(base ?? ({} as any));
|
|
1686
|
+
},
|
|
1687
|
+
fromPartial<I extends Exact<DeepPartial<DeleteDerivedMetricRequest>, I>>(object: I): DeleteDerivedMetricRequest {
|
|
1688
|
+
const message = createBaseDeleteDerivedMetricRequest();
|
|
1689
|
+
message.organizationId = object.organizationId ?? "";
|
|
1690
|
+
message.projectId = object.projectId ?? "";
|
|
1691
|
+
message.derivedMetricId = object.derivedMetricId ?? "";
|
|
1692
|
+
return message;
|
|
1693
|
+
},
|
|
1694
|
+
};
|
|
1695
|
+
|
|
1696
|
+
function createBaseDeleteDerivedMetricResponse(): DeleteDerivedMetricResponse {
|
|
1697
|
+
return { status: undefined };
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
export const DeleteDerivedMetricResponse: MessageFns<DeleteDerivedMetricResponse> = {
|
|
1701
|
+
encode(message: DeleteDerivedMetricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1702
|
+
if (message.status !== undefined) {
|
|
1703
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1704
|
+
}
|
|
1705
|
+
return writer;
|
|
1706
|
+
},
|
|
1707
|
+
|
|
1708
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DeleteDerivedMetricResponse {
|
|
1709
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1710
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1711
|
+
const message = createBaseDeleteDerivedMetricResponse();
|
|
1712
|
+
while (reader.pos < end) {
|
|
1713
|
+
const tag = reader.uint32();
|
|
1714
|
+
switch (tag >>> 3) {
|
|
1715
|
+
case 1: {
|
|
1716
|
+
if (tag !== 10) {
|
|
1717
|
+
break;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1727
|
+
reader.skip(tag & 7);
|
|
1728
|
+
}
|
|
1729
|
+
return message;
|
|
1730
|
+
},
|
|
1731
|
+
|
|
1732
|
+
fromJSON(object: any): DeleteDerivedMetricResponse {
|
|
1733
|
+
return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
|
|
1734
|
+
},
|
|
1735
|
+
|
|
1736
|
+
toJSON(message: DeleteDerivedMetricResponse): unknown {
|
|
1737
|
+
const obj: any = {};
|
|
1738
|
+
if (message.status !== undefined) {
|
|
1739
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1740
|
+
}
|
|
1741
|
+
return obj;
|
|
1742
|
+
},
|
|
1743
|
+
|
|
1744
|
+
create<I extends Exact<DeepPartial<DeleteDerivedMetricResponse>, I>>(base?: I): DeleteDerivedMetricResponse {
|
|
1745
|
+
return DeleteDerivedMetricResponse.fromPartial(base ?? ({} as any));
|
|
1746
|
+
},
|
|
1747
|
+
fromPartial<I extends Exact<DeepPartial<DeleteDerivedMetricResponse>, I>>(object: I): DeleteDerivedMetricResponse {
|
|
1748
|
+
const message = createBaseDeleteDerivedMetricResponse();
|
|
1749
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1750
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1751
|
+
: undefined;
|
|
1752
|
+
return message;
|
|
1753
|
+
},
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
function createBaseDryRunDerivedMetricRequest(): DryRunDerivedMetricRequest {
|
|
1757
|
+
return { organizationId: "", projectId: "", program: undefined, traceLimit: 0 };
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
export const DryRunDerivedMetricRequest: MessageFns<DryRunDerivedMetricRequest> = {
|
|
1761
|
+
encode(message: DryRunDerivedMetricRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1762
|
+
if (message.organizationId !== "") {
|
|
1763
|
+
writer.uint32(10).string(message.organizationId);
|
|
1764
|
+
}
|
|
1765
|
+
if (message.projectId !== "") {
|
|
1766
|
+
writer.uint32(18).string(message.projectId);
|
|
1767
|
+
}
|
|
1768
|
+
if (message.program !== undefined) {
|
|
1769
|
+
DerivedMetricProgram.encode(message.program, writer.uint32(26).fork()).join();
|
|
1770
|
+
}
|
|
1771
|
+
if (message.traceLimit !== 0) {
|
|
1772
|
+
writer.uint32(32).int32(message.traceLimit);
|
|
1773
|
+
}
|
|
1774
|
+
return writer;
|
|
1775
|
+
},
|
|
1776
|
+
|
|
1777
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DryRunDerivedMetricRequest {
|
|
1778
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1779
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1780
|
+
const message = createBaseDryRunDerivedMetricRequest();
|
|
1781
|
+
while (reader.pos < end) {
|
|
1782
|
+
const tag = reader.uint32();
|
|
1783
|
+
switch (tag >>> 3) {
|
|
1784
|
+
case 1: {
|
|
1785
|
+
if (tag !== 10) {
|
|
1786
|
+
break;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
message.organizationId = reader.string();
|
|
1790
|
+
continue;
|
|
1791
|
+
}
|
|
1792
|
+
case 2: {
|
|
1793
|
+
if (tag !== 18) {
|
|
1794
|
+
break;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
message.projectId = reader.string();
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
case 3: {
|
|
1801
|
+
if (tag !== 26) {
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
message.program = DerivedMetricProgram.decode(reader, reader.uint32());
|
|
1806
|
+
continue;
|
|
1807
|
+
}
|
|
1808
|
+
case 4: {
|
|
1809
|
+
if (tag !== 32) {
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
message.traceLimit = reader.int32();
|
|
1814
|
+
continue;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1818
|
+
break;
|
|
1819
|
+
}
|
|
1820
|
+
reader.skip(tag & 7);
|
|
1821
|
+
}
|
|
1822
|
+
return message;
|
|
1823
|
+
},
|
|
1824
|
+
|
|
1825
|
+
fromJSON(object: any): DryRunDerivedMetricRequest {
|
|
1826
|
+
return {
|
|
1827
|
+
organizationId: isSet(object.organizationId)
|
|
1828
|
+
? globalThis.String(object.organizationId)
|
|
1829
|
+
: isSet(object.organization_id)
|
|
1830
|
+
? globalThis.String(object.organization_id)
|
|
1831
|
+
: "",
|
|
1832
|
+
projectId: isSet(object.projectId)
|
|
1833
|
+
? globalThis.String(object.projectId)
|
|
1834
|
+
: isSet(object.project_id)
|
|
1835
|
+
? globalThis.String(object.project_id)
|
|
1836
|
+
: "",
|
|
1837
|
+
program: isSet(object.program) ? DerivedMetricProgram.fromJSON(object.program) : undefined,
|
|
1838
|
+
traceLimit: isSet(object.traceLimit)
|
|
1839
|
+
? globalThis.Number(object.traceLimit)
|
|
1840
|
+
: isSet(object.trace_limit)
|
|
1841
|
+
? globalThis.Number(object.trace_limit)
|
|
1842
|
+
: 0,
|
|
1843
|
+
};
|
|
1844
|
+
},
|
|
1845
|
+
|
|
1846
|
+
toJSON(message: DryRunDerivedMetricRequest): unknown {
|
|
1847
|
+
const obj: any = {};
|
|
1848
|
+
if (message.organizationId !== "") {
|
|
1849
|
+
obj.organizationId = message.organizationId;
|
|
1850
|
+
}
|
|
1851
|
+
if (message.projectId !== "") {
|
|
1852
|
+
obj.projectId = message.projectId;
|
|
1853
|
+
}
|
|
1854
|
+
if (message.program !== undefined) {
|
|
1855
|
+
obj.program = DerivedMetricProgram.toJSON(message.program);
|
|
1856
|
+
}
|
|
1857
|
+
if (message.traceLimit !== 0) {
|
|
1858
|
+
obj.traceLimit = Math.round(message.traceLimit);
|
|
1859
|
+
}
|
|
1860
|
+
return obj;
|
|
1861
|
+
},
|
|
1862
|
+
|
|
1863
|
+
create<I extends Exact<DeepPartial<DryRunDerivedMetricRequest>, I>>(base?: I): DryRunDerivedMetricRequest {
|
|
1864
|
+
return DryRunDerivedMetricRequest.fromPartial(base ?? ({} as any));
|
|
1865
|
+
},
|
|
1866
|
+
fromPartial<I extends Exact<DeepPartial<DryRunDerivedMetricRequest>, I>>(object: I): DryRunDerivedMetricRequest {
|
|
1867
|
+
const message = createBaseDryRunDerivedMetricRequest();
|
|
1868
|
+
message.organizationId = object.organizationId ?? "";
|
|
1869
|
+
message.projectId = object.projectId ?? "";
|
|
1870
|
+
message.program = (object.program !== undefined && object.program !== null)
|
|
1871
|
+
? DerivedMetricProgram.fromPartial(object.program)
|
|
1872
|
+
: undefined;
|
|
1873
|
+
message.traceLimit = object.traceLimit ?? 0;
|
|
1874
|
+
return message;
|
|
1875
|
+
},
|
|
1876
|
+
};
|
|
1877
|
+
|
|
1878
|
+
function createBaseDryRunDerivedMetricResponse(): DryRunDerivedMetricResponse {
|
|
1879
|
+
return { status: undefined, traceResults: [], outcomeCounts: [], tracesSelected: 0 };
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export const DryRunDerivedMetricResponse: MessageFns<DryRunDerivedMetricResponse> = {
|
|
1883
|
+
encode(message: DryRunDerivedMetricResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1884
|
+
if (message.status !== undefined) {
|
|
1885
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1886
|
+
}
|
|
1887
|
+
for (const v of message.traceResults) {
|
|
1888
|
+
DryRunTraceResult.encode(v!, writer.uint32(18).fork()).join();
|
|
1889
|
+
}
|
|
1890
|
+
for (const v of message.outcomeCounts) {
|
|
1891
|
+
DerivedMetricOutcomeCount.encode(v!, writer.uint32(26).fork()).join();
|
|
1892
|
+
}
|
|
1893
|
+
if (message.tracesSelected !== 0) {
|
|
1894
|
+
writer.uint32(32).uint32(message.tracesSelected);
|
|
1895
|
+
}
|
|
1896
|
+
return writer;
|
|
1897
|
+
},
|
|
1898
|
+
|
|
1899
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DryRunDerivedMetricResponse {
|
|
1900
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1901
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1902
|
+
const message = createBaseDryRunDerivedMetricResponse();
|
|
1903
|
+
while (reader.pos < end) {
|
|
1904
|
+
const tag = reader.uint32();
|
|
1905
|
+
switch (tag >>> 3) {
|
|
1906
|
+
case 1: {
|
|
1907
|
+
if (tag !== 10) {
|
|
1908
|
+
break;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1912
|
+
continue;
|
|
1913
|
+
}
|
|
1914
|
+
case 2: {
|
|
1915
|
+
if (tag !== 18) {
|
|
1916
|
+
break;
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
message.traceResults.push(DryRunTraceResult.decode(reader, reader.uint32()));
|
|
1920
|
+
continue;
|
|
1921
|
+
}
|
|
1922
|
+
case 3: {
|
|
1923
|
+
if (tag !== 26) {
|
|
1924
|
+
break;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
message.outcomeCounts.push(DerivedMetricOutcomeCount.decode(reader, reader.uint32()));
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
case 4: {
|
|
1931
|
+
if (tag !== 32) {
|
|
1932
|
+
break;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
message.tracesSelected = reader.uint32();
|
|
1936
|
+
continue;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1940
|
+
break;
|
|
1941
|
+
}
|
|
1942
|
+
reader.skip(tag & 7);
|
|
1943
|
+
}
|
|
1944
|
+
return message;
|
|
1945
|
+
},
|
|
1946
|
+
|
|
1947
|
+
fromJSON(object: any): DryRunDerivedMetricResponse {
|
|
1948
|
+
return {
|
|
1949
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1950
|
+
traceResults: globalThis.Array.isArray(object?.traceResults)
|
|
1951
|
+
? object.traceResults.map((e: any) => DryRunTraceResult.fromJSON(e))
|
|
1952
|
+
: globalThis.Array.isArray(object?.trace_results)
|
|
1953
|
+
? object.trace_results.map((e: any) => DryRunTraceResult.fromJSON(e))
|
|
1954
|
+
: [],
|
|
1955
|
+
outcomeCounts: globalThis.Array.isArray(object?.outcomeCounts)
|
|
1956
|
+
? object.outcomeCounts.map((e: any) => DerivedMetricOutcomeCount.fromJSON(e))
|
|
1957
|
+
: globalThis.Array.isArray(object?.outcome_counts)
|
|
1958
|
+
? object.outcome_counts.map((e: any) => DerivedMetricOutcomeCount.fromJSON(e))
|
|
1959
|
+
: [],
|
|
1960
|
+
tracesSelected: isSet(object.tracesSelected)
|
|
1961
|
+
? globalThis.Number(object.tracesSelected)
|
|
1962
|
+
: isSet(object.traces_selected)
|
|
1963
|
+
? globalThis.Number(object.traces_selected)
|
|
1964
|
+
: 0,
|
|
1965
|
+
};
|
|
1966
|
+
},
|
|
1967
|
+
|
|
1968
|
+
toJSON(message: DryRunDerivedMetricResponse): unknown {
|
|
1969
|
+
const obj: any = {};
|
|
1970
|
+
if (message.status !== undefined) {
|
|
1971
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1972
|
+
}
|
|
1973
|
+
if (message.traceResults?.length) {
|
|
1974
|
+
obj.traceResults = message.traceResults.map((e) => DryRunTraceResult.toJSON(e));
|
|
1975
|
+
}
|
|
1976
|
+
if (message.outcomeCounts?.length) {
|
|
1977
|
+
obj.outcomeCounts = message.outcomeCounts.map((e) => DerivedMetricOutcomeCount.toJSON(e));
|
|
1978
|
+
}
|
|
1979
|
+
if (message.tracesSelected !== 0) {
|
|
1980
|
+
obj.tracesSelected = Math.round(message.tracesSelected);
|
|
1981
|
+
}
|
|
1982
|
+
return obj;
|
|
1983
|
+
},
|
|
1984
|
+
|
|
1985
|
+
create<I extends Exact<DeepPartial<DryRunDerivedMetricResponse>, I>>(base?: I): DryRunDerivedMetricResponse {
|
|
1986
|
+
return DryRunDerivedMetricResponse.fromPartial(base ?? ({} as any));
|
|
1987
|
+
},
|
|
1988
|
+
fromPartial<I extends Exact<DeepPartial<DryRunDerivedMetricResponse>, I>>(object: I): DryRunDerivedMetricResponse {
|
|
1989
|
+
const message = createBaseDryRunDerivedMetricResponse();
|
|
1990
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1991
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1992
|
+
: undefined;
|
|
1993
|
+
message.traceResults = object.traceResults?.map((e) => DryRunTraceResult.fromPartial(e)) || [];
|
|
1994
|
+
message.outcomeCounts = object.outcomeCounts?.map((e) => DerivedMetricOutcomeCount.fromPartial(e)) || [];
|
|
1995
|
+
message.tracesSelected = object.tracesSelected ?? 0;
|
|
1996
|
+
return message;
|
|
1997
|
+
},
|
|
1998
|
+
};
|
|
1999
|
+
|
|
2000
|
+
function createBaseDryRunTraceResult(): DryRunTraceResult {
|
|
2001
|
+
return { traceId: "", emitted: undefined, notEmitted: undefined };
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
export const DryRunTraceResult: MessageFns<DryRunTraceResult> = {
|
|
2005
|
+
encode(message: DryRunTraceResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2006
|
+
if (message.traceId !== "") {
|
|
2007
|
+
writer.uint32(10).string(message.traceId);
|
|
2008
|
+
}
|
|
2009
|
+
if (message.emitted !== undefined) {
|
|
2010
|
+
DryRunEmission.encode(message.emitted, writer.uint32(18).fork()).join();
|
|
2011
|
+
}
|
|
2012
|
+
if (message.notEmitted !== undefined) {
|
|
2013
|
+
DryRunNonEmission.encode(message.notEmitted, writer.uint32(26).fork()).join();
|
|
2014
|
+
}
|
|
2015
|
+
return writer;
|
|
2016
|
+
},
|
|
2017
|
+
|
|
2018
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DryRunTraceResult {
|
|
2019
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2020
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2021
|
+
const message = createBaseDryRunTraceResult();
|
|
2022
|
+
while (reader.pos < end) {
|
|
2023
|
+
const tag = reader.uint32();
|
|
2024
|
+
switch (tag >>> 3) {
|
|
2025
|
+
case 1: {
|
|
2026
|
+
if (tag !== 10) {
|
|
2027
|
+
break;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
message.traceId = reader.string();
|
|
2031
|
+
continue;
|
|
2032
|
+
}
|
|
2033
|
+
case 2: {
|
|
2034
|
+
if (tag !== 18) {
|
|
2035
|
+
break;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
message.emitted = DryRunEmission.decode(reader, reader.uint32());
|
|
2039
|
+
continue;
|
|
2040
|
+
}
|
|
2041
|
+
case 3: {
|
|
2042
|
+
if (tag !== 26) {
|
|
2043
|
+
break;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
message.notEmitted = DryRunNonEmission.decode(reader, reader.uint32());
|
|
2047
|
+
continue;
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2051
|
+
break;
|
|
2052
|
+
}
|
|
2053
|
+
reader.skip(tag & 7);
|
|
2054
|
+
}
|
|
2055
|
+
return message;
|
|
2056
|
+
},
|
|
2057
|
+
|
|
2058
|
+
fromJSON(object: any): DryRunTraceResult {
|
|
2059
|
+
return {
|
|
2060
|
+
traceId: isSet(object.traceId)
|
|
2061
|
+
? globalThis.String(object.traceId)
|
|
2062
|
+
: isSet(object.trace_id)
|
|
2063
|
+
? globalThis.String(object.trace_id)
|
|
2064
|
+
: "",
|
|
2065
|
+
emitted: isSet(object.emitted) ? DryRunEmission.fromJSON(object.emitted) : undefined,
|
|
2066
|
+
notEmitted: isSet(object.notEmitted)
|
|
2067
|
+
? DryRunNonEmission.fromJSON(object.notEmitted)
|
|
2068
|
+
: isSet(object.not_emitted)
|
|
2069
|
+
? DryRunNonEmission.fromJSON(object.not_emitted)
|
|
2070
|
+
: undefined,
|
|
2071
|
+
};
|
|
2072
|
+
},
|
|
2073
|
+
|
|
2074
|
+
toJSON(message: DryRunTraceResult): unknown {
|
|
2075
|
+
const obj: any = {};
|
|
2076
|
+
if (message.traceId !== "") {
|
|
2077
|
+
obj.traceId = message.traceId;
|
|
2078
|
+
}
|
|
2079
|
+
if (message.emitted !== undefined) {
|
|
2080
|
+
obj.emitted = DryRunEmission.toJSON(message.emitted);
|
|
2081
|
+
}
|
|
2082
|
+
if (message.notEmitted !== undefined) {
|
|
2083
|
+
obj.notEmitted = DryRunNonEmission.toJSON(message.notEmitted);
|
|
2084
|
+
}
|
|
2085
|
+
return obj;
|
|
2086
|
+
},
|
|
2087
|
+
|
|
2088
|
+
create<I extends Exact<DeepPartial<DryRunTraceResult>, I>>(base?: I): DryRunTraceResult {
|
|
2089
|
+
return DryRunTraceResult.fromPartial(base ?? ({} as any));
|
|
2090
|
+
},
|
|
2091
|
+
fromPartial<I extends Exact<DeepPartial<DryRunTraceResult>, I>>(object: I): DryRunTraceResult {
|
|
2092
|
+
const message = createBaseDryRunTraceResult();
|
|
2093
|
+
message.traceId = object.traceId ?? "";
|
|
2094
|
+
message.emitted = (object.emitted !== undefined && object.emitted !== null)
|
|
2095
|
+
? DryRunEmission.fromPartial(object.emitted)
|
|
2096
|
+
: undefined;
|
|
2097
|
+
message.notEmitted = (object.notEmitted !== undefined && object.notEmitted !== null)
|
|
2098
|
+
? DryRunNonEmission.fromPartial(object.notEmitted)
|
|
2099
|
+
: undefined;
|
|
2100
|
+
return message;
|
|
2101
|
+
},
|
|
2102
|
+
};
|
|
2103
|
+
|
|
2104
|
+
function createBaseDryRunEmission(): DryRunEmission {
|
|
2105
|
+
return { value: 0, groupValue: "" };
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
export const DryRunEmission: MessageFns<DryRunEmission> = {
|
|
2109
|
+
encode(message: DryRunEmission, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2110
|
+
if (message.value !== 0) {
|
|
2111
|
+
writer.uint32(9).double(message.value);
|
|
2112
|
+
}
|
|
2113
|
+
if (message.groupValue !== "") {
|
|
2114
|
+
writer.uint32(18).string(message.groupValue);
|
|
2115
|
+
}
|
|
2116
|
+
return writer;
|
|
2117
|
+
},
|
|
2118
|
+
|
|
2119
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DryRunEmission {
|
|
2120
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2121
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2122
|
+
const message = createBaseDryRunEmission();
|
|
2123
|
+
while (reader.pos < end) {
|
|
2124
|
+
const tag = reader.uint32();
|
|
2125
|
+
switch (tag >>> 3) {
|
|
2126
|
+
case 1: {
|
|
2127
|
+
if (tag !== 9) {
|
|
2128
|
+
break;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
message.value = reader.double();
|
|
2132
|
+
continue;
|
|
2133
|
+
}
|
|
2134
|
+
case 2: {
|
|
2135
|
+
if (tag !== 18) {
|
|
2136
|
+
break;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
message.groupValue = reader.string();
|
|
2140
|
+
continue;
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2144
|
+
break;
|
|
2145
|
+
}
|
|
2146
|
+
reader.skip(tag & 7);
|
|
2147
|
+
}
|
|
2148
|
+
return message;
|
|
2149
|
+
},
|
|
2150
|
+
|
|
2151
|
+
fromJSON(object: any): DryRunEmission {
|
|
2152
|
+
return {
|
|
2153
|
+
value: isSet(object.value) ? globalThis.Number(object.value) : 0,
|
|
2154
|
+
groupValue: isSet(object.groupValue)
|
|
2155
|
+
? globalThis.String(object.groupValue)
|
|
2156
|
+
: isSet(object.group_value)
|
|
2157
|
+
? globalThis.String(object.group_value)
|
|
2158
|
+
: "",
|
|
2159
|
+
};
|
|
2160
|
+
},
|
|
2161
|
+
|
|
2162
|
+
toJSON(message: DryRunEmission): unknown {
|
|
2163
|
+
const obj: any = {};
|
|
2164
|
+
if (message.value !== 0) {
|
|
2165
|
+
obj.value = message.value;
|
|
2166
|
+
}
|
|
2167
|
+
if (message.groupValue !== "") {
|
|
2168
|
+
obj.groupValue = message.groupValue;
|
|
2169
|
+
}
|
|
2170
|
+
return obj;
|
|
2171
|
+
},
|
|
2172
|
+
|
|
2173
|
+
create<I extends Exact<DeepPartial<DryRunEmission>, I>>(base?: I): DryRunEmission {
|
|
2174
|
+
return DryRunEmission.fromPartial(base ?? ({} as any));
|
|
2175
|
+
},
|
|
2176
|
+
fromPartial<I extends Exact<DeepPartial<DryRunEmission>, I>>(object: I): DryRunEmission {
|
|
2177
|
+
const message = createBaseDryRunEmission();
|
|
2178
|
+
message.value = object.value ?? 0;
|
|
2179
|
+
message.groupValue = object.groupValue ?? "";
|
|
2180
|
+
return message;
|
|
2181
|
+
},
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2184
|
+
function createBaseDryRunNonEmission(): DryRunNonEmission {
|
|
2185
|
+
return { outcome: 0, detail: "" };
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
export const DryRunNonEmission: MessageFns<DryRunNonEmission> = {
|
|
2189
|
+
encode(message: DryRunNonEmission, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2190
|
+
if (message.outcome !== 0) {
|
|
2191
|
+
writer.uint32(8).int32(message.outcome);
|
|
2192
|
+
}
|
|
2193
|
+
if (message.detail !== "") {
|
|
2194
|
+
writer.uint32(18).string(message.detail);
|
|
2195
|
+
}
|
|
2196
|
+
return writer;
|
|
2197
|
+
},
|
|
2198
|
+
|
|
2199
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DryRunNonEmission {
|
|
2200
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2201
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2202
|
+
const message = createBaseDryRunNonEmission();
|
|
2203
|
+
while (reader.pos < end) {
|
|
2204
|
+
const tag = reader.uint32();
|
|
2205
|
+
switch (tag >>> 3) {
|
|
2206
|
+
case 1: {
|
|
2207
|
+
if (tag !== 8) {
|
|
2208
|
+
break;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
message.outcome = reader.int32() as any;
|
|
2212
|
+
continue;
|
|
2213
|
+
}
|
|
2214
|
+
case 2: {
|
|
2215
|
+
if (tag !== 18) {
|
|
2216
|
+
break;
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
message.detail = reader.string();
|
|
2220
|
+
continue;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2224
|
+
break;
|
|
2225
|
+
}
|
|
2226
|
+
reader.skip(tag & 7);
|
|
2227
|
+
}
|
|
2228
|
+
return message;
|
|
2229
|
+
},
|
|
2230
|
+
|
|
2231
|
+
fromJSON(object: any): DryRunNonEmission {
|
|
2232
|
+
return {
|
|
2233
|
+
outcome: isSet(object.outcome) ? derivedMetricOutcomeFromJSON(object.outcome) : 0,
|
|
2234
|
+
detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
|
|
2235
|
+
};
|
|
2236
|
+
},
|
|
2237
|
+
|
|
2238
|
+
toJSON(message: DryRunNonEmission): unknown {
|
|
2239
|
+
const obj: any = {};
|
|
2240
|
+
if (message.outcome !== 0) {
|
|
2241
|
+
obj.outcome = derivedMetricOutcomeToJSON(message.outcome);
|
|
2242
|
+
}
|
|
2243
|
+
if (message.detail !== "") {
|
|
2244
|
+
obj.detail = message.detail;
|
|
2245
|
+
}
|
|
2246
|
+
return obj;
|
|
2247
|
+
},
|
|
2248
|
+
|
|
2249
|
+
create<I extends Exact<DeepPartial<DryRunNonEmission>, I>>(base?: I): DryRunNonEmission {
|
|
2250
|
+
return DryRunNonEmission.fromPartial(base ?? ({} as any));
|
|
2251
|
+
},
|
|
2252
|
+
fromPartial<I extends Exact<DeepPartial<DryRunNonEmission>, I>>(object: I): DryRunNonEmission {
|
|
2253
|
+
const message = createBaseDryRunNonEmission();
|
|
2254
|
+
message.outcome = object.outcome ?? 0;
|
|
2255
|
+
message.detail = object.detail ?? "";
|
|
2256
|
+
return message;
|
|
2257
|
+
},
|
|
2258
|
+
};
|
|
2259
|
+
|
|
2260
|
+
function createBaseDerivedMetricOutcomeCount(): DerivedMetricOutcomeCount {
|
|
2261
|
+
return { outcome: 0, count: 0 };
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
export const DerivedMetricOutcomeCount: MessageFns<DerivedMetricOutcomeCount> = {
|
|
2265
|
+
encode(message: DerivedMetricOutcomeCount, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2266
|
+
if (message.outcome !== 0) {
|
|
2267
|
+
writer.uint32(8).int32(message.outcome);
|
|
2268
|
+
}
|
|
2269
|
+
if (message.count !== 0) {
|
|
2270
|
+
writer.uint32(16).uint32(message.count);
|
|
2271
|
+
}
|
|
2272
|
+
return writer;
|
|
2273
|
+
},
|
|
2274
|
+
|
|
2275
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricOutcomeCount {
|
|
2276
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2277
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2278
|
+
const message = createBaseDerivedMetricOutcomeCount();
|
|
2279
|
+
while (reader.pos < end) {
|
|
2280
|
+
const tag = reader.uint32();
|
|
2281
|
+
switch (tag >>> 3) {
|
|
2282
|
+
case 1: {
|
|
2283
|
+
if (tag !== 8) {
|
|
2284
|
+
break;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
message.outcome = reader.int32() as any;
|
|
2288
|
+
continue;
|
|
2289
|
+
}
|
|
2290
|
+
case 2: {
|
|
2291
|
+
if (tag !== 16) {
|
|
2292
|
+
break;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
message.count = reader.uint32();
|
|
2296
|
+
continue;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2300
|
+
break;
|
|
2301
|
+
}
|
|
2302
|
+
reader.skip(tag & 7);
|
|
2303
|
+
}
|
|
2304
|
+
return message;
|
|
2305
|
+
},
|
|
2306
|
+
|
|
2307
|
+
fromJSON(object: any): DerivedMetricOutcomeCount {
|
|
2308
|
+
return {
|
|
2309
|
+
outcome: isSet(object.outcome) ? derivedMetricOutcomeFromJSON(object.outcome) : 0,
|
|
2310
|
+
count: isSet(object.count) ? globalThis.Number(object.count) : 0,
|
|
2311
|
+
};
|
|
2312
|
+
},
|
|
2313
|
+
|
|
2314
|
+
toJSON(message: DerivedMetricOutcomeCount): unknown {
|
|
2315
|
+
const obj: any = {};
|
|
2316
|
+
if (message.outcome !== 0) {
|
|
2317
|
+
obj.outcome = derivedMetricOutcomeToJSON(message.outcome);
|
|
2318
|
+
}
|
|
2319
|
+
if (message.count !== 0) {
|
|
2320
|
+
obj.count = Math.round(message.count);
|
|
2321
|
+
}
|
|
2322
|
+
return obj;
|
|
2323
|
+
},
|
|
2324
|
+
|
|
2325
|
+
create<I extends Exact<DeepPartial<DerivedMetricOutcomeCount>, I>>(base?: I): DerivedMetricOutcomeCount {
|
|
2326
|
+
return DerivedMetricOutcomeCount.fromPartial(base ?? ({} as any));
|
|
2327
|
+
},
|
|
2328
|
+
fromPartial<I extends Exact<DeepPartial<DerivedMetricOutcomeCount>, I>>(object: I): DerivedMetricOutcomeCount {
|
|
2329
|
+
const message = createBaseDerivedMetricOutcomeCount();
|
|
2330
|
+
message.outcome = object.outcome ?? 0;
|
|
2331
|
+
message.count = object.count ?? 0;
|
|
2332
|
+
return message;
|
|
2333
|
+
},
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
/**
|
|
2337
|
+
* DerivedMetricGatewayService provides web client access to derived metrics: definitions that turn
|
|
2338
|
+
* each finished trace into one gauge datapoint. The resulting series is queried through
|
|
2339
|
+
* MetricGatewayService.
|
|
2340
|
+
*/
|
|
2341
|
+
export interface DerivedMetricGatewayService {
|
|
2342
|
+
CreateDerivedMetric(request: CreateDerivedMetricRequest, metadata?: Metadata): Promise<CreateDerivedMetricResponse>;
|
|
2343
|
+
GetDerivedMetric(request: GetDerivedMetricRequest, metadata?: Metadata): Promise<GetDerivedMetricResponse>;
|
|
2344
|
+
ListDerivedMetrics(request: ListDerivedMetricsRequest, metadata?: Metadata): Promise<ListDerivedMetricsResponse>;
|
|
2345
|
+
UpdateDerivedMetric(request: UpdateDerivedMetricRequest, metadata?: Metadata): Promise<UpdateDerivedMetricResponse>;
|
|
2346
|
+
DeleteDerivedMetric(request: DeleteDerivedMetricRequest, metadata?: Metadata): Promise<DeleteDerivedMetricResponse>;
|
|
2347
|
+
/** Evaluates an unsaved program against recent finished traces; persists nothing. */
|
|
2348
|
+
DryRunDerivedMetric(request: DryRunDerivedMetricRequest, metadata?: Metadata): Promise<DryRunDerivedMetricResponse>;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
export const DerivedMetricGatewayServiceServiceName = "gateway.web.v1.DerivedMetricGatewayService";
|
|
2352
|
+
export class DerivedMetricGatewayServiceClientImpl implements DerivedMetricGatewayService {
|
|
2353
|
+
private readonly rpc: Rpc;
|
|
2354
|
+
private readonly service: string;
|
|
2355
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
2356
|
+
this.service = opts?.service || DerivedMetricGatewayServiceServiceName;
|
|
2357
|
+
this.rpc = rpc;
|
|
2358
|
+
this.CreateDerivedMetric = this.CreateDerivedMetric.bind(this);
|
|
2359
|
+
this.GetDerivedMetric = this.GetDerivedMetric.bind(this);
|
|
2360
|
+
this.ListDerivedMetrics = this.ListDerivedMetrics.bind(this);
|
|
2361
|
+
this.UpdateDerivedMetric = this.UpdateDerivedMetric.bind(this);
|
|
2362
|
+
this.DeleteDerivedMetric = this.DeleteDerivedMetric.bind(this);
|
|
2363
|
+
this.DryRunDerivedMetric = this.DryRunDerivedMetric.bind(this);
|
|
2364
|
+
}
|
|
2365
|
+
CreateDerivedMetric(request: CreateDerivedMetricRequest, metadata?: Metadata): Promise<CreateDerivedMetricResponse> {
|
|
2366
|
+
const data = CreateDerivedMetricRequest.encode(request).finish();
|
|
2367
|
+
const promise = this.rpc.request(this.service, "CreateDerivedMetric", data, metadata);
|
|
2368
|
+
return promise.then((data) => CreateDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
GetDerivedMetric(request: GetDerivedMetricRequest, metadata?: Metadata): Promise<GetDerivedMetricResponse> {
|
|
2372
|
+
const data = GetDerivedMetricRequest.encode(request).finish();
|
|
2373
|
+
const promise = this.rpc.request(this.service, "GetDerivedMetric", data, metadata);
|
|
2374
|
+
return promise.then((data) => GetDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
ListDerivedMetrics(request: ListDerivedMetricsRequest, metadata?: Metadata): Promise<ListDerivedMetricsResponse> {
|
|
2378
|
+
const data = ListDerivedMetricsRequest.encode(request).finish();
|
|
2379
|
+
const promise = this.rpc.request(this.service, "ListDerivedMetrics", data, metadata);
|
|
2380
|
+
return promise.then((data) => ListDerivedMetricsResponse.decode(new BinaryReader(data)));
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
UpdateDerivedMetric(request: UpdateDerivedMetricRequest, metadata?: Metadata): Promise<UpdateDerivedMetricResponse> {
|
|
2384
|
+
const data = UpdateDerivedMetricRequest.encode(request).finish();
|
|
2385
|
+
const promise = this.rpc.request(this.service, "UpdateDerivedMetric", data, metadata);
|
|
2386
|
+
return promise.then((data) => UpdateDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
DeleteDerivedMetric(request: DeleteDerivedMetricRequest, metadata?: Metadata): Promise<DeleteDerivedMetricResponse> {
|
|
2390
|
+
const data = DeleteDerivedMetricRequest.encode(request).finish();
|
|
2391
|
+
const promise = this.rpc.request(this.service, "DeleteDerivedMetric", data, metadata);
|
|
2392
|
+
return promise.then((data) => DeleteDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
DryRunDerivedMetric(request: DryRunDerivedMetricRequest, metadata?: Metadata): Promise<DryRunDerivedMetricResponse> {
|
|
2396
|
+
const data = DryRunDerivedMetricRequest.encode(request).finish();
|
|
2397
|
+
const promise = this.rpc.request(this.service, "DryRunDerivedMetric", data, metadata);
|
|
2398
|
+
return promise.then((data) => DryRunDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
interface Rpc {
|
|
2403
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2407
|
+
|
|
2408
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2409
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2410
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2411
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2412
|
+
: Partial<T>;
|
|
2413
|
+
|
|
2414
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
2415
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
2416
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
2417
|
+
|
|
2418
|
+
function toTimestamp(date: Date): Timestamp {
|
|
2419
|
+
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
2420
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
2421
|
+
return { seconds, nanos };
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
function fromTimestamp(t: Timestamp): Date {
|
|
2425
|
+
let millis = (t.seconds || 0) * 1_000;
|
|
2426
|
+
millis += (t.nanos || 0) / 1_000_000;
|
|
2427
|
+
return new globalThis.Date(millis);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
function fromJsonTimestamp(o: any): Date {
|
|
2431
|
+
if (o instanceof globalThis.Date) {
|
|
2432
|
+
return o;
|
|
2433
|
+
} else if (typeof o === "string") {
|
|
2434
|
+
return new globalThis.Date(o);
|
|
2435
|
+
} else {
|
|
2436
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
function isSet(value: any): boolean {
|
|
2441
|
+
return value !== null && value !== undefined;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
export interface MessageFns<T> {
|
|
2445
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2446
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2447
|
+
fromJSON(object: any): T;
|
|
2448
|
+
toJSON(message: T): unknown;
|
|
2449
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
2450
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
2451
|
+
}
|