@bufbuild/protobuf 2.0.0-beta.3 → 2.1.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 (31) hide show
  1. package/dist/cjs/registry.js +9 -3
  2. package/dist/cjs/types.d.ts +3 -3
  3. package/dist/cjs/wkt/gen/google/protobuf/any_pb.d.ts +88 -1
  4. package/dist/cjs/wkt/gen/google/protobuf/api_pb.d.ts +148 -3
  5. package/dist/cjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +128 -5
  6. package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +721 -55
  7. package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
  8. package/dist/cjs/wkt/gen/google/protobuf/duration_pb.d.ts +61 -1
  9. package/dist/cjs/wkt/gen/google/protobuf/empty_pb.d.ts +10 -1
  10. package/dist/cjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +201 -1
  11. package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.d.ts +7 -1
  12. package/dist/cjs/wkt/gen/google/protobuf/struct_pb.d.ts +29 -4
  13. package/dist/cjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +92 -1
  14. package/dist/cjs/wkt/gen/google/protobuf/type_pb.d.ts +89 -8
  15. package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +45 -9
  16. package/dist/esm/registry.js +9 -3
  17. package/dist/esm/types.d.ts +3 -3
  18. package/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +88 -1
  19. package/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +148 -3
  20. package/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +128 -5
  21. package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +721 -55
  22. package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +1 -1
  23. package/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +61 -1
  24. package/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +10 -1
  25. package/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +201 -1
  26. package/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +7 -1
  27. package/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +29 -4
  28. package/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +92 -1
  29. package/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +89 -8
  30. package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +45 -9
  31. package/package.json +1 -1
@@ -56,34 +56,50 @@ export type Type = Message<"google.protobuf.Type"> & {
56
56
  edition: string;
57
57
  };
58
58
  /**
59
- * JSON type for the message google.protobuf.Type.
59
+ * A protocol buffer message type.
60
+ *
61
+ * @generated from message google.protobuf.Type
60
62
  */
61
63
  export type TypeJson = {
62
64
  /**
65
+ * The fully qualified message name.
66
+ *
63
67
  * @generated from field: string name = 1;
64
68
  */
65
69
  name?: string;
66
70
  /**
71
+ * The list of fields.
72
+ *
67
73
  * @generated from field: repeated google.protobuf.Field fields = 2;
68
74
  */
69
75
  fields?: FieldJson[];
70
76
  /**
77
+ * The list of types appearing in `oneof` definitions in this type.
78
+ *
71
79
  * @generated from field: repeated string oneofs = 3;
72
80
  */
73
81
  oneofs?: string[];
74
82
  /**
83
+ * The protocol buffer options.
84
+ *
75
85
  * @generated from field: repeated google.protobuf.Option options = 4;
76
86
  */
77
87
  options?: OptionJson[];
78
88
  /**
89
+ * The source context.
90
+ *
79
91
  * @generated from field: google.protobuf.SourceContext source_context = 5;
80
92
  */
81
93
  sourceContext?: SourceContextJson;
82
94
  /**
95
+ * The source syntax.
96
+ *
83
97
  * @generated from field: google.protobuf.Syntax syntax = 6;
84
98
  */
85
99
  syntax?: SyntaxJson;
86
100
  /**
101
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
102
+ *
87
103
  * @generated from field: string edition = 7;
88
104
  */
89
105
  edition?: string;
@@ -163,46 +179,70 @@ export type Field = Message<"google.protobuf.Field"> & {
163
179
  defaultValue: string;
164
180
  };
165
181
  /**
166
- * JSON type for the message google.protobuf.Field.
182
+ * A single field of a message type.
183
+ *
184
+ * @generated from message google.protobuf.Field
167
185
  */
168
186
  export type FieldJson = {
169
187
  /**
188
+ * The field type.
189
+ *
170
190
  * @generated from field: google.protobuf.Field.Kind kind = 1;
171
191
  */
172
192
  kind?: Field_KindJson;
173
193
  /**
194
+ * The field cardinality.
195
+ *
174
196
  * @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
175
197
  */
176
198
  cardinality?: Field_CardinalityJson;
177
199
  /**
200
+ * The field number.
201
+ *
178
202
  * @generated from field: int32 number = 3;
179
203
  */
180
204
  number?: number;
181
205
  /**
206
+ * The field name.
207
+ *
182
208
  * @generated from field: string name = 4;
183
209
  */
184
210
  name?: string;
185
211
  /**
212
+ * The field type URL, without the scheme, for message or enumeration
213
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
214
+ *
186
215
  * @generated from field: string type_url = 6;
187
216
  */
188
217
  typeUrl?: string;
189
218
  /**
219
+ * The index of the field type in `Type.oneofs`, for message or enumeration
220
+ * types. The first type has index 1; zero means the type is not in the list.
221
+ *
190
222
  * @generated from field: int32 oneof_index = 7;
191
223
  */
192
224
  oneofIndex?: number;
193
225
  /**
226
+ * Whether to use alternative packed wire representation.
227
+ *
194
228
  * @generated from field: bool packed = 8;
195
229
  */
196
230
  packed?: boolean;
197
231
  /**
232
+ * The protocol buffer options.
233
+ *
198
234
  * @generated from field: repeated google.protobuf.Option options = 9;
199
235
  */
200
236
  options?: OptionJson[];
201
237
  /**
238
+ * The field JSON name.
239
+ *
202
240
  * @generated from field: string json_name = 10;
203
241
  */
204
242
  jsonName?: string;
205
243
  /**
244
+ * The string value of the default value of this field. Proto2 syntax only.
245
+ *
206
246
  * @generated from field: string default_value = 11;
207
247
  */
208
248
  defaultValue?: string;
@@ -334,7 +374,9 @@ export declare enum Field_Kind {
334
374
  TYPE_SINT64 = 18
335
375
  }
336
376
  /**
337
- * JSON type for the enum google.protobuf.Field.Kind.
377
+ * Basic field types.
378
+ *
379
+ * @generated from enum google.protobuf.Field.Kind
338
380
  */
339
381
  export type Field_KindJson = "TYPE_UNKNOWN" | "TYPE_DOUBLE" | "TYPE_FLOAT" | "TYPE_INT64" | "TYPE_UINT64" | "TYPE_INT32" | "TYPE_FIXED64" | "TYPE_FIXED32" | "TYPE_BOOL" | "TYPE_STRING" | "TYPE_GROUP" | "TYPE_MESSAGE" | "TYPE_BYTES" | "TYPE_UINT32" | "TYPE_ENUM" | "TYPE_SFIXED32" | "TYPE_SFIXED64" | "TYPE_SINT32" | "TYPE_SINT64";
340
382
  /**
@@ -373,7 +415,9 @@ export declare enum Field_Cardinality {
373
415
  REPEATED = 3
374
416
  }
375
417
  /**
376
- * JSON type for the enum google.protobuf.Field.Cardinality.
418
+ * Whether a field is optional, required, or repeated.
419
+ *
420
+ * @generated from enum google.protobuf.Field.Cardinality
377
421
  */
378
422
  export type Field_CardinalityJson = "CARDINALITY_UNKNOWN" | "CARDINALITY_OPTIONAL" | "CARDINALITY_REQUIRED" | "CARDINALITY_REPEATED";
379
423
  /**
@@ -424,30 +468,44 @@ export type Enum = Message<"google.protobuf.Enum"> & {
424
468
  edition: string;
425
469
  };
426
470
  /**
427
- * JSON type for the message google.protobuf.Enum.
471
+ * Enum type definition.
472
+ *
473
+ * @generated from message google.protobuf.Enum
428
474
  */
429
475
  export type EnumJson = {
430
476
  /**
477
+ * Enum type name.
478
+ *
431
479
  * @generated from field: string name = 1;
432
480
  */
433
481
  name?: string;
434
482
  /**
483
+ * Enum value definitions.
484
+ *
435
485
  * @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
436
486
  */
437
487
  enumvalue?: EnumValueJson[];
438
488
  /**
489
+ * Protocol buffer options.
490
+ *
439
491
  * @generated from field: repeated google.protobuf.Option options = 3;
440
492
  */
441
493
  options?: OptionJson[];
442
494
  /**
495
+ * The source context.
496
+ *
443
497
  * @generated from field: google.protobuf.SourceContext source_context = 4;
444
498
  */
445
499
  sourceContext?: SourceContextJson;
446
500
  /**
501
+ * The source syntax.
502
+ *
447
503
  * @generated from field: google.protobuf.Syntax syntax = 5;
448
504
  */
449
505
  syntax?: SyntaxJson;
450
506
  /**
507
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
508
+ *
451
509
  * @generated from field: string edition = 6;
452
510
  */
453
511
  edition?: string;
@@ -483,18 +541,26 @@ export type EnumValue = Message<"google.protobuf.EnumValue"> & {
483
541
  options: Option[];
484
542
  };
485
543
  /**
486
- * JSON type for the message google.protobuf.EnumValue.
544
+ * Enum value definition.
545
+ *
546
+ * @generated from message google.protobuf.EnumValue
487
547
  */
488
548
  export type EnumValueJson = {
489
549
  /**
550
+ * Enum value name.
551
+ *
490
552
  * @generated from field: string name = 1;
491
553
  */
492
554
  name?: string;
493
555
  /**
556
+ * Enum value number.
557
+ *
494
558
  * @generated from field: int32 number = 2;
495
559
  */
496
560
  number?: number;
497
561
  /**
562
+ * Protocol buffer options.
563
+ *
498
564
  * @generated from field: repeated google.protobuf.Option options = 3;
499
565
  */
500
566
  options?: OptionJson[];
@@ -531,14 +597,27 @@ export type Option = Message<"google.protobuf.Option"> & {
531
597
  value?: Any;
532
598
  };
533
599
  /**
534
- * JSON type for the message google.protobuf.Option.
600
+ * A protocol buffer option, which can be attached to a message, field,
601
+ * enumeration, etc.
602
+ *
603
+ * @generated from message google.protobuf.Option
535
604
  */
536
605
  export type OptionJson = {
537
606
  /**
607
+ * The option's name. For protobuf built-in options (options defined in
608
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
609
+ * For custom options, it should be the fully-qualified name. For example,
610
+ * `"google.api.http"`.
611
+ *
538
612
  * @generated from field: string name = 1;
539
613
  */
540
614
  name?: string;
541
615
  /**
616
+ * The option's value packed in an Any message. If the value is a primitive,
617
+ * the corresponding wrapper type defined in google/protobuf/wrappers.proto
618
+ * should be used. If the value is an enum, it should be stored as an int32
619
+ * value using the google.protobuf.Int32Value type.
620
+ *
542
621
  * @generated from field: google.protobuf.Any value = 2;
543
622
  */
544
623
  value?: AnyJson;
@@ -574,7 +653,9 @@ export declare enum Syntax {
574
653
  EDITIONS = 2
575
654
  }
576
655
  /**
577
- * JSON type for the enum google.protobuf.Syntax.
656
+ * The syntax in which a protocol buffer element is defined.
657
+ *
658
+ * @generated from enum google.protobuf.Syntax
578
659
  */
579
660
  export type SyntaxJson = "SYNTAX_PROTO2" | "SYNTAX_PROTO3" | "SYNTAX_EDITIONS";
580
661
  /**
@@ -20,7 +20,11 @@ export type DoubleValue = Message<"google.protobuf.DoubleValue"> & {
20
20
  value: number;
21
21
  };
22
22
  /**
23
- * JSON type for the message google.protobuf.DoubleValue.
23
+ * Wrapper message for `double`.
24
+ *
25
+ * The JSON representation for `DoubleValue` is JSON number.
26
+ *
27
+ * @generated from message google.protobuf.DoubleValue
24
28
  */
25
29
  export type DoubleValueJson = number | "NaN" | "Infinity" | "-Infinity";
26
30
  /**
@@ -44,7 +48,11 @@ export type FloatValue = Message<"google.protobuf.FloatValue"> & {
44
48
  value: number;
45
49
  };
46
50
  /**
47
- * JSON type for the message google.protobuf.FloatValue.
51
+ * Wrapper message for `float`.
52
+ *
53
+ * The JSON representation for `FloatValue` is JSON number.
54
+ *
55
+ * @generated from message google.protobuf.FloatValue
48
56
  */
49
57
  export type FloatValueJson = number | "NaN" | "Infinity" | "-Infinity";
50
58
  /**
@@ -68,7 +76,11 @@ export type Int64Value = Message<"google.protobuf.Int64Value"> & {
68
76
  value: bigint;
69
77
  };
70
78
  /**
71
- * JSON type for the message google.protobuf.Int64Value.
79
+ * Wrapper message for `int64`.
80
+ *
81
+ * The JSON representation for `Int64Value` is JSON string.
82
+ *
83
+ * @generated from message google.protobuf.Int64Value
72
84
  */
73
85
  export type Int64ValueJson = string;
74
86
  /**
@@ -92,7 +104,11 @@ export type UInt64Value = Message<"google.protobuf.UInt64Value"> & {
92
104
  value: bigint;
93
105
  };
94
106
  /**
95
- * JSON type for the message google.protobuf.UInt64Value.
107
+ * Wrapper message for `uint64`.
108
+ *
109
+ * The JSON representation for `UInt64Value` is JSON string.
110
+ *
111
+ * @generated from message google.protobuf.UInt64Value
96
112
  */
97
113
  export type UInt64ValueJson = string;
98
114
  /**
@@ -116,7 +132,11 @@ export type Int32Value = Message<"google.protobuf.Int32Value"> & {
116
132
  value: number;
117
133
  };
118
134
  /**
119
- * JSON type for the message google.protobuf.Int32Value.
135
+ * Wrapper message for `int32`.
136
+ *
137
+ * The JSON representation for `Int32Value` is JSON number.
138
+ *
139
+ * @generated from message google.protobuf.Int32Value
120
140
  */
121
141
  export type Int32ValueJson = number;
122
142
  /**
@@ -140,7 +160,11 @@ export type UInt32Value = Message<"google.protobuf.UInt32Value"> & {
140
160
  value: number;
141
161
  };
142
162
  /**
143
- * JSON type for the message google.protobuf.UInt32Value.
163
+ * Wrapper message for `uint32`.
164
+ *
165
+ * The JSON representation for `UInt32Value` is JSON number.
166
+ *
167
+ * @generated from message google.protobuf.UInt32Value
144
168
  */
145
169
  export type UInt32ValueJson = number;
146
170
  /**
@@ -164,7 +188,11 @@ export type BoolValue = Message<"google.protobuf.BoolValue"> & {
164
188
  value: boolean;
165
189
  };
166
190
  /**
167
- * JSON type for the message google.protobuf.BoolValue.
191
+ * Wrapper message for `bool`.
192
+ *
193
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
194
+ *
195
+ * @generated from message google.protobuf.BoolValue
168
196
  */
169
197
  export type BoolValueJson = boolean;
170
198
  /**
@@ -188,7 +216,11 @@ export type StringValue = Message<"google.protobuf.StringValue"> & {
188
216
  value: string;
189
217
  };
190
218
  /**
191
- * JSON type for the message google.protobuf.StringValue.
219
+ * Wrapper message for `string`.
220
+ *
221
+ * The JSON representation for `StringValue` is JSON string.
222
+ *
223
+ * @generated from message google.protobuf.StringValue
192
224
  */
193
225
  export type StringValueJson = string;
194
226
  /**
@@ -212,7 +244,11 @@ export type BytesValue = Message<"google.protobuf.BytesValue"> & {
212
244
  value: Uint8Array;
213
245
  };
214
246
  /**
215
- * JSON type for the message google.protobuf.BytesValue.
247
+ * Wrapper message for `bytes`.
248
+ *
249
+ * The JSON representation for `BytesValue` is JSON string.
250
+ *
251
+ * @generated from message google.protobuf.BytesValue
216
252
  */
217
253
  export type BytesValueJson = string;
218
254
  /**
@@ -224,7 +224,7 @@ const DELIMITED = 2;
224
224
  const OPEN = 1;
225
225
  // prettier-ignore
226
226
  // bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2023: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition;
227
- // generated from protoc v27.0
227
+ // generated from protoc v28.0
228
228
  export const minimumEdition = 998, maximumEdition = 1000;
229
229
  const featureDefaults = {
230
230
  // EDITION_PROTO2
@@ -608,12 +608,14 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
608
608
  case TYPE_GROUP:
609
609
  field.listKind = "message";
610
610
  field.message = reg.getMessage(trimLeadingDot(proto.typeName));
611
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
611
612
  assert(field.message);
612
613
  field.delimitedEncoding = isDelimitedEncoding(proto, parentOrFile);
613
614
  break;
614
615
  case TYPE_ENUM:
615
616
  field.listKind = "enum";
616
617
  field.enum = reg.getEnum(trimLeadingDot(proto.typeName));
618
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
617
619
  assert(field.enum);
618
620
  break;
619
621
  default:
@@ -631,7 +633,9 @@ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
631
633
  case TYPE_GROUP:
632
634
  field.fieldKind = "message";
633
635
  field.message = reg.getMessage(trimLeadingDot(proto.typeName));
634
- assert(field.message, `invalid FieldDescriptorProto: type_name ${proto.typeName} not found`);
636
+ assert(
637
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
638
+ field.message, `invalid FieldDescriptorProto: type_name ${proto.typeName} not found`);
635
639
  field.delimitedEncoding = isDelimitedEncoding(proto, parentOrFile);
636
640
  field.getDefaultValue = () => undefined;
637
641
  break;
@@ -768,7 +772,9 @@ function findOneof(proto, allOneofs) {
768
772
  return undefined;
769
773
  }
770
774
  const oneof = allOneofs[proto.oneofIndex];
771
- assert(oneof, `invalid FieldDescriptorProto: oneof #${proto.oneofIndex} for field #${proto.number} not found`);
775
+ assert(
776
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
777
+ oneof, `invalid FieldDescriptorProto: oneof #${proto.oneofIndex} for field #${proto.number} not found`);
772
778
  return oneof;
773
779
  }
774
780
  /**
@@ -28,7 +28,7 @@ export type MessageJsonType<Desc extends DescMessage> = Desc extends GenMessage<
28
28
  * Extract the init type from a message descriptor.
29
29
  * The init type is accepted by the function create().
30
30
  */
31
- export type MessageInitShape<Desc extends DescMessage> = Desc extends GenMessage<infer RuntimeShape> ? RuntimeShape | MessageInit<RuntimeShape> : Record<string, unknown>;
31
+ export type MessageInitShape<Desc extends DescMessage> = Desc extends GenMessage<infer RuntimeShape> ? MessageInit<RuntimeShape> : Record<string, unknown>;
32
32
  /**
33
33
  * Extract the enum type of from an enum descriptor.
34
34
  */
@@ -58,8 +58,8 @@ export type UnknownField = {
58
58
  * The init type for a message, which makes all fields optional.
59
59
  * The init type is accepted by the function create().
60
60
  */
61
- type MessageInit<T extends Message> = {
62
- [P in keyof T as P extends "$typeName" | "$unknown" ? never : P]?: FieldInit<T[P]>;
61
+ type MessageInit<T extends Message> = T | {
62
+ [P in keyof T as P extends "$unknown" ? never : P]?: P extends "$typeName" ? never : FieldInit<T[P]>;
63
63
  };
64
64
  type FieldInit<F> = F extends (Date | Uint8Array | bigint | boolean | string | number) ? F : F extends Array<infer U> ? Array<FieldInit<U>> : F extends ReadonlyArray<infer U> ? ReadonlyArray<FieldInit<U>> : F extends Message ? MessageInit<F> : F extends OneofSelectedMessage<infer C, infer V> ? {
65
65
  case: C;
@@ -137,7 +137,94 @@ export type Any = Message<"google.protobuf.Any"> & {
137
137
  value: Uint8Array;
138
138
  };
139
139
  /**
140
- * JSON type for the message google.protobuf.Any.
140
+ * `Any` contains an arbitrary serialized protocol buffer message along with a
141
+ * URL that describes the type of the serialized message.
142
+ *
143
+ * Protobuf library provides support to pack/unpack Any values in the form
144
+ * of utility functions or additional generated methods of the Any type.
145
+ *
146
+ * Example 1: Pack and unpack a message in C++.
147
+ *
148
+ * Foo foo = ...;
149
+ * Any any;
150
+ * any.PackFrom(foo);
151
+ * ...
152
+ * if (any.UnpackTo(&foo)) {
153
+ * ...
154
+ * }
155
+ *
156
+ * Example 2: Pack and unpack a message in Java.
157
+ *
158
+ * Foo foo = ...;
159
+ * Any any = Any.pack(foo);
160
+ * ...
161
+ * if (any.is(Foo.class)) {
162
+ * foo = any.unpack(Foo.class);
163
+ * }
164
+ * // or ...
165
+ * if (any.isSameTypeAs(Foo.getDefaultInstance())) {
166
+ * foo = any.unpack(Foo.getDefaultInstance());
167
+ * }
168
+ *
169
+ * Example 3: Pack and unpack a message in Python.
170
+ *
171
+ * foo = Foo(...)
172
+ * any = Any()
173
+ * any.Pack(foo)
174
+ * ...
175
+ * if any.Is(Foo.DESCRIPTOR):
176
+ * any.Unpack(foo)
177
+ * ...
178
+ *
179
+ * Example 4: Pack and unpack a message in Go
180
+ *
181
+ * foo := &pb.Foo{...}
182
+ * any, err := anypb.New(foo)
183
+ * if err != nil {
184
+ * ...
185
+ * }
186
+ * ...
187
+ * foo := &pb.Foo{}
188
+ * if err := any.UnmarshalTo(foo); err != nil {
189
+ * ...
190
+ * }
191
+ *
192
+ * The pack methods provided by protobuf library will by default use
193
+ * 'type.googleapis.com/full.type.name' as the type URL and the unpack
194
+ * methods only use the fully qualified type name after the last '/'
195
+ * in the type URL, for example "foo.bar.com/x/y.z" will yield type
196
+ * name "y.z".
197
+ *
198
+ * JSON
199
+ * ====
200
+ * The JSON representation of an `Any` value uses the regular
201
+ * representation of the deserialized, embedded message, with an
202
+ * additional field `@type` which contains the type URL. Example:
203
+ *
204
+ * package google.profile;
205
+ * message Person {
206
+ * string first_name = 1;
207
+ * string last_name = 2;
208
+ * }
209
+ *
210
+ * {
211
+ * "@type": "type.googleapis.com/google.profile.Person",
212
+ * "firstName": <string>,
213
+ * "lastName": <string>
214
+ * }
215
+ *
216
+ * If the embedded message type is well-known and has a custom JSON
217
+ * representation, that representation will be embedded adding a field
218
+ * `value` which holds the custom JSON in addition to the `@type`
219
+ * field. Example (for message [google.protobuf.Duration][]):
220
+ *
221
+ * {
222
+ * "@type": "type.googleapis.com/google.protobuf.Duration",
223
+ * "value": "1.212s"
224
+ * }
225
+ *
226
+ *
227
+ * @generated from message google.protobuf.Any
141
228
  */
142
229
  export type AnyJson = {
143
230
  "@type"?: string;