@raystack/proton 0.1.0-ce225175aa066e6f296bc489293bb83ed0edcef6

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 (197) hide show
  1. package/google/api/annotations_pb.ts +33 -0
  2. package/google/api/field_behavior.ts +95 -0
  3. package/google/api/field_behavior_pb.ts +139 -0
  4. package/google/api/http.ts +695 -0
  5. package/google/api/http_pb.ts +547 -0
  6. package/google/api/httpbody.ts +159 -0
  7. package/google/api/httpbody_pb.ts +122 -0
  8. package/google/protobuf/any.ts +322 -0
  9. package/google/protobuf/descriptor.ts +3475 -0
  10. package/google/protobuf/duration.ts +231 -0
  11. package/google/protobuf/struct.ts +484 -0
  12. package/google/protobuf/timestamp.ts +290 -0
  13. package/google/protobuf/wrappers.ts +752 -0
  14. package/package.json +47 -0
  15. package/protoc-gen-openapiv2/options/annotations_pb.ts +78 -0
  16. package/protoc-gen-openapiv2/options/openapiv2.ts +3110 -0
  17. package/protoc-gen-openapiv2/options/openapiv2_pb.ts +1995 -0
  18. package/raystack/assets/index.ts +29 -0
  19. package/raystack/assets/v1beta1/bucket.ts +362 -0
  20. package/raystack/assets/v1beta1/bucket_pb.ts +233 -0
  21. package/raystack/assets/v1beta1/dashboard.ts +426 -0
  22. package/raystack/assets/v1beta1/dashboard_pb.ts +275 -0
  23. package/raystack/assets/v1beta1/event.ts +105 -0
  24. package/raystack/assets/v1beta1/event_pb.ts +70 -0
  25. package/raystack/assets/v1beta1/group.ts +223 -0
  26. package/raystack/assets/v1beta1/group_pb.ts +149 -0
  27. package/raystack/assets/v1beta1/job.ts +147 -0
  28. package/raystack/assets/v1beta1/job_pb.ts +100 -0
  29. package/raystack/assets/v1beta1/lineage.ts +90 -0
  30. package/raystack/assets/v1beta1/lineage_pb.ts +61 -0
  31. package/raystack/assets/v1beta1/ownership.ts +179 -0
  32. package/raystack/assets/v1beta1/ownership_pb.ts +119 -0
  33. package/raystack/assets/v1beta1/preview.ts +87 -0
  34. package/raystack/assets/v1beta1/preview_pb.ts +58 -0
  35. package/raystack/assets/v1beta1/properties.ts +116 -0
  36. package/raystack/assets/v1beta1/properties_pb.ts +63 -0
  37. package/raystack/assets/v1beta1/resource.ts +149 -0
  38. package/raystack/assets/v1beta1/resource_pb.ts +96 -0
  39. package/raystack/assets/v1beta1/schema.ts +421 -0
  40. package/raystack/assets/v1beta1/schema_pb.ts +262 -0
  41. package/raystack/assets/v1beta1/table.ts +408 -0
  42. package/raystack/assets/v1beta1/table_pb.ts +266 -0
  43. package/raystack/assets/v1beta1/timestamp.ts +158 -0
  44. package/raystack/assets/v1beta1/timestamp_pb.ts +107 -0
  45. package/raystack/assets/v1beta1/topic.ts +253 -0
  46. package/raystack/assets/v1beta1/topic_pb.ts +171 -0
  47. package/raystack/assets/v1beta1/user.ts +451 -0
  48. package/raystack/assets/v1beta1/user_pb.ts +292 -0
  49. package/raystack/assets/v1beta2/application.ts +125 -0
  50. package/raystack/assets/v1beta2/application_pb.ts +79 -0
  51. package/raystack/assets/v1beta2/asset.ts +269 -0
  52. package/raystack/assets/v1beta2/asset_pb.ts +157 -0
  53. package/raystack/assets/v1beta2/bucket.ts +341 -0
  54. package/raystack/assets/v1beta2/bucket_pb.ts +215 -0
  55. package/raystack/assets/v1beta2/common.ts +392 -0
  56. package/raystack/assets/v1beta2/common_pb.ts +258 -0
  57. package/raystack/assets/v1beta2/dashboard.ts +393 -0
  58. package/raystack/assets/v1beta2/dashboard_pb.ts +247 -0
  59. package/raystack/assets/v1beta2/experiment.ts +274 -0
  60. package/raystack/assets/v1beta2/experiment_pb.ts +180 -0
  61. package/raystack/assets/v1beta2/feature_table.ts +387 -0
  62. package/raystack/assets/v1beta2/feature_table_pb.ts +237 -0
  63. package/raystack/assets/v1beta2/group.ts +178 -0
  64. package/raystack/assets/v1beta2/group_pb.ts +118 -0
  65. package/raystack/assets/v1beta2/job.ts +99 -0
  66. package/raystack/assets/v1beta2/job_pb.ts +65 -0
  67. package/raystack/assets/v1beta2/metric.ts +163 -0
  68. package/raystack/assets/v1beta2/metric_pb.ts +105 -0
  69. package/raystack/assets/v1beta2/model.ts +519 -0
  70. package/raystack/assets/v1beta2/model_pb.ts +322 -0
  71. package/raystack/assets/v1beta2/table.ts +663 -0
  72. package/raystack/assets/v1beta2/table_pb.ts +409 -0
  73. package/raystack/assets/v1beta2/topic.ts +275 -0
  74. package/raystack/assets/v1beta2/topic_pb.ts +181 -0
  75. package/raystack/assets/v1beta2/user.ts +433 -0
  76. package/raystack/assets/v1beta2/user_pb.ts +277 -0
  77. package/raystack/common/index.ts +3 -0
  78. package/raystack/common/v1/service-CommonService_connectquery.ts +21 -0
  79. package/raystack/common/v1/service.client.ts +37 -0
  80. package/raystack/common/v1/service.ts +245 -0
  81. package/raystack/common/v1/service_connect.ts +26 -0
  82. package/raystack/common/v1/service_pb.ts +149 -0
  83. package/raystack/compass/index.ts +3 -0
  84. package/raystack/compass/v1beta1/service-CompassService_connectquery.ts +605 -0
  85. package/raystack/compass/v1beta1/service.client.ts +594 -0
  86. package/raystack/compass/v1beta1/service.ts +8169 -0
  87. package/raystack/compass/v1beta1/service_connect.ts +407 -0
  88. package/raystack/compass/v1beta1/service_pb.ts +4975 -0
  89. package/raystack/entropy/index.ts +6 -0
  90. package/raystack/entropy/v1beta1/module-ModuleService_connectquery.ts +77 -0
  91. package/raystack/entropy/v1beta1/module.client.ts +89 -0
  92. package/raystack/entropy/v1beta1/module.ts +692 -0
  93. package/raystack/entropy/v1beta1/module_connect.ts +62 -0
  94. package/raystack/entropy/v1beta1/module_pb.ts +445 -0
  95. package/raystack/entropy/v1beta1/resource-ResourceService_connectquery.ts +105 -0
  96. package/raystack/entropy/v1beta1/resource.client.ts +129 -0
  97. package/raystack/entropy/v1beta1/resource.ts +1817 -0
  98. package/raystack/entropy/v1beta1/resource_connect.ts +89 -0
  99. package/raystack/entropy/v1beta1/resource_pb.ts +1092 -0
  100. package/raystack/frontier/index.ts +7 -0
  101. package/raystack/frontier/v1beta1/admin-AdminService_connectquery.ts +756 -0
  102. package/raystack/frontier/v1beta1/admin.client.ts +849 -0
  103. package/raystack/frontier/v1beta1/admin.ts +9007 -0
  104. package/raystack/frontier/v1beta1/admin_connect.ts +573 -0
  105. package/raystack/frontier/v1beta1/admin_pb.ts +5615 -0
  106. package/raystack/frontier/v1beta1/frontier-FrontierService_connectquery.ts +2399 -0
  107. package/raystack/frontier/v1beta1/frontier.client.ts +2307 -0
  108. package/raystack/frontier/v1beta1/frontier.ts +23706 -0
  109. package/raystack/frontier/v1beta1/frontier_connect.ts +1574 -0
  110. package/raystack/frontier/v1beta1/frontier_pb.ts +15258 -0
  111. package/raystack/frontier/v1beta1/models.ts +7433 -0
  112. package/raystack/frontier/v1beta1/models_pb.ts +4345 -0
  113. package/raystack/guardian/index.ts +3 -0
  114. package/raystack/guardian/v1beta1/guardian-GuardianService_connectquery.ts +569 -0
  115. package/raystack/guardian/v1beta1/guardian.client.ts +552 -0
  116. package/raystack/guardian/v1beta1/guardian.ts +9688 -0
  117. package/raystack/guardian/v1beta1/guardian_connect.ts +381 -0
  118. package/raystack/guardian/v1beta1/guardian_pb.ts +5858 -0
  119. package/raystack/optimus/core/v1beta1/backup-BackupService_connectquery.ts +49 -0
  120. package/raystack/optimus/core/v1beta1/backup.client.ts +63 -0
  121. package/raystack/optimus/core/v1beta1/backup.ts +708 -0
  122. package/raystack/optimus/core/v1beta1/backup_connect.ts +44 -0
  123. package/raystack/optimus/core/v1beta1/backup_pb.ts +406 -0
  124. package/raystack/optimus/core/v1beta1/job_run-JobRunService_connectquery.ts +71 -0
  125. package/raystack/optimus/core/v1beta1/job_run.client.ts +96 -0
  126. package/raystack/optimus/core/v1beta1/job_run.ts +1008 -0
  127. package/raystack/optimus/core/v1beta1/job_run_connect.ts +63 -0
  128. package/raystack/optimus/core/v1beta1/job_run_pb.ts +612 -0
  129. package/raystack/optimus/core/v1beta1/job_spec-JobSpecificationService_connectquery.ts +249 -0
  130. package/raystack/optimus/core/v1beta1/job_spec.client.ts +363 -0
  131. package/raystack/optimus/core/v1beta1/job_spec.ts +5134 -0
  132. package/raystack/optimus/core/v1beta1/job_spec_connect.ts +233 -0
  133. package/raystack/optimus/core/v1beta1/job_spec_pb.ts +3196 -0
  134. package/raystack/optimus/core/v1beta1/namespace-NamespaceService_connectquery.ts +55 -0
  135. package/raystack/optimus/core/v1beta1/namespace.client.ts +75 -0
  136. package/raystack/optimus/core/v1beta1/namespace.ts +477 -0
  137. package/raystack/optimus/core/v1beta1/namespace_connect.ts +50 -0
  138. package/raystack/optimus/core/v1beta1/namespace_pb.ts +291 -0
  139. package/raystack/optimus/core/v1beta1/project-ProjectService_connectquery.ts +55 -0
  140. package/raystack/optimus/core/v1beta1/project.client.ts +75 -0
  141. package/raystack/optimus/core/v1beta1/project.ts +520 -0
  142. package/raystack/optimus/core/v1beta1/project_connect.ts +50 -0
  143. package/raystack/optimus/core/v1beta1/project_pb.ts +322 -0
  144. package/raystack/optimus/core/v1beta1/replay-ReplayService_connectquery.ts +63 -0
  145. package/raystack/optimus/core/v1beta1/replay.client.ts +76 -0
  146. package/raystack/optimus/core/v1beta1/replay.ts +881 -0
  147. package/raystack/optimus/core/v1beta1/replay_connect.ts +53 -0
  148. package/raystack/optimus/core/v1beta1/replay_pb.ts +522 -0
  149. package/raystack/optimus/core/v1beta1/resource-ResourceService_connectquery.ts +104 -0
  150. package/raystack/optimus/core/v1beta1/resource.client.ts +148 -0
  151. package/raystack/optimus/core/v1beta1/resource.ts +1329 -0
  152. package/raystack/optimus/core/v1beta1/resource_connect.ts +96 -0
  153. package/raystack/optimus/core/v1beta1/resource_pb.ts +791 -0
  154. package/raystack/optimus/core/v1beta1/runtime-RuntimeService_connectquery.ts +23 -0
  155. package/raystack/optimus/core/v1beta1/runtime.client.ts +45 -0
  156. package/raystack/optimus/core/v1beta1/runtime.ts +131 -0
  157. package/raystack/optimus/core/v1beta1/runtime_connect.ts +30 -0
  158. package/raystack/optimus/core/v1beta1/runtime_pb.ts +82 -0
  159. package/raystack/optimus/core/v1beta1/secret-SecretService_connectquery.ts +71 -0
  160. package/raystack/optimus/core/v1beta1/secret.client.ts +92 -0
  161. package/raystack/optimus/core/v1beta1/secret.ts +619 -0
  162. package/raystack/optimus/core/v1beta1/secret_connect.ts +61 -0
  163. package/raystack/optimus/core/v1beta1/secret_pb.ts +393 -0
  164. package/raystack/optimus/core/v1beta1/status.ts +113 -0
  165. package/raystack/optimus/core/v1beta1/status_pb.ts +101 -0
  166. package/raystack/optimus/integration/v1beta1/event.ts +531 -0
  167. package/raystack/optimus/integration/v1beta1/event_pb.ts +362 -0
  168. package/raystack/optimus/plugins/v1beta1/dependency_resolver-DependencyResolverModService_connectquery.ts +72 -0
  169. package/raystack/optimus/plugins/v1beta1/dependency_resolver.client.ts +100 -0
  170. package/raystack/optimus/plugins/v1beta1/dependency_resolver.ts +950 -0
  171. package/raystack/optimus/plugins/v1beta1/dependency_resolver_connect.ts +65 -0
  172. package/raystack/optimus/plugins/v1beta1/dependency_resolver_pb.ts +604 -0
  173. package/raystack/predator/index.ts +2 -0
  174. package/raystack/predator/v1beta1/metrics_log.ts +457 -0
  175. package/raystack/predator/v1beta1/metrics_log_pb.ts +277 -0
  176. package/raystack/predator/v1beta1/result_log.ts +390 -0
  177. package/raystack/predator/v1beta1/result_log_pb.ts +235 -0
  178. package/raystack/raccoon/index.ts +3 -0
  179. package/raystack/raccoon/v1beta1/raccoon-EventService_connectquery.ts +21 -0
  180. package/raystack/raccoon/v1beta1/raccoon.client.ts +37 -0
  181. package/raystack/raccoon/v1beta1/raccoon.ts +442 -0
  182. package/raystack/raccoon/v1beta1/raccoon_connect.ts +26 -0
  183. package/raystack/raccoon/v1beta1/raccoon_pb.ts +324 -0
  184. package/raystack/siren/index.ts +3 -0
  185. package/raystack/siren/v1beta1/siren-SirenService_connectquery.ts +497 -0
  186. package/raystack/siren/v1beta1/siren.client.ts +479 -0
  187. package/raystack/siren/v1beta1/siren.ts +6507 -0
  188. package/raystack/siren/v1beta1/siren_connect.ts +332 -0
  189. package/raystack/siren/v1beta1/siren_pb.ts +3853 -0
  190. package/raystack/stencil/index.ts +3 -0
  191. package/raystack/stencil/v1beta1/stencil-StencilService_connectquery.ts +231 -0
  192. package/raystack/stencil/v1beta1/stencil.client.ts +232 -0
  193. package/raystack/stencil/v1beta1/stencil.ts +2716 -0
  194. package/raystack/stencil/v1beta1/stencil_connect.ts +161 -0
  195. package/raystack/stencil/v1beta1/stencil_pb.ts +1729 -0
  196. package/validate/validate.ts +4130 -0
  197. package/validate/validate_pb.ts +2621 -0
@@ -0,0 +1,484 @@
1
+ // @generated by protobuf-ts 2.11.1
2
+ // @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Protocol Buffers - Google's data interchange format
6
+ // Copyright 2008 Google Inc. All rights reserved.
7
+ // https://developers.google.com/protocol-buffers/
8
+ //
9
+ // Redistribution and use in source and binary forms, with or without
10
+ // modification, are permitted provided that the following conditions are
11
+ // met:
12
+ //
13
+ // * Redistributions of source code must retain the above copyright
14
+ // notice, this list of conditions and the following disclaimer.
15
+ // * Redistributions in binary form must reproduce the above
16
+ // copyright notice, this list of conditions and the following disclaimer
17
+ // in the documentation and/or other materials provided with the
18
+ // distribution.
19
+ // * Neither the name of Google Inc. nor the names of its
20
+ // contributors may be used to endorse or promote products derived from
21
+ // this software without specific prior written permission.
22
+ //
23
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ //
35
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
36
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
37
+ import { WireType } from "@protobuf-ts/runtime";
38
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
39
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
40
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
41
+ import type { PartialMessage } from "@protobuf-ts/runtime";
42
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
43
+ import { isJsonObject } from "@protobuf-ts/runtime";
44
+ import { typeofJsonValue } from "@protobuf-ts/runtime";
45
+ import type { JsonValue } from "@protobuf-ts/runtime";
46
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
47
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
48
+ import type { JsonObject } from "@protobuf-ts/runtime";
49
+ import { MessageType } from "@protobuf-ts/runtime";
50
+ /**
51
+ * `Struct` represents a structured data value, consisting of fields
52
+ * which map to dynamically typed values. In some languages, `Struct`
53
+ * might be supported by a native representation. For example, in
54
+ * scripting languages like JS a struct is represented as an
55
+ * object. The details of that representation are described together
56
+ * with the proto support for the language.
57
+ *
58
+ * The JSON representation for `Struct` is JSON object.
59
+ *
60
+ * @generated from protobuf message google.protobuf.Struct
61
+ */
62
+ export interface Struct {
63
+ /**
64
+ * Unordered map of dynamically typed values.
65
+ *
66
+ * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1
67
+ */
68
+ fields: {
69
+ [key: string]: Value;
70
+ };
71
+ }
72
+ /**
73
+ * `Value` represents a dynamically typed value which can be either
74
+ * null, a number, a string, a boolean, a recursive struct value, or a
75
+ * list of values. A producer of value is expected to set one of these
76
+ * variants. Absence of any variant indicates an error.
77
+ *
78
+ * The JSON representation for `Value` is JSON value.
79
+ *
80
+ * @generated from protobuf message google.protobuf.Value
81
+ */
82
+ export interface Value {
83
+ /**
84
+ * The kind of value.
85
+ *
86
+ * @generated from protobuf oneof: kind
87
+ */
88
+ kind: {
89
+ oneofKind: "nullValue";
90
+ /**
91
+ * Represents a null value.
92
+ *
93
+ * @generated from protobuf field: google.protobuf.NullValue null_value = 1
94
+ */
95
+ nullValue: NullValue;
96
+ } | {
97
+ oneofKind: "numberValue";
98
+ /**
99
+ * Represents a double value.
100
+ *
101
+ * @generated from protobuf field: double number_value = 2
102
+ */
103
+ numberValue: number;
104
+ } | {
105
+ oneofKind: "stringValue";
106
+ /**
107
+ * Represents a string value.
108
+ *
109
+ * @generated from protobuf field: string string_value = 3
110
+ */
111
+ stringValue: string;
112
+ } | {
113
+ oneofKind: "boolValue";
114
+ /**
115
+ * Represents a boolean value.
116
+ *
117
+ * @generated from protobuf field: bool bool_value = 4
118
+ */
119
+ boolValue: boolean;
120
+ } | {
121
+ oneofKind: "structValue";
122
+ /**
123
+ * Represents a structured value.
124
+ *
125
+ * @generated from protobuf field: google.protobuf.Struct struct_value = 5
126
+ */
127
+ structValue: Struct;
128
+ } | {
129
+ oneofKind: "listValue";
130
+ /**
131
+ * Represents a repeated `Value`.
132
+ *
133
+ * @generated from protobuf field: google.protobuf.ListValue list_value = 6
134
+ */
135
+ listValue: ListValue;
136
+ } | {
137
+ oneofKind: undefined;
138
+ };
139
+ }
140
+ /**
141
+ * `ListValue` is a wrapper around a repeated field of values.
142
+ *
143
+ * The JSON representation for `ListValue` is JSON array.
144
+ *
145
+ * @generated from protobuf message google.protobuf.ListValue
146
+ */
147
+ export interface ListValue {
148
+ /**
149
+ * Repeated field of dynamically typed values.
150
+ *
151
+ * @generated from protobuf field: repeated google.protobuf.Value values = 1
152
+ */
153
+ values: Value[];
154
+ }
155
+ /**
156
+ * `NullValue` is a singleton enumeration to represent the null value for the
157
+ * `Value` type union.
158
+ *
159
+ * The JSON representation for `NullValue` is JSON `null`.
160
+ *
161
+ * @generated from protobuf enum google.protobuf.NullValue
162
+ */
163
+ export enum NullValue {
164
+ /**
165
+ * Null value.
166
+ *
167
+ * @generated from protobuf enum value: NULL_VALUE = 0;
168
+ */
169
+ NULL_VALUE = 0
170
+ }
171
+ // @generated message type with reflection information, may provide speed optimized methods
172
+ class Struct$Type extends MessageType<Struct> {
173
+ constructor() {
174
+ super("google.protobuf.Struct", [
175
+ { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } }
176
+ ]);
177
+ }
178
+ /**
179
+ * Encode `Struct` to JSON object.
180
+ */
181
+ internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
182
+ let json: JsonObject = {};
183
+ for (let [k, v] of Object.entries(message.fields)) {
184
+ json[k] = Value.toJson(v);
185
+ }
186
+ return json;
187
+ }
188
+ /**
189
+ * Decode `Struct` from JSON object.
190
+ */
191
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
192
+ if (!isJsonObject(json))
193
+ throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + ".");
194
+ if (!target)
195
+ target = this.create();
196
+ for (let [k, v] of globalThis.Object.entries(json)) {
197
+ target.fields[k] = Value.fromJson(v);
198
+ }
199
+ return target;
200
+ }
201
+ create(value?: PartialMessage<Struct>): Struct {
202
+ const message = globalThis.Object.create((this.messagePrototype!));
203
+ message.fields = {};
204
+ if (value !== undefined)
205
+ reflectionMergePartial<Struct>(this, message, value);
206
+ return message;
207
+ }
208
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
209
+ let message = target ?? this.create(), end = reader.pos + length;
210
+ while (reader.pos < end) {
211
+ let [fieldNo, wireType] = reader.tag();
212
+ switch (fieldNo) {
213
+ case /* map<string, google.protobuf.Value> fields */ 1:
214
+ this.binaryReadMap1(message.fields, reader, options);
215
+ break;
216
+ default:
217
+ let u = options.readUnknownField;
218
+ if (u === "throw")
219
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
220
+ let d = reader.skip(wireType);
221
+ if (u !== false)
222
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
223
+ }
224
+ }
225
+ return message;
226
+ }
227
+ private binaryReadMap1(map: Struct["fields"], reader: IBinaryReader, options: BinaryReadOptions): void {
228
+ let len = reader.uint32(), end = reader.pos + len, key: keyof Struct["fields"] | undefined, val: Struct["fields"][any] | undefined;
229
+ while (reader.pos < end) {
230
+ let [fieldNo, wireType] = reader.tag();
231
+ switch (fieldNo) {
232
+ case 1:
233
+ key = reader.string();
234
+ break;
235
+ case 2:
236
+ val = Value.internalBinaryRead(reader, reader.uint32(), options);
237
+ break;
238
+ default: throw new globalThis.Error("unknown map entry field for google.protobuf.Struct.fields");
239
+ }
240
+ }
241
+ map[key ?? ""] = val ?? Value.create();
242
+ }
243
+ internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
244
+ /* map<string, google.protobuf.Value> fields = 1; */
245
+ for (let k of globalThis.Object.keys(message.fields)) {
246
+ writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
247
+ writer.tag(2, WireType.LengthDelimited).fork();
248
+ Value.internalBinaryWrite(message.fields[k], writer, options);
249
+ writer.join().join();
250
+ }
251
+ let u = options.writeUnknownFields;
252
+ if (u !== false)
253
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
254
+ return writer;
255
+ }
256
+ }
257
+ /**
258
+ * @generated MessageType for protobuf message google.protobuf.Struct
259
+ */
260
+ export const Struct = new Struct$Type();
261
+ // @generated message type with reflection information, may provide speed optimized methods
262
+ class Value$Type extends MessageType<Value> {
263
+ constructor() {
264
+ super("google.protobuf.Value", [
265
+ { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] },
266
+ { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ },
267
+ { no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ },
268
+ { no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ },
269
+ { no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
270
+ { no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
271
+ ]);
272
+ }
273
+ /**
274
+ * Encode `Value` to JSON value.
275
+ */
276
+ internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
277
+ if (message.kind.oneofKind === undefined)
278
+ throw new globalThis.Error();
279
+ switch (message.kind.oneofKind) {
280
+ case undefined: throw new globalThis.Error();
281
+ case "boolValue": return message.kind.boolValue;
282
+ case "nullValue": return null;
283
+ case "numberValue":
284
+ let numberValue = message.kind.numberValue;
285
+ if (typeof numberValue == "number" && !Number.isFinite(numberValue))
286
+ throw new globalThis.Error();
287
+ return numberValue;
288
+ case "stringValue": return message.kind.stringValue;
289
+ case "listValue":
290
+ let listValueField = this.fields.find(f => f.no === 6);
291
+ if (listValueField?.kind !== "message")
292
+ throw new globalThis.Error();
293
+ return listValueField.T().toJson(message.kind.listValue);
294
+ case "structValue":
295
+ let structValueField = this.fields.find(f => f.no === 5);
296
+ if (structValueField?.kind !== "message")
297
+ throw new globalThis.Error();
298
+ return structValueField.T().toJson(message.kind.structValue);
299
+ }
300
+ }
301
+ /**
302
+ * Decode `Value` from JSON value.
303
+ */
304
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
305
+ if (!target)
306
+ target = this.create();
307
+ switch (typeof json) {
308
+ case "number":
309
+ target.kind = { oneofKind: "numberValue", numberValue: json };
310
+ break;
311
+ case "string":
312
+ target.kind = { oneofKind: "stringValue", stringValue: json };
313
+ break;
314
+ case "boolean":
315
+ target.kind = { oneofKind: "boolValue", boolValue: json };
316
+ break;
317
+ case "object":
318
+ if (json === null) {
319
+ target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE };
320
+ }
321
+ else if (globalThis.Array.isArray(json)) {
322
+ target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) };
323
+ }
324
+ else {
325
+ target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
326
+ }
327
+ break;
328
+ default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
329
+ }
330
+ return target;
331
+ }
332
+ create(value?: PartialMessage<Value>): Value {
333
+ const message = globalThis.Object.create((this.messagePrototype!));
334
+ message.kind = { oneofKind: undefined };
335
+ if (value !== undefined)
336
+ reflectionMergePartial<Value>(this, message, value);
337
+ return message;
338
+ }
339
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
340
+ let message = target ?? this.create(), end = reader.pos + length;
341
+ while (reader.pos < end) {
342
+ let [fieldNo, wireType] = reader.tag();
343
+ switch (fieldNo) {
344
+ case /* google.protobuf.NullValue null_value */ 1:
345
+ message.kind = {
346
+ oneofKind: "nullValue",
347
+ nullValue: reader.int32()
348
+ };
349
+ break;
350
+ case /* double number_value */ 2:
351
+ message.kind = {
352
+ oneofKind: "numberValue",
353
+ numberValue: reader.double()
354
+ };
355
+ break;
356
+ case /* string string_value */ 3:
357
+ message.kind = {
358
+ oneofKind: "stringValue",
359
+ stringValue: reader.string()
360
+ };
361
+ break;
362
+ case /* bool bool_value */ 4:
363
+ message.kind = {
364
+ oneofKind: "boolValue",
365
+ boolValue: reader.bool()
366
+ };
367
+ break;
368
+ case /* google.protobuf.Struct struct_value */ 5:
369
+ message.kind = {
370
+ oneofKind: "structValue",
371
+ structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
372
+ };
373
+ break;
374
+ case /* google.protobuf.ListValue list_value */ 6:
375
+ message.kind = {
376
+ oneofKind: "listValue",
377
+ listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
378
+ };
379
+ break;
380
+ default:
381
+ let u = options.readUnknownField;
382
+ if (u === "throw")
383
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
384
+ let d = reader.skip(wireType);
385
+ if (u !== false)
386
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
387
+ }
388
+ }
389
+ return message;
390
+ }
391
+ internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
392
+ /* google.protobuf.NullValue null_value = 1; */
393
+ if (message.kind.oneofKind === "nullValue")
394
+ writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
395
+ /* double number_value = 2; */
396
+ if (message.kind.oneofKind === "numberValue")
397
+ writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
398
+ /* string string_value = 3; */
399
+ if (message.kind.oneofKind === "stringValue")
400
+ writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
401
+ /* bool bool_value = 4; */
402
+ if (message.kind.oneofKind === "boolValue")
403
+ writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
404
+ /* google.protobuf.Struct struct_value = 5; */
405
+ if (message.kind.oneofKind === "structValue")
406
+ Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
407
+ /* google.protobuf.ListValue list_value = 6; */
408
+ if (message.kind.oneofKind === "listValue")
409
+ ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
410
+ let u = options.writeUnknownFields;
411
+ if (u !== false)
412
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
413
+ return writer;
414
+ }
415
+ }
416
+ /**
417
+ * @generated MessageType for protobuf message google.protobuf.Value
418
+ */
419
+ export const Value = new Value$Type();
420
+ // @generated message type with reflection information, may provide speed optimized methods
421
+ class ListValue$Type extends MessageType<ListValue> {
422
+ constructor() {
423
+ super("google.protobuf.ListValue", [
424
+ { no: 1, name: "values", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Value }
425
+ ]);
426
+ }
427
+ /**
428
+ * Encode `ListValue` to JSON array.
429
+ */
430
+ internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
431
+ return message.values.map(v => Value.toJson(v));
432
+ }
433
+ /**
434
+ * Decode `ListValue` from JSON array.
435
+ */
436
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
437
+ if (!globalThis.Array.isArray(json))
438
+ throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
439
+ if (!target)
440
+ target = this.create();
441
+ let values = json.map(v => Value.fromJson(v));
442
+ target.values.push(...values);
443
+ return target;
444
+ }
445
+ create(value?: PartialMessage<ListValue>): ListValue {
446
+ const message = globalThis.Object.create((this.messagePrototype!));
447
+ message.values = [];
448
+ if (value !== undefined)
449
+ reflectionMergePartial<ListValue>(this, message, value);
450
+ return message;
451
+ }
452
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
453
+ let message = target ?? this.create(), end = reader.pos + length;
454
+ while (reader.pos < end) {
455
+ let [fieldNo, wireType] = reader.tag();
456
+ switch (fieldNo) {
457
+ case /* repeated google.protobuf.Value values */ 1:
458
+ message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
459
+ break;
460
+ default:
461
+ let u = options.readUnknownField;
462
+ if (u === "throw")
463
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
464
+ let d = reader.skip(wireType);
465
+ if (u !== false)
466
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
467
+ }
468
+ }
469
+ return message;
470
+ }
471
+ internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
472
+ /* repeated google.protobuf.Value values = 1; */
473
+ for (let i = 0; i < message.values.length; i++)
474
+ Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
475
+ let u = options.writeUnknownFields;
476
+ if (u !== false)
477
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
478
+ return writer;
479
+ }
480
+ }
481
+ /**
482
+ * @generated MessageType for protobuf message google.protobuf.ListValue
483
+ */
484
+ export const ListValue = new ListValue$Type();