@structured-id/proto 0.14.0 → 0.16.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/generated/sid/v1/admin/admin.d.ts +48 -17
  3. package/dist/generated/sid/v1/admin/admin.js +55 -62
  4. package/dist/generated/sid/v1/admin/admin.js.map +1 -1
  5. package/dist/generated/sid/v1/admin/branding.d.ts +54 -26
  6. package/dist/generated/sid/v1/admin/branding.js +87 -98
  7. package/dist/generated/sid/v1/admin/branding.js.map +1 -1
  8. package/dist/generated/sid/v1/admin/enrollment.d.ts +63 -44
  9. package/dist/generated/sid/v1/admin/enrollment.js +109 -107
  10. package/dist/generated/sid/v1/admin/enrollment.js.map +1 -1
  11. package/dist/generated/sid/v1/admin/flow.d.ts +90 -42
  12. package/dist/generated/sid/v1/admin/flow.js +143 -155
  13. package/dist/generated/sid/v1/admin/flow.js.map +1 -1
  14. package/dist/generated/sid/v1/admin/security.d.ts +11 -4
  15. package/dist/generated/sid/v1/admin/security.js +14 -14
  16. package/dist/generated/sid/v1/admin/security.js.map +1 -1
  17. package/dist/generated/sid/v1/admin/sessions.d.ts +18 -8
  18. package/dist/generated/sid/v1/admin/sessions.js +27 -29
  19. package/dist/generated/sid/v1/admin/sessions.js.map +1 -1
  20. package/dist/generated/sid/v1/authn/auth.d.ts +13 -7
  21. package/dist/generated/sid/v1/authn/auth.js +20 -20
  22. package/dist/generated/sid/v1/authn/auth.js.map +1 -1
  23. package/dist/generated/sid/v1/authz/authz.d.ts +203 -111
  24. package/dist/generated/sid/v1/authz/authz.js +308 -330
  25. package/dist/generated/sid/v1/authz/authz.js.map +1 -1
  26. package/dist/generated/sid/v1/authz/governance.d.ts +40 -26
  27. package/dist/generated/sid/v1/authz/governance.js +65 -71
  28. package/dist/generated/sid/v1/authz/governance.js.map +1 -1
  29. package/dist/generated/sid/v1/common/types.d.ts +29 -0
  30. package/dist/generated/sid/v1/common/types.js +47 -0
  31. package/dist/generated/sid/v1/common/types.js.map +1 -1
  32. package/dist/generated/sid/v1/federation/upstream.d.ts +34 -16
  33. package/dist/generated/sid/v1/federation/upstream.js +53 -59
  34. package/dist/generated/sid/v1/federation/upstream.js.map +1 -1
  35. package/dist/generated/sid/v1/ids/ids.d.ts +12 -0
  36. package/dist/generated/sid/v1/ids/ids.js +6 -0
  37. package/dist/generated/sid/v1/ids/ids.js.map +1 -1
  38. package/dist/generated/sid/v1/machine/machine_user.d.ts +100 -48
  39. package/dist/generated/sid/v1/machine/machine_user.js +228 -179
  40. package/dist/generated/sid/v1/machine/machine_user.js.map +1 -1
  41. package/dist/generated/sid/v1/machine/pat.d.ts +16 -12
  42. package/dist/generated/sid/v1/machine/pat.js +41 -45
  43. package/dist/generated/sid/v1/machine/pat.js.map +1 -1
  44. package/dist/generated/sid/v1/projects/projects.d.ts +141 -103
  45. package/dist/generated/sid/v1/projects/projects.js +293 -271
  46. package/dist/generated/sid/v1/projects/projects.js.map +1 -1
  47. package/dist/ip.d.ts +31 -0
  48. package/dist/ip.js +84 -0
  49. package/dist/ip.js.map +1 -0
  50. package/package.json +6 -2
@@ -7,7 +7,12 @@ import { WireType } from "@protobuf-ts/runtime";
7
7
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
8
8
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
9
9
  import { MessageType } from "@protobuf-ts/runtime";
10
+ import { Empty } from "../../../google/protobuf/empty.js";
11
+ import { OrgId } from "../ids/ids.js";
12
+ import { ProfileId } from "../ids/ids.js";
10
13
  import { Timestamp } from "../../../google/protobuf/timestamp.js";
14
+ import { ProjectId } from "../ids/ids.js";
15
+ import { MachineUserId } from "../ids/ids.js";
11
16
  /**
12
17
  * Enums
13
18
  *
@@ -132,36 +137,31 @@ export var ImpersonationTargetType;
132
137
  class MachineUserInfo$Type extends MessageType {
133
138
  constructor() {
134
139
  super("sid.v1.machine.MachineUserInfo", [
135
- { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
136
- { no: 2, name: "project_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
140
+ { no: 1, name: "id", kind: "message", T: () => MachineUserId },
141
+ { no: 2, name: "project_id", kind: "message", T: () => ProjectId },
137
142
  { no: 3, name: "client_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
138
143
  { no: 4, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
139
144
  { no: 5, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
140
145
  { no: 6, name: "machine_type", kind: "enum", T: () => ["sid.v1.machine.MachineUserType", MachineUserType, "MACHINE_USER_TYPE_"] },
141
146
  { no: 7, name: "status", kind: "enum", T: () => ["sid.v1.machine.MachineUserStatus", MachineUserStatus, "MACHINE_USER_STATUS_"] },
142
- { no: 8, name: "owner_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
143
- { no: 9, name: "owner_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
144
- { no: 10, name: "scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
145
- { no: 11, name: "ip_allowlist", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
146
- { no: 12, name: "rate_limit_rpm", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
147
- { no: 13, name: "max_token_lifetime", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
148
- { no: 14, name: "expires_at", kind: "message", T: () => Timestamp },
149
- { no: 15, name: "last_used_at", kind: "message", T: () => Timestamp },
150
- { no: 16, name: "created_at", kind: "message", T: () => Timestamp },
151
- { no: 17, name: "updated_at", kind: "message", T: () => Timestamp }
147
+ { no: 8, name: "owner", kind: "message", T: () => MachineUserOwner },
148
+ { no: 9, name: "scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
149
+ { no: 10, name: "ip_allowlist", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
150
+ { no: 11, name: "rate_limit_rpm", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
151
+ { no: 12, name: "max_token_lifetime", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
152
+ { no: 13, name: "expires_at", kind: "message", T: () => Timestamp },
153
+ { no: 14, name: "last_used_at", kind: "message", T: () => Timestamp },
154
+ { no: 15, name: "created_at", kind: "message", T: () => Timestamp },
155
+ { no: 16, name: "updated_at", kind: "message", T: () => Timestamp }
152
156
  ]);
153
157
  }
154
158
  create(value) {
155
159
  const message = globalThis.Object.create((this.messagePrototype));
156
- message.id = "";
157
- message.projectId = "";
158
160
  message.clientId = "";
159
161
  message.displayName = "";
160
162
  message.description = "";
161
163
  message.machineType = 0;
162
164
  message.status = 0;
163
- message.ownerType = "";
164
- message.ownerId = "";
165
165
  message.scopes = [];
166
166
  message.ipAllowlist = [];
167
167
  message.rateLimitRpm = 0;
@@ -175,11 +175,11 @@ class MachineUserInfo$Type extends MessageType {
175
175
  while (reader.pos < end) {
176
176
  let [fieldNo, wireType] = reader.tag();
177
177
  switch (fieldNo) {
178
- case /* string id */ 1:
179
- message.id = reader.string();
178
+ case /* sid.v1.ids.MachineUserId id */ 1:
179
+ message.id = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.id);
180
180
  break;
181
- case /* string project_id */ 2:
182
- message.projectId = reader.string();
181
+ case /* sid.v1.ids.ProjectId project_id */ 2:
182
+ message.projectId = ProjectId.internalBinaryRead(reader, reader.uint32(), options, message.projectId);
183
183
  break;
184
184
  case /* string client_id */ 3:
185
185
  message.clientId = reader.string();
@@ -196,34 +196,31 @@ class MachineUserInfo$Type extends MessageType {
196
196
  case /* sid.v1.machine.MachineUserStatus status */ 7:
197
197
  message.status = reader.int32();
198
198
  break;
199
- case /* string owner_type */ 8:
200
- message.ownerType = reader.string();
201
- break;
202
- case /* string owner_id */ 9:
203
- message.ownerId = reader.string();
199
+ case /* sid.v1.machine.MachineUserOwner owner */ 8:
200
+ message.owner = MachineUserOwner.internalBinaryRead(reader, reader.uint32(), options, message.owner);
204
201
  break;
205
- case /* repeated string scopes */ 10:
202
+ case /* repeated string scopes */ 9:
206
203
  message.scopes.push(reader.string());
207
204
  break;
208
- case /* repeated string ip_allowlist */ 11:
205
+ case /* repeated string ip_allowlist */ 10:
209
206
  message.ipAllowlist.push(reader.string());
210
207
  break;
211
- case /* int32 rate_limit_rpm */ 12:
208
+ case /* int32 rate_limit_rpm */ 11:
212
209
  message.rateLimitRpm = reader.int32();
213
210
  break;
214
- case /* int32 max_token_lifetime */ 13:
211
+ case /* int32 max_token_lifetime */ 12:
215
212
  message.maxTokenLifetime = reader.int32();
216
213
  break;
217
- case /* google.protobuf.Timestamp expires_at */ 14:
214
+ case /* google.protobuf.Timestamp expires_at */ 13:
218
215
  message.expiresAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
219
216
  break;
220
- case /* google.protobuf.Timestamp last_used_at */ 15:
217
+ case /* google.protobuf.Timestamp last_used_at */ 14:
221
218
  message.lastUsedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.lastUsedAt);
222
219
  break;
223
- case /* google.protobuf.Timestamp created_at */ 16:
220
+ case /* google.protobuf.Timestamp created_at */ 15:
224
221
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
225
222
  break;
226
- case /* google.protobuf.Timestamp updated_at */ 17:
223
+ case /* google.protobuf.Timestamp updated_at */ 16:
227
224
  message.updatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.updatedAt);
228
225
  break;
229
226
  default:
@@ -238,12 +235,12 @@ class MachineUserInfo$Type extends MessageType {
238
235
  return message;
239
236
  }
240
237
  internalBinaryWrite(message, writer, options) {
241
- /* string id = 1; */
242
- if (message.id !== "")
243
- writer.tag(1, WireType.LengthDelimited).string(message.id);
244
- /* string project_id = 2; */
245
- if (message.projectId !== "")
246
- writer.tag(2, WireType.LengthDelimited).string(message.projectId);
238
+ /* sid.v1.ids.MachineUserId id = 1; */
239
+ if (message.id)
240
+ MachineUserId.internalBinaryWrite(message.id, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
241
+ /* sid.v1.ids.ProjectId project_id = 2; */
242
+ if (message.projectId)
243
+ ProjectId.internalBinaryWrite(message.projectId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
247
244
  /* string client_id = 3; */
248
245
  if (message.clientId !== "")
249
246
  writer.tag(3, WireType.LengthDelimited).string(message.clientId);
@@ -259,36 +256,33 @@ class MachineUserInfo$Type extends MessageType {
259
256
  /* sid.v1.machine.MachineUserStatus status = 7; */
260
257
  if (message.status !== 0)
261
258
  writer.tag(7, WireType.Varint).int32(message.status);
262
- /* string owner_type = 8; */
263
- if (message.ownerType !== "")
264
- writer.tag(8, WireType.LengthDelimited).string(message.ownerType);
265
- /* string owner_id = 9; */
266
- if (message.ownerId !== "")
267
- writer.tag(9, WireType.LengthDelimited).string(message.ownerId);
268
- /* repeated string scopes = 10; */
259
+ /* sid.v1.machine.MachineUserOwner owner = 8; */
260
+ if (message.owner)
261
+ MachineUserOwner.internalBinaryWrite(message.owner, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
262
+ /* repeated string scopes = 9; */
269
263
  for (let i = 0; i < message.scopes.length; i++)
270
- writer.tag(10, WireType.LengthDelimited).string(message.scopes[i]);
271
- /* repeated string ip_allowlist = 11; */
264
+ writer.tag(9, WireType.LengthDelimited).string(message.scopes[i]);
265
+ /* repeated string ip_allowlist = 10; */
272
266
  for (let i = 0; i < message.ipAllowlist.length; i++)
273
- writer.tag(11, WireType.LengthDelimited).string(message.ipAllowlist[i]);
274
- /* int32 rate_limit_rpm = 12; */
267
+ writer.tag(10, WireType.LengthDelimited).string(message.ipAllowlist[i]);
268
+ /* int32 rate_limit_rpm = 11; */
275
269
  if (message.rateLimitRpm !== 0)
276
- writer.tag(12, WireType.Varint).int32(message.rateLimitRpm);
277
- /* int32 max_token_lifetime = 13; */
270
+ writer.tag(11, WireType.Varint).int32(message.rateLimitRpm);
271
+ /* int32 max_token_lifetime = 12; */
278
272
  if (message.maxTokenLifetime !== 0)
279
- writer.tag(13, WireType.Varint).int32(message.maxTokenLifetime);
280
- /* google.protobuf.Timestamp expires_at = 14; */
273
+ writer.tag(12, WireType.Varint).int32(message.maxTokenLifetime);
274
+ /* google.protobuf.Timestamp expires_at = 13; */
281
275
  if (message.expiresAt)
282
- Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
283
- /* google.protobuf.Timestamp last_used_at = 15; */
276
+ Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
277
+ /* google.protobuf.Timestamp last_used_at = 14; */
284
278
  if (message.lastUsedAt)
285
- Timestamp.internalBinaryWrite(message.lastUsedAt, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
286
- /* google.protobuf.Timestamp created_at = 16; */
279
+ Timestamp.internalBinaryWrite(message.lastUsedAt, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
280
+ /* google.protobuf.Timestamp created_at = 15; */
287
281
  if (message.createdAt)
288
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
289
- /* google.protobuf.Timestamp updated_at = 17; */
282
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
283
+ /* google.protobuf.Timestamp updated_at = 16; */
290
284
  if (message.updatedAt)
291
- Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
285
+ Timestamp.internalBinaryWrite(message.updatedAt, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
292
286
  let u = options.writeUnknownFields;
293
287
  if (u !== false)
294
288
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -300,6 +294,76 @@ class MachineUserInfo$Type extends MessageType {
300
294
  */
301
295
  export const MachineUserInfo = new MachineUserInfo$Type();
302
296
  // @generated message type with reflection information, may provide speed optimized methods
297
+ class MachineUserOwner$Type extends MessageType {
298
+ constructor() {
299
+ super("sid.v1.machine.MachineUserOwner", [
300
+ { no: 1, name: "profile", kind: "message", oneof: "owner", T: () => ProfileId },
301
+ { no: 2, name: "organization", kind: "message", oneof: "owner", T: () => OrgId },
302
+ { no: 3, name: "system", kind: "message", oneof: "owner", T: () => Empty }
303
+ ]);
304
+ }
305
+ create(value) {
306
+ const message = globalThis.Object.create((this.messagePrototype));
307
+ message.owner = { oneofKind: undefined };
308
+ if (value !== undefined)
309
+ reflectionMergePartial(this, message, value);
310
+ return message;
311
+ }
312
+ internalBinaryRead(reader, length, options, target) {
313
+ let message = target ?? this.create(), end = reader.pos + length;
314
+ while (reader.pos < end) {
315
+ let [fieldNo, wireType] = reader.tag();
316
+ switch (fieldNo) {
317
+ case /* sid.v1.ids.ProfileId profile */ 1:
318
+ message.owner = {
319
+ oneofKind: "profile",
320
+ profile: ProfileId.internalBinaryRead(reader, reader.uint32(), options, message.owner.profile)
321
+ };
322
+ break;
323
+ case /* sid.v1.ids.OrgId organization */ 2:
324
+ message.owner = {
325
+ oneofKind: "organization",
326
+ organization: OrgId.internalBinaryRead(reader, reader.uint32(), options, message.owner.organization)
327
+ };
328
+ break;
329
+ case /* google.protobuf.Empty system */ 3:
330
+ message.owner = {
331
+ oneofKind: "system",
332
+ system: Empty.internalBinaryRead(reader, reader.uint32(), options, message.owner.system)
333
+ };
334
+ break;
335
+ default:
336
+ let u = options.readUnknownField;
337
+ if (u === "throw")
338
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
339
+ let d = reader.skip(wireType);
340
+ if (u !== false)
341
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
342
+ }
343
+ }
344
+ return message;
345
+ }
346
+ internalBinaryWrite(message, writer, options) {
347
+ /* sid.v1.ids.ProfileId profile = 1; */
348
+ if (message.owner.oneofKind === "profile")
349
+ ProfileId.internalBinaryWrite(message.owner.profile, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
350
+ /* sid.v1.ids.OrgId organization = 2; */
351
+ if (message.owner.oneofKind === "organization")
352
+ OrgId.internalBinaryWrite(message.owner.organization, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
353
+ /* google.protobuf.Empty system = 3; */
354
+ if (message.owner.oneofKind === "system")
355
+ Empty.internalBinaryWrite(message.owner.system, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
356
+ let u = options.writeUnknownFields;
357
+ if (u !== false)
358
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
359
+ return writer;
360
+ }
361
+ }
362
+ /**
363
+ * @generated MessageType for protobuf message sid.v1.machine.MachineUserOwner
364
+ */
365
+ export const MachineUserOwner = new MachineUserOwner$Type();
366
+ // @generated message type with reflection information, may provide speed optimized methods
303
367
  class MachineCredentialInfo$Type extends MessageType {
304
368
  constructor() {
305
369
  super("sid.v1.machine.MachineCredentialInfo", [
@@ -389,7 +453,7 @@ class ImpersonationGrantInfo$Type extends MessageType {
389
453
  constructor() {
390
454
  super("sid.v1.machine.ImpersonationGrantInfo", [
391
455
  { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
392
- { no: 2, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
456
+ { no: 2, name: "machine_user_id", kind: "message", T: () => MachineUserId },
393
457
  { no: 3, name: "target_type", kind: "enum", T: () => ["sid.v1.machine.ImpersonationTargetType", ImpersonationTargetType, "IMPERSONATION_TARGET_TYPE_"] },
394
458
  { no: 4, name: "target", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
395
459
  { no: 5, name: "allowed_scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
@@ -399,7 +463,6 @@ class ImpersonationGrantInfo$Type extends MessageType {
399
463
  create(value) {
400
464
  const message = globalThis.Object.create((this.messagePrototype));
401
465
  message.id = "";
402
- message.machineUserId = "";
403
466
  message.targetType = 0;
404
467
  message.target = "";
405
468
  message.allowedScopes = [];
@@ -415,8 +478,8 @@ class ImpersonationGrantInfo$Type extends MessageType {
415
478
  case /* string id */ 1:
416
479
  message.id = reader.string();
417
480
  break;
418
- case /* string machine_user_id */ 2:
419
- message.machineUserId = reader.string();
481
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 2:
482
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
420
483
  break;
421
484
  case /* sid.v1.machine.ImpersonationTargetType target_type */ 3:
422
485
  message.targetType = reader.int32();
@@ -445,9 +508,9 @@ class ImpersonationGrantInfo$Type extends MessageType {
445
508
  /* string id = 1; */
446
509
  if (message.id !== "")
447
510
  writer.tag(1, WireType.LengthDelimited).string(message.id);
448
- /* string machine_user_id = 2; */
449
- if (message.machineUserId !== "")
450
- writer.tag(2, WireType.LengthDelimited).string(message.machineUserId);
511
+ /* sid.v1.ids.MachineUserId machine_user_id = 2; */
512
+ if (message.machineUserId)
513
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
451
514
  /* sid.v1.machine.ImpersonationTargetType target_type = 3; */
452
515
  if (message.targetType !== 0)
453
516
  writer.tag(3, WireType.Varint).int32(message.targetType);
@@ -474,7 +537,7 @@ export const ImpersonationGrantInfo = new ImpersonationGrantInfo$Type();
474
537
  class CreateMachineUserRequest$Type extends MessageType {
475
538
  constructor() {
476
539
  super("sid.v1.machine.CreateMachineUserRequest", [
477
- { no: 1, name: "project_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
540
+ { no: 1, name: "project_id", kind: "message", T: () => ProjectId },
478
541
  { no: 2, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
479
542
  { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
480
543
  { no: 4, name: "machine_type", kind: "enum", T: () => ["sid.v1.machine.MachineUserType", MachineUserType, "MACHINE_USER_TYPE_"] },
@@ -487,7 +550,6 @@ class CreateMachineUserRequest$Type extends MessageType {
487
550
  }
488
551
  create(value) {
489
552
  const message = globalThis.Object.create((this.messagePrototype));
490
- message.projectId = "";
491
553
  message.displayName = "";
492
554
  message.description = "";
493
555
  message.machineType = 0;
@@ -504,8 +566,8 @@ class CreateMachineUserRequest$Type extends MessageType {
504
566
  while (reader.pos < end) {
505
567
  let [fieldNo, wireType] = reader.tag();
506
568
  switch (fieldNo) {
507
- case /* string project_id */ 1:
508
- message.projectId = reader.string();
569
+ case /* sid.v1.ids.ProjectId project_id */ 1:
570
+ message.projectId = ProjectId.internalBinaryRead(reader, reader.uint32(), options, message.projectId);
509
571
  break;
510
572
  case /* string display_name */ 2:
511
573
  message.displayName = reader.string();
@@ -543,9 +605,9 @@ class CreateMachineUserRequest$Type extends MessageType {
543
605
  return message;
544
606
  }
545
607
  internalBinaryWrite(message, writer, options) {
546
- /* string project_id = 1; */
547
- if (message.projectId !== "")
548
- writer.tag(1, WireType.LengthDelimited).string(message.projectId);
608
+ /* sid.v1.ids.ProjectId project_id = 1; */
609
+ if (message.projectId)
610
+ ProjectId.internalBinaryWrite(message.projectId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
549
611
  /* string display_name = 2; */
550
612
  if (message.displayName !== "")
551
613
  writer.tag(2, WireType.LengthDelimited).string(message.displayName);
@@ -630,12 +692,11 @@ export const CreateMachineUserResponse = new CreateMachineUserResponse$Type();
630
692
  class GetMachineUserRequest$Type extends MessageType {
631
693
  constructor() {
632
694
  super("sid.v1.machine.GetMachineUserRequest", [
633
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
695
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
634
696
  ]);
635
697
  }
636
698
  create(value) {
637
699
  const message = globalThis.Object.create((this.messagePrototype));
638
- message.machineUserId = "";
639
700
  if (value !== undefined)
640
701
  reflectionMergePartial(this, message, value);
641
702
  return message;
@@ -645,8 +706,8 @@ class GetMachineUserRequest$Type extends MessageType {
645
706
  while (reader.pos < end) {
646
707
  let [fieldNo, wireType] = reader.tag();
647
708
  switch (fieldNo) {
648
- case /* string machine_user_id */ 1:
649
- message.machineUserId = reader.string();
709
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
710
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
650
711
  break;
651
712
  default:
652
713
  let u = options.readUnknownField;
@@ -660,9 +721,9 @@ class GetMachineUserRequest$Type extends MessageType {
660
721
  return message;
661
722
  }
662
723
  internalBinaryWrite(message, writer, options) {
663
- /* string machine_user_id = 1; */
664
- if (message.machineUserId !== "")
665
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
724
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
725
+ if (message.machineUserId)
726
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
666
727
  let u = options.writeUnknownFields;
667
728
  if (u !== false)
668
729
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -723,7 +784,7 @@ export const MachineUserResponse = new MachineUserResponse$Type();
723
784
  class UpdateMachineUserRequest$Type extends MessageType {
724
785
  constructor() {
725
786
  super("sid.v1.machine.UpdateMachineUserRequest", [
726
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
787
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
727
788
  { no: 2, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
728
789
  { no: 3, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
729
790
  { no: 4, name: "scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
@@ -735,7 +796,6 @@ class UpdateMachineUserRequest$Type extends MessageType {
735
796
  }
736
797
  create(value) {
737
798
  const message = globalThis.Object.create((this.messagePrototype));
738
- message.machineUserId = "";
739
799
  message.displayName = "";
740
800
  message.description = "";
741
801
  message.scopes = [];
@@ -751,8 +811,8 @@ class UpdateMachineUserRequest$Type extends MessageType {
751
811
  while (reader.pos < end) {
752
812
  let [fieldNo, wireType] = reader.tag();
753
813
  switch (fieldNo) {
754
- case /* string machine_user_id */ 1:
755
- message.machineUserId = reader.string();
814
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
815
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
756
816
  break;
757
817
  case /* string display_name */ 2:
758
818
  message.displayName = reader.string();
@@ -787,9 +847,9 @@ class UpdateMachineUserRequest$Type extends MessageType {
787
847
  return message;
788
848
  }
789
849
  internalBinaryWrite(message, writer, options) {
790
- /* string machine_user_id = 1; */
791
- if (message.machineUserId !== "")
792
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
850
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
851
+ if (message.machineUserId)
852
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
793
853
  /* string display_name = 2; */
794
854
  if (message.displayName !== "")
795
855
  writer.tag(2, WireType.LengthDelimited).string(message.displayName);
@@ -825,12 +885,11 @@ export const UpdateMachineUserRequest = new UpdateMachineUserRequest$Type();
825
885
  class DeleteMachineUserRequest$Type extends MessageType {
826
886
  constructor() {
827
887
  super("sid.v1.machine.DeleteMachineUserRequest", [
828
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
888
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
829
889
  ]);
830
890
  }
831
891
  create(value) {
832
892
  const message = globalThis.Object.create((this.messagePrototype));
833
- message.machineUserId = "";
834
893
  if (value !== undefined)
835
894
  reflectionMergePartial(this, message, value);
836
895
  return message;
@@ -840,8 +899,8 @@ class DeleteMachineUserRequest$Type extends MessageType {
840
899
  while (reader.pos < end) {
841
900
  let [fieldNo, wireType] = reader.tag();
842
901
  switch (fieldNo) {
843
- case /* string machine_user_id */ 1:
844
- message.machineUserId = reader.string();
902
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
903
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
845
904
  break;
846
905
  default:
847
906
  let u = options.readUnknownField;
@@ -855,9 +914,9 @@ class DeleteMachineUserRequest$Type extends MessageType {
855
914
  return message;
856
915
  }
857
916
  internalBinaryWrite(message, writer, options) {
858
- /* string machine_user_id = 1; */
859
- if (message.machineUserId !== "")
860
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
917
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
918
+ if (message.machineUserId)
919
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
861
920
  let u = options.writeUnknownFields;
862
921
  if (u !== false)
863
922
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -910,12 +969,11 @@ export const DeleteMachineUserResponse = new DeleteMachineUserResponse$Type();
910
969
  class ListMachineUsersRequest$Type extends MessageType {
911
970
  constructor() {
912
971
  super("sid.v1.machine.ListMachineUsersRequest", [
913
- { no: 1, name: "project_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
972
+ { no: 1, name: "project_id", kind: "message", T: () => ProjectId }
914
973
  ]);
915
974
  }
916
975
  create(value) {
917
976
  const message = globalThis.Object.create((this.messagePrototype));
918
- message.projectId = "";
919
977
  if (value !== undefined)
920
978
  reflectionMergePartial(this, message, value);
921
979
  return message;
@@ -925,8 +983,8 @@ class ListMachineUsersRequest$Type extends MessageType {
925
983
  while (reader.pos < end) {
926
984
  let [fieldNo, wireType] = reader.tag();
927
985
  switch (fieldNo) {
928
- case /* string project_id */ 1:
929
- message.projectId = reader.string();
986
+ case /* sid.v1.ids.ProjectId project_id */ 1:
987
+ message.projectId = ProjectId.internalBinaryRead(reader, reader.uint32(), options, message.projectId);
930
988
  break;
931
989
  default:
932
990
  let u = options.readUnknownField;
@@ -940,9 +998,9 @@ class ListMachineUsersRequest$Type extends MessageType {
940
998
  return message;
941
999
  }
942
1000
  internalBinaryWrite(message, writer, options) {
943
- /* string project_id = 1; */
944
- if (message.projectId !== "")
945
- writer.tag(1, WireType.LengthDelimited).string(message.projectId);
1001
+ /* sid.v1.ids.ProjectId project_id = 1; */
1002
+ if (message.projectId)
1003
+ ProjectId.internalBinaryWrite(message.projectId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
946
1004
  let u = options.writeUnknownFields;
947
1005
  if (u !== false)
948
1006
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1004,12 +1062,11 @@ export const ListMachineUsersResponse = new ListMachineUsersResponse$Type();
1004
1062
  class SuspendMachineUserRequest$Type extends MessageType {
1005
1063
  constructor() {
1006
1064
  super("sid.v1.machine.SuspendMachineUserRequest", [
1007
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1065
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
1008
1066
  ]);
1009
1067
  }
1010
1068
  create(value) {
1011
1069
  const message = globalThis.Object.create((this.messagePrototype));
1012
- message.machineUserId = "";
1013
1070
  if (value !== undefined)
1014
1071
  reflectionMergePartial(this, message, value);
1015
1072
  return message;
@@ -1019,8 +1076,8 @@ class SuspendMachineUserRequest$Type extends MessageType {
1019
1076
  while (reader.pos < end) {
1020
1077
  let [fieldNo, wireType] = reader.tag();
1021
1078
  switch (fieldNo) {
1022
- case /* string machine_user_id */ 1:
1023
- message.machineUserId = reader.string();
1079
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1080
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1024
1081
  break;
1025
1082
  default:
1026
1083
  let u = options.readUnknownField;
@@ -1034,9 +1091,9 @@ class SuspendMachineUserRequest$Type extends MessageType {
1034
1091
  return message;
1035
1092
  }
1036
1093
  internalBinaryWrite(message, writer, options) {
1037
- /* string machine_user_id = 1; */
1038
- if (message.machineUserId !== "")
1039
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1094
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1095
+ if (message.machineUserId)
1096
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1040
1097
  let u = options.writeUnknownFields;
1041
1098
  if (u !== false)
1042
1099
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1051,12 +1108,11 @@ export const SuspendMachineUserRequest = new SuspendMachineUserRequest$Type();
1051
1108
  class ReactivateMachineUserRequest$Type extends MessageType {
1052
1109
  constructor() {
1053
1110
  super("sid.v1.machine.ReactivateMachineUserRequest", [
1054
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1111
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
1055
1112
  ]);
1056
1113
  }
1057
1114
  create(value) {
1058
1115
  const message = globalThis.Object.create((this.messagePrototype));
1059
- message.machineUserId = "";
1060
1116
  if (value !== undefined)
1061
1117
  reflectionMergePartial(this, message, value);
1062
1118
  return message;
@@ -1066,8 +1122,8 @@ class ReactivateMachineUserRequest$Type extends MessageType {
1066
1122
  while (reader.pos < end) {
1067
1123
  let [fieldNo, wireType] = reader.tag();
1068
1124
  switch (fieldNo) {
1069
- case /* string machine_user_id */ 1:
1070
- message.machineUserId = reader.string();
1125
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1126
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1071
1127
  break;
1072
1128
  default:
1073
1129
  let u = options.readUnknownField;
@@ -1081,9 +1137,9 @@ class ReactivateMachineUserRequest$Type extends MessageType {
1081
1137
  return message;
1082
1138
  }
1083
1139
  internalBinaryWrite(message, writer, options) {
1084
- /* string machine_user_id = 1; */
1085
- if (message.machineUserId !== "")
1086
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1140
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1141
+ if (message.machineUserId)
1142
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1087
1143
  let u = options.writeUnknownFields;
1088
1144
  if (u !== false)
1089
1145
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1098,7 +1154,7 @@ export const ReactivateMachineUserRequest = new ReactivateMachineUserRequest$Typ
1098
1154
  class AddMachineCredentialRequest$Type extends MessageType {
1099
1155
  constructor() {
1100
1156
  super("sid.v1.machine.AddMachineCredentialRequest", [
1101
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1157
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
1102
1158
  { no: 2, name: "credential_type", kind: "enum", T: () => ["sid.v1.machine.MachineCredentialType", MachineCredentialType, "MACHINE_CREDENTIAL_TYPE_"] },
1103
1159
  { no: 3, name: "algorithm", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1104
1160
  { no: 4, name: "public_key_pem", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
@@ -1107,7 +1163,6 @@ class AddMachineCredentialRequest$Type extends MessageType {
1107
1163
  }
1108
1164
  create(value) {
1109
1165
  const message = globalThis.Object.create((this.messagePrototype));
1110
- message.machineUserId = "";
1111
1166
  message.credentialType = 0;
1112
1167
  message.algorithm = "";
1113
1168
  message.publicKeyPem = "";
@@ -1120,8 +1175,8 @@ class AddMachineCredentialRequest$Type extends MessageType {
1120
1175
  while (reader.pos < end) {
1121
1176
  let [fieldNo, wireType] = reader.tag();
1122
1177
  switch (fieldNo) {
1123
- case /* string machine_user_id */ 1:
1124
- message.machineUserId = reader.string();
1178
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1179
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1125
1180
  break;
1126
1181
  case /* sid.v1.machine.MachineCredentialType credential_type */ 2:
1127
1182
  message.credentialType = reader.int32();
@@ -1147,9 +1202,9 @@ class AddMachineCredentialRequest$Type extends MessageType {
1147
1202
  return message;
1148
1203
  }
1149
1204
  internalBinaryWrite(message, writer, options) {
1150
- /* string machine_user_id = 1; */
1151
- if (message.machineUserId !== "")
1152
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1205
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1206
+ if (message.machineUserId)
1207
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1153
1208
  /* sid.v1.machine.MachineCredentialType credential_type = 2; */
1154
1209
  if (message.credentialType !== 0)
1155
1210
  writer.tag(2, WireType.Varint).int32(message.credentialType);
@@ -1230,13 +1285,12 @@ export const AddMachineCredentialResponse = new AddMachineCredentialResponse$Typ
1230
1285
  class RevokeMachineCredentialRequest$Type extends MessageType {
1231
1286
  constructor() {
1232
1287
  super("sid.v1.machine.RevokeMachineCredentialRequest", [
1233
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1288
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
1234
1289
  { no: 2, name: "kid", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1235
1290
  ]);
1236
1291
  }
1237
1292
  create(value) {
1238
1293
  const message = globalThis.Object.create((this.messagePrototype));
1239
- message.machineUserId = "";
1240
1294
  message.kid = "";
1241
1295
  if (value !== undefined)
1242
1296
  reflectionMergePartial(this, message, value);
@@ -1247,8 +1301,8 @@ class RevokeMachineCredentialRequest$Type extends MessageType {
1247
1301
  while (reader.pos < end) {
1248
1302
  let [fieldNo, wireType] = reader.tag();
1249
1303
  switch (fieldNo) {
1250
- case /* string machine_user_id */ 1:
1251
- message.machineUserId = reader.string();
1304
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1305
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1252
1306
  break;
1253
1307
  case /* string kid */ 2:
1254
1308
  message.kid = reader.string();
@@ -1265,9 +1319,9 @@ class RevokeMachineCredentialRequest$Type extends MessageType {
1265
1319
  return message;
1266
1320
  }
1267
1321
  internalBinaryWrite(message, writer, options) {
1268
- /* string machine_user_id = 1; */
1269
- if (message.machineUserId !== "")
1270
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1322
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1323
+ if (message.machineUserId)
1324
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1271
1325
  /* string kid = 2; */
1272
1326
  if (message.kid !== "")
1273
1327
  writer.tag(2, WireType.LengthDelimited).string(message.kid);
@@ -1323,12 +1377,11 @@ export const RevokeMachineCredentialResponse = new RevokeMachineCredentialRespon
1323
1377
  class ListMachineCredentialsRequest$Type extends MessageType {
1324
1378
  constructor() {
1325
1379
  super("sid.v1.machine.ListMachineCredentialsRequest", [
1326
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1380
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
1327
1381
  ]);
1328
1382
  }
1329
1383
  create(value) {
1330
1384
  const message = globalThis.Object.create((this.messagePrototype));
1331
- message.machineUserId = "";
1332
1385
  if (value !== undefined)
1333
1386
  reflectionMergePartial(this, message, value);
1334
1387
  return message;
@@ -1338,8 +1391,8 @@ class ListMachineCredentialsRequest$Type extends MessageType {
1338
1391
  while (reader.pos < end) {
1339
1392
  let [fieldNo, wireType] = reader.tag();
1340
1393
  switch (fieldNo) {
1341
- case /* string machine_user_id */ 1:
1342
- message.machineUserId = reader.string();
1394
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1395
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1343
1396
  break;
1344
1397
  default:
1345
1398
  let u = options.readUnknownField;
@@ -1353,9 +1406,9 @@ class ListMachineCredentialsRequest$Type extends MessageType {
1353
1406
  return message;
1354
1407
  }
1355
1408
  internalBinaryWrite(message, writer, options) {
1356
- /* string machine_user_id = 1; */
1357
- if (message.machineUserId !== "")
1358
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1409
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1410
+ if (message.machineUserId)
1411
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1359
1412
  let u = options.writeUnknownFields;
1360
1413
  if (u !== false)
1361
1414
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1417,7 +1470,7 @@ export const ListMachineCredentialsResponse = new ListMachineCredentialsResponse
1417
1470
  class RotateMachineCredentialRequest$Type extends MessageType {
1418
1471
  constructor() {
1419
1472
  super("sid.v1.machine.RotateMachineCredentialRequest", [
1420
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1473
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
1421
1474
  { no: 2, name: "kid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1422
1475
  { no: 3, name: "algorithm", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1423
1476
  { no: 4, name: "public_key_pem", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
@@ -1426,7 +1479,6 @@ class RotateMachineCredentialRequest$Type extends MessageType {
1426
1479
  }
1427
1480
  create(value) {
1428
1481
  const message = globalThis.Object.create((this.messagePrototype));
1429
- message.machineUserId = "";
1430
1482
  message.kid = "";
1431
1483
  message.algorithm = "";
1432
1484
  message.publicKeyPem = "";
@@ -1439,8 +1491,8 @@ class RotateMachineCredentialRequest$Type extends MessageType {
1439
1491
  while (reader.pos < end) {
1440
1492
  let [fieldNo, wireType] = reader.tag();
1441
1493
  switch (fieldNo) {
1442
- case /* string machine_user_id */ 1:
1443
- message.machineUserId = reader.string();
1494
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1495
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1444
1496
  break;
1445
1497
  case /* string kid */ 2:
1446
1498
  message.kid = reader.string();
@@ -1466,9 +1518,9 @@ class RotateMachineCredentialRequest$Type extends MessageType {
1466
1518
  return message;
1467
1519
  }
1468
1520
  internalBinaryWrite(message, writer, options) {
1469
- /* string machine_user_id = 1; */
1470
- if (message.machineUserId !== "")
1471
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1521
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1522
+ if (message.machineUserId)
1523
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1472
1524
  /* string kid = 2; */
1473
1525
  if (message.kid !== "")
1474
1526
  writer.tag(2, WireType.LengthDelimited).string(message.kid);
@@ -1556,7 +1608,7 @@ export const RotateMachineCredentialResponse = new RotateMachineCredentialRespon
1556
1608
  class GrantImpersonationRequest$Type extends MessageType {
1557
1609
  constructor() {
1558
1610
  super("sid.v1.machine.GrantImpersonationRequest", [
1559
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1611
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
1560
1612
  { no: 2, name: "target_type", kind: "enum", T: () => ["sid.v1.machine.ImpersonationTargetType", ImpersonationTargetType, "IMPERSONATION_TARGET_TYPE_"] },
1561
1613
  { no: 3, name: "target", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1562
1614
  { no: 4, name: "allowed_scopes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
@@ -1564,7 +1616,6 @@ class GrantImpersonationRequest$Type extends MessageType {
1564
1616
  }
1565
1617
  create(value) {
1566
1618
  const message = globalThis.Object.create((this.messagePrototype));
1567
- message.machineUserId = "";
1568
1619
  message.targetType = 0;
1569
1620
  message.target = "";
1570
1621
  message.allowedScopes = [];
@@ -1577,8 +1628,8 @@ class GrantImpersonationRequest$Type extends MessageType {
1577
1628
  while (reader.pos < end) {
1578
1629
  let [fieldNo, wireType] = reader.tag();
1579
1630
  switch (fieldNo) {
1580
- case /* string machine_user_id */ 1:
1581
- message.machineUserId = reader.string();
1631
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1632
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1582
1633
  break;
1583
1634
  case /* sid.v1.machine.ImpersonationTargetType target_type */ 2:
1584
1635
  message.targetType = reader.int32();
@@ -1601,9 +1652,9 @@ class GrantImpersonationRequest$Type extends MessageType {
1601
1652
  return message;
1602
1653
  }
1603
1654
  internalBinaryWrite(message, writer, options) {
1604
- /* string machine_user_id = 1; */
1605
- if (message.machineUserId !== "")
1606
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1655
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1656
+ if (message.machineUserId)
1657
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1607
1658
  /* sid.v1.machine.ImpersonationTargetType target_type = 2; */
1608
1659
  if (message.targetType !== 0)
1609
1660
  writer.tag(2, WireType.Varint).int32(message.targetType);
@@ -1673,14 +1724,13 @@ export const GrantImpersonationResponse = new GrantImpersonationResponse$Type();
1673
1724
  class RevokeImpersonationRequest$Type extends MessageType {
1674
1725
  constructor() {
1675
1726
  super("sid.v1.machine.RevokeImpersonationRequest", [
1676
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1727
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId },
1677
1728
  { no: 2, name: "target_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1678
1729
  { no: 3, name: "target", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1679
1730
  ]);
1680
1731
  }
1681
1732
  create(value) {
1682
1733
  const message = globalThis.Object.create((this.messagePrototype));
1683
- message.machineUserId = "";
1684
1734
  message.targetType = "";
1685
1735
  message.target = "";
1686
1736
  if (value !== undefined)
@@ -1692,8 +1742,8 @@ class RevokeImpersonationRequest$Type extends MessageType {
1692
1742
  while (reader.pos < end) {
1693
1743
  let [fieldNo, wireType] = reader.tag();
1694
1744
  switch (fieldNo) {
1695
- case /* string machine_user_id */ 1:
1696
- message.machineUserId = reader.string();
1745
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1746
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1697
1747
  break;
1698
1748
  case /* string target_type */ 2:
1699
1749
  message.targetType = reader.string();
@@ -1713,9 +1763,9 @@ class RevokeImpersonationRequest$Type extends MessageType {
1713
1763
  return message;
1714
1764
  }
1715
1765
  internalBinaryWrite(message, writer, options) {
1716
- /* string machine_user_id = 1; */
1717
- if (message.machineUserId !== "")
1718
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1766
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1767
+ if (message.machineUserId)
1768
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1719
1769
  /* string target_type = 2; */
1720
1770
  if (message.targetType !== "")
1721
1771
  writer.tag(2, WireType.LengthDelimited).string(message.targetType);
@@ -1774,12 +1824,11 @@ export const RevokeImpersonationResponse = new RevokeImpersonationResponse$Type(
1774
1824
  class ListImpersonationGrantsRequest$Type extends MessageType {
1775
1825
  constructor() {
1776
1826
  super("sid.v1.machine.ListImpersonationGrantsRequest", [
1777
- { no: 1, name: "machine_user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1827
+ { no: 1, name: "machine_user_id", kind: "message", T: () => MachineUserId }
1778
1828
  ]);
1779
1829
  }
1780
1830
  create(value) {
1781
1831
  const message = globalThis.Object.create((this.messagePrototype));
1782
- message.machineUserId = "";
1783
1832
  if (value !== undefined)
1784
1833
  reflectionMergePartial(this, message, value);
1785
1834
  return message;
@@ -1789,8 +1838,8 @@ class ListImpersonationGrantsRequest$Type extends MessageType {
1789
1838
  while (reader.pos < end) {
1790
1839
  let [fieldNo, wireType] = reader.tag();
1791
1840
  switch (fieldNo) {
1792
- case /* string machine_user_id */ 1:
1793
- message.machineUserId = reader.string();
1841
+ case /* sid.v1.ids.MachineUserId machine_user_id */ 1:
1842
+ message.machineUserId = MachineUserId.internalBinaryRead(reader, reader.uint32(), options, message.machineUserId);
1794
1843
  break;
1795
1844
  default:
1796
1845
  let u = options.readUnknownField;
@@ -1804,9 +1853,9 @@ class ListImpersonationGrantsRequest$Type extends MessageType {
1804
1853
  return message;
1805
1854
  }
1806
1855
  internalBinaryWrite(message, writer, options) {
1807
- /* string machine_user_id = 1; */
1808
- if (message.machineUserId !== "")
1809
- writer.tag(1, WireType.LengthDelimited).string(message.machineUserId);
1856
+ /* sid.v1.ids.MachineUserId machine_user_id = 1; */
1857
+ if (message.machineUserId)
1858
+ MachineUserId.internalBinaryWrite(message.machineUserId, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1810
1859
  let u = options.writeUnknownFields;
1811
1860
  if (u !== false)
1812
1861
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1869,18 +1918,18 @@ export const ListImpersonationGrantsResponse = new ListImpersonationGrantsRespon
1869
1918
  */
1870
1919
  export const MachineUserService = new ServiceType("sid.v1.machine.MachineUserService", [
1871
1920
  { name: "CreateMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: CreateMachineUserRequest, O: CreateMachineUserResponse },
1872
- { name: "GetMachineUser", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id}" } }, I: GetMachineUserRequest, O: MachineUserResponse },
1873
- { name: "UpdateMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/machine-users/{machine_user_id}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateMachineUserRequest, O: MachineUserResponse },
1874
- { name: "DeleteMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id}" }, "sid.v1.common.retry": { keyed: true } }, I: DeleteMachineUserRequest, O: DeleteMachineUserResponse },
1875
- { name: "ListMachineUsers", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/projects/{project_id}/machine-users" } }, I: ListMachineUsersRequest, O: ListMachineUsersResponse },
1876
- { name: "SuspendMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id}/suspend", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: SuspendMachineUserRequest, O: MachineUserResponse },
1877
- { name: "ReactivateMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id}/reactivate", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: ReactivateMachineUserRequest, O: MachineUserResponse },
1878
- { name: "AddMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id}/credentials", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: AddMachineCredentialRequest, O: AddMachineCredentialResponse },
1879
- { name: "RevokeMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id}/credentials/{kid}" }, "sid.v1.common.retry": { natural: "a revoked credential is never reactivated: a repeat finds it revoked, answers as the first and stops its tokens again" } }, I: RevokeMachineCredentialRequest, O: RevokeMachineCredentialResponse },
1880
- { name: "ListMachineCredentials", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id}/credentials" } }, I: ListMachineCredentialsRequest, O: ListMachineCredentialsResponse },
1881
- { name: "RotateMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id}/credentials/{kid}/rotate", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RotateMachineCredentialRequest, O: RotateMachineCredentialResponse },
1882
- { name: "GrantImpersonation", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id}/impersonation", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: GrantImpersonationRequest, O: GrantImpersonationResponse },
1883
- { name: "RevokeImpersonation", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id}/impersonation/{target_type}/{target}" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeImpersonationRequest, O: RevokeImpersonationResponse },
1884
- { name: "ListImpersonationGrants", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id}/impersonation" } }, I: ListImpersonationGrantsRequest, O: ListImpersonationGrantsResponse }
1921
+ { name: "GetMachineUser", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id.value}" } }, I: GetMachineUserRequest, O: MachineUserResponse },
1922
+ { name: "UpdateMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { patch: "/v1/machine-users/{machine_user_id.value}", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: UpdateMachineUserRequest, O: MachineUserResponse },
1923
+ { name: "DeleteMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id.value}" }, "sid.v1.common.retry": { keyed: true } }, I: DeleteMachineUserRequest, O: DeleteMachineUserResponse },
1924
+ { name: "ListMachineUsers", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/projects/{project_id.value}/machine-users" } }, I: ListMachineUsersRequest, O: ListMachineUsersResponse },
1925
+ { name: "SuspendMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id.value}/suspend", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: SuspendMachineUserRequest, O: MachineUserResponse },
1926
+ { name: "ReactivateMachineUser", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id.value}/reactivate", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: ReactivateMachineUserRequest, O: MachineUserResponse },
1927
+ { name: "AddMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id.value}/credentials", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: AddMachineCredentialRequest, O: AddMachineCredentialResponse },
1928
+ { name: "RevokeMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id.value}/credentials/{kid}" }, "sid.v1.common.retry": { natural: "a revoked credential is never reactivated: a repeat finds it revoked, answers as the first and stops its tokens again" } }, I: RevokeMachineCredentialRequest, O: RevokeMachineCredentialResponse },
1929
+ { name: "ListMachineCredentials", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id.value}/credentials" } }, I: ListMachineCredentialsRequest, O: ListMachineCredentialsResponse },
1930
+ { name: "RotateMachineCredential", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id.value}/credentials/{kid}/rotate", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: RotateMachineCredentialRequest, O: RotateMachineCredentialResponse },
1931
+ { name: "GrantImpersonation", idempotency: "IDEMPOTENT", options: { "google.api.http": { post: "/v1/machine-users/{machine_user_id.value}/impersonation", body: "*" }, "sid.v1.common.retry": { keyed: true } }, I: GrantImpersonationRequest, O: GrantImpersonationResponse },
1932
+ { name: "RevokeImpersonation", idempotency: "IDEMPOTENT", options: { "google.api.http": { delete: "/v1/machine-users/{machine_user_id.value}/impersonation/{target_type}/{target}" }, "sid.v1.common.retry": { keyed: true } }, I: RevokeImpersonationRequest, O: RevokeImpersonationResponse },
1933
+ { name: "ListImpersonationGrants", idempotency: "NO_SIDE_EFFECTS", options: { "google.api.http": { get: "/v1/machine-users/{machine_user_id.value}/impersonation" } }, I: ListImpersonationGrantsRequest, O: ListImpersonationGrantsResponse }
1885
1934
  ]);
1886
1935
  //# sourceMappingURL=machine_user.js.map