@miradorlabs/web-grpc 2.18.0 → 2.20.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.
@@ -2,7 +2,7 @@
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.12.0
4
4
  // protoc v3.21.12
5
- // source: proto/gateway/web/v1/sla_gateway.proto
5
+ // source: proto/gateway/web/v1/slo_gateway.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
@@ -12,283 +12,242 @@ import { ResponseStatus } from "../../common/v1/status";
12
12
 
13
13
  export const protobufPackage = "gateway.web.v1";
14
14
 
15
- export enum SlaComparator {
16
- SLA_COMPARATOR_UNSPECIFIED = 0,
17
- SLA_COMPARATOR_GREATER_THAN = 1,
18
- SLA_COMPARATOR_GREATER_THAN_OR_EQUAL = 2,
19
- SLA_COMPARATOR_LESS_THAN = 3,
20
- SLA_COMPARATOR_LESS_THAN_OR_EQUAL = 4,
15
+ export enum SloComparator {
16
+ SLO_COMPARATOR_UNSPECIFIED = 0,
17
+ SLO_COMPARATOR_GREATER_THAN = 1,
18
+ SLO_COMPARATOR_GREATER_THAN_OR_EQUAL = 2,
19
+ SLO_COMPARATOR_LESS_THAN = 3,
20
+ SLO_COMPARATOR_LESS_THAN_OR_EQUAL = 4,
21
21
  UNRECOGNIZED = -1,
22
22
  }
23
23
 
24
- export function slaComparatorFromJSON(object: any): SlaComparator {
24
+ export function sloComparatorFromJSON(object: any): SloComparator {
25
25
  switch (object) {
26
26
  case 0:
27
- case "SLA_COMPARATOR_UNSPECIFIED":
28
- return SlaComparator.SLA_COMPARATOR_UNSPECIFIED;
27
+ case "SLO_COMPARATOR_UNSPECIFIED":
28
+ return SloComparator.SLO_COMPARATOR_UNSPECIFIED;
29
29
  case 1:
30
- case "SLA_COMPARATOR_GREATER_THAN":
31
- return SlaComparator.SLA_COMPARATOR_GREATER_THAN;
30
+ case "SLO_COMPARATOR_GREATER_THAN":
31
+ return SloComparator.SLO_COMPARATOR_GREATER_THAN;
32
32
  case 2:
33
- case "SLA_COMPARATOR_GREATER_THAN_OR_EQUAL":
34
- return SlaComparator.SLA_COMPARATOR_GREATER_THAN_OR_EQUAL;
33
+ case "SLO_COMPARATOR_GREATER_THAN_OR_EQUAL":
34
+ return SloComparator.SLO_COMPARATOR_GREATER_THAN_OR_EQUAL;
35
35
  case 3:
36
- case "SLA_COMPARATOR_LESS_THAN":
37
- return SlaComparator.SLA_COMPARATOR_LESS_THAN;
36
+ case "SLO_COMPARATOR_LESS_THAN":
37
+ return SloComparator.SLO_COMPARATOR_LESS_THAN;
38
38
  case 4:
39
- case "SLA_COMPARATOR_LESS_THAN_OR_EQUAL":
40
- return SlaComparator.SLA_COMPARATOR_LESS_THAN_OR_EQUAL;
39
+ case "SLO_COMPARATOR_LESS_THAN_OR_EQUAL":
40
+ return SloComparator.SLO_COMPARATOR_LESS_THAN_OR_EQUAL;
41
41
  case -1:
42
42
  case "UNRECOGNIZED":
43
43
  default:
44
- return SlaComparator.UNRECOGNIZED;
44
+ return SloComparator.UNRECOGNIZED;
45
45
  }
46
46
  }
47
47
 
48
- export function slaComparatorToJSON(object: SlaComparator): string {
48
+ export function sloComparatorToJSON(object: SloComparator): string {
49
49
  switch (object) {
50
- case SlaComparator.SLA_COMPARATOR_UNSPECIFIED:
51
- return "SLA_COMPARATOR_UNSPECIFIED";
52
- case SlaComparator.SLA_COMPARATOR_GREATER_THAN:
53
- return "SLA_COMPARATOR_GREATER_THAN";
54
- case SlaComparator.SLA_COMPARATOR_GREATER_THAN_OR_EQUAL:
55
- return "SLA_COMPARATOR_GREATER_THAN_OR_EQUAL";
56
- case SlaComparator.SLA_COMPARATOR_LESS_THAN:
57
- return "SLA_COMPARATOR_LESS_THAN";
58
- case SlaComparator.SLA_COMPARATOR_LESS_THAN_OR_EQUAL:
59
- return "SLA_COMPARATOR_LESS_THAN_OR_EQUAL";
60
- case SlaComparator.UNRECOGNIZED:
50
+ case SloComparator.SLO_COMPARATOR_UNSPECIFIED:
51
+ return "SLO_COMPARATOR_UNSPECIFIED";
52
+ case SloComparator.SLO_COMPARATOR_GREATER_THAN:
53
+ return "SLO_COMPARATOR_GREATER_THAN";
54
+ case SloComparator.SLO_COMPARATOR_GREATER_THAN_OR_EQUAL:
55
+ return "SLO_COMPARATOR_GREATER_THAN_OR_EQUAL";
56
+ case SloComparator.SLO_COMPARATOR_LESS_THAN:
57
+ return "SLO_COMPARATOR_LESS_THAN";
58
+ case SloComparator.SLO_COMPARATOR_LESS_THAN_OR_EQUAL:
59
+ return "SLO_COMPARATOR_LESS_THAN_OR_EQUAL";
60
+ case SloComparator.UNRECOGNIZED:
61
61
  default:
62
62
  return "UNRECOGNIZED";
63
63
  }
64
64
  }
65
65
 
66
- export enum SlaOccurrence {
67
- SLA_OCCURRENCE_UNSPECIFIED = 0,
68
- SLA_OCCURRENCE_EARLIEST = 1,
69
- SLA_OCCURRENCE_LATEST = 2,
66
+ export enum SloCorridorState {
67
+ SLO_CORRIDOR_STATE_UNSPECIFIED = 0,
68
+ SLO_CORRIDOR_STATE_OK = 1,
69
+ SLO_CORRIDOR_STATE_BREACHED = 2,
70
+ SLO_CORRIDOR_STATE_NO_DATA = 3,
70
71
  UNRECOGNIZED = -1,
71
72
  }
72
73
 
73
- export function slaOccurrenceFromJSON(object: any): SlaOccurrence {
74
+ export function sloCorridorStateFromJSON(object: any): SloCorridorState {
74
75
  switch (object) {
75
76
  case 0:
76
- case "SLA_OCCURRENCE_UNSPECIFIED":
77
- return SlaOccurrence.SLA_OCCURRENCE_UNSPECIFIED;
77
+ case "SLO_CORRIDOR_STATE_UNSPECIFIED":
78
+ return SloCorridorState.SLO_CORRIDOR_STATE_UNSPECIFIED;
78
79
  case 1:
79
- case "SLA_OCCURRENCE_EARLIEST":
80
- return SlaOccurrence.SLA_OCCURRENCE_EARLIEST;
80
+ case "SLO_CORRIDOR_STATE_OK":
81
+ return SloCorridorState.SLO_CORRIDOR_STATE_OK;
81
82
  case 2:
82
- case "SLA_OCCURRENCE_LATEST":
83
- return SlaOccurrence.SLA_OCCURRENCE_LATEST;
84
- case -1:
85
- case "UNRECOGNIZED":
86
- default:
87
- return SlaOccurrence.UNRECOGNIZED;
88
- }
89
- }
90
-
91
- export function slaOccurrenceToJSON(object: SlaOccurrence): string {
92
- switch (object) {
93
- case SlaOccurrence.SLA_OCCURRENCE_UNSPECIFIED:
94
- return "SLA_OCCURRENCE_UNSPECIFIED";
95
- case SlaOccurrence.SLA_OCCURRENCE_EARLIEST:
96
- return "SLA_OCCURRENCE_EARLIEST";
97
- case SlaOccurrence.SLA_OCCURRENCE_LATEST:
98
- return "SLA_OCCURRENCE_LATEST";
99
- case SlaOccurrence.UNRECOGNIZED:
100
- default:
101
- return "UNRECOGNIZED";
102
- }
103
- }
104
-
105
- export enum SlaOutcomeStatus {
106
- SLA_OUTCOME_STATUS_UNSPECIFIED = 0,
107
- SLA_OUTCOME_STATUS_PASS = 1,
108
- SLA_OUTCOME_STATUS_FAIL = 2,
109
- SLA_OUTCOME_STATUS_NO_DATA = 3,
110
- SLA_OUTCOME_STATUS_ERROR = 4,
111
- UNRECOGNIZED = -1,
112
- }
113
-
114
- export function slaOutcomeStatusFromJSON(object: any): SlaOutcomeStatus {
115
- switch (object) {
116
- case 0:
117
- case "SLA_OUTCOME_STATUS_UNSPECIFIED":
118
- return SlaOutcomeStatus.SLA_OUTCOME_STATUS_UNSPECIFIED;
119
- case 1:
120
- case "SLA_OUTCOME_STATUS_PASS":
121
- return SlaOutcomeStatus.SLA_OUTCOME_STATUS_PASS;
122
- case 2:
123
- case "SLA_OUTCOME_STATUS_FAIL":
124
- return SlaOutcomeStatus.SLA_OUTCOME_STATUS_FAIL;
83
+ case "SLO_CORRIDOR_STATE_BREACHED":
84
+ return SloCorridorState.SLO_CORRIDOR_STATE_BREACHED;
125
85
  case 3:
126
- case "SLA_OUTCOME_STATUS_NO_DATA":
127
- return SlaOutcomeStatus.SLA_OUTCOME_STATUS_NO_DATA;
128
- case 4:
129
- case "SLA_OUTCOME_STATUS_ERROR":
130
- return SlaOutcomeStatus.SLA_OUTCOME_STATUS_ERROR;
86
+ case "SLO_CORRIDOR_STATE_NO_DATA":
87
+ return SloCorridorState.SLO_CORRIDOR_STATE_NO_DATA;
131
88
  case -1:
132
89
  case "UNRECOGNIZED":
133
90
  default:
134
- return SlaOutcomeStatus.UNRECOGNIZED;
91
+ return SloCorridorState.UNRECOGNIZED;
135
92
  }
136
93
  }
137
94
 
138
- export function slaOutcomeStatusToJSON(object: SlaOutcomeStatus): string {
95
+ export function sloCorridorStateToJSON(object: SloCorridorState): string {
139
96
  switch (object) {
140
- case SlaOutcomeStatus.SLA_OUTCOME_STATUS_UNSPECIFIED:
141
- return "SLA_OUTCOME_STATUS_UNSPECIFIED";
142
- case SlaOutcomeStatus.SLA_OUTCOME_STATUS_PASS:
143
- return "SLA_OUTCOME_STATUS_PASS";
144
- case SlaOutcomeStatus.SLA_OUTCOME_STATUS_FAIL:
145
- return "SLA_OUTCOME_STATUS_FAIL";
146
- case SlaOutcomeStatus.SLA_OUTCOME_STATUS_NO_DATA:
147
- return "SLA_OUTCOME_STATUS_NO_DATA";
148
- case SlaOutcomeStatus.SLA_OUTCOME_STATUS_ERROR:
149
- return "SLA_OUTCOME_STATUS_ERROR";
150
- case SlaOutcomeStatus.UNRECOGNIZED:
97
+ case SloCorridorState.SLO_CORRIDOR_STATE_UNSPECIFIED:
98
+ return "SLO_CORRIDOR_STATE_UNSPECIFIED";
99
+ case SloCorridorState.SLO_CORRIDOR_STATE_OK:
100
+ return "SLO_CORRIDOR_STATE_OK";
101
+ case SloCorridorState.SLO_CORRIDOR_STATE_BREACHED:
102
+ return "SLO_CORRIDOR_STATE_BREACHED";
103
+ case SloCorridorState.SLO_CORRIDOR_STATE_NO_DATA:
104
+ return "SLO_CORRIDOR_STATE_NO_DATA";
105
+ case SloCorridorState.UNRECOGNIZED:
151
106
  default:
152
107
  return "UNRECOGNIZED";
153
108
  }
154
109
  }
155
110
 
156
- export interface Sla {
111
+ export interface Slo {
157
112
  id: string;
158
113
  organizationId: string;
159
114
  projectId: string;
160
115
  name: string;
161
116
  description: string;
162
117
  enabled: boolean;
163
- check: SlaCheck | undefined;
164
- currentRevision: number;
165
- /** Server-assigned and immutable: mirador.sla.<id>.diff — query it via MetricGatewayService. */
166
- metricName: string;
118
+ objective: SloObjective | undefined;
167
119
  createdAt: Date | undefined;
168
120
  updatedAt: Date | undefined;
169
121
  }
170
122
 
171
- /** SlaCheck is the measurement: diff = side_a - side_b, compared against threshold. */
172
- export interface SlaCheck {
173
- sideA: SlaAttributeRef | undefined;
174
- sideB: SlaAttributeRef | undefined;
175
- comparator: SlaComparator;
176
- threshold: number;
177
- }
178
-
179
123
  /**
180
- * SlaAttributeRef addresses one numeric per-event trace attribute. Timestamps are
181
- * addressed as ordinary numeric attributes (epoch millis), so "B within N of A" is a
182
- * plain value diff there is no separate latency mode.
124
+ * SloObjective is the measurement: over the rolling window, at least `target` of the
125
+ * eligible samples of `metric_name` (split into one row per `group_by` combination) must be
126
+ * "good". What counts as good is the SLI in the oneof.
183
127
  */
184
- export interface SlaAttributeRef {
185
- attributeKey: string;
186
- /** Optional: restrict the lookup to events with this name. */
187
- eventName: string;
188
- occurrence: SlaOccurrence;
128
+ export interface SloObjective {
129
+ metricName: string;
130
+ groupBy: string[];
131
+ target: number;
132
+ windowSeconds: number;
133
+ gaugeThreshold?: GaugeThresholdSli | undefined;
189
134
  }
190
135
 
191
- export interface SlaOutcome {
192
- slaId: string;
193
- revision: number;
194
- traceId: string;
195
- terminalVersion: number;
196
- outcome: SlaOutcomeStatus;
197
- sideAValue?: number | undefined;
198
- sideBValue?: number | undefined;
199
- diff?: number | undefined;
200
- reasonCode: string;
201
- traceFinishedAt: Date | undefined;
202
- evaluatedAt: Date | undefined;
136
+ /** GaugeThresholdSli: a gauge sample is "good" when value <comparator> threshold. */
137
+ export interface GaugeThresholdSli {
138
+ comparator: SloComparator;
139
+ threshold: number;
203
140
  }
204
141
 
205
- export interface CreateSlaRequest {
142
+ export interface CreateSloRequest {
206
143
  organizationId: string;
207
144
  projectId: string;
208
145
  name: string;
209
146
  description: string;
210
147
  enabled: boolean;
211
- check: SlaCheck | undefined;
148
+ objective: SloObjective | undefined;
212
149
  }
213
150
 
214
- export interface CreateSlaResponse {
151
+ export interface CreateSloResponse {
215
152
  status: ResponseStatus | undefined;
216
- sla: Sla | undefined;
153
+ slo: Slo | undefined;
217
154
  }
218
155
 
219
- export interface GetSlaRequest {
156
+ export interface GetSloRequest {
220
157
  organizationId: string;
221
158
  projectId: string;
222
- slaId: string;
159
+ sloId: string;
223
160
  }
224
161
 
225
- export interface GetSlaResponse {
162
+ export interface GetSloResponse {
226
163
  status: ResponseStatus | undefined;
227
- sla: Sla | undefined;
164
+ slo: Slo | undefined;
228
165
  }
229
166
 
230
- export interface ListSlasRequest {
167
+ export interface ListSlosRequest {
231
168
  organizationId: string;
232
169
  projectId: string;
233
170
  }
234
171
 
235
- export interface ListSlasResponse {
172
+ export interface ListSlosResponse {
236
173
  status: ResponseStatus | undefined;
237
- slas: Sla[];
174
+ slos: Slo[];
238
175
  }
239
176
 
240
- export interface UpdateSlaRequest {
177
+ export interface UpdateSloRequest {
241
178
  organizationId: string;
242
179
  projectId: string;
243
- slaId: string;
244
- updates: UpdateSlaRequest_SlaUpdates | undefined;
180
+ sloId: string;
181
+ updates: UpdateSloRequest_SloUpdates | undefined;
245
182
  }
246
183
 
247
- export interface UpdateSlaRequest_SlaUpdates {
184
+ export interface UpdateSloRequest_SloUpdates {
248
185
  name?: string | undefined;
249
186
  description?: string | undefined;
250
187
  enabled?:
251
188
  | boolean
252
189
  | undefined;
253
- /** If set, replaces the whole check. */
254
- check: SlaCheck | undefined;
190
+ /** If set, replaces the whole objective. */
191
+ objective: SloObjective | undefined;
255
192
  }
256
193
 
257
- export interface UpdateSlaResponse {
194
+ export interface UpdateSloResponse {
258
195
  status: ResponseStatus | undefined;
259
- sla: Sla | undefined;
196
+ slo: Slo | undefined;
260
197
  }
261
198
 
262
- export interface DeleteSlaRequest {
199
+ export interface DeleteSloRequest {
263
200
  organizationId: string;
264
201
  projectId: string;
265
- slaId: string;
202
+ sloId: string;
266
203
  }
267
204
 
268
- export interface DeleteSlaResponse {
205
+ export interface DeleteSloResponse {
269
206
  status: ResponseStatus | undefined;
270
207
  }
271
208
 
272
- export interface ListSlaOutcomesRequest {
209
+ export interface GetSloStatusRequest {
273
210
  organizationId: string;
274
211
  projectId: string;
275
- slaId: string;
276
- startTime: Date | undefined;
277
- endTime:
278
- | Date
279
- | undefined;
280
- /** Unspecified returns every outcome status. */
281
- outcome: SlaOutcomeStatus;
282
- limit: number;
283
- offset: number;
212
+ sloId: string;
213
+ /** evaluation_time: the instant the rolling window ends at. Unset = server now(). */
214
+ evaluationTime: Date | undefined;
284
215
  }
285
216
 
286
- export interface ListSlaOutcomesResponse {
217
+ export interface GetSloStatusResponse {
287
218
  status: ResponseStatus | undefined;
288
- outcomes: SlaOutcome[];
219
+ sloStatus: SloStatus | undefined;
220
+ }
221
+
222
+ /**
223
+ * SloStatus is one SLO's live compliance over its rolling window, one row per
224
+ * observed corridor. A disabled SLO returns no corridors (nothing is evaluated).
225
+ */
226
+ export interface SloStatus {
227
+ sloId: string;
228
+ enabled: boolean;
229
+ windowSeconds: number;
230
+ windowStart: Date | undefined;
231
+ windowEnd: Date | undefined;
232
+ corridors: SloCorridorStatus[];
233
+ }
234
+
235
+ /**
236
+ * SloCorridorStatus is one group_by combination's compliance. group_values is
237
+ * parallel to the objective's group_by (empty for a project-wide SLO).
238
+ */
239
+ export interface SloCorridorStatus {
240
+ groupValues: string[];
241
+ eligibleCount: number;
242
+ goodCount: number;
243
+ /** compliance: good/eligible in [0,1]; 0 and state NO_DATA when eligible_count is 0. */
244
+ compliance: number;
245
+ /** budget_remaining: 1 - (1 - compliance)/(1 - target); may be negative when overspent. */
246
+ budgetRemaining: number;
247
+ state: SloCorridorState;
289
248
  }
290
249
 
291
- function createBaseSla(): Sla {
250
+ function createBaseSlo(): Slo {
292
251
  return {
293
252
  id: "",
294
253
  organizationId: "",
@@ -296,16 +255,14 @@ function createBaseSla(): Sla {
296
255
  name: "",
297
256
  description: "",
298
257
  enabled: false,
299
- check: undefined,
300
- currentRevision: 0,
301
- metricName: "",
258
+ objective: undefined,
302
259
  createdAt: undefined,
303
260
  updatedAt: undefined,
304
261
  };
305
262
  }
306
263
 
307
- export const Sla: MessageFns<Sla> = {
308
- encode(message: Sla, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
264
+ export const Slo: MessageFns<Slo> = {
265
+ encode(message: Slo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
309
266
  if (message.id !== "") {
310
267
  writer.uint32(10).string(message.id);
311
268
  }
@@ -324,28 +281,22 @@ export const Sla: MessageFns<Sla> = {
324
281
  if (message.enabled !== false) {
325
282
  writer.uint32(48).bool(message.enabled);
326
283
  }
327
- if (message.check !== undefined) {
328
- SlaCheck.encode(message.check, writer.uint32(58).fork()).join();
329
- }
330
- if (message.currentRevision !== 0) {
331
- writer.uint32(64).int32(message.currentRevision);
332
- }
333
- if (message.metricName !== "") {
334
- writer.uint32(74).string(message.metricName);
284
+ if (message.objective !== undefined) {
285
+ SloObjective.encode(message.objective, writer.uint32(58).fork()).join();
335
286
  }
336
287
  if (message.createdAt !== undefined) {
337
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
288
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
338
289
  }
339
290
  if (message.updatedAt !== undefined) {
340
- Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
291
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
341
292
  }
342
293
  return writer;
343
294
  },
344
295
 
345
- decode(input: BinaryReader | Uint8Array, length?: number): Sla {
296
+ decode(input: BinaryReader | Uint8Array, length?: number): Slo {
346
297
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
347
298
  const end = length === undefined ? reader.len : reader.pos + length;
348
- const message = createBaseSla();
299
+ const message = createBaseSlo();
349
300
  while (reader.pos < end) {
350
301
  const tag = reader.uint32();
351
302
  switch (tag >>> 3) {
@@ -402,15 +353,15 @@ export const Sla: MessageFns<Sla> = {
402
353
  break;
403
354
  }
404
355
 
405
- message.check = SlaCheck.decode(reader, reader.uint32());
356
+ message.objective = SloObjective.decode(reader, reader.uint32());
406
357
  continue;
407
358
  }
408
359
  case 8: {
409
- if (tag !== 64) {
360
+ if (tag !== 66) {
410
361
  break;
411
362
  }
412
363
 
413
- message.currentRevision = reader.int32();
364
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
414
365
  continue;
415
366
  }
416
367
  case 9: {
@@ -418,22 +369,6 @@ export const Sla: MessageFns<Sla> = {
418
369
  break;
419
370
  }
420
371
 
421
- message.metricName = reader.string();
422
- continue;
423
- }
424
- case 10: {
425
- if (tag !== 82) {
426
- break;
427
- }
428
-
429
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
430
- continue;
431
- }
432
- case 11: {
433
- if (tag !== 90) {
434
- break;
435
- }
436
-
437
372
  message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
438
373
  continue;
439
374
  }
@@ -446,7 +381,7 @@ export const Sla: MessageFns<Sla> = {
446
381
  return message;
447
382
  },
448
383
 
449
- fromJSON(object: any): Sla {
384
+ fromJSON(object: any): Slo {
450
385
  return {
451
386
  id: isSet(object.id) ? globalThis.String(object.id) : "",
452
387
  organizationId: isSet(object.organizationId)
@@ -462,17 +397,7 @@ export const Sla: MessageFns<Sla> = {
462
397
  name: isSet(object.name) ? globalThis.String(object.name) : "",
463
398
  description: isSet(object.description) ? globalThis.String(object.description) : "",
464
399
  enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
465
- check: isSet(object.check) ? SlaCheck.fromJSON(object.check) : undefined,
466
- currentRevision: isSet(object.currentRevision)
467
- ? globalThis.Number(object.currentRevision)
468
- : isSet(object.current_revision)
469
- ? globalThis.Number(object.current_revision)
470
- : 0,
471
- metricName: isSet(object.metricName)
472
- ? globalThis.String(object.metricName)
473
- : isSet(object.metric_name)
474
- ? globalThis.String(object.metric_name)
475
- : "",
400
+ objective: isSet(object.objective) ? SloObjective.fromJSON(object.objective) : undefined,
476
401
  createdAt: isSet(object.createdAt)
477
402
  ? fromJsonTimestamp(object.createdAt)
478
403
  : isSet(object.created_at)
@@ -486,7 +411,7 @@ export const Sla: MessageFns<Sla> = {
486
411
  };
487
412
  },
488
413
 
489
- toJSON(message: Sla): unknown {
414
+ toJSON(message: Slo): unknown {
490
415
  const obj: any = {};
491
416
  if (message.id !== "") {
492
417
  obj.id = message.id;
@@ -506,14 +431,8 @@ export const Sla: MessageFns<Sla> = {
506
431
  if (message.enabled !== false) {
507
432
  obj.enabled = message.enabled;
508
433
  }
509
- if (message.check !== undefined) {
510
- obj.check = SlaCheck.toJSON(message.check);
511
- }
512
- if (message.currentRevision !== 0) {
513
- obj.currentRevision = Math.round(message.currentRevision);
514
- }
515
- if (message.metricName !== "") {
516
- obj.metricName = message.metricName;
434
+ if (message.objective !== undefined) {
435
+ obj.objective = SloObjective.toJSON(message.objective);
517
436
  }
518
437
  if (message.createdAt !== undefined) {
519
438
  obj.createdAt = message.createdAt.toISOString();
@@ -524,53 +443,54 @@ export const Sla: MessageFns<Sla> = {
524
443
  return obj;
525
444
  },
526
445
 
527
- create<I extends Exact<DeepPartial<Sla>, I>>(base?: I): Sla {
528
- return Sla.fromPartial(base ?? ({} as any));
446
+ create<I extends Exact<DeepPartial<Slo>, I>>(base?: I): Slo {
447
+ return Slo.fromPartial(base ?? ({} as any));
529
448
  },
530
- fromPartial<I extends Exact<DeepPartial<Sla>, I>>(object: I): Sla {
531
- const message = createBaseSla();
449
+ fromPartial<I extends Exact<DeepPartial<Slo>, I>>(object: I): Slo {
450
+ const message = createBaseSlo();
532
451
  message.id = object.id ?? "";
533
452
  message.organizationId = object.organizationId ?? "";
534
453
  message.projectId = object.projectId ?? "";
535
454
  message.name = object.name ?? "";
536
455
  message.description = object.description ?? "";
537
456
  message.enabled = object.enabled ?? false;
538
- message.check = (object.check !== undefined && object.check !== null)
539
- ? SlaCheck.fromPartial(object.check)
457
+ message.objective = (object.objective !== undefined && object.objective !== null)
458
+ ? SloObjective.fromPartial(object.objective)
540
459
  : undefined;
541
- message.currentRevision = object.currentRevision ?? 0;
542
- message.metricName = object.metricName ?? "";
543
460
  message.createdAt = object.createdAt ?? undefined;
544
461
  message.updatedAt = object.updatedAt ?? undefined;
545
462
  return message;
546
463
  },
547
464
  };
548
465
 
549
- function createBaseSlaCheck(): SlaCheck {
550
- return { sideA: undefined, sideB: undefined, comparator: 0, threshold: 0 };
466
+ function createBaseSloObjective(): SloObjective {
467
+ return { metricName: "", groupBy: [], target: 0, windowSeconds: 0, gaugeThreshold: undefined };
551
468
  }
552
469
 
553
- export const SlaCheck: MessageFns<SlaCheck> = {
554
- encode(message: SlaCheck, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
555
- if (message.sideA !== undefined) {
556
- SlaAttributeRef.encode(message.sideA, writer.uint32(10).fork()).join();
470
+ export const SloObjective: MessageFns<SloObjective> = {
471
+ encode(message: SloObjective, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
472
+ if (message.metricName !== "") {
473
+ writer.uint32(10).string(message.metricName);
557
474
  }
558
- if (message.sideB !== undefined) {
559
- SlaAttributeRef.encode(message.sideB, writer.uint32(18).fork()).join();
475
+ for (const v of message.groupBy) {
476
+ writer.uint32(18).string(v!);
560
477
  }
561
- if (message.comparator !== 0) {
562
- writer.uint32(24).int32(message.comparator);
478
+ if (message.target !== 0) {
479
+ writer.uint32(25).double(message.target);
563
480
  }
564
- if (message.threshold !== 0) {
565
- writer.uint32(33).double(message.threshold);
481
+ if (message.windowSeconds !== 0) {
482
+ writer.uint32(32).int64(message.windowSeconds);
483
+ }
484
+ if (message.gaugeThreshold !== undefined) {
485
+ GaugeThresholdSli.encode(message.gaugeThreshold, writer.uint32(42).fork()).join();
566
486
  }
567
487
  return writer;
568
488
  },
569
489
 
570
- decode(input: BinaryReader | Uint8Array, length?: number): SlaCheck {
490
+ decode(input: BinaryReader | Uint8Array, length?: number): SloObjective {
571
491
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
572
492
  const end = length === undefined ? reader.len : reader.pos + length;
573
- const message = createBaseSlaCheck();
493
+ const message = createBaseSloObjective();
574
494
  while (reader.pos < end) {
575
495
  const tag = reader.uint32();
576
496
  switch (tag >>> 3) {
@@ -579,7 +499,7 @@ export const SlaCheck: MessageFns<SlaCheck> = {
579
499
  break;
580
500
  }
581
501
 
582
- message.sideA = SlaAttributeRef.decode(reader, reader.uint32());
502
+ message.metricName = reader.string();
583
503
  continue;
584
504
  }
585
505
  case 2: {
@@ -587,132 +507,31 @@ export const SlaCheck: MessageFns<SlaCheck> = {
587
507
  break;
588
508
  }
589
509
 
590
- message.sideB = SlaAttributeRef.decode(reader, reader.uint32());
510
+ message.groupBy.push(reader.string());
591
511
  continue;
592
512
  }
593
513
  case 3: {
594
- if (tag !== 24) {
514
+ if (tag !== 25) {
595
515
  break;
596
516
  }
597
517
 
598
- message.comparator = reader.int32() as any;
518
+ message.target = reader.double();
599
519
  continue;
600
520
  }
601
521
  case 4: {
602
- if (tag !== 33) {
603
- break;
604
- }
605
-
606
- message.threshold = reader.double();
607
- continue;
608
- }
609
- }
610
- if ((tag & 7) === 4 || tag === 0) {
611
- break;
612
- }
613
- reader.skip(tag & 7);
614
- }
615
- return message;
616
- },
617
-
618
- fromJSON(object: any): SlaCheck {
619
- return {
620
- sideA: isSet(object.sideA)
621
- ? SlaAttributeRef.fromJSON(object.sideA)
622
- : isSet(object.side_a)
623
- ? SlaAttributeRef.fromJSON(object.side_a)
624
- : undefined,
625
- sideB: isSet(object.sideB)
626
- ? SlaAttributeRef.fromJSON(object.sideB)
627
- : isSet(object.side_b)
628
- ? SlaAttributeRef.fromJSON(object.side_b)
629
- : undefined,
630
- comparator: isSet(object.comparator) ? slaComparatorFromJSON(object.comparator) : 0,
631
- threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0,
632
- };
633
- },
634
-
635
- toJSON(message: SlaCheck): unknown {
636
- const obj: any = {};
637
- if (message.sideA !== undefined) {
638
- obj.sideA = SlaAttributeRef.toJSON(message.sideA);
639
- }
640
- if (message.sideB !== undefined) {
641
- obj.sideB = SlaAttributeRef.toJSON(message.sideB);
642
- }
643
- if (message.comparator !== 0) {
644
- obj.comparator = slaComparatorToJSON(message.comparator);
645
- }
646
- if (message.threshold !== 0) {
647
- obj.threshold = message.threshold;
648
- }
649
- return obj;
650
- },
651
-
652
- create<I extends Exact<DeepPartial<SlaCheck>, I>>(base?: I): SlaCheck {
653
- return SlaCheck.fromPartial(base ?? ({} as any));
654
- },
655
- fromPartial<I extends Exact<DeepPartial<SlaCheck>, I>>(object: I): SlaCheck {
656
- const message = createBaseSlaCheck();
657
- message.sideA = (object.sideA !== undefined && object.sideA !== null)
658
- ? SlaAttributeRef.fromPartial(object.sideA)
659
- : undefined;
660
- message.sideB = (object.sideB !== undefined && object.sideB !== null)
661
- ? SlaAttributeRef.fromPartial(object.sideB)
662
- : undefined;
663
- message.comparator = object.comparator ?? 0;
664
- message.threshold = object.threshold ?? 0;
665
- return message;
666
- },
667
- };
668
-
669
- function createBaseSlaAttributeRef(): SlaAttributeRef {
670
- return { attributeKey: "", eventName: "", occurrence: 0 };
671
- }
672
-
673
- export const SlaAttributeRef: MessageFns<SlaAttributeRef> = {
674
- encode(message: SlaAttributeRef, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
675
- if (message.attributeKey !== "") {
676
- writer.uint32(10).string(message.attributeKey);
677
- }
678
- if (message.eventName !== "") {
679
- writer.uint32(18).string(message.eventName);
680
- }
681
- if (message.occurrence !== 0) {
682
- writer.uint32(24).int32(message.occurrence);
683
- }
684
- return writer;
685
- },
686
-
687
- decode(input: BinaryReader | Uint8Array, length?: number): SlaAttributeRef {
688
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
689
- const end = length === undefined ? reader.len : reader.pos + length;
690
- const message = createBaseSlaAttributeRef();
691
- while (reader.pos < end) {
692
- const tag = reader.uint32();
693
- switch (tag >>> 3) {
694
- case 1: {
695
- if (tag !== 10) {
696
- break;
697
- }
698
-
699
- message.attributeKey = reader.string();
700
- continue;
701
- }
702
- case 2: {
703
- if (tag !== 18) {
522
+ if (tag !== 32) {
704
523
  break;
705
524
  }
706
525
 
707
- message.eventName = reader.string();
526
+ message.windowSeconds = longToNumber(reader.int64());
708
527
  continue;
709
528
  }
710
- case 3: {
711
- if (tag !== 24) {
529
+ case 5: {
530
+ if (tag !== 42) {
712
531
  break;
713
532
  }
714
533
 
715
- message.occurrence = reader.int32() as any;
534
+ message.gaugeThreshold = GaugeThresholdSli.decode(reader, reader.uint32());
716
535
  continue;
717
536
  }
718
537
  }
@@ -724,195 +543,104 @@ export const SlaAttributeRef: MessageFns<SlaAttributeRef> = {
724
543
  return message;
725
544
  },
726
545
 
727
- fromJSON(object: any): SlaAttributeRef {
546
+ fromJSON(object: any): SloObjective {
728
547
  return {
729
- attributeKey: isSet(object.attributeKey)
730
- ? globalThis.String(object.attributeKey)
731
- : isSet(object.attribute_key)
732
- ? globalThis.String(object.attribute_key)
733
- : "",
734
- eventName: isSet(object.eventName)
735
- ? globalThis.String(object.eventName)
736
- : isSet(object.event_name)
737
- ? globalThis.String(object.event_name)
548
+ metricName: isSet(object.metricName)
549
+ ? globalThis.String(object.metricName)
550
+ : isSet(object.metric_name)
551
+ ? globalThis.String(object.metric_name)
738
552
  : "",
739
- occurrence: isSet(object.occurrence) ? slaOccurrenceFromJSON(object.occurrence) : 0,
553
+ groupBy: globalThis.Array.isArray(object?.groupBy)
554
+ ? object.groupBy.map((e: any) => globalThis.String(e))
555
+ : globalThis.Array.isArray(object?.group_by)
556
+ ? object.group_by.map((e: any) => globalThis.String(e))
557
+ : [],
558
+ target: isSet(object.target) ? globalThis.Number(object.target) : 0,
559
+ windowSeconds: isSet(object.windowSeconds)
560
+ ? globalThis.Number(object.windowSeconds)
561
+ : isSet(object.window_seconds)
562
+ ? globalThis.Number(object.window_seconds)
563
+ : 0,
564
+ gaugeThreshold: isSet(object.gaugeThreshold)
565
+ ? GaugeThresholdSli.fromJSON(object.gaugeThreshold)
566
+ : isSet(object.gauge_threshold)
567
+ ? GaugeThresholdSli.fromJSON(object.gauge_threshold)
568
+ : undefined,
740
569
  };
741
570
  },
742
571
 
743
- toJSON(message: SlaAttributeRef): unknown {
572
+ toJSON(message: SloObjective): unknown {
744
573
  const obj: any = {};
745
- if (message.attributeKey !== "") {
746
- obj.attributeKey = message.attributeKey;
574
+ if (message.metricName !== "") {
575
+ obj.metricName = message.metricName;
747
576
  }
748
- if (message.eventName !== "") {
749
- obj.eventName = message.eventName;
577
+ if (message.groupBy?.length) {
578
+ obj.groupBy = message.groupBy;
750
579
  }
751
- if (message.occurrence !== 0) {
752
- obj.occurrence = slaOccurrenceToJSON(message.occurrence);
580
+ if (message.target !== 0) {
581
+ obj.target = message.target;
582
+ }
583
+ if (message.windowSeconds !== 0) {
584
+ obj.windowSeconds = Math.round(message.windowSeconds);
585
+ }
586
+ if (message.gaugeThreshold !== undefined) {
587
+ obj.gaugeThreshold = GaugeThresholdSli.toJSON(message.gaugeThreshold);
753
588
  }
754
589
  return obj;
755
590
  },
756
591
 
757
- create<I extends Exact<DeepPartial<SlaAttributeRef>, I>>(base?: I): SlaAttributeRef {
758
- return SlaAttributeRef.fromPartial(base ?? ({} as any));
592
+ create<I extends Exact<DeepPartial<SloObjective>, I>>(base?: I): SloObjective {
593
+ return SloObjective.fromPartial(base ?? ({} as any));
759
594
  },
760
- fromPartial<I extends Exact<DeepPartial<SlaAttributeRef>, I>>(object: I): SlaAttributeRef {
761
- const message = createBaseSlaAttributeRef();
762
- message.attributeKey = object.attributeKey ?? "";
763
- message.eventName = object.eventName ?? "";
764
- message.occurrence = object.occurrence ?? 0;
595
+ fromPartial<I extends Exact<DeepPartial<SloObjective>, I>>(object: I): SloObjective {
596
+ const message = createBaseSloObjective();
597
+ message.metricName = object.metricName ?? "";
598
+ message.groupBy = object.groupBy?.map((e) => e) || [];
599
+ message.target = object.target ?? 0;
600
+ message.windowSeconds = object.windowSeconds ?? 0;
601
+ message.gaugeThreshold = (object.gaugeThreshold !== undefined && object.gaugeThreshold !== null)
602
+ ? GaugeThresholdSli.fromPartial(object.gaugeThreshold)
603
+ : undefined;
765
604
  return message;
766
605
  },
767
606
  };
768
607
 
769
- function createBaseSlaOutcome(): SlaOutcome {
770
- return {
771
- slaId: "",
772
- revision: 0,
773
- traceId: "",
774
- terminalVersion: 0,
775
- outcome: 0,
776
- sideAValue: undefined,
777
- sideBValue: undefined,
778
- diff: undefined,
779
- reasonCode: "",
780
- traceFinishedAt: undefined,
781
- evaluatedAt: undefined,
782
- };
608
+ function createBaseGaugeThresholdSli(): GaugeThresholdSli {
609
+ return { comparator: 0, threshold: 0 };
783
610
  }
784
611
 
785
- export const SlaOutcome: MessageFns<SlaOutcome> = {
786
- encode(message: SlaOutcome, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
787
- if (message.slaId !== "") {
788
- writer.uint32(10).string(message.slaId);
789
- }
790
- if (message.revision !== 0) {
791
- writer.uint32(16).int32(message.revision);
792
- }
793
- if (message.traceId !== "") {
794
- writer.uint32(26).string(message.traceId);
795
- }
796
- if (message.terminalVersion !== 0) {
797
- writer.uint32(32).uint64(message.terminalVersion);
798
- }
799
- if (message.outcome !== 0) {
800
- writer.uint32(40).int32(message.outcome);
801
- }
802
- if (message.sideAValue !== undefined) {
803
- writer.uint32(49).double(message.sideAValue);
804
- }
805
- if (message.sideBValue !== undefined) {
806
- writer.uint32(57).double(message.sideBValue);
807
- }
808
- if (message.diff !== undefined) {
809
- writer.uint32(65).double(message.diff);
810
- }
811
- if (message.reasonCode !== "") {
812
- writer.uint32(74).string(message.reasonCode);
813
- }
814
- if (message.traceFinishedAt !== undefined) {
815
- Timestamp.encode(toTimestamp(message.traceFinishedAt), writer.uint32(82).fork()).join();
612
+ export const GaugeThresholdSli: MessageFns<GaugeThresholdSli> = {
613
+ encode(message: GaugeThresholdSli, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
614
+ if (message.comparator !== 0) {
615
+ writer.uint32(8).int32(message.comparator);
816
616
  }
817
- if (message.evaluatedAt !== undefined) {
818
- Timestamp.encode(toTimestamp(message.evaluatedAt), writer.uint32(90).fork()).join();
617
+ if (message.threshold !== 0) {
618
+ writer.uint32(17).double(message.threshold);
819
619
  }
820
620
  return writer;
821
621
  },
822
622
 
823
- decode(input: BinaryReader | Uint8Array, length?: number): SlaOutcome {
623
+ decode(input: BinaryReader | Uint8Array, length?: number): GaugeThresholdSli {
824
624
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
825
625
  const end = length === undefined ? reader.len : reader.pos + length;
826
- const message = createBaseSlaOutcome();
626
+ const message = createBaseGaugeThresholdSli();
827
627
  while (reader.pos < end) {
828
628
  const tag = reader.uint32();
829
629
  switch (tag >>> 3) {
830
630
  case 1: {
831
- if (tag !== 10) {
631
+ if (tag !== 8) {
832
632
  break;
833
633
  }
834
634
 
835
- message.slaId = reader.string();
635
+ message.comparator = reader.int32() as any;
836
636
  continue;
837
637
  }
838
638
  case 2: {
839
- if (tag !== 16) {
840
- break;
841
- }
842
-
843
- message.revision = reader.int32();
844
- continue;
845
- }
846
- case 3: {
847
- if (tag !== 26) {
848
- break;
849
- }
850
-
851
- message.traceId = reader.string();
852
- continue;
853
- }
854
- case 4: {
855
- if (tag !== 32) {
856
- break;
857
- }
858
-
859
- message.terminalVersion = longToNumber(reader.uint64());
860
- continue;
861
- }
862
- case 5: {
863
- if (tag !== 40) {
864
- break;
865
- }
866
-
867
- message.outcome = reader.int32() as any;
868
- continue;
869
- }
870
- case 6: {
871
- if (tag !== 49) {
872
- break;
873
- }
874
-
875
- message.sideAValue = reader.double();
876
- continue;
877
- }
878
- case 7: {
879
- if (tag !== 57) {
880
- break;
881
- }
882
-
883
- message.sideBValue = reader.double();
884
- continue;
885
- }
886
- case 8: {
887
- if (tag !== 65) {
888
- break;
889
- }
890
-
891
- message.diff = reader.double();
892
- continue;
893
- }
894
- case 9: {
895
- if (tag !== 74) {
896
- break;
897
- }
898
-
899
- message.reasonCode = reader.string();
900
- continue;
901
- }
902
- case 10: {
903
- if (tag !== 82) {
904
- break;
905
- }
906
-
907
- message.traceFinishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
908
- continue;
909
- }
910
- case 11: {
911
- if (tag !== 90) {
639
+ if (tag !== 17) {
912
640
  break;
913
641
  }
914
642
 
915
- message.evaluatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
643
+ message.threshold = reader.double();
916
644
  continue;
917
645
  }
918
646
  }
@@ -924,118 +652,41 @@ export const SlaOutcome: MessageFns<SlaOutcome> = {
924
652
  return message;
925
653
  },
926
654
 
927
- fromJSON(object: any): SlaOutcome {
655
+ fromJSON(object: any): GaugeThresholdSli {
928
656
  return {
929
- slaId: isSet(object.slaId)
930
- ? globalThis.String(object.slaId)
931
- : isSet(object.sla_id)
932
- ? globalThis.String(object.sla_id)
933
- : "",
934
- revision: isSet(object.revision) ? globalThis.Number(object.revision) : 0,
935
- traceId: isSet(object.traceId)
936
- ? globalThis.String(object.traceId)
937
- : isSet(object.trace_id)
938
- ? globalThis.String(object.trace_id)
939
- : "",
940
- terminalVersion: isSet(object.terminalVersion)
941
- ? globalThis.Number(object.terminalVersion)
942
- : isSet(object.terminal_version)
943
- ? globalThis.Number(object.terminal_version)
944
- : 0,
945
- outcome: isSet(object.outcome) ? slaOutcomeStatusFromJSON(object.outcome) : 0,
946
- sideAValue: isSet(object.sideAValue)
947
- ? globalThis.Number(object.sideAValue)
948
- : isSet(object.side_a_value)
949
- ? globalThis.Number(object.side_a_value)
950
- : undefined,
951
- sideBValue: isSet(object.sideBValue)
952
- ? globalThis.Number(object.sideBValue)
953
- : isSet(object.side_b_value)
954
- ? globalThis.Number(object.side_b_value)
955
- : undefined,
956
- diff: isSet(object.diff) ? globalThis.Number(object.diff) : undefined,
957
- reasonCode: isSet(object.reasonCode)
958
- ? globalThis.String(object.reasonCode)
959
- : isSet(object.reason_code)
960
- ? globalThis.String(object.reason_code)
961
- : "",
962
- traceFinishedAt: isSet(object.traceFinishedAt)
963
- ? fromJsonTimestamp(object.traceFinishedAt)
964
- : isSet(object.trace_finished_at)
965
- ? fromJsonTimestamp(object.trace_finished_at)
966
- : undefined,
967
- evaluatedAt: isSet(object.evaluatedAt)
968
- ? fromJsonTimestamp(object.evaluatedAt)
969
- : isSet(object.evaluated_at)
970
- ? fromJsonTimestamp(object.evaluated_at)
971
- : undefined,
657
+ comparator: isSet(object.comparator) ? sloComparatorFromJSON(object.comparator) : 0,
658
+ threshold: isSet(object.threshold) ? globalThis.Number(object.threshold) : 0,
972
659
  };
973
660
  },
974
661
 
975
- toJSON(message: SlaOutcome): unknown {
662
+ toJSON(message: GaugeThresholdSli): unknown {
976
663
  const obj: any = {};
977
- if (message.slaId !== "") {
978
- obj.slaId = message.slaId;
979
- }
980
- if (message.revision !== 0) {
981
- obj.revision = Math.round(message.revision);
982
- }
983
- if (message.traceId !== "") {
984
- obj.traceId = message.traceId;
985
- }
986
- if (message.terminalVersion !== 0) {
987
- obj.terminalVersion = Math.round(message.terminalVersion);
988
- }
989
- if (message.outcome !== 0) {
990
- obj.outcome = slaOutcomeStatusToJSON(message.outcome);
991
- }
992
- if (message.sideAValue !== undefined) {
993
- obj.sideAValue = message.sideAValue;
994
- }
995
- if (message.sideBValue !== undefined) {
996
- obj.sideBValue = message.sideBValue;
997
- }
998
- if (message.diff !== undefined) {
999
- obj.diff = message.diff;
1000
- }
1001
- if (message.reasonCode !== "") {
1002
- obj.reasonCode = message.reasonCode;
1003
- }
1004
- if (message.traceFinishedAt !== undefined) {
1005
- obj.traceFinishedAt = message.traceFinishedAt.toISOString();
664
+ if (message.comparator !== 0) {
665
+ obj.comparator = sloComparatorToJSON(message.comparator);
1006
666
  }
1007
- if (message.evaluatedAt !== undefined) {
1008
- obj.evaluatedAt = message.evaluatedAt.toISOString();
667
+ if (message.threshold !== 0) {
668
+ obj.threshold = message.threshold;
1009
669
  }
1010
670
  return obj;
1011
671
  },
1012
672
 
1013
- create<I extends Exact<DeepPartial<SlaOutcome>, I>>(base?: I): SlaOutcome {
1014
- return SlaOutcome.fromPartial(base ?? ({} as any));
1015
- },
1016
- fromPartial<I extends Exact<DeepPartial<SlaOutcome>, I>>(object: I): SlaOutcome {
1017
- const message = createBaseSlaOutcome();
1018
- message.slaId = object.slaId ?? "";
1019
- message.revision = object.revision ?? 0;
1020
- message.traceId = object.traceId ?? "";
1021
- message.terminalVersion = object.terminalVersion ?? 0;
1022
- message.outcome = object.outcome ?? 0;
1023
- message.sideAValue = object.sideAValue ?? undefined;
1024
- message.sideBValue = object.sideBValue ?? undefined;
1025
- message.diff = object.diff ?? undefined;
1026
- message.reasonCode = object.reasonCode ?? "";
1027
- message.traceFinishedAt = object.traceFinishedAt ?? undefined;
1028
- message.evaluatedAt = object.evaluatedAt ?? undefined;
673
+ create<I extends Exact<DeepPartial<GaugeThresholdSli>, I>>(base?: I): GaugeThresholdSli {
674
+ return GaugeThresholdSli.fromPartial(base ?? ({} as any));
675
+ },
676
+ fromPartial<I extends Exact<DeepPartial<GaugeThresholdSli>, I>>(object: I): GaugeThresholdSli {
677
+ const message = createBaseGaugeThresholdSli();
678
+ message.comparator = object.comparator ?? 0;
679
+ message.threshold = object.threshold ?? 0;
1029
680
  return message;
1030
681
  },
1031
682
  };
1032
683
 
1033
- function createBaseCreateSlaRequest(): CreateSlaRequest {
1034
- return { organizationId: "", projectId: "", name: "", description: "", enabled: false, check: undefined };
684
+ function createBaseCreateSloRequest(): CreateSloRequest {
685
+ return { organizationId: "", projectId: "", name: "", description: "", enabled: false, objective: undefined };
1035
686
  }
1036
687
 
1037
- export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1038
- encode(message: CreateSlaRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
688
+ export const CreateSloRequest: MessageFns<CreateSloRequest> = {
689
+ encode(message: CreateSloRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1039
690
  if (message.organizationId !== "") {
1040
691
  writer.uint32(10).string(message.organizationId);
1041
692
  }
@@ -1051,16 +702,16 @@ export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1051
702
  if (message.enabled !== false) {
1052
703
  writer.uint32(40).bool(message.enabled);
1053
704
  }
1054
- if (message.check !== undefined) {
1055
- SlaCheck.encode(message.check, writer.uint32(50).fork()).join();
705
+ if (message.objective !== undefined) {
706
+ SloObjective.encode(message.objective, writer.uint32(50).fork()).join();
1056
707
  }
1057
708
  return writer;
1058
709
  },
1059
710
 
1060
- decode(input: BinaryReader | Uint8Array, length?: number): CreateSlaRequest {
711
+ decode(input: BinaryReader | Uint8Array, length?: number): CreateSloRequest {
1061
712
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1062
713
  const end = length === undefined ? reader.len : reader.pos + length;
1063
- const message = createBaseCreateSlaRequest();
714
+ const message = createBaseCreateSloRequest();
1064
715
  while (reader.pos < end) {
1065
716
  const tag = reader.uint32();
1066
717
  switch (tag >>> 3) {
@@ -1109,7 +760,7 @@ export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1109
760
  break;
1110
761
  }
1111
762
 
1112
- message.check = SlaCheck.decode(reader, reader.uint32());
763
+ message.objective = SloObjective.decode(reader, reader.uint32());
1113
764
  continue;
1114
765
  }
1115
766
  }
@@ -1121,7 +772,7 @@ export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1121
772
  return message;
1122
773
  },
1123
774
 
1124
- fromJSON(object: any): CreateSlaRequest {
775
+ fromJSON(object: any): CreateSloRequest {
1125
776
  return {
1126
777
  organizationId: isSet(object.organizationId)
1127
778
  ? globalThis.String(object.organizationId)
@@ -1136,11 +787,11 @@ export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1136
787
  name: isSet(object.name) ? globalThis.String(object.name) : "",
1137
788
  description: isSet(object.description) ? globalThis.String(object.description) : "",
1138
789
  enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
1139
- check: isSet(object.check) ? SlaCheck.fromJSON(object.check) : undefined,
790
+ objective: isSet(object.objective) ? SloObjective.fromJSON(object.objective) : undefined,
1140
791
  };
1141
792
  },
1142
793
 
1143
- toJSON(message: CreateSlaRequest): unknown {
794
+ toJSON(message: CreateSloRequest): unknown {
1144
795
  const obj: any = {};
1145
796
  if (message.organizationId !== "") {
1146
797
  obj.organizationId = message.organizationId;
@@ -1157,48 +808,48 @@ export const CreateSlaRequest: MessageFns<CreateSlaRequest> = {
1157
808
  if (message.enabled !== false) {
1158
809
  obj.enabled = message.enabled;
1159
810
  }
1160
- if (message.check !== undefined) {
1161
- obj.check = SlaCheck.toJSON(message.check);
811
+ if (message.objective !== undefined) {
812
+ obj.objective = SloObjective.toJSON(message.objective);
1162
813
  }
1163
814
  return obj;
1164
815
  },
1165
816
 
1166
- create<I extends Exact<DeepPartial<CreateSlaRequest>, I>>(base?: I): CreateSlaRequest {
1167
- return CreateSlaRequest.fromPartial(base ?? ({} as any));
817
+ create<I extends Exact<DeepPartial<CreateSloRequest>, I>>(base?: I): CreateSloRequest {
818
+ return CreateSloRequest.fromPartial(base ?? ({} as any));
1168
819
  },
1169
- fromPartial<I extends Exact<DeepPartial<CreateSlaRequest>, I>>(object: I): CreateSlaRequest {
1170
- const message = createBaseCreateSlaRequest();
820
+ fromPartial<I extends Exact<DeepPartial<CreateSloRequest>, I>>(object: I): CreateSloRequest {
821
+ const message = createBaseCreateSloRequest();
1171
822
  message.organizationId = object.organizationId ?? "";
1172
823
  message.projectId = object.projectId ?? "";
1173
824
  message.name = object.name ?? "";
1174
825
  message.description = object.description ?? "";
1175
826
  message.enabled = object.enabled ?? false;
1176
- message.check = (object.check !== undefined && object.check !== null)
1177
- ? SlaCheck.fromPartial(object.check)
827
+ message.objective = (object.objective !== undefined && object.objective !== null)
828
+ ? SloObjective.fromPartial(object.objective)
1178
829
  : undefined;
1179
830
  return message;
1180
831
  },
1181
832
  };
1182
833
 
1183
- function createBaseCreateSlaResponse(): CreateSlaResponse {
1184
- return { status: undefined, sla: undefined };
834
+ function createBaseCreateSloResponse(): CreateSloResponse {
835
+ return { status: undefined, slo: undefined };
1185
836
  }
1186
837
 
1187
- export const CreateSlaResponse: MessageFns<CreateSlaResponse> = {
1188
- encode(message: CreateSlaResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
838
+ export const CreateSloResponse: MessageFns<CreateSloResponse> = {
839
+ encode(message: CreateSloResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1189
840
  if (message.status !== undefined) {
1190
841
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1191
842
  }
1192
- if (message.sla !== undefined) {
1193
- Sla.encode(message.sla, writer.uint32(18).fork()).join();
843
+ if (message.slo !== undefined) {
844
+ Slo.encode(message.slo, writer.uint32(18).fork()).join();
1194
845
  }
1195
846
  return writer;
1196
847
  },
1197
848
 
1198
- decode(input: BinaryReader | Uint8Array, length?: number): CreateSlaResponse {
849
+ decode(input: BinaryReader | Uint8Array, length?: number): CreateSloResponse {
1199
850
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1200
851
  const end = length === undefined ? reader.len : reader.pos + length;
1201
- const message = createBaseCreateSlaResponse();
852
+ const message = createBaseCreateSloResponse();
1202
853
  while (reader.pos < end) {
1203
854
  const tag = reader.uint32();
1204
855
  switch (tag >>> 3) {
@@ -1215,7 +866,7 @@ export const CreateSlaResponse: MessageFns<CreateSlaResponse> = {
1215
866
  break;
1216
867
  }
1217
868
 
1218
- message.sla = Sla.decode(reader, reader.uint32());
869
+ message.slo = Slo.decode(reader, reader.uint32());
1219
870
  continue;
1220
871
  }
1221
872
  }
@@ -1227,59 +878,59 @@ export const CreateSlaResponse: MessageFns<CreateSlaResponse> = {
1227
878
  return message;
1228
879
  },
1229
880
 
1230
- fromJSON(object: any): CreateSlaResponse {
881
+ fromJSON(object: any): CreateSloResponse {
1231
882
  return {
1232
883
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1233
- sla: isSet(object.sla) ? Sla.fromJSON(object.sla) : undefined,
884
+ slo: isSet(object.slo) ? Slo.fromJSON(object.slo) : undefined,
1234
885
  };
1235
886
  },
1236
887
 
1237
- toJSON(message: CreateSlaResponse): unknown {
888
+ toJSON(message: CreateSloResponse): unknown {
1238
889
  const obj: any = {};
1239
890
  if (message.status !== undefined) {
1240
891
  obj.status = ResponseStatus.toJSON(message.status);
1241
892
  }
1242
- if (message.sla !== undefined) {
1243
- obj.sla = Sla.toJSON(message.sla);
893
+ if (message.slo !== undefined) {
894
+ obj.slo = Slo.toJSON(message.slo);
1244
895
  }
1245
896
  return obj;
1246
897
  },
1247
898
 
1248
- create<I extends Exact<DeepPartial<CreateSlaResponse>, I>>(base?: I): CreateSlaResponse {
1249
- return CreateSlaResponse.fromPartial(base ?? ({} as any));
899
+ create<I extends Exact<DeepPartial<CreateSloResponse>, I>>(base?: I): CreateSloResponse {
900
+ return CreateSloResponse.fromPartial(base ?? ({} as any));
1250
901
  },
1251
- fromPartial<I extends Exact<DeepPartial<CreateSlaResponse>, I>>(object: I): CreateSlaResponse {
1252
- const message = createBaseCreateSlaResponse();
902
+ fromPartial<I extends Exact<DeepPartial<CreateSloResponse>, I>>(object: I): CreateSloResponse {
903
+ const message = createBaseCreateSloResponse();
1253
904
  message.status = (object.status !== undefined && object.status !== null)
1254
905
  ? ResponseStatus.fromPartial(object.status)
1255
906
  : undefined;
1256
- message.sla = (object.sla !== undefined && object.sla !== null) ? Sla.fromPartial(object.sla) : undefined;
907
+ message.slo = (object.slo !== undefined && object.slo !== null) ? Slo.fromPartial(object.slo) : undefined;
1257
908
  return message;
1258
909
  },
1259
910
  };
1260
911
 
1261
- function createBaseGetSlaRequest(): GetSlaRequest {
1262
- return { organizationId: "", projectId: "", slaId: "" };
912
+ function createBaseGetSloRequest(): GetSloRequest {
913
+ return { organizationId: "", projectId: "", sloId: "" };
1263
914
  }
1264
915
 
1265
- export const GetSlaRequest: MessageFns<GetSlaRequest> = {
1266
- encode(message: GetSlaRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
916
+ export const GetSloRequest: MessageFns<GetSloRequest> = {
917
+ encode(message: GetSloRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1267
918
  if (message.organizationId !== "") {
1268
919
  writer.uint32(10).string(message.organizationId);
1269
920
  }
1270
921
  if (message.projectId !== "") {
1271
922
  writer.uint32(18).string(message.projectId);
1272
923
  }
1273
- if (message.slaId !== "") {
1274
- writer.uint32(26).string(message.slaId);
924
+ if (message.sloId !== "") {
925
+ writer.uint32(26).string(message.sloId);
1275
926
  }
1276
927
  return writer;
1277
928
  },
1278
929
 
1279
- decode(input: BinaryReader | Uint8Array, length?: number): GetSlaRequest {
930
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSloRequest {
1280
931
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1281
932
  const end = length === undefined ? reader.len : reader.pos + length;
1282
- const message = createBaseGetSlaRequest();
933
+ const message = createBaseGetSloRequest();
1283
934
  while (reader.pos < end) {
1284
935
  const tag = reader.uint32();
1285
936
  switch (tag >>> 3) {
@@ -1304,7 +955,7 @@ export const GetSlaRequest: MessageFns<GetSlaRequest> = {
1304
955
  break;
1305
956
  }
1306
957
 
1307
- message.slaId = reader.string();
958
+ message.sloId = reader.string();
1308
959
  continue;
1309
960
  }
1310
961
  }
@@ -1316,7 +967,7 @@ export const GetSlaRequest: MessageFns<GetSlaRequest> = {
1316
967
  return message;
1317
968
  },
1318
969
 
1319
- fromJSON(object: any): GetSlaRequest {
970
+ fromJSON(object: any): GetSloRequest {
1320
971
  return {
1321
972
  organizationId: isSet(object.organizationId)
1322
973
  ? globalThis.String(object.organizationId)
@@ -1328,15 +979,15 @@ export const GetSlaRequest: MessageFns<GetSlaRequest> = {
1328
979
  : isSet(object.project_id)
1329
980
  ? globalThis.String(object.project_id)
1330
981
  : "",
1331
- slaId: isSet(object.slaId)
1332
- ? globalThis.String(object.slaId)
1333
- : isSet(object.sla_id)
1334
- ? globalThis.String(object.sla_id)
982
+ sloId: isSet(object.sloId)
983
+ ? globalThis.String(object.sloId)
984
+ : isSet(object.slo_id)
985
+ ? globalThis.String(object.slo_id)
1335
986
  : "",
1336
987
  };
1337
988
  },
1338
989
 
1339
- toJSON(message: GetSlaRequest): unknown {
990
+ toJSON(message: GetSloRequest): unknown {
1340
991
  const obj: any = {};
1341
992
  if (message.organizationId !== "") {
1342
993
  obj.organizationId = message.organizationId;
@@ -1344,43 +995,43 @@ export const GetSlaRequest: MessageFns<GetSlaRequest> = {
1344
995
  if (message.projectId !== "") {
1345
996
  obj.projectId = message.projectId;
1346
997
  }
1347
- if (message.slaId !== "") {
1348
- obj.slaId = message.slaId;
998
+ if (message.sloId !== "") {
999
+ obj.sloId = message.sloId;
1349
1000
  }
1350
1001
  return obj;
1351
1002
  },
1352
1003
 
1353
- create<I extends Exact<DeepPartial<GetSlaRequest>, I>>(base?: I): GetSlaRequest {
1354
- return GetSlaRequest.fromPartial(base ?? ({} as any));
1004
+ create<I extends Exact<DeepPartial<GetSloRequest>, I>>(base?: I): GetSloRequest {
1005
+ return GetSloRequest.fromPartial(base ?? ({} as any));
1355
1006
  },
1356
- fromPartial<I extends Exact<DeepPartial<GetSlaRequest>, I>>(object: I): GetSlaRequest {
1357
- const message = createBaseGetSlaRequest();
1007
+ fromPartial<I extends Exact<DeepPartial<GetSloRequest>, I>>(object: I): GetSloRequest {
1008
+ const message = createBaseGetSloRequest();
1358
1009
  message.organizationId = object.organizationId ?? "";
1359
1010
  message.projectId = object.projectId ?? "";
1360
- message.slaId = object.slaId ?? "";
1011
+ message.sloId = object.sloId ?? "";
1361
1012
  return message;
1362
1013
  },
1363
1014
  };
1364
1015
 
1365
- function createBaseGetSlaResponse(): GetSlaResponse {
1366
- return { status: undefined, sla: undefined };
1016
+ function createBaseGetSloResponse(): GetSloResponse {
1017
+ return { status: undefined, slo: undefined };
1367
1018
  }
1368
1019
 
1369
- export const GetSlaResponse: MessageFns<GetSlaResponse> = {
1370
- encode(message: GetSlaResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1020
+ export const GetSloResponse: MessageFns<GetSloResponse> = {
1021
+ encode(message: GetSloResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1371
1022
  if (message.status !== undefined) {
1372
1023
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1373
1024
  }
1374
- if (message.sla !== undefined) {
1375
- Sla.encode(message.sla, writer.uint32(18).fork()).join();
1025
+ if (message.slo !== undefined) {
1026
+ Slo.encode(message.slo, writer.uint32(18).fork()).join();
1376
1027
  }
1377
1028
  return writer;
1378
1029
  },
1379
1030
 
1380
- decode(input: BinaryReader | Uint8Array, length?: number): GetSlaResponse {
1031
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSloResponse {
1381
1032
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1382
1033
  const end = length === undefined ? reader.len : reader.pos + length;
1383
- const message = createBaseGetSlaResponse();
1034
+ const message = createBaseGetSloResponse();
1384
1035
  while (reader.pos < end) {
1385
1036
  const tag = reader.uint32();
1386
1037
  switch (tag >>> 3) {
@@ -1397,7 +1048,7 @@ export const GetSlaResponse: MessageFns<GetSlaResponse> = {
1397
1048
  break;
1398
1049
  }
1399
1050
 
1400
- message.sla = Sla.decode(reader, reader.uint32());
1051
+ message.slo = Slo.decode(reader, reader.uint32());
1401
1052
  continue;
1402
1053
  }
1403
1054
  }
@@ -1409,43 +1060,43 @@ export const GetSlaResponse: MessageFns<GetSlaResponse> = {
1409
1060
  return message;
1410
1061
  },
1411
1062
 
1412
- fromJSON(object: any): GetSlaResponse {
1063
+ fromJSON(object: any): GetSloResponse {
1413
1064
  return {
1414
1065
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1415
- sla: isSet(object.sla) ? Sla.fromJSON(object.sla) : undefined,
1066
+ slo: isSet(object.slo) ? Slo.fromJSON(object.slo) : undefined,
1416
1067
  };
1417
1068
  },
1418
1069
 
1419
- toJSON(message: GetSlaResponse): unknown {
1070
+ toJSON(message: GetSloResponse): unknown {
1420
1071
  const obj: any = {};
1421
1072
  if (message.status !== undefined) {
1422
1073
  obj.status = ResponseStatus.toJSON(message.status);
1423
1074
  }
1424
- if (message.sla !== undefined) {
1425
- obj.sla = Sla.toJSON(message.sla);
1075
+ if (message.slo !== undefined) {
1076
+ obj.slo = Slo.toJSON(message.slo);
1426
1077
  }
1427
1078
  return obj;
1428
1079
  },
1429
1080
 
1430
- create<I extends Exact<DeepPartial<GetSlaResponse>, I>>(base?: I): GetSlaResponse {
1431
- return GetSlaResponse.fromPartial(base ?? ({} as any));
1081
+ create<I extends Exact<DeepPartial<GetSloResponse>, I>>(base?: I): GetSloResponse {
1082
+ return GetSloResponse.fromPartial(base ?? ({} as any));
1432
1083
  },
1433
- fromPartial<I extends Exact<DeepPartial<GetSlaResponse>, I>>(object: I): GetSlaResponse {
1434
- const message = createBaseGetSlaResponse();
1084
+ fromPartial<I extends Exact<DeepPartial<GetSloResponse>, I>>(object: I): GetSloResponse {
1085
+ const message = createBaseGetSloResponse();
1435
1086
  message.status = (object.status !== undefined && object.status !== null)
1436
1087
  ? ResponseStatus.fromPartial(object.status)
1437
1088
  : undefined;
1438
- message.sla = (object.sla !== undefined && object.sla !== null) ? Sla.fromPartial(object.sla) : undefined;
1089
+ message.slo = (object.slo !== undefined && object.slo !== null) ? Slo.fromPartial(object.slo) : undefined;
1439
1090
  return message;
1440
1091
  },
1441
1092
  };
1442
1093
 
1443
- function createBaseListSlasRequest(): ListSlasRequest {
1094
+ function createBaseListSlosRequest(): ListSlosRequest {
1444
1095
  return { organizationId: "", projectId: "" };
1445
1096
  }
1446
1097
 
1447
- export const ListSlasRequest: MessageFns<ListSlasRequest> = {
1448
- encode(message: ListSlasRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1098
+ export const ListSlosRequest: MessageFns<ListSlosRequest> = {
1099
+ encode(message: ListSlosRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1449
1100
  if (message.organizationId !== "") {
1450
1101
  writer.uint32(10).string(message.organizationId);
1451
1102
  }
@@ -1455,10 +1106,10 @@ export const ListSlasRequest: MessageFns<ListSlasRequest> = {
1455
1106
  return writer;
1456
1107
  },
1457
1108
 
1458
- decode(input: BinaryReader | Uint8Array, length?: number): ListSlasRequest {
1109
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSlosRequest {
1459
1110
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1460
1111
  const end = length === undefined ? reader.len : reader.pos + length;
1461
- const message = createBaseListSlasRequest();
1112
+ const message = createBaseListSlosRequest();
1462
1113
  while (reader.pos < end) {
1463
1114
  const tag = reader.uint32();
1464
1115
  switch (tag >>> 3) {
@@ -1487,7 +1138,7 @@ export const ListSlasRequest: MessageFns<ListSlasRequest> = {
1487
1138
  return message;
1488
1139
  },
1489
1140
 
1490
- fromJSON(object: any): ListSlasRequest {
1141
+ fromJSON(object: any): ListSlosRequest {
1491
1142
  return {
1492
1143
  organizationId: isSet(object.organizationId)
1493
1144
  ? globalThis.String(object.organizationId)
@@ -1502,7 +1153,7 @@ export const ListSlasRequest: MessageFns<ListSlasRequest> = {
1502
1153
  };
1503
1154
  },
1504
1155
 
1505
- toJSON(message: ListSlasRequest): unknown {
1156
+ toJSON(message: ListSlosRequest): unknown {
1506
1157
  const obj: any = {};
1507
1158
  if (message.organizationId !== "") {
1508
1159
  obj.organizationId = message.organizationId;
@@ -1513,36 +1164,36 @@ export const ListSlasRequest: MessageFns<ListSlasRequest> = {
1513
1164
  return obj;
1514
1165
  },
1515
1166
 
1516
- create<I extends Exact<DeepPartial<ListSlasRequest>, I>>(base?: I): ListSlasRequest {
1517
- return ListSlasRequest.fromPartial(base ?? ({} as any));
1167
+ create<I extends Exact<DeepPartial<ListSlosRequest>, I>>(base?: I): ListSlosRequest {
1168
+ return ListSlosRequest.fromPartial(base ?? ({} as any));
1518
1169
  },
1519
- fromPartial<I extends Exact<DeepPartial<ListSlasRequest>, I>>(object: I): ListSlasRequest {
1520
- const message = createBaseListSlasRequest();
1170
+ fromPartial<I extends Exact<DeepPartial<ListSlosRequest>, I>>(object: I): ListSlosRequest {
1171
+ const message = createBaseListSlosRequest();
1521
1172
  message.organizationId = object.organizationId ?? "";
1522
1173
  message.projectId = object.projectId ?? "";
1523
1174
  return message;
1524
1175
  },
1525
1176
  };
1526
1177
 
1527
- function createBaseListSlasResponse(): ListSlasResponse {
1528
- return { status: undefined, slas: [] };
1178
+ function createBaseListSlosResponse(): ListSlosResponse {
1179
+ return { status: undefined, slos: [] };
1529
1180
  }
1530
1181
 
1531
- export const ListSlasResponse: MessageFns<ListSlasResponse> = {
1532
- encode(message: ListSlasResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1182
+ export const ListSlosResponse: MessageFns<ListSlosResponse> = {
1183
+ encode(message: ListSlosResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1533
1184
  if (message.status !== undefined) {
1534
1185
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1535
1186
  }
1536
- for (const v of message.slas) {
1537
- Sla.encode(v!, writer.uint32(18).fork()).join();
1187
+ for (const v of message.slos) {
1188
+ Slo.encode(v!, writer.uint32(18).fork()).join();
1538
1189
  }
1539
1190
  return writer;
1540
1191
  },
1541
1192
 
1542
- decode(input: BinaryReader | Uint8Array, length?: number): ListSlasResponse {
1193
+ decode(input: BinaryReader | Uint8Array, length?: number): ListSlosResponse {
1543
1194
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1544
1195
  const end = length === undefined ? reader.len : reader.pos + length;
1545
- const message = createBaseListSlasResponse();
1196
+ const message = createBaseListSlosResponse();
1546
1197
  while (reader.pos < end) {
1547
1198
  const tag = reader.uint32();
1548
1199
  switch (tag >>> 3) {
@@ -1559,7 +1210,7 @@ export const ListSlasResponse: MessageFns<ListSlasResponse> = {
1559
1210
  break;
1560
1211
  }
1561
1212
 
1562
- message.slas.push(Sla.decode(reader, reader.uint32()));
1213
+ message.slos.push(Slo.decode(reader, reader.uint32()));
1563
1214
  continue;
1564
1215
  }
1565
1216
  }
@@ -1571,62 +1222,62 @@ export const ListSlasResponse: MessageFns<ListSlasResponse> = {
1571
1222
  return message;
1572
1223
  },
1573
1224
 
1574
- fromJSON(object: any): ListSlasResponse {
1225
+ fromJSON(object: any): ListSlosResponse {
1575
1226
  return {
1576
1227
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1577
- slas: globalThis.Array.isArray(object?.slas) ? object.slas.map((e: any) => Sla.fromJSON(e)) : [],
1228
+ slos: globalThis.Array.isArray(object?.slos) ? object.slos.map((e: any) => Slo.fromJSON(e)) : [],
1578
1229
  };
1579
1230
  },
1580
1231
 
1581
- toJSON(message: ListSlasResponse): unknown {
1232
+ toJSON(message: ListSlosResponse): unknown {
1582
1233
  const obj: any = {};
1583
1234
  if (message.status !== undefined) {
1584
1235
  obj.status = ResponseStatus.toJSON(message.status);
1585
1236
  }
1586
- if (message.slas?.length) {
1587
- obj.slas = message.slas.map((e) => Sla.toJSON(e));
1237
+ if (message.slos?.length) {
1238
+ obj.slos = message.slos.map((e) => Slo.toJSON(e));
1588
1239
  }
1589
1240
  return obj;
1590
1241
  },
1591
1242
 
1592
- create<I extends Exact<DeepPartial<ListSlasResponse>, I>>(base?: I): ListSlasResponse {
1593
- return ListSlasResponse.fromPartial(base ?? ({} as any));
1243
+ create<I extends Exact<DeepPartial<ListSlosResponse>, I>>(base?: I): ListSlosResponse {
1244
+ return ListSlosResponse.fromPartial(base ?? ({} as any));
1594
1245
  },
1595
- fromPartial<I extends Exact<DeepPartial<ListSlasResponse>, I>>(object: I): ListSlasResponse {
1596
- const message = createBaseListSlasResponse();
1246
+ fromPartial<I extends Exact<DeepPartial<ListSlosResponse>, I>>(object: I): ListSlosResponse {
1247
+ const message = createBaseListSlosResponse();
1597
1248
  message.status = (object.status !== undefined && object.status !== null)
1598
1249
  ? ResponseStatus.fromPartial(object.status)
1599
1250
  : undefined;
1600
- message.slas = object.slas?.map((e) => Sla.fromPartial(e)) || [];
1251
+ message.slos = object.slos?.map((e) => Slo.fromPartial(e)) || [];
1601
1252
  return message;
1602
1253
  },
1603
1254
  };
1604
1255
 
1605
- function createBaseUpdateSlaRequest(): UpdateSlaRequest {
1606
- return { organizationId: "", projectId: "", slaId: "", updates: undefined };
1256
+ function createBaseUpdateSloRequest(): UpdateSloRequest {
1257
+ return { organizationId: "", projectId: "", sloId: "", updates: undefined };
1607
1258
  }
1608
1259
 
1609
- export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1610
- encode(message: UpdateSlaRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1260
+ export const UpdateSloRequest: MessageFns<UpdateSloRequest> = {
1261
+ encode(message: UpdateSloRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1611
1262
  if (message.organizationId !== "") {
1612
1263
  writer.uint32(10).string(message.organizationId);
1613
1264
  }
1614
1265
  if (message.projectId !== "") {
1615
1266
  writer.uint32(18).string(message.projectId);
1616
1267
  }
1617
- if (message.slaId !== "") {
1618
- writer.uint32(26).string(message.slaId);
1268
+ if (message.sloId !== "") {
1269
+ writer.uint32(26).string(message.sloId);
1619
1270
  }
1620
1271
  if (message.updates !== undefined) {
1621
- UpdateSlaRequest_SlaUpdates.encode(message.updates, writer.uint32(34).fork()).join();
1272
+ UpdateSloRequest_SloUpdates.encode(message.updates, writer.uint32(34).fork()).join();
1622
1273
  }
1623
1274
  return writer;
1624
1275
  },
1625
1276
 
1626
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateSlaRequest {
1277
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateSloRequest {
1627
1278
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1628
1279
  const end = length === undefined ? reader.len : reader.pos + length;
1629
- const message = createBaseUpdateSlaRequest();
1280
+ const message = createBaseUpdateSloRequest();
1630
1281
  while (reader.pos < end) {
1631
1282
  const tag = reader.uint32();
1632
1283
  switch (tag >>> 3) {
@@ -1651,7 +1302,7 @@ export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1651
1302
  break;
1652
1303
  }
1653
1304
 
1654
- message.slaId = reader.string();
1305
+ message.sloId = reader.string();
1655
1306
  continue;
1656
1307
  }
1657
1308
  case 4: {
@@ -1659,7 +1310,7 @@ export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1659
1310
  break;
1660
1311
  }
1661
1312
 
1662
- message.updates = UpdateSlaRequest_SlaUpdates.decode(reader, reader.uint32());
1313
+ message.updates = UpdateSloRequest_SloUpdates.decode(reader, reader.uint32());
1663
1314
  continue;
1664
1315
  }
1665
1316
  }
@@ -1671,7 +1322,7 @@ export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1671
1322
  return message;
1672
1323
  },
1673
1324
 
1674
- fromJSON(object: any): UpdateSlaRequest {
1325
+ fromJSON(object: any): UpdateSloRequest {
1675
1326
  return {
1676
1327
  organizationId: isSet(object.organizationId)
1677
1328
  ? globalThis.String(object.organizationId)
@@ -1683,16 +1334,16 @@ export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1683
1334
  : isSet(object.project_id)
1684
1335
  ? globalThis.String(object.project_id)
1685
1336
  : "",
1686
- slaId: isSet(object.slaId)
1687
- ? globalThis.String(object.slaId)
1688
- : isSet(object.sla_id)
1689
- ? globalThis.String(object.sla_id)
1337
+ sloId: isSet(object.sloId)
1338
+ ? globalThis.String(object.sloId)
1339
+ : isSet(object.slo_id)
1340
+ ? globalThis.String(object.slo_id)
1690
1341
  : "",
1691
- updates: isSet(object.updates) ? UpdateSlaRequest_SlaUpdates.fromJSON(object.updates) : undefined,
1342
+ updates: isSet(object.updates) ? UpdateSloRequest_SloUpdates.fromJSON(object.updates) : undefined,
1692
1343
  };
1693
1344
  },
1694
1345
 
1695
- toJSON(message: UpdateSlaRequest): unknown {
1346
+ toJSON(message: UpdateSloRequest): unknown {
1696
1347
  const obj: any = {};
1697
1348
  if (message.organizationId !== "") {
1698
1349
  obj.organizationId = message.organizationId;
@@ -1700,36 +1351,36 @@ export const UpdateSlaRequest: MessageFns<UpdateSlaRequest> = {
1700
1351
  if (message.projectId !== "") {
1701
1352
  obj.projectId = message.projectId;
1702
1353
  }
1703
- if (message.slaId !== "") {
1704
- obj.slaId = message.slaId;
1354
+ if (message.sloId !== "") {
1355
+ obj.sloId = message.sloId;
1705
1356
  }
1706
1357
  if (message.updates !== undefined) {
1707
- obj.updates = UpdateSlaRequest_SlaUpdates.toJSON(message.updates);
1358
+ obj.updates = UpdateSloRequest_SloUpdates.toJSON(message.updates);
1708
1359
  }
1709
1360
  return obj;
1710
1361
  },
1711
1362
 
1712
- create<I extends Exact<DeepPartial<UpdateSlaRequest>, I>>(base?: I): UpdateSlaRequest {
1713
- return UpdateSlaRequest.fromPartial(base ?? ({} as any));
1363
+ create<I extends Exact<DeepPartial<UpdateSloRequest>, I>>(base?: I): UpdateSloRequest {
1364
+ return UpdateSloRequest.fromPartial(base ?? ({} as any));
1714
1365
  },
1715
- fromPartial<I extends Exact<DeepPartial<UpdateSlaRequest>, I>>(object: I): UpdateSlaRequest {
1716
- const message = createBaseUpdateSlaRequest();
1366
+ fromPartial<I extends Exact<DeepPartial<UpdateSloRequest>, I>>(object: I): UpdateSloRequest {
1367
+ const message = createBaseUpdateSloRequest();
1717
1368
  message.organizationId = object.organizationId ?? "";
1718
1369
  message.projectId = object.projectId ?? "";
1719
- message.slaId = object.slaId ?? "";
1370
+ message.sloId = object.sloId ?? "";
1720
1371
  message.updates = (object.updates !== undefined && object.updates !== null)
1721
- ? UpdateSlaRequest_SlaUpdates.fromPartial(object.updates)
1372
+ ? UpdateSloRequest_SloUpdates.fromPartial(object.updates)
1722
1373
  : undefined;
1723
1374
  return message;
1724
1375
  },
1725
1376
  };
1726
1377
 
1727
- function createBaseUpdateSlaRequest_SlaUpdates(): UpdateSlaRequest_SlaUpdates {
1728
- return { name: undefined, description: undefined, enabled: undefined, check: undefined };
1378
+ function createBaseUpdateSloRequest_SloUpdates(): UpdateSloRequest_SloUpdates {
1379
+ return { name: undefined, description: undefined, enabled: undefined, objective: undefined };
1729
1380
  }
1730
1381
 
1731
- export const UpdateSlaRequest_SlaUpdates: MessageFns<UpdateSlaRequest_SlaUpdates> = {
1732
- encode(message: UpdateSlaRequest_SlaUpdates, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1382
+ export const UpdateSloRequest_SloUpdates: MessageFns<UpdateSloRequest_SloUpdates> = {
1383
+ encode(message: UpdateSloRequest_SloUpdates, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1733
1384
  if (message.name !== undefined) {
1734
1385
  writer.uint32(10).string(message.name);
1735
1386
  }
@@ -1739,16 +1390,16 @@ export const UpdateSlaRequest_SlaUpdates: MessageFns<UpdateSlaRequest_SlaUpdates
1739
1390
  if (message.enabled !== undefined) {
1740
1391
  writer.uint32(24).bool(message.enabled);
1741
1392
  }
1742
- if (message.check !== undefined) {
1743
- SlaCheck.encode(message.check, writer.uint32(34).fork()).join();
1393
+ if (message.objective !== undefined) {
1394
+ SloObjective.encode(message.objective, writer.uint32(34).fork()).join();
1744
1395
  }
1745
1396
  return writer;
1746
1397
  },
1747
1398
 
1748
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateSlaRequest_SlaUpdates {
1399
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateSloRequest_SloUpdates {
1749
1400
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1750
1401
  const end = length === undefined ? reader.len : reader.pos + length;
1751
- const message = createBaseUpdateSlaRequest_SlaUpdates();
1402
+ const message = createBaseUpdateSloRequest_SloUpdates();
1752
1403
  while (reader.pos < end) {
1753
1404
  const tag = reader.uint32();
1754
1405
  switch (tag >>> 3) {
@@ -1781,7 +1432,7 @@ export const UpdateSlaRequest_SlaUpdates: MessageFns<UpdateSlaRequest_SlaUpdates
1781
1432
  break;
1782
1433
  }
1783
1434
 
1784
- message.check = SlaCheck.decode(reader, reader.uint32());
1435
+ message.objective = SloObjective.decode(reader, reader.uint32());
1785
1436
  continue;
1786
1437
  }
1787
1438
  }
@@ -1793,16 +1444,16 @@ export const UpdateSlaRequest_SlaUpdates: MessageFns<UpdateSlaRequest_SlaUpdates
1793
1444
  return message;
1794
1445
  },
1795
1446
 
1796
- fromJSON(object: any): UpdateSlaRequest_SlaUpdates {
1447
+ fromJSON(object: any): UpdateSloRequest_SloUpdates {
1797
1448
  return {
1798
1449
  name: isSet(object.name) ? globalThis.String(object.name) : undefined,
1799
1450
  description: isSet(object.description) ? globalThis.String(object.description) : undefined,
1800
1451
  enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : undefined,
1801
- check: isSet(object.check) ? SlaCheck.fromJSON(object.check) : undefined,
1452
+ objective: isSet(object.objective) ? SloObjective.fromJSON(object.objective) : undefined,
1802
1453
  };
1803
1454
  },
1804
1455
 
1805
- toJSON(message: UpdateSlaRequest_SlaUpdates): unknown {
1456
+ toJSON(message: UpdateSloRequest_SloUpdates): unknown {
1806
1457
  const obj: any = {};
1807
1458
  if (message.name !== undefined) {
1808
1459
  obj.name = message.name;
@@ -1813,46 +1464,46 @@ export const UpdateSlaRequest_SlaUpdates: MessageFns<UpdateSlaRequest_SlaUpdates
1813
1464
  if (message.enabled !== undefined) {
1814
1465
  obj.enabled = message.enabled;
1815
1466
  }
1816
- if (message.check !== undefined) {
1817
- obj.check = SlaCheck.toJSON(message.check);
1467
+ if (message.objective !== undefined) {
1468
+ obj.objective = SloObjective.toJSON(message.objective);
1818
1469
  }
1819
1470
  return obj;
1820
1471
  },
1821
1472
 
1822
- create<I extends Exact<DeepPartial<UpdateSlaRequest_SlaUpdates>, I>>(base?: I): UpdateSlaRequest_SlaUpdates {
1823
- return UpdateSlaRequest_SlaUpdates.fromPartial(base ?? ({} as any));
1473
+ create<I extends Exact<DeepPartial<UpdateSloRequest_SloUpdates>, I>>(base?: I): UpdateSloRequest_SloUpdates {
1474
+ return UpdateSloRequest_SloUpdates.fromPartial(base ?? ({} as any));
1824
1475
  },
1825
- fromPartial<I extends Exact<DeepPartial<UpdateSlaRequest_SlaUpdates>, I>>(object: I): UpdateSlaRequest_SlaUpdates {
1826
- const message = createBaseUpdateSlaRequest_SlaUpdates();
1476
+ fromPartial<I extends Exact<DeepPartial<UpdateSloRequest_SloUpdates>, I>>(object: I): UpdateSloRequest_SloUpdates {
1477
+ const message = createBaseUpdateSloRequest_SloUpdates();
1827
1478
  message.name = object.name ?? undefined;
1828
1479
  message.description = object.description ?? undefined;
1829
1480
  message.enabled = object.enabled ?? undefined;
1830
- message.check = (object.check !== undefined && object.check !== null)
1831
- ? SlaCheck.fromPartial(object.check)
1481
+ message.objective = (object.objective !== undefined && object.objective !== null)
1482
+ ? SloObjective.fromPartial(object.objective)
1832
1483
  : undefined;
1833
1484
  return message;
1834
1485
  },
1835
1486
  };
1836
1487
 
1837
- function createBaseUpdateSlaResponse(): UpdateSlaResponse {
1838
- return { status: undefined, sla: undefined };
1488
+ function createBaseUpdateSloResponse(): UpdateSloResponse {
1489
+ return { status: undefined, slo: undefined };
1839
1490
  }
1840
1491
 
1841
- export const UpdateSlaResponse: MessageFns<UpdateSlaResponse> = {
1842
- encode(message: UpdateSlaResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1492
+ export const UpdateSloResponse: MessageFns<UpdateSloResponse> = {
1493
+ encode(message: UpdateSloResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1843
1494
  if (message.status !== undefined) {
1844
1495
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
1845
1496
  }
1846
- if (message.sla !== undefined) {
1847
- Sla.encode(message.sla, writer.uint32(18).fork()).join();
1497
+ if (message.slo !== undefined) {
1498
+ Slo.encode(message.slo, writer.uint32(18).fork()).join();
1848
1499
  }
1849
1500
  return writer;
1850
1501
  },
1851
1502
 
1852
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateSlaResponse {
1503
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateSloResponse {
1853
1504
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1854
1505
  const end = length === undefined ? reader.len : reader.pos + length;
1855
- const message = createBaseUpdateSlaResponse();
1506
+ const message = createBaseUpdateSloResponse();
1856
1507
  while (reader.pos < end) {
1857
1508
  const tag = reader.uint32();
1858
1509
  switch (tag >>> 3) {
@@ -1869,7 +1520,7 @@ export const UpdateSlaResponse: MessageFns<UpdateSlaResponse> = {
1869
1520
  break;
1870
1521
  }
1871
1522
 
1872
- message.sla = Sla.decode(reader, reader.uint32());
1523
+ message.slo = Slo.decode(reader, reader.uint32());
1873
1524
  continue;
1874
1525
  }
1875
1526
  }
@@ -1881,59 +1532,59 @@ export const UpdateSlaResponse: MessageFns<UpdateSlaResponse> = {
1881
1532
  return message;
1882
1533
  },
1883
1534
 
1884
- fromJSON(object: any): UpdateSlaResponse {
1535
+ fromJSON(object: any): UpdateSloResponse {
1885
1536
  return {
1886
1537
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1887
- sla: isSet(object.sla) ? Sla.fromJSON(object.sla) : undefined,
1538
+ slo: isSet(object.slo) ? Slo.fromJSON(object.slo) : undefined,
1888
1539
  };
1889
1540
  },
1890
1541
 
1891
- toJSON(message: UpdateSlaResponse): unknown {
1542
+ toJSON(message: UpdateSloResponse): unknown {
1892
1543
  const obj: any = {};
1893
1544
  if (message.status !== undefined) {
1894
1545
  obj.status = ResponseStatus.toJSON(message.status);
1895
1546
  }
1896
- if (message.sla !== undefined) {
1897
- obj.sla = Sla.toJSON(message.sla);
1547
+ if (message.slo !== undefined) {
1548
+ obj.slo = Slo.toJSON(message.slo);
1898
1549
  }
1899
1550
  return obj;
1900
1551
  },
1901
1552
 
1902
- create<I extends Exact<DeepPartial<UpdateSlaResponse>, I>>(base?: I): UpdateSlaResponse {
1903
- return UpdateSlaResponse.fromPartial(base ?? ({} as any));
1553
+ create<I extends Exact<DeepPartial<UpdateSloResponse>, I>>(base?: I): UpdateSloResponse {
1554
+ return UpdateSloResponse.fromPartial(base ?? ({} as any));
1904
1555
  },
1905
- fromPartial<I extends Exact<DeepPartial<UpdateSlaResponse>, I>>(object: I): UpdateSlaResponse {
1906
- const message = createBaseUpdateSlaResponse();
1556
+ fromPartial<I extends Exact<DeepPartial<UpdateSloResponse>, I>>(object: I): UpdateSloResponse {
1557
+ const message = createBaseUpdateSloResponse();
1907
1558
  message.status = (object.status !== undefined && object.status !== null)
1908
1559
  ? ResponseStatus.fromPartial(object.status)
1909
1560
  : undefined;
1910
- message.sla = (object.sla !== undefined && object.sla !== null) ? Sla.fromPartial(object.sla) : undefined;
1561
+ message.slo = (object.slo !== undefined && object.slo !== null) ? Slo.fromPartial(object.slo) : undefined;
1911
1562
  return message;
1912
1563
  },
1913
1564
  };
1914
1565
 
1915
- function createBaseDeleteSlaRequest(): DeleteSlaRequest {
1916
- return { organizationId: "", projectId: "", slaId: "" };
1566
+ function createBaseDeleteSloRequest(): DeleteSloRequest {
1567
+ return { organizationId: "", projectId: "", sloId: "" };
1917
1568
  }
1918
1569
 
1919
- export const DeleteSlaRequest: MessageFns<DeleteSlaRequest> = {
1920
- encode(message: DeleteSlaRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1570
+ export const DeleteSloRequest: MessageFns<DeleteSloRequest> = {
1571
+ encode(message: DeleteSloRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1921
1572
  if (message.organizationId !== "") {
1922
1573
  writer.uint32(10).string(message.organizationId);
1923
1574
  }
1924
1575
  if (message.projectId !== "") {
1925
1576
  writer.uint32(18).string(message.projectId);
1926
1577
  }
1927
- if (message.slaId !== "") {
1928
- writer.uint32(26).string(message.slaId);
1578
+ if (message.sloId !== "") {
1579
+ writer.uint32(26).string(message.sloId);
1929
1580
  }
1930
1581
  return writer;
1931
1582
  },
1932
1583
 
1933
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteSlaRequest {
1584
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteSloRequest {
1934
1585
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1935
1586
  const end = length === undefined ? reader.len : reader.pos + length;
1936
- const message = createBaseDeleteSlaRequest();
1587
+ const message = createBaseDeleteSloRequest();
1937
1588
  while (reader.pos < end) {
1938
1589
  const tag = reader.uint32();
1939
1590
  switch (tag >>> 3) {
@@ -1958,7 +1609,7 @@ export const DeleteSlaRequest: MessageFns<DeleteSlaRequest> = {
1958
1609
  break;
1959
1610
  }
1960
1611
 
1961
- message.slaId = reader.string();
1612
+ message.sloId = reader.string();
1962
1613
  continue;
1963
1614
  }
1964
1615
  }
@@ -1970,7 +1621,7 @@ export const DeleteSlaRequest: MessageFns<DeleteSlaRequest> = {
1970
1621
  return message;
1971
1622
  },
1972
1623
 
1973
- fromJSON(object: any): DeleteSlaRequest {
1624
+ fromJSON(object: any): DeleteSloRequest {
1974
1625
  return {
1975
1626
  organizationId: isSet(object.organizationId)
1976
1627
  ? globalThis.String(object.organizationId)
@@ -1982,15 +1633,15 @@ export const DeleteSlaRequest: MessageFns<DeleteSlaRequest> = {
1982
1633
  : isSet(object.project_id)
1983
1634
  ? globalThis.String(object.project_id)
1984
1635
  : "",
1985
- slaId: isSet(object.slaId)
1986
- ? globalThis.String(object.slaId)
1987
- : isSet(object.sla_id)
1988
- ? globalThis.String(object.sla_id)
1636
+ sloId: isSet(object.sloId)
1637
+ ? globalThis.String(object.sloId)
1638
+ : isSet(object.slo_id)
1639
+ ? globalThis.String(object.slo_id)
1989
1640
  : "",
1990
1641
  };
1991
1642
  },
1992
1643
 
1993
- toJSON(message: DeleteSlaRequest): unknown {
1644
+ toJSON(message: DeleteSloRequest): unknown {
1994
1645
  const obj: any = {};
1995
1646
  if (message.organizationId !== "") {
1996
1647
  obj.organizationId = message.organizationId;
@@ -1998,40 +1649,40 @@ export const DeleteSlaRequest: MessageFns<DeleteSlaRequest> = {
1998
1649
  if (message.projectId !== "") {
1999
1650
  obj.projectId = message.projectId;
2000
1651
  }
2001
- if (message.slaId !== "") {
2002
- obj.slaId = message.slaId;
1652
+ if (message.sloId !== "") {
1653
+ obj.sloId = message.sloId;
2003
1654
  }
2004
1655
  return obj;
2005
1656
  },
2006
1657
 
2007
- create<I extends Exact<DeepPartial<DeleteSlaRequest>, I>>(base?: I): DeleteSlaRequest {
2008
- return DeleteSlaRequest.fromPartial(base ?? ({} as any));
1658
+ create<I extends Exact<DeepPartial<DeleteSloRequest>, I>>(base?: I): DeleteSloRequest {
1659
+ return DeleteSloRequest.fromPartial(base ?? ({} as any));
2009
1660
  },
2010
- fromPartial<I extends Exact<DeepPartial<DeleteSlaRequest>, I>>(object: I): DeleteSlaRequest {
2011
- const message = createBaseDeleteSlaRequest();
1661
+ fromPartial<I extends Exact<DeepPartial<DeleteSloRequest>, I>>(object: I): DeleteSloRequest {
1662
+ const message = createBaseDeleteSloRequest();
2012
1663
  message.organizationId = object.organizationId ?? "";
2013
1664
  message.projectId = object.projectId ?? "";
2014
- message.slaId = object.slaId ?? "";
1665
+ message.sloId = object.sloId ?? "";
2015
1666
  return message;
2016
1667
  },
2017
1668
  };
2018
1669
 
2019
- function createBaseDeleteSlaResponse(): DeleteSlaResponse {
1670
+ function createBaseDeleteSloResponse(): DeleteSloResponse {
2020
1671
  return { status: undefined };
2021
1672
  }
2022
1673
 
2023
- export const DeleteSlaResponse: MessageFns<DeleteSlaResponse> = {
2024
- encode(message: DeleteSlaResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1674
+ export const DeleteSloResponse: MessageFns<DeleteSloResponse> = {
1675
+ encode(message: DeleteSloResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2025
1676
  if (message.status !== undefined) {
2026
1677
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2027
1678
  }
2028
1679
  return writer;
2029
1680
  },
2030
1681
 
2031
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteSlaResponse {
1682
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteSloResponse {
2032
1683
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2033
1684
  const end = length === undefined ? reader.len : reader.pos + length;
2034
- const message = createBaseDeleteSlaResponse();
1685
+ const message = createBaseDeleteSloResponse();
2035
1686
  while (reader.pos < end) {
2036
1687
  const tag = reader.uint32();
2037
1688
  switch (tag >>> 3) {
@@ -2052,11 +1703,11 @@ export const DeleteSlaResponse: MessageFns<DeleteSlaResponse> = {
2052
1703
  return message;
2053
1704
  },
2054
1705
 
2055
- fromJSON(object: any): DeleteSlaResponse {
1706
+ fromJSON(object: any): DeleteSloResponse {
2056
1707
  return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
2057
1708
  },
2058
1709
 
2059
- toJSON(message: DeleteSlaResponse): unknown {
1710
+ toJSON(message: DeleteSloResponse): unknown {
2060
1711
  const obj: any = {};
2061
1712
  if (message.status !== undefined) {
2062
1713
  obj.status = ResponseStatus.toJSON(message.status);
@@ -2064,11 +1715,11 @@ export const DeleteSlaResponse: MessageFns<DeleteSlaResponse> = {
2064
1715
  return obj;
2065
1716
  },
2066
1717
 
2067
- create<I extends Exact<DeepPartial<DeleteSlaResponse>, I>>(base?: I): DeleteSlaResponse {
2068
- return DeleteSlaResponse.fromPartial(base ?? ({} as any));
1718
+ create<I extends Exact<DeepPartial<DeleteSloResponse>, I>>(base?: I): DeleteSloResponse {
1719
+ return DeleteSloResponse.fromPartial(base ?? ({} as any));
2069
1720
  },
2070
- fromPartial<I extends Exact<DeepPartial<DeleteSlaResponse>, I>>(object: I): DeleteSlaResponse {
2071
- const message = createBaseDeleteSlaResponse();
1721
+ fromPartial<I extends Exact<DeepPartial<DeleteSloResponse>, I>>(object: I): DeleteSloResponse {
1722
+ const message = createBaseDeleteSloResponse();
2072
1723
  message.status = (object.status !== undefined && object.status !== null)
2073
1724
  ? ResponseStatus.fromPartial(object.status)
2074
1725
  : undefined;
@@ -2076,52 +1727,31 @@ export const DeleteSlaResponse: MessageFns<DeleteSlaResponse> = {
2076
1727
  },
2077
1728
  };
2078
1729
 
2079
- function createBaseListSlaOutcomesRequest(): ListSlaOutcomesRequest {
2080
- return {
2081
- organizationId: "",
2082
- projectId: "",
2083
- slaId: "",
2084
- startTime: undefined,
2085
- endTime: undefined,
2086
- outcome: 0,
2087
- limit: 0,
2088
- offset: 0,
2089
- };
1730
+ function createBaseGetSloStatusRequest(): GetSloStatusRequest {
1731
+ return { organizationId: "", projectId: "", sloId: "", evaluationTime: undefined };
2090
1732
  }
2091
1733
 
2092
- export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2093
- encode(message: ListSlaOutcomesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1734
+ export const GetSloStatusRequest: MessageFns<GetSloStatusRequest> = {
1735
+ encode(message: GetSloStatusRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2094
1736
  if (message.organizationId !== "") {
2095
1737
  writer.uint32(10).string(message.organizationId);
2096
1738
  }
2097
1739
  if (message.projectId !== "") {
2098
1740
  writer.uint32(18).string(message.projectId);
2099
1741
  }
2100
- if (message.slaId !== "") {
2101
- writer.uint32(26).string(message.slaId);
1742
+ if (message.sloId !== "") {
1743
+ writer.uint32(26).string(message.sloId);
2102
1744
  }
2103
- if (message.startTime !== undefined) {
2104
- Timestamp.encode(toTimestamp(message.startTime), writer.uint32(34).fork()).join();
2105
- }
2106
- if (message.endTime !== undefined) {
2107
- Timestamp.encode(toTimestamp(message.endTime), writer.uint32(42).fork()).join();
2108
- }
2109
- if (message.outcome !== 0) {
2110
- writer.uint32(48).int32(message.outcome);
2111
- }
2112
- if (message.limit !== 0) {
2113
- writer.uint32(56).int32(message.limit);
2114
- }
2115
- if (message.offset !== 0) {
2116
- writer.uint32(64).int32(message.offset);
1745
+ if (message.evaluationTime !== undefined) {
1746
+ Timestamp.encode(toTimestamp(message.evaluationTime), writer.uint32(34).fork()).join();
2117
1747
  }
2118
1748
  return writer;
2119
1749
  },
2120
1750
 
2121
- decode(input: BinaryReader | Uint8Array, length?: number): ListSlaOutcomesRequest {
1751
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSloStatusRequest {
2122
1752
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2123
1753
  const end = length === undefined ? reader.len : reader.pos + length;
2124
- const message = createBaseListSlaOutcomesRequest();
1754
+ const message = createBaseGetSloStatusRequest();
2125
1755
  while (reader.pos < end) {
2126
1756
  const tag = reader.uint32();
2127
1757
  switch (tag >>> 3) {
@@ -2146,7 +1776,7 @@ export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2146
1776
  break;
2147
1777
  }
2148
1778
 
2149
- message.slaId = reader.string();
1779
+ message.sloId = reader.string();
2150
1780
  continue;
2151
1781
  }
2152
1782
  case 4: {
@@ -2154,39 +1784,7 @@ export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2154
1784
  break;
2155
1785
  }
2156
1786
 
2157
- message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2158
- continue;
2159
- }
2160
- case 5: {
2161
- if (tag !== 42) {
2162
- break;
2163
- }
2164
-
2165
- message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2166
- continue;
2167
- }
2168
- case 6: {
2169
- if (tag !== 48) {
2170
- break;
2171
- }
2172
-
2173
- message.outcome = reader.int32() as any;
2174
- continue;
2175
- }
2176
- case 7: {
2177
- if (tag !== 56) {
2178
- break;
2179
- }
2180
-
2181
- message.limit = reader.int32();
2182
- continue;
2183
- }
2184
- case 8: {
2185
- if (tag !== 64) {
2186
- break;
2187
- }
2188
-
2189
- message.offset = reader.int32();
1787
+ message.evaluationTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2190
1788
  continue;
2191
1789
  }
2192
1790
  }
@@ -2198,7 +1796,7 @@ export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2198
1796
  return message;
2199
1797
  },
2200
1798
 
2201
- fromJSON(object: any): ListSlaOutcomesRequest {
1799
+ fromJSON(object: any): GetSloStatusRequest {
2202
1800
  return {
2203
1801
  organizationId: isSet(object.organizationId)
2204
1802
  ? globalThis.String(object.organizationId)
@@ -2210,28 +1808,20 @@ export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2210
1808
  : isSet(object.project_id)
2211
1809
  ? globalThis.String(object.project_id)
2212
1810
  : "",
2213
- slaId: isSet(object.slaId)
2214
- ? globalThis.String(object.slaId)
2215
- : isSet(object.sla_id)
2216
- ? globalThis.String(object.sla_id)
1811
+ sloId: isSet(object.sloId)
1812
+ ? globalThis.String(object.sloId)
1813
+ : isSet(object.slo_id)
1814
+ ? globalThis.String(object.slo_id)
2217
1815
  : "",
2218
- startTime: isSet(object.startTime)
2219
- ? fromJsonTimestamp(object.startTime)
2220
- : isSet(object.start_time)
2221
- ? fromJsonTimestamp(object.start_time)
1816
+ evaluationTime: isSet(object.evaluationTime)
1817
+ ? fromJsonTimestamp(object.evaluationTime)
1818
+ : isSet(object.evaluation_time)
1819
+ ? fromJsonTimestamp(object.evaluation_time)
2222
1820
  : undefined,
2223
- endTime: isSet(object.endTime)
2224
- ? fromJsonTimestamp(object.endTime)
2225
- : isSet(object.end_time)
2226
- ? fromJsonTimestamp(object.end_time)
2227
- : undefined,
2228
- outcome: isSet(object.outcome) ? slaOutcomeStatusFromJSON(object.outcome) : 0,
2229
- limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
2230
- offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
2231
1821
  };
2232
1822
  },
2233
1823
 
2234
- toJSON(message: ListSlaOutcomesRequest): unknown {
1824
+ toJSON(message: GetSloStatusRequest): unknown {
2235
1825
  const obj: any = {};
2236
1826
  if (message.organizationId !== "") {
2237
1827
  obj.organizationId = message.organizationId;
@@ -2239,63 +1829,47 @@ export const ListSlaOutcomesRequest: MessageFns<ListSlaOutcomesRequest> = {
2239
1829
  if (message.projectId !== "") {
2240
1830
  obj.projectId = message.projectId;
2241
1831
  }
2242
- if (message.slaId !== "") {
2243
- obj.slaId = message.slaId;
2244
- }
2245
- if (message.startTime !== undefined) {
2246
- obj.startTime = message.startTime.toISOString();
2247
- }
2248
- if (message.endTime !== undefined) {
2249
- obj.endTime = message.endTime.toISOString();
2250
- }
2251
- if (message.outcome !== 0) {
2252
- obj.outcome = slaOutcomeStatusToJSON(message.outcome);
1832
+ if (message.sloId !== "") {
1833
+ obj.sloId = message.sloId;
2253
1834
  }
2254
- if (message.limit !== 0) {
2255
- obj.limit = Math.round(message.limit);
2256
- }
2257
- if (message.offset !== 0) {
2258
- obj.offset = Math.round(message.offset);
1835
+ if (message.evaluationTime !== undefined) {
1836
+ obj.evaluationTime = message.evaluationTime.toISOString();
2259
1837
  }
2260
1838
  return obj;
2261
1839
  },
2262
1840
 
2263
- create<I extends Exact<DeepPartial<ListSlaOutcomesRequest>, I>>(base?: I): ListSlaOutcomesRequest {
2264
- return ListSlaOutcomesRequest.fromPartial(base ?? ({} as any));
1841
+ create<I extends Exact<DeepPartial<GetSloStatusRequest>, I>>(base?: I): GetSloStatusRequest {
1842
+ return GetSloStatusRequest.fromPartial(base ?? ({} as any));
2265
1843
  },
2266
- fromPartial<I extends Exact<DeepPartial<ListSlaOutcomesRequest>, I>>(object: I): ListSlaOutcomesRequest {
2267
- const message = createBaseListSlaOutcomesRequest();
1844
+ fromPartial<I extends Exact<DeepPartial<GetSloStatusRequest>, I>>(object: I): GetSloStatusRequest {
1845
+ const message = createBaseGetSloStatusRequest();
2268
1846
  message.organizationId = object.organizationId ?? "";
2269
1847
  message.projectId = object.projectId ?? "";
2270
- message.slaId = object.slaId ?? "";
2271
- message.startTime = object.startTime ?? undefined;
2272
- message.endTime = object.endTime ?? undefined;
2273
- message.outcome = object.outcome ?? 0;
2274
- message.limit = object.limit ?? 0;
2275
- message.offset = object.offset ?? 0;
1848
+ message.sloId = object.sloId ?? "";
1849
+ message.evaluationTime = object.evaluationTime ?? undefined;
2276
1850
  return message;
2277
1851
  },
2278
1852
  };
2279
1853
 
2280
- function createBaseListSlaOutcomesResponse(): ListSlaOutcomesResponse {
2281
- return { status: undefined, outcomes: [] };
1854
+ function createBaseGetSloStatusResponse(): GetSloStatusResponse {
1855
+ return { status: undefined, sloStatus: undefined };
2282
1856
  }
2283
1857
 
2284
- export const ListSlaOutcomesResponse: MessageFns<ListSlaOutcomesResponse> = {
2285
- encode(message: ListSlaOutcomesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1858
+ export const GetSloStatusResponse: MessageFns<GetSloStatusResponse> = {
1859
+ encode(message: GetSloStatusResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2286
1860
  if (message.status !== undefined) {
2287
1861
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2288
1862
  }
2289
- for (const v of message.outcomes) {
2290
- SlaOutcome.encode(v!, writer.uint32(18).fork()).join();
1863
+ if (message.sloStatus !== undefined) {
1864
+ SloStatus.encode(message.sloStatus, writer.uint32(18).fork()).join();
2291
1865
  }
2292
1866
  return writer;
2293
1867
  },
2294
1868
 
2295
- decode(input: BinaryReader | Uint8Array, length?: number): ListSlaOutcomesResponse {
1869
+ decode(input: BinaryReader | Uint8Array, length?: number): GetSloStatusResponse {
2296
1870
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2297
1871
  const end = length === undefined ? reader.len : reader.pos + length;
2298
- const message = createBaseListSlaOutcomesResponse();
1872
+ const message = createBaseGetSloStatusResponse();
2299
1873
  while (reader.pos < end) {
2300
1874
  const tag = reader.uint32();
2301
1875
  switch (tag >>> 3) {
@@ -2312,7 +1886,7 @@ export const ListSlaOutcomesResponse: MessageFns<ListSlaOutcomesResponse> = {
2312
1886
  break;
2313
1887
  }
2314
1888
 
2315
- message.outcomes.push(SlaOutcome.decode(reader, reader.uint32()));
1889
+ message.sloStatus = SloStatus.decode(reader, reader.uint32());
2316
1890
  continue;
2317
1891
  }
2318
1892
  }
@@ -2324,97 +1898,415 @@ export const ListSlaOutcomesResponse: MessageFns<ListSlaOutcomesResponse> = {
2324
1898
  return message;
2325
1899
  },
2326
1900
 
2327
- fromJSON(object: any): ListSlaOutcomesResponse {
1901
+ fromJSON(object: any): GetSloStatusResponse {
2328
1902
  return {
2329
1903
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
2330
- outcomes: globalThis.Array.isArray(object?.outcomes)
2331
- ? object.outcomes.map((e: any) => SlaOutcome.fromJSON(e))
2332
- : [],
1904
+ sloStatus: isSet(object.sloStatus)
1905
+ ? SloStatus.fromJSON(object.sloStatus)
1906
+ : isSet(object.slo_status)
1907
+ ? SloStatus.fromJSON(object.slo_status)
1908
+ : undefined,
2333
1909
  };
2334
1910
  },
2335
1911
 
2336
- toJSON(message: ListSlaOutcomesResponse): unknown {
1912
+ toJSON(message: GetSloStatusResponse): unknown {
2337
1913
  const obj: any = {};
2338
1914
  if (message.status !== undefined) {
2339
1915
  obj.status = ResponseStatus.toJSON(message.status);
2340
1916
  }
2341
- if (message.outcomes?.length) {
2342
- obj.outcomes = message.outcomes.map((e) => SlaOutcome.toJSON(e));
1917
+ if (message.sloStatus !== undefined) {
1918
+ obj.sloStatus = SloStatus.toJSON(message.sloStatus);
2343
1919
  }
2344
1920
  return obj;
2345
1921
  },
2346
1922
 
2347
- create<I extends Exact<DeepPartial<ListSlaOutcomesResponse>, I>>(base?: I): ListSlaOutcomesResponse {
2348
- return ListSlaOutcomesResponse.fromPartial(base ?? ({} as any));
1923
+ create<I extends Exact<DeepPartial<GetSloStatusResponse>, I>>(base?: I): GetSloStatusResponse {
1924
+ return GetSloStatusResponse.fromPartial(base ?? ({} as any));
2349
1925
  },
2350
- fromPartial<I extends Exact<DeepPartial<ListSlaOutcomesResponse>, I>>(object: I): ListSlaOutcomesResponse {
2351
- const message = createBaseListSlaOutcomesResponse();
1926
+ fromPartial<I extends Exact<DeepPartial<GetSloStatusResponse>, I>>(object: I): GetSloStatusResponse {
1927
+ const message = createBaseGetSloStatusResponse();
2352
1928
  message.status = (object.status !== undefined && object.status !== null)
2353
1929
  ? ResponseStatus.fromPartial(object.status)
2354
1930
  : undefined;
2355
- message.outcomes = object.outcomes?.map((e) => SlaOutcome.fromPartial(e)) || [];
1931
+ message.sloStatus = (object.sloStatus !== undefined && object.sloStatus !== null)
1932
+ ? SloStatus.fromPartial(object.sloStatus)
1933
+ : undefined;
1934
+ return message;
1935
+ },
1936
+ };
1937
+
1938
+ function createBaseSloStatus(): SloStatus {
1939
+ return { sloId: "", enabled: false, windowSeconds: 0, windowStart: undefined, windowEnd: undefined, corridors: [] };
1940
+ }
1941
+
1942
+ export const SloStatus: MessageFns<SloStatus> = {
1943
+ encode(message: SloStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1944
+ if (message.sloId !== "") {
1945
+ writer.uint32(10).string(message.sloId);
1946
+ }
1947
+ if (message.enabled !== false) {
1948
+ writer.uint32(16).bool(message.enabled);
1949
+ }
1950
+ if (message.windowSeconds !== 0) {
1951
+ writer.uint32(24).int64(message.windowSeconds);
1952
+ }
1953
+ if (message.windowStart !== undefined) {
1954
+ Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(34).fork()).join();
1955
+ }
1956
+ if (message.windowEnd !== undefined) {
1957
+ Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(42).fork()).join();
1958
+ }
1959
+ for (const v of message.corridors) {
1960
+ SloCorridorStatus.encode(v!, writer.uint32(50).fork()).join();
1961
+ }
1962
+ return writer;
1963
+ },
1964
+
1965
+ decode(input: BinaryReader | Uint8Array, length?: number): SloStatus {
1966
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1967
+ const end = length === undefined ? reader.len : reader.pos + length;
1968
+ const message = createBaseSloStatus();
1969
+ while (reader.pos < end) {
1970
+ const tag = reader.uint32();
1971
+ switch (tag >>> 3) {
1972
+ case 1: {
1973
+ if (tag !== 10) {
1974
+ break;
1975
+ }
1976
+
1977
+ message.sloId = reader.string();
1978
+ continue;
1979
+ }
1980
+ case 2: {
1981
+ if (tag !== 16) {
1982
+ break;
1983
+ }
1984
+
1985
+ message.enabled = reader.bool();
1986
+ continue;
1987
+ }
1988
+ case 3: {
1989
+ if (tag !== 24) {
1990
+ break;
1991
+ }
1992
+
1993
+ message.windowSeconds = longToNumber(reader.int64());
1994
+ continue;
1995
+ }
1996
+ case 4: {
1997
+ if (tag !== 34) {
1998
+ break;
1999
+ }
2000
+
2001
+ message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2002
+ continue;
2003
+ }
2004
+ case 5: {
2005
+ if (tag !== 42) {
2006
+ break;
2007
+ }
2008
+
2009
+ message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
2010
+ continue;
2011
+ }
2012
+ case 6: {
2013
+ if (tag !== 50) {
2014
+ break;
2015
+ }
2016
+
2017
+ message.corridors.push(SloCorridorStatus.decode(reader, reader.uint32()));
2018
+ continue;
2019
+ }
2020
+ }
2021
+ if ((tag & 7) === 4 || tag === 0) {
2022
+ break;
2023
+ }
2024
+ reader.skip(tag & 7);
2025
+ }
2026
+ return message;
2027
+ },
2028
+
2029
+ fromJSON(object: any): SloStatus {
2030
+ return {
2031
+ sloId: isSet(object.sloId)
2032
+ ? globalThis.String(object.sloId)
2033
+ : isSet(object.slo_id)
2034
+ ? globalThis.String(object.slo_id)
2035
+ : "",
2036
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
2037
+ windowSeconds: isSet(object.windowSeconds)
2038
+ ? globalThis.Number(object.windowSeconds)
2039
+ : isSet(object.window_seconds)
2040
+ ? globalThis.Number(object.window_seconds)
2041
+ : 0,
2042
+ windowStart: isSet(object.windowStart)
2043
+ ? fromJsonTimestamp(object.windowStart)
2044
+ : isSet(object.window_start)
2045
+ ? fromJsonTimestamp(object.window_start)
2046
+ : undefined,
2047
+ windowEnd: isSet(object.windowEnd)
2048
+ ? fromJsonTimestamp(object.windowEnd)
2049
+ : isSet(object.window_end)
2050
+ ? fromJsonTimestamp(object.window_end)
2051
+ : undefined,
2052
+ corridors: globalThis.Array.isArray(object?.corridors)
2053
+ ? object.corridors.map((e: any) => SloCorridorStatus.fromJSON(e))
2054
+ : [],
2055
+ };
2056
+ },
2057
+
2058
+ toJSON(message: SloStatus): unknown {
2059
+ const obj: any = {};
2060
+ if (message.sloId !== "") {
2061
+ obj.sloId = message.sloId;
2062
+ }
2063
+ if (message.enabled !== false) {
2064
+ obj.enabled = message.enabled;
2065
+ }
2066
+ if (message.windowSeconds !== 0) {
2067
+ obj.windowSeconds = Math.round(message.windowSeconds);
2068
+ }
2069
+ if (message.windowStart !== undefined) {
2070
+ obj.windowStart = message.windowStart.toISOString();
2071
+ }
2072
+ if (message.windowEnd !== undefined) {
2073
+ obj.windowEnd = message.windowEnd.toISOString();
2074
+ }
2075
+ if (message.corridors?.length) {
2076
+ obj.corridors = message.corridors.map((e) => SloCorridorStatus.toJSON(e));
2077
+ }
2078
+ return obj;
2079
+ },
2080
+
2081
+ create<I extends Exact<DeepPartial<SloStatus>, I>>(base?: I): SloStatus {
2082
+ return SloStatus.fromPartial(base ?? ({} as any));
2083
+ },
2084
+ fromPartial<I extends Exact<DeepPartial<SloStatus>, I>>(object: I): SloStatus {
2085
+ const message = createBaseSloStatus();
2086
+ message.sloId = object.sloId ?? "";
2087
+ message.enabled = object.enabled ?? false;
2088
+ message.windowSeconds = object.windowSeconds ?? 0;
2089
+ message.windowStart = object.windowStart ?? undefined;
2090
+ message.windowEnd = object.windowEnd ?? undefined;
2091
+ message.corridors = object.corridors?.map((e) => SloCorridorStatus.fromPartial(e)) || [];
2092
+ return message;
2093
+ },
2094
+ };
2095
+
2096
+ function createBaseSloCorridorStatus(): SloCorridorStatus {
2097
+ return { groupValues: [], eligibleCount: 0, goodCount: 0, compliance: 0, budgetRemaining: 0, state: 0 };
2098
+ }
2099
+
2100
+ export const SloCorridorStatus: MessageFns<SloCorridorStatus> = {
2101
+ encode(message: SloCorridorStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2102
+ for (const v of message.groupValues) {
2103
+ writer.uint32(10).string(v!);
2104
+ }
2105
+ if (message.eligibleCount !== 0) {
2106
+ writer.uint32(16).uint64(message.eligibleCount);
2107
+ }
2108
+ if (message.goodCount !== 0) {
2109
+ writer.uint32(24).uint64(message.goodCount);
2110
+ }
2111
+ if (message.compliance !== 0) {
2112
+ writer.uint32(33).double(message.compliance);
2113
+ }
2114
+ if (message.budgetRemaining !== 0) {
2115
+ writer.uint32(41).double(message.budgetRemaining);
2116
+ }
2117
+ if (message.state !== 0) {
2118
+ writer.uint32(48).int32(message.state);
2119
+ }
2120
+ return writer;
2121
+ },
2122
+
2123
+ decode(input: BinaryReader | Uint8Array, length?: number): SloCorridorStatus {
2124
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2125
+ const end = length === undefined ? reader.len : reader.pos + length;
2126
+ const message = createBaseSloCorridorStatus();
2127
+ while (reader.pos < end) {
2128
+ const tag = reader.uint32();
2129
+ switch (tag >>> 3) {
2130
+ case 1: {
2131
+ if (tag !== 10) {
2132
+ break;
2133
+ }
2134
+
2135
+ message.groupValues.push(reader.string());
2136
+ continue;
2137
+ }
2138
+ case 2: {
2139
+ if (tag !== 16) {
2140
+ break;
2141
+ }
2142
+
2143
+ message.eligibleCount = longToNumber(reader.uint64());
2144
+ continue;
2145
+ }
2146
+ case 3: {
2147
+ if (tag !== 24) {
2148
+ break;
2149
+ }
2150
+
2151
+ message.goodCount = longToNumber(reader.uint64());
2152
+ continue;
2153
+ }
2154
+ case 4: {
2155
+ if (tag !== 33) {
2156
+ break;
2157
+ }
2158
+
2159
+ message.compliance = reader.double();
2160
+ continue;
2161
+ }
2162
+ case 5: {
2163
+ if (tag !== 41) {
2164
+ break;
2165
+ }
2166
+
2167
+ message.budgetRemaining = reader.double();
2168
+ continue;
2169
+ }
2170
+ case 6: {
2171
+ if (tag !== 48) {
2172
+ break;
2173
+ }
2174
+
2175
+ message.state = reader.int32() as any;
2176
+ continue;
2177
+ }
2178
+ }
2179
+ if ((tag & 7) === 4 || tag === 0) {
2180
+ break;
2181
+ }
2182
+ reader.skip(tag & 7);
2183
+ }
2184
+ return message;
2185
+ },
2186
+
2187
+ fromJSON(object: any): SloCorridorStatus {
2188
+ return {
2189
+ groupValues: globalThis.Array.isArray(object?.groupValues)
2190
+ ? object.groupValues.map((e: any) => globalThis.String(e))
2191
+ : globalThis.Array.isArray(object?.group_values)
2192
+ ? object.group_values.map((e: any) => globalThis.String(e))
2193
+ : [],
2194
+ eligibleCount: isSet(object.eligibleCount)
2195
+ ? globalThis.Number(object.eligibleCount)
2196
+ : isSet(object.eligible_count)
2197
+ ? globalThis.Number(object.eligible_count)
2198
+ : 0,
2199
+ goodCount: isSet(object.goodCount)
2200
+ ? globalThis.Number(object.goodCount)
2201
+ : isSet(object.good_count)
2202
+ ? globalThis.Number(object.good_count)
2203
+ : 0,
2204
+ compliance: isSet(object.compliance) ? globalThis.Number(object.compliance) : 0,
2205
+ budgetRemaining: isSet(object.budgetRemaining)
2206
+ ? globalThis.Number(object.budgetRemaining)
2207
+ : isSet(object.budget_remaining)
2208
+ ? globalThis.Number(object.budget_remaining)
2209
+ : 0,
2210
+ state: isSet(object.state) ? sloCorridorStateFromJSON(object.state) : 0,
2211
+ };
2212
+ },
2213
+
2214
+ toJSON(message: SloCorridorStatus): unknown {
2215
+ const obj: any = {};
2216
+ if (message.groupValues?.length) {
2217
+ obj.groupValues = message.groupValues;
2218
+ }
2219
+ if (message.eligibleCount !== 0) {
2220
+ obj.eligibleCount = Math.round(message.eligibleCount);
2221
+ }
2222
+ if (message.goodCount !== 0) {
2223
+ obj.goodCount = Math.round(message.goodCount);
2224
+ }
2225
+ if (message.compliance !== 0) {
2226
+ obj.compliance = message.compliance;
2227
+ }
2228
+ if (message.budgetRemaining !== 0) {
2229
+ obj.budgetRemaining = message.budgetRemaining;
2230
+ }
2231
+ if (message.state !== 0) {
2232
+ obj.state = sloCorridorStateToJSON(message.state);
2233
+ }
2234
+ return obj;
2235
+ },
2236
+
2237
+ create<I extends Exact<DeepPartial<SloCorridorStatus>, I>>(base?: I): SloCorridorStatus {
2238
+ return SloCorridorStatus.fromPartial(base ?? ({} as any));
2239
+ },
2240
+ fromPartial<I extends Exact<DeepPartial<SloCorridorStatus>, I>>(object: I): SloCorridorStatus {
2241
+ const message = createBaseSloCorridorStatus();
2242
+ message.groupValues = object.groupValues?.map((e) => e) || [];
2243
+ message.eligibleCount = object.eligibleCount ?? 0;
2244
+ message.goodCount = object.goodCount ?? 0;
2245
+ message.compliance = object.compliance ?? 0;
2246
+ message.budgetRemaining = object.budgetRemaining ?? 0;
2247
+ message.state = object.state ?? 0;
2356
2248
  return message;
2357
2249
  },
2358
2250
  };
2359
2251
 
2360
- /** SlaGatewayService provides web client access to SLA definitions and outcomes. */
2361
- export interface SlaGatewayService {
2362
- CreateSla(request: CreateSlaRequest, metadata?: Metadata): Promise<CreateSlaResponse>;
2363
- GetSla(request: GetSlaRequest, metadata?: Metadata): Promise<GetSlaResponse>;
2364
- ListSlas(request: ListSlasRequest, metadata?: Metadata): Promise<ListSlasResponse>;
2365
- UpdateSla(request: UpdateSlaRequest, metadata?: Metadata): Promise<UpdateSlaResponse>;
2366
- DeleteSla(request: DeleteSlaRequest, metadata?: Metadata): Promise<DeleteSlaResponse>;
2367
- ListSlaOutcomes(request: ListSlaOutcomesRequest, metadata?: Metadata): Promise<ListSlaOutcomesResponse>;
2252
+ /** SloGatewayService provides web client access to SLO definitions. */
2253
+ export interface SloGatewayService {
2254
+ CreateSlo(request: CreateSloRequest, metadata?: Metadata): Promise<CreateSloResponse>;
2255
+ GetSlo(request: GetSloRequest, metadata?: Metadata): Promise<GetSloResponse>;
2256
+ ListSlos(request: ListSlosRequest, metadata?: Metadata): Promise<ListSlosResponse>;
2257
+ UpdateSlo(request: UpdateSloRequest, metadata?: Metadata): Promise<UpdateSloResponse>;
2258
+ DeleteSlo(request: DeleteSloRequest, metadata?: Metadata): Promise<DeleteSloResponse>;
2259
+ GetSloStatus(request: GetSloStatusRequest, metadata?: Metadata): Promise<GetSloStatusResponse>;
2368
2260
  }
2369
2261
 
2370
- export const SlaGatewayServiceServiceName = "gateway.web.v1.SlaGatewayService";
2371
- export class SlaGatewayServiceClientImpl implements SlaGatewayService {
2262
+ export const SloGatewayServiceServiceName = "gateway.web.v1.SloGatewayService";
2263
+ export class SloGatewayServiceClientImpl implements SloGatewayService {
2372
2264
  private readonly rpc: Rpc;
2373
2265
  private readonly service: string;
2374
2266
  constructor(rpc: Rpc, opts?: { service?: string }) {
2375
- this.service = opts?.service || SlaGatewayServiceServiceName;
2267
+ this.service = opts?.service || SloGatewayServiceServiceName;
2376
2268
  this.rpc = rpc;
2377
- this.CreateSla = this.CreateSla.bind(this);
2378
- this.GetSla = this.GetSla.bind(this);
2379
- this.ListSlas = this.ListSlas.bind(this);
2380
- this.UpdateSla = this.UpdateSla.bind(this);
2381
- this.DeleteSla = this.DeleteSla.bind(this);
2382
- this.ListSlaOutcomes = this.ListSlaOutcomes.bind(this);
2269
+ this.CreateSlo = this.CreateSlo.bind(this);
2270
+ this.GetSlo = this.GetSlo.bind(this);
2271
+ this.ListSlos = this.ListSlos.bind(this);
2272
+ this.UpdateSlo = this.UpdateSlo.bind(this);
2273
+ this.DeleteSlo = this.DeleteSlo.bind(this);
2274
+ this.GetSloStatus = this.GetSloStatus.bind(this);
2383
2275
  }
2384
- CreateSla(request: CreateSlaRequest, metadata?: Metadata): Promise<CreateSlaResponse> {
2385
- const data = CreateSlaRequest.encode(request).finish();
2386
- const promise = this.rpc.request(this.service, "CreateSla", data, metadata);
2387
- return promise.then((data) => CreateSlaResponse.decode(new BinaryReader(data)));
2276
+ CreateSlo(request: CreateSloRequest, metadata?: Metadata): Promise<CreateSloResponse> {
2277
+ const data = CreateSloRequest.encode(request).finish();
2278
+ const promise = this.rpc.request(this.service, "CreateSlo", data, metadata);
2279
+ return promise.then((data) => CreateSloResponse.decode(new BinaryReader(data)));
2388
2280
  }
2389
2281
 
2390
- GetSla(request: GetSlaRequest, metadata?: Metadata): Promise<GetSlaResponse> {
2391
- const data = GetSlaRequest.encode(request).finish();
2392
- const promise = this.rpc.request(this.service, "GetSla", data, metadata);
2393
- return promise.then((data) => GetSlaResponse.decode(new BinaryReader(data)));
2282
+ GetSlo(request: GetSloRequest, metadata?: Metadata): Promise<GetSloResponse> {
2283
+ const data = GetSloRequest.encode(request).finish();
2284
+ const promise = this.rpc.request(this.service, "GetSlo", data, metadata);
2285
+ return promise.then((data) => GetSloResponse.decode(new BinaryReader(data)));
2394
2286
  }
2395
2287
 
2396
- ListSlas(request: ListSlasRequest, metadata?: Metadata): Promise<ListSlasResponse> {
2397
- const data = ListSlasRequest.encode(request).finish();
2398
- const promise = this.rpc.request(this.service, "ListSlas", data, metadata);
2399
- return promise.then((data) => ListSlasResponse.decode(new BinaryReader(data)));
2288
+ ListSlos(request: ListSlosRequest, metadata?: Metadata): Promise<ListSlosResponse> {
2289
+ const data = ListSlosRequest.encode(request).finish();
2290
+ const promise = this.rpc.request(this.service, "ListSlos", data, metadata);
2291
+ return promise.then((data) => ListSlosResponse.decode(new BinaryReader(data)));
2400
2292
  }
2401
2293
 
2402
- UpdateSla(request: UpdateSlaRequest, metadata?: Metadata): Promise<UpdateSlaResponse> {
2403
- const data = UpdateSlaRequest.encode(request).finish();
2404
- const promise = this.rpc.request(this.service, "UpdateSla", data, metadata);
2405
- return promise.then((data) => UpdateSlaResponse.decode(new BinaryReader(data)));
2294
+ UpdateSlo(request: UpdateSloRequest, metadata?: Metadata): Promise<UpdateSloResponse> {
2295
+ const data = UpdateSloRequest.encode(request).finish();
2296
+ const promise = this.rpc.request(this.service, "UpdateSlo", data, metadata);
2297
+ return promise.then((data) => UpdateSloResponse.decode(new BinaryReader(data)));
2406
2298
  }
2407
2299
 
2408
- DeleteSla(request: DeleteSlaRequest, metadata?: Metadata): Promise<DeleteSlaResponse> {
2409
- const data = DeleteSlaRequest.encode(request).finish();
2410
- const promise = this.rpc.request(this.service, "DeleteSla", data, metadata);
2411
- return promise.then((data) => DeleteSlaResponse.decode(new BinaryReader(data)));
2300
+ DeleteSlo(request: DeleteSloRequest, metadata?: Metadata): Promise<DeleteSloResponse> {
2301
+ const data = DeleteSloRequest.encode(request).finish();
2302
+ const promise = this.rpc.request(this.service, "DeleteSlo", data, metadata);
2303
+ return promise.then((data) => DeleteSloResponse.decode(new BinaryReader(data)));
2412
2304
  }
2413
2305
 
2414
- ListSlaOutcomes(request: ListSlaOutcomesRequest, metadata?: Metadata): Promise<ListSlaOutcomesResponse> {
2415
- const data = ListSlaOutcomesRequest.encode(request).finish();
2416
- const promise = this.rpc.request(this.service, "ListSlaOutcomes", data, metadata);
2417
- return promise.then((data) => ListSlaOutcomesResponse.decode(new BinaryReader(data)));
2306
+ GetSloStatus(request: GetSloStatusRequest, metadata?: Metadata): Promise<GetSloStatusResponse> {
2307
+ const data = GetSloStatusRequest.encode(request).finish();
2308
+ const promise = this.rpc.request(this.service, "GetSloStatus", data, metadata);
2309
+ return promise.then((data) => GetSloStatusResponse.decode(new BinaryReader(data)));
2418
2310
  }
2419
2311
  }
2420
2312