@raystack/proton 0.1.0-8a4f578dceca476c696c82054faaf4871b1b949c → 0.1.0-8cb19702a3e47d173732860d58084b83d6941865

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 (198) hide show
  1. package/google/api/annotations_pb.ts +15 -9
  2. package/google/api/field_behavior_pb.ts +19 -19
  3. package/google/api/http_pb.ts +43 -108
  4. package/google/api/httpbody_pb.ts +23 -37
  5. package/index.ts +10 -0
  6. package/package.json +61 -17
  7. package/protoc-gen-openapiv2/options/annotations_pb.ts +23 -29
  8. package/protoc-gen-openapiv2/options/openapiv2_pb.ts +338 -808
  9. package/raystack/assets/index.ts +29 -29
  10. package/raystack/assets/v1beta1/bucket_pb.ts +46 -89
  11. package/raystack/assets/v1beta1/dashboard_pb.ts +49 -97
  12. package/raystack/assets/v1beta1/event_pb.ts +22 -36
  13. package/raystack/assets/v1beta1/group_pb.ts +38 -74
  14. package/raystack/assets/v1beta1/job_pb.ts +30 -43
  15. package/raystack/assets/v1beta1/lineage_pb.ts +22 -36
  16. package/raystack/assets/v1beta1/ownership_pb.ts +31 -68
  17. package/raystack/assets/v1beta1/preview_pb.ts +21 -34
  18. package/raystack/assets/v1beta1/properties_pb.ts +22 -37
  19. package/raystack/assets/v1beta1/resource_pb.ts +24 -43
  20. package/raystack/assets/v1beta1/schema_pb.ts +59 -145
  21. package/raystack/assets/v1beta1/table_pb.ts +59 -120
  22. package/raystack/assets/v1beta1/timestamp_pb.ts +28 -62
  23. package/raystack/assets/v1beta1/topic_pb.ts +43 -78
  24. package/raystack/assets/v1beta1/user_pb.ts +58 -125
  25. package/raystack/assets/v1beta2/application_pb.ts +23 -39
  26. package/raystack/assets/v1beta2/asset_pb.ts +30 -53
  27. package/raystack/assets/v1beta2/bucket_pb.ts +41 -87
  28. package/raystack/assets/v1beta2/common_pb.ts +56 -137
  29. package/raystack/assets/v1beta2/dashboard_pb.ts +44 -93
  30. package/raystack/assets/v1beta2/experiment_pb.ts +38 -79
  31. package/raystack/assets/v1beta2/feature_table_pb.ts +51 -115
  32. package/raystack/assets/v1beta2/group_pb.ts +32 -68
  33. package/raystack/assets/v1beta2/job_pb.ts +21 -35
  34. package/raystack/assets/v1beta2/metric_pb.ts +25 -43
  35. package/raystack/assets/v1beta2/model_pb.ts +59 -147
  36. package/raystack/assets/v1beta2/table_pb.ts +82 -200
  37. package/raystack/assets/v1beta2/topic_pb.ts +41 -99
  38. package/raystack/assets/v1beta2/user_pb.ts +53 -121
  39. package/raystack/common/index.ts +1 -2
  40. package/raystack/common/v1/service-CommonService_connectquery.ts +3 -14
  41. package/raystack/common/v1/service_pb.ts +57 -97
  42. package/raystack/compass/index.ts +1 -2
  43. package/raystack/compass/v1beta1/service-CompassService_connectquery.ts +44 -424
  44. package/raystack/compass/v1beta1/service_pb.ts +1448 -3319
  45. package/raystack/entropy/index.ts +2 -4
  46. package/raystack/entropy/v1beta1/module-ModuleService_connectquery.ts +7 -54
  47. package/raystack/entropy/v1beta1/module_pb.ts +156 -324
  48. package/raystack/entropy/v1beta1/resource-ResourceService_connectquery.ts +9 -74
  49. package/raystack/entropy/v1beta1/resource_pb.ts +330 -756
  50. package/raystack/frontier/index.ts +3 -5
  51. package/raystack/frontier/v1beta1/admin-AdminService_connectquery.ts +60 -514
  52. package/raystack/frontier/v1beta1/admin_pb.ts +1774 -3791
  53. package/raystack/frontier/v1beta1/frontier-FrontierService_connectquery.ts +169 -1674
  54. package/raystack/frontier/v1beta1/frontier_pb.ts +4850 -10959
  55. package/raystack/frontier/v1beta1/models_pb.ts +810 -2296
  56. package/raystack/guardian/index.ts +1 -2
  57. package/raystack/guardian/v1beta1/guardian-GuardianService_connectquery.ts +42 -404
  58. package/raystack/guardian/v1beta1/guardian_pb.ts +1584 -3783
  59. package/raystack/optimus/core/v1beta1/backup-BackupService_connectquery.ts +5 -34
  60. package/raystack/optimus/core/v1beta1/backup_pb.ts +137 -273
  61. package/raystack/optimus/core/v1beta1/job_run-JobRunService_connectquery.ts +6 -44
  62. package/raystack/optimus/core/v1beta1/job_run_pb.ts +194 -376
  63. package/raystack/optimus/core/v1beta1/job_spec-JobSpecificationService_connectquery.ts +17 -154
  64. package/raystack/optimus/core/v1beta1/job_spec_pb.ts +910 -2081
  65. package/raystack/optimus/core/v1beta1/namespace-NamespaceService_connectquery.ts +5 -34
  66. package/raystack/optimus/core/v1beta1/namespace_pb.ts +113 -212
  67. package/raystack/optimus/core/v1beta1/project-ProjectService_connectquery.ts +5 -34
  68. package/raystack/optimus/core/v1beta1/project_pb.ts +121 -238
  69. package/raystack/optimus/core/v1beta1/replay-ReplayService_connectquery.ts +6 -44
  70. package/raystack/optimus/core/v1beta1/replay_pb.ts +160 -335
  71. package/raystack/optimus/core/v1beta1/resource-ResourceService_connectquery.ts +8 -64
  72. package/raystack/optimus/core/v1beta1/resource_pb.ts +266 -527
  73. package/raystack/optimus/core/v1beta1/runtime-RuntimeService_connectquery.ts +3 -14
  74. package/raystack/optimus/core/v1beta1/runtime_pb.ts +48 -61
  75. package/raystack/optimus/core/v1beta1/secret-SecretService_connectquery.ts +6 -44
  76. package/raystack/optimus/core/v1beta1/secret_pb.ts +155 -283
  77. package/raystack/optimus/core/v1beta1/status_pb.ts +35 -54
  78. package/raystack/optimus/integration/v1beta1/event_pb.ts +75 -187
  79. package/raystack/optimus/plugins/v1beta1/dependency_resolver-DependencyResolverModService_connectquery.ts +6 -44
  80. package/raystack/optimus/plugins/v1beta1/dependency_resolver_pb.ts +193 -426
  81. package/raystack/predator/index.ts +2 -2
  82. package/raystack/predator/v1beta1/metrics_log_pb.ts +67 -173
  83. package/raystack/predator/v1beta1/result_log_pb.ts +60 -144
  84. package/raystack/raccoon/index.ts +1 -2
  85. package/raystack/raccoon/v1beta1/raccoon-EventService_connectquery.ts +3 -14
  86. package/raystack/raccoon/v1beta1/raccoon_pb.ts +142 -189
  87. package/raystack/siren/index.ts +1 -2
  88. package/raystack/siren/v1beta1/siren-SirenService_connectquery.ts +37 -354
  89. package/raystack/siren/v1beta1/siren_pb.ts +1155 -2637
  90. package/raystack/stencil/index.ts +1 -2
  91. package/raystack/stencil/v1beta1/stencil-StencilService_connectquery.ts +18 -164
  92. package/raystack/stencil/v1beta1/stencil_pb.ts +530 -1157
  93. package/validate/validate_pb.ts +401 -1038
  94. package/google/api/field_behavior.ts +0 -95
  95. package/google/api/http.ts +0 -695
  96. package/google/api/httpbody.ts +0 -159
  97. package/google/protobuf/any.ts +0 -322
  98. package/google/protobuf/descriptor.ts +0 -3475
  99. package/google/protobuf/duration.ts +0 -231
  100. package/google/protobuf/struct.ts +0 -484
  101. package/google/protobuf/timestamp.ts +0 -290
  102. package/google/protobuf/wrappers.ts +0 -752
  103. package/protoc-gen-openapiv2/options/openapiv2.ts +0 -3110
  104. package/raystack/assets/v1beta1/bucket.ts +0 -362
  105. package/raystack/assets/v1beta1/dashboard.ts +0 -426
  106. package/raystack/assets/v1beta1/event.ts +0 -105
  107. package/raystack/assets/v1beta1/group.ts +0 -223
  108. package/raystack/assets/v1beta1/job.ts +0 -147
  109. package/raystack/assets/v1beta1/lineage.ts +0 -90
  110. package/raystack/assets/v1beta1/ownership.ts +0 -179
  111. package/raystack/assets/v1beta1/preview.ts +0 -87
  112. package/raystack/assets/v1beta1/properties.ts +0 -116
  113. package/raystack/assets/v1beta1/resource.ts +0 -149
  114. package/raystack/assets/v1beta1/schema.ts +0 -421
  115. package/raystack/assets/v1beta1/table.ts +0 -408
  116. package/raystack/assets/v1beta1/timestamp.ts +0 -158
  117. package/raystack/assets/v1beta1/topic.ts +0 -253
  118. package/raystack/assets/v1beta1/user.ts +0 -451
  119. package/raystack/assets/v1beta2/application.ts +0 -125
  120. package/raystack/assets/v1beta2/asset.ts +0 -269
  121. package/raystack/assets/v1beta2/bucket.ts +0 -341
  122. package/raystack/assets/v1beta2/common.ts +0 -392
  123. package/raystack/assets/v1beta2/dashboard.ts +0 -393
  124. package/raystack/assets/v1beta2/experiment.ts +0 -274
  125. package/raystack/assets/v1beta2/feature_table.ts +0 -387
  126. package/raystack/assets/v1beta2/group.ts +0 -178
  127. package/raystack/assets/v1beta2/job.ts +0 -99
  128. package/raystack/assets/v1beta2/metric.ts +0 -163
  129. package/raystack/assets/v1beta2/model.ts +0 -519
  130. package/raystack/assets/v1beta2/table.ts +0 -663
  131. package/raystack/assets/v1beta2/topic.ts +0 -275
  132. package/raystack/assets/v1beta2/user.ts +0 -433
  133. package/raystack/common/v1/service.client.ts +0 -37
  134. package/raystack/common/v1/service.ts +0 -245
  135. package/raystack/common/v1/service_connect.ts +0 -26
  136. package/raystack/compass/v1beta1/service.client.ts +0 -594
  137. package/raystack/compass/v1beta1/service.ts +0 -8169
  138. package/raystack/compass/v1beta1/service_connect.ts +0 -407
  139. package/raystack/entropy/v1beta1/module.client.ts +0 -89
  140. package/raystack/entropy/v1beta1/module.ts +0 -692
  141. package/raystack/entropy/v1beta1/module_connect.ts +0 -62
  142. package/raystack/entropy/v1beta1/resource.client.ts +0 -129
  143. package/raystack/entropy/v1beta1/resource.ts +0 -1817
  144. package/raystack/entropy/v1beta1/resource_connect.ts +0 -89
  145. package/raystack/frontier/v1beta1/admin.client.ts +0 -849
  146. package/raystack/frontier/v1beta1/admin.ts +0 -9007
  147. package/raystack/frontier/v1beta1/admin_connect.ts +0 -573
  148. package/raystack/frontier/v1beta1/frontier.client.ts +0 -2307
  149. package/raystack/frontier/v1beta1/frontier.ts +0 -23706
  150. package/raystack/frontier/v1beta1/frontier_connect.ts +0 -1574
  151. package/raystack/frontier/v1beta1/models.ts +0 -7433
  152. package/raystack/guardian/v1beta1/guardian.client.ts +0 -552
  153. package/raystack/guardian/v1beta1/guardian.ts +0 -9688
  154. package/raystack/guardian/v1beta1/guardian_connect.ts +0 -381
  155. package/raystack/optimus/core/v1beta1/backup.client.ts +0 -63
  156. package/raystack/optimus/core/v1beta1/backup.ts +0 -708
  157. package/raystack/optimus/core/v1beta1/backup_connect.ts +0 -44
  158. package/raystack/optimus/core/v1beta1/job_run.client.ts +0 -96
  159. package/raystack/optimus/core/v1beta1/job_run.ts +0 -1008
  160. package/raystack/optimus/core/v1beta1/job_run_connect.ts +0 -63
  161. package/raystack/optimus/core/v1beta1/job_spec.client.ts +0 -363
  162. package/raystack/optimus/core/v1beta1/job_spec.ts +0 -5134
  163. package/raystack/optimus/core/v1beta1/job_spec_connect.ts +0 -233
  164. package/raystack/optimus/core/v1beta1/namespace.client.ts +0 -75
  165. package/raystack/optimus/core/v1beta1/namespace.ts +0 -477
  166. package/raystack/optimus/core/v1beta1/namespace_connect.ts +0 -50
  167. package/raystack/optimus/core/v1beta1/project.client.ts +0 -75
  168. package/raystack/optimus/core/v1beta1/project.ts +0 -520
  169. package/raystack/optimus/core/v1beta1/project_connect.ts +0 -50
  170. package/raystack/optimus/core/v1beta1/replay.client.ts +0 -76
  171. package/raystack/optimus/core/v1beta1/replay.ts +0 -881
  172. package/raystack/optimus/core/v1beta1/replay_connect.ts +0 -53
  173. package/raystack/optimus/core/v1beta1/resource.client.ts +0 -148
  174. package/raystack/optimus/core/v1beta1/resource.ts +0 -1329
  175. package/raystack/optimus/core/v1beta1/resource_connect.ts +0 -96
  176. package/raystack/optimus/core/v1beta1/runtime.client.ts +0 -45
  177. package/raystack/optimus/core/v1beta1/runtime.ts +0 -131
  178. package/raystack/optimus/core/v1beta1/runtime_connect.ts +0 -30
  179. package/raystack/optimus/core/v1beta1/secret.client.ts +0 -92
  180. package/raystack/optimus/core/v1beta1/secret.ts +0 -619
  181. package/raystack/optimus/core/v1beta1/secret_connect.ts +0 -61
  182. package/raystack/optimus/core/v1beta1/status.ts +0 -113
  183. package/raystack/optimus/integration/v1beta1/event.ts +0 -531
  184. package/raystack/optimus/plugins/v1beta1/dependency_resolver.client.ts +0 -100
  185. package/raystack/optimus/plugins/v1beta1/dependency_resolver.ts +0 -950
  186. package/raystack/optimus/plugins/v1beta1/dependency_resolver_connect.ts +0 -65
  187. package/raystack/predator/v1beta1/metrics_log.ts +0 -457
  188. package/raystack/predator/v1beta1/result_log.ts +0 -390
  189. package/raystack/raccoon/v1beta1/raccoon.client.ts +0 -37
  190. package/raystack/raccoon/v1beta1/raccoon.ts +0 -442
  191. package/raystack/raccoon/v1beta1/raccoon_connect.ts +0 -26
  192. package/raystack/siren/v1beta1/siren.client.ts +0 -479
  193. package/raystack/siren/v1beta1/siren.ts +0 -6507
  194. package/raystack/siren/v1beta1/siren_connect.ts +0 -332
  195. package/raystack/stencil/v1beta1/stencil.client.ts +0 -232
  196. package/raystack/stencil/v1beta1/stencil.ts +0 -2716
  197. package/raystack/stencil/v1beta1/stencil_connect.ts +0 -161
  198. package/validate/validate.ts +0 -4130
@@ -1,231 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1
2
- // @generated from protobuf file "google/protobuf/duration.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 { typeofJsonValue } from "@protobuf-ts/runtime";
44
- import type { JsonValue } from "@protobuf-ts/runtime";
45
- import type { JsonReadOptions } from "@protobuf-ts/runtime";
46
- import type { JsonWriteOptions } from "@protobuf-ts/runtime";
47
- import { PbLong } from "@protobuf-ts/runtime";
48
- import { MessageType } from "@protobuf-ts/runtime";
49
- /**
50
- * A Duration represents a signed, fixed-length span of time represented
51
- * as a count of seconds and fractions of seconds at nanosecond
52
- * resolution. It is independent of any calendar and concepts like "day"
53
- * or "month". It is related to Timestamp in that the difference between
54
- * two Timestamp values is a Duration and it can be added or subtracted
55
- * from a Timestamp. Range is approximately +-10,000 years.
56
- *
57
- * # Examples
58
- *
59
- * Example 1: Compute Duration from two Timestamps in pseudo code.
60
- *
61
- * Timestamp start = ...;
62
- * Timestamp end = ...;
63
- * Duration duration = ...;
64
- *
65
- * duration.seconds = end.seconds - start.seconds;
66
- * duration.nanos = end.nanos - start.nanos;
67
- *
68
- * if (duration.seconds < 0 && duration.nanos > 0) {
69
- * duration.seconds += 1;
70
- * duration.nanos -= 1000000000;
71
- * } else if (duration.seconds > 0 && duration.nanos < 0) {
72
- * duration.seconds -= 1;
73
- * duration.nanos += 1000000000;
74
- * }
75
- *
76
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
77
- *
78
- * Timestamp start = ...;
79
- * Duration duration = ...;
80
- * Timestamp end = ...;
81
- *
82
- * end.seconds = start.seconds + duration.seconds;
83
- * end.nanos = start.nanos + duration.nanos;
84
- *
85
- * if (end.nanos < 0) {
86
- * end.seconds -= 1;
87
- * end.nanos += 1000000000;
88
- * } else if (end.nanos >= 1000000000) {
89
- * end.seconds += 1;
90
- * end.nanos -= 1000000000;
91
- * }
92
- *
93
- * Example 3: Compute Duration from datetime.timedelta in Python.
94
- *
95
- * td = datetime.timedelta(days=3, minutes=10)
96
- * duration = Duration()
97
- * duration.FromTimedelta(td)
98
- *
99
- * # JSON Mapping
100
- *
101
- * In JSON format, the Duration type is encoded as a string rather than an
102
- * object, where the string ends in the suffix "s" (indicating seconds) and
103
- * is preceded by the number of seconds, with nanoseconds expressed as
104
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
105
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
106
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
107
- * microsecond should be expressed in JSON format as "3.000001s".
108
- *
109
- *
110
- *
111
- * @generated from protobuf message google.protobuf.Duration
112
- */
113
- export interface Duration {
114
- /**
115
- * Signed seconds of the span of time. Must be from -315,576,000,000
116
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
117
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
118
- *
119
- * @generated from protobuf field: int64 seconds = 1
120
- */
121
- seconds: bigint;
122
- /**
123
- * Signed fractions of a second at nanosecond resolution of the span
124
- * of time. Durations less than one second are represented with a 0
125
- * `seconds` field and a positive or negative `nanos` field. For durations
126
- * of one second or more, a non-zero value for the `nanos` field must be
127
- * of the same sign as the `seconds` field. Must be from -999,999,999
128
- * to +999,999,999 inclusive.
129
- *
130
- * @generated from protobuf field: int32 nanos = 2
131
- */
132
- nanos: number;
133
- }
134
- // @generated message type with reflection information, may provide speed optimized methods
135
- class Duration$Type extends MessageType<Duration> {
136
- constructor() {
137
- super("google.protobuf.Duration", [
138
- { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
139
- { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
140
- ]);
141
- }
142
- /**
143
- * Encode `Duration` to JSON string like "3.000001s".
144
- */
145
- internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue {
146
- let s = PbLong.from(message.seconds).toNumber();
147
- if (s > 315576000000 || s < -315576000000)
148
- throw new Error("Duration value out of range.");
149
- let text = message.seconds.toString();
150
- if (s === 0 && message.nanos < 0)
151
- text = "-" + text;
152
- if (message.nanos !== 0) {
153
- let nanosStr = Math.abs(message.nanos).toString();
154
- nanosStr = "0".repeat(9 - nanosStr.length) + nanosStr;
155
- if (nanosStr.substring(3) === "000000")
156
- nanosStr = nanosStr.substring(0, 3);
157
- else if (nanosStr.substring(6) === "000")
158
- nanosStr = nanosStr.substring(0, 6);
159
- text += "." + nanosStr;
160
- }
161
- return text + "s";
162
- }
163
- /**
164
- * Decode `Duration` from JSON string like "3.000001s"
165
- */
166
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration {
167
- if (typeof json !== "string")
168
- throw new Error("Unable to parse Duration from JSON " + typeofJsonValue(json) + ". Expected string.");
169
- let match = json.match(/^(-?)([0-9]+)(?:\.([0-9]+))?s/);
170
- if (match === null)
171
- throw new Error("Unable to parse Duration from JSON string. Invalid format.");
172
- if (!target)
173
- target = this.create();
174
- let [, sign, secs, nanos] = match;
175
- let longSeconds = PbLong.from(sign + secs);
176
- if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000)
177
- throw new Error("Unable to parse Duration from JSON string. Value out of range.");
178
- target.seconds = longSeconds.toBigInt();
179
- if (typeof nanos == "string") {
180
- let nanosStr = sign + nanos + "0".repeat(9 - nanos.length);
181
- target.nanos = parseInt(nanosStr);
182
- }
183
- return target;
184
- }
185
- create(value?: PartialMessage<Duration>): Duration {
186
- const message = globalThis.Object.create((this.messagePrototype!));
187
- message.seconds = 0n;
188
- message.nanos = 0;
189
- if (value !== undefined)
190
- reflectionMergePartial<Duration>(this, message, value);
191
- return message;
192
- }
193
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration {
194
- let message = target ?? this.create(), end = reader.pos + length;
195
- while (reader.pos < end) {
196
- let [fieldNo, wireType] = reader.tag();
197
- switch (fieldNo) {
198
- case /* int64 seconds */ 1:
199
- message.seconds = reader.int64().toBigInt();
200
- break;
201
- case /* int32 nanos */ 2:
202
- message.nanos = reader.int32();
203
- break;
204
- default:
205
- let u = options.readUnknownField;
206
- if (u === "throw")
207
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
208
- let d = reader.skip(wireType);
209
- if (u !== false)
210
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
211
- }
212
- }
213
- return message;
214
- }
215
- internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
216
- /* int64 seconds = 1; */
217
- if (message.seconds !== 0n)
218
- writer.tag(1, WireType.Varint).int64(message.seconds);
219
- /* int32 nanos = 2; */
220
- if (message.nanos !== 0)
221
- writer.tag(2, WireType.Varint).int32(message.nanos);
222
- let u = options.writeUnknownFields;
223
- if (u !== false)
224
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
225
- return writer;
226
- }
227
- }
228
- /**
229
- * @generated MessageType for protobuf message google.protobuf.Duration
230
- */
231
- export const Duration = new Duration$Type();