@tarkahq/sdk 0.0.0-stage → 0.3.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 (130) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +69 -0
  3. package/README.md +700 -2
  4. package/api-source.json +38 -0
  5. package/dist/cjs/client.d.ts +114 -0
  6. package/dist/cjs/client.js +174 -0
  7. package/dist/cjs/errors.d.ts +27 -0
  8. package/dist/cjs/errors.js +78 -0
  9. package/dist/cjs/generated/google/api/annotations.d.ts +1 -0
  10. package/dist/cjs/generated/google/api/annotations.js +10 -0
  11. package/dist/cjs/generated/google/api/http.d.ts +395 -0
  12. package/dist/cjs/generated/google/api/http.js +421 -0
  13. package/dist/cjs/generated/google/protobuf/descriptor.d.ts +873 -0
  14. package/dist/cjs/generated/google/protobuf/descriptor.js +3992 -0
  15. package/dist/cjs/generated/google/protobuf/empty.d.ts +35 -0
  16. package/dist/cjs/generated/google/protobuf/empty.js +58 -0
  17. package/dist/cjs/generated/google/protobuf/struct.d.ts +127 -0
  18. package/dist/cjs/generated/google/protobuf/struct.js +529 -0
  19. package/dist/cjs/generated/google/protobuf/timestamp.d.ts +128 -0
  20. package/dist/cjs/generated/google/protobuf/timestamp.js +95 -0
  21. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  22. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.js +10 -0
  23. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  24. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.js +4874 -0
  25. package/dist/cjs/generated/tarka/access/v1/access.d.ts +322 -0
  26. package/dist/cjs/generated/tarka/access/v1/access.js +2979 -0
  27. package/dist/cjs/generated/tarka/channels/v1/channels.d.ts +370 -0
  28. package/dist/cjs/generated/tarka/channels/v1/channels.js +3603 -0
  29. package/dist/cjs/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  30. package/dist/cjs/generated/tarka/gateway/v1/gateway.js +8081 -0
  31. package/dist/cjs/generated/tarka/iam/v1/iam.d.ts +1291 -0
  32. package/dist/cjs/generated/tarka/iam/v1/iam.js +13207 -0
  33. package/dist/cjs/generated/tarka/inference/v1/inference.d.ts +699 -0
  34. package/dist/cjs/generated/tarka/inference/v1/inference.js +7058 -0
  35. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  36. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.js +603 -0
  37. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  38. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.js +1588 -0
  39. package/dist/cjs/generated/tarka/provisioning/v1/job.d.ts +168 -0
  40. package/dist/cjs/generated/tarka/provisioning/v1/job.js +1505 -0
  41. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  42. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.js +19501 -0
  43. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  44. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.js +856 -0
  45. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  46. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.js +3203 -0
  47. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  48. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.js +3920 -0
  49. package/dist/cjs/grpc.d.ts +12 -0
  50. package/dist/cjs/grpc.js +55 -0
  51. package/dist/cjs/index.d.ts +6 -0
  52. package/dist/cjs/index.js +21 -0
  53. package/dist/cjs/package.json +1 -0
  54. package/dist/cjs/resources/inference.d.ts +293 -0
  55. package/dist/cjs/resources/inference.js +451 -0
  56. package/dist/cjs/resources/provisioning.d.ts +389 -0
  57. package/dist/cjs/resources/provisioning.js +552 -0
  58. package/dist/cjs/resources/sandboxes.d.ts +360 -0
  59. package/dist/cjs/resources/sandboxes.js +732 -0
  60. package/dist/cjs/rpc-types.d.ts +36 -0
  61. package/dist/cjs/rpc-types.js +29 -0
  62. package/dist/cjs/runtime.d.ts +99 -0
  63. package/dist/cjs/runtime.js +473 -0
  64. package/dist/cjs/transport.d.ts +60 -0
  65. package/dist/cjs/transport.js +114 -0
  66. package/dist/cjs/types.d.ts +309 -0
  67. package/dist/cjs/types.js +2 -0
  68. package/dist/esm/client.d.ts +114 -0
  69. package/dist/esm/client.js +169 -0
  70. package/dist/esm/errors.d.ts +27 -0
  71. package/dist/esm/errors.js +71 -0
  72. package/dist/esm/generated/google/api/annotations.d.ts +1 -0
  73. package/dist/esm/generated/google/api/annotations.js +7 -0
  74. package/dist/esm/generated/google/api/http.d.ts +395 -0
  75. package/dist/esm/generated/google/api/http.js +418 -0
  76. package/dist/esm/generated/google/protobuf/descriptor.d.ts +873 -0
  77. package/dist/esm/generated/google/protobuf/descriptor.js +3977 -0
  78. package/dist/esm/generated/google/protobuf/empty.d.ts +35 -0
  79. package/dist/esm/generated/google/protobuf/empty.js +55 -0
  80. package/dist/esm/generated/google/protobuf/struct.d.ts +127 -0
  81. package/dist/esm/generated/google/protobuf/struct.js +524 -0
  82. package/dist/esm/generated/google/protobuf/timestamp.d.ts +128 -0
  83. package/dist/esm/generated/google/protobuf/timestamp.js +92 -0
  84. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  85. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.js +7 -0
  86. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  87. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.js +4859 -0
  88. package/dist/esm/generated/tarka/access/v1/access.d.ts +322 -0
  89. package/dist/esm/generated/tarka/access/v1/access.js +2976 -0
  90. package/dist/esm/generated/tarka/channels/v1/channels.d.ts +370 -0
  91. package/dist/esm/generated/tarka/channels/v1/channels.js +3600 -0
  92. package/dist/esm/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  93. package/dist/esm/generated/tarka/gateway/v1/gateway.js +8077 -0
  94. package/dist/esm/generated/tarka/iam/v1/iam.d.ts +1291 -0
  95. package/dist/esm/generated/tarka/iam/v1/iam.js +13203 -0
  96. package/dist/esm/generated/tarka/inference/v1/inference.d.ts +699 -0
  97. package/dist/esm/generated/tarka/inference/v1/inference.js +7055 -0
  98. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  99. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.js +600 -0
  100. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  101. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.js +1585 -0
  102. package/dist/esm/generated/tarka/provisioning/v1/job.d.ts +168 -0
  103. package/dist/esm/generated/tarka/provisioning/v1/job.js +1500 -0
  104. package/dist/esm/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  105. package/dist/esm/generated/tarka/provisioning/v1/provisioning.js +19496 -0
  106. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  107. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.js +853 -0
  108. package/dist/esm/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  109. package/dist/esm/generated/tarka/provisioning/v1/sandbox.js +3192 -0
  110. package/dist/esm/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  111. package/dist/esm/generated/tarka/provisioning/v1/source_builds.js +3917 -0
  112. package/dist/esm/grpc.d.ts +12 -0
  113. package/dist/esm/grpc.js +11 -0
  114. package/dist/esm/index.d.ts +6 -0
  115. package/dist/esm/index.js +4 -0
  116. package/dist/esm/resources/inference.d.ts +293 -0
  117. package/dist/esm/resources/inference.js +437 -0
  118. package/dist/esm/resources/provisioning.d.ts +389 -0
  119. package/dist/esm/resources/provisioning.js +531 -0
  120. package/dist/esm/resources/sandboxes.d.ts +360 -0
  121. package/dist/esm/resources/sandboxes.js +718 -0
  122. package/dist/esm/rpc-types.d.ts +36 -0
  123. package/dist/esm/rpc-types.js +26 -0
  124. package/dist/esm/runtime.d.ts +99 -0
  125. package/dist/esm/runtime.js +466 -0
  126. package/dist/esm/transport.d.ts +60 -0
  127. package/dist/esm/transport.js +110 -0
  128. package/dist/esm/types.d.ts +309 -0
  129. package/dist/esm/types.js +1 -0
  130. package/package.json +155 -4
@@ -0,0 +1,3920 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.4
5
+ // protoc v3.19.1
6
+ // source: tarka/provisioning/v1/source_builds.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GetSourceBuildLogsResponse = exports.SourceBuildLogChunk = exports.GetSourceBuildLogsRequest = exports.SourceBuild_ImagesEntry = exports.SourceBuild = exports.ListSourceBuildsResponse = exports.ListSourceBuildsRequest = exports.CancelSourceBuildRequest = exports.GetSourceBuildRequest = exports.StartSourceBuildRequest = exports.ListSourceTargetsResponse = exports.ListSourceTargetsRequest = exports.SourceTarget = exports.PutSourceTargetRequest = exports.PrepareSourceDeploymentResponse_ImagesEntry = exports.PrepareSourceDeploymentResponse = exports.PrepareSourceDeploymentRequest = exports.PreviewSourceResponse = exports.PreviewSourceRequest = exports.GetSourceCapabilitiesResponse = exports.GetSourceCapabilitiesRequest = exports.SourceBuildConfig = exports.SourceBuildService = exports.ConnectHostedGitSourceRequest = exports.DisconnectSourceConnectionRequest = exports.ListSourceConnectionsResponse = exports.ListSourceConnectionsRequest = exports.SourceConnection = exports.SourceRepository = exports.ConnectGitHubSourceRequest = exports.ListGitHubSourceRepositoriesResponse = exports.GitHubSourceRepository = exports.ListGitHubSourceRepositoriesRequest = exports.ListGitHubSourceInstallationsResponse = exports.GitHubSourceInstallation = exports.ListGitHubSourceInstallationsRequest = exports.GitHubSourceAuthorization = exports.StartGitHubSourceAuthorizationRequest = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const timestamp_js_1 = require("../../../google/protobuf/timestamp.js");
12
+ exports.protobufPackage = "tarka.provisioning.v1";
13
+ function createBaseStartGitHubSourceAuthorizationRequest() {
14
+ return { orgId: "" };
15
+ }
16
+ exports.StartGitHubSourceAuthorizationRequest = {
17
+ encode(message, writer = new wire_1.BinaryWriter()) {
18
+ if (message.orgId !== "") {
19
+ writer.uint32(10).string(message.orgId);
20
+ }
21
+ return writer;
22
+ },
23
+ decode(input, length) {
24
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
25
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
26
+ if (previousRecursionDepth >= 100) {
27
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
28
+ }
29
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
30
+ try {
31
+ const end = length === undefined ? reader.len : reader.pos + length;
32
+ const message = createBaseStartGitHubSourceAuthorizationRequest();
33
+ while (reader.pos < end) {
34
+ const tag = reader.uint32();
35
+ switch (tag >>> 3) {
36
+ case 1: {
37
+ if (tag !== 10) {
38
+ break;
39
+ }
40
+ message.orgId = reader.string();
41
+ continue;
42
+ }
43
+ }
44
+ if ((tag & 7) === 4 || tag === 0) {
45
+ break;
46
+ }
47
+ reader.skip(tag & 7);
48
+ }
49
+ return message;
50
+ }
51
+ finally {
52
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
53
+ }
54
+ },
55
+ fromJSON(object) {
56
+ return {
57
+ orgId: isSet(object.orgId)
58
+ ? globalThis.String(object.orgId)
59
+ : isSet(object.org_id)
60
+ ? globalThis.String(object.org_id)
61
+ : "",
62
+ };
63
+ },
64
+ toJSON(message) {
65
+ const obj = {};
66
+ if (message.orgId !== "") {
67
+ obj.orgId = message.orgId;
68
+ }
69
+ return obj;
70
+ },
71
+ create(base) {
72
+ return exports.StartGitHubSourceAuthorizationRequest.fromPartial(base ?? {});
73
+ },
74
+ fromPartial(object) {
75
+ const message = createBaseStartGitHubSourceAuthorizationRequest();
76
+ message.orgId = object.orgId ?? "";
77
+ return message;
78
+ },
79
+ };
80
+ function createBaseGitHubSourceAuthorization() {
81
+ return { id: "", authorizationUrl: "", expiresAt: undefined };
82
+ }
83
+ exports.GitHubSourceAuthorization = {
84
+ encode(message, writer = new wire_1.BinaryWriter()) {
85
+ if (message.id !== "") {
86
+ writer.uint32(10).string(message.id);
87
+ }
88
+ if (message.authorizationUrl !== "") {
89
+ writer.uint32(18).string(message.authorizationUrl);
90
+ }
91
+ if (message.expiresAt !== undefined) {
92
+ timestamp_js_1.Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(26).fork()).join();
93
+ }
94
+ return writer;
95
+ },
96
+ decode(input, length) {
97
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
98
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
99
+ if (previousRecursionDepth >= 100) {
100
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
101
+ }
102
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
103
+ try {
104
+ const end = length === undefined ? reader.len : reader.pos + length;
105
+ const message = createBaseGitHubSourceAuthorization();
106
+ while (reader.pos < end) {
107
+ const tag = reader.uint32();
108
+ switch (tag >>> 3) {
109
+ case 1: {
110
+ if (tag !== 10) {
111
+ break;
112
+ }
113
+ message.id = reader.string();
114
+ continue;
115
+ }
116
+ case 2: {
117
+ if (tag !== 18) {
118
+ break;
119
+ }
120
+ message.authorizationUrl = reader.string();
121
+ continue;
122
+ }
123
+ case 3: {
124
+ if (tag !== 26) {
125
+ break;
126
+ }
127
+ message.expiresAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
128
+ continue;
129
+ }
130
+ }
131
+ if ((tag & 7) === 4 || tag === 0) {
132
+ break;
133
+ }
134
+ reader.skip(tag & 7);
135
+ }
136
+ return message;
137
+ }
138
+ finally {
139
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
140
+ }
141
+ },
142
+ fromJSON(object) {
143
+ return {
144
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
145
+ authorizationUrl: isSet(object.authorizationUrl)
146
+ ? globalThis.String(object.authorizationUrl)
147
+ : isSet(object.authorization_url)
148
+ ? globalThis.String(object.authorization_url)
149
+ : "",
150
+ expiresAt: isSet(object.expiresAt)
151
+ ? fromJsonTimestamp(object.expiresAt)
152
+ : isSet(object.expires_at)
153
+ ? fromJsonTimestamp(object.expires_at)
154
+ : undefined,
155
+ };
156
+ },
157
+ toJSON(message) {
158
+ const obj = {};
159
+ if (message.id !== "") {
160
+ obj.id = message.id;
161
+ }
162
+ if (message.authorizationUrl !== "") {
163
+ obj.authorizationUrl = message.authorizationUrl;
164
+ }
165
+ if (message.expiresAt !== undefined) {
166
+ obj.expiresAt = message.expiresAt.toISOString();
167
+ }
168
+ return obj;
169
+ },
170
+ create(base) {
171
+ return exports.GitHubSourceAuthorization.fromPartial(base ?? {});
172
+ },
173
+ fromPartial(object) {
174
+ const message = createBaseGitHubSourceAuthorization();
175
+ message.id = object.id ?? "";
176
+ message.authorizationUrl = object.authorizationUrl ?? "";
177
+ message.expiresAt = object.expiresAt ?? undefined;
178
+ return message;
179
+ },
180
+ };
181
+ function createBaseListGitHubSourceInstallationsRequest() {
182
+ return { orgId: "", authorizationId: "" };
183
+ }
184
+ exports.ListGitHubSourceInstallationsRequest = {
185
+ encode(message, writer = new wire_1.BinaryWriter()) {
186
+ if (message.orgId !== "") {
187
+ writer.uint32(10).string(message.orgId);
188
+ }
189
+ if (message.authorizationId !== "") {
190
+ writer.uint32(18).string(message.authorizationId);
191
+ }
192
+ return writer;
193
+ },
194
+ decode(input, length) {
195
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
196
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
197
+ if (previousRecursionDepth >= 100) {
198
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
199
+ }
200
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
201
+ try {
202
+ const end = length === undefined ? reader.len : reader.pos + length;
203
+ const message = createBaseListGitHubSourceInstallationsRequest();
204
+ while (reader.pos < end) {
205
+ const tag = reader.uint32();
206
+ switch (tag >>> 3) {
207
+ case 1: {
208
+ if (tag !== 10) {
209
+ break;
210
+ }
211
+ message.orgId = reader.string();
212
+ continue;
213
+ }
214
+ case 2: {
215
+ if (tag !== 18) {
216
+ break;
217
+ }
218
+ message.authorizationId = reader.string();
219
+ continue;
220
+ }
221
+ }
222
+ if ((tag & 7) === 4 || tag === 0) {
223
+ break;
224
+ }
225
+ reader.skip(tag & 7);
226
+ }
227
+ return message;
228
+ }
229
+ finally {
230
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
231
+ }
232
+ },
233
+ fromJSON(object) {
234
+ return {
235
+ orgId: isSet(object.orgId)
236
+ ? globalThis.String(object.orgId)
237
+ : isSet(object.org_id)
238
+ ? globalThis.String(object.org_id)
239
+ : "",
240
+ authorizationId: isSet(object.authorizationId)
241
+ ? globalThis.String(object.authorizationId)
242
+ : isSet(object.authorization_id)
243
+ ? globalThis.String(object.authorization_id)
244
+ : "",
245
+ };
246
+ },
247
+ toJSON(message) {
248
+ const obj = {};
249
+ if (message.orgId !== "") {
250
+ obj.orgId = message.orgId;
251
+ }
252
+ if (message.authorizationId !== "") {
253
+ obj.authorizationId = message.authorizationId;
254
+ }
255
+ return obj;
256
+ },
257
+ create(base) {
258
+ return exports.ListGitHubSourceInstallationsRequest.fromPartial(base ?? {});
259
+ },
260
+ fromPartial(object) {
261
+ const message = createBaseListGitHubSourceInstallationsRequest();
262
+ message.orgId = object.orgId ?? "";
263
+ message.authorizationId = object.authorizationId ?? "";
264
+ return message;
265
+ },
266
+ };
267
+ function createBaseGitHubSourceInstallation() {
268
+ return { id: 0n, account: "" };
269
+ }
270
+ exports.GitHubSourceInstallation = {
271
+ encode(message, writer = new wire_1.BinaryWriter()) {
272
+ if (message.id !== 0n) {
273
+ if (BigInt.asIntN(64, message.id) !== message.id) {
274
+ throw new globalThis.Error("value provided for field message.id of type int64 too large");
275
+ }
276
+ writer.uint32(8).int64(message.id);
277
+ }
278
+ if (message.account !== "") {
279
+ writer.uint32(18).string(message.account);
280
+ }
281
+ return writer;
282
+ },
283
+ decode(input, length) {
284
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
285
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
286
+ if (previousRecursionDepth >= 100) {
287
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
288
+ }
289
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
290
+ try {
291
+ const end = length === undefined ? reader.len : reader.pos + length;
292
+ const message = createBaseGitHubSourceInstallation();
293
+ while (reader.pos < end) {
294
+ const tag = reader.uint32();
295
+ switch (tag >>> 3) {
296
+ case 1: {
297
+ if (tag !== 8) {
298
+ break;
299
+ }
300
+ message.id = reader.int64();
301
+ continue;
302
+ }
303
+ case 2: {
304
+ if (tag !== 18) {
305
+ break;
306
+ }
307
+ message.account = reader.string();
308
+ continue;
309
+ }
310
+ }
311
+ if ((tag & 7) === 4 || tag === 0) {
312
+ break;
313
+ }
314
+ reader.skip(tag & 7);
315
+ }
316
+ return message;
317
+ }
318
+ finally {
319
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
320
+ }
321
+ },
322
+ fromJSON(object) {
323
+ return {
324
+ id: isSet(object.id) ? BigInt(object.id) : 0n,
325
+ account: isSet(object.account) ? globalThis.String(object.account) : "",
326
+ };
327
+ },
328
+ toJSON(message) {
329
+ const obj = {};
330
+ if (message.id !== 0n) {
331
+ obj.id = message.id.toString();
332
+ }
333
+ if (message.account !== "") {
334
+ obj.account = message.account;
335
+ }
336
+ return obj;
337
+ },
338
+ create(base) {
339
+ return exports.GitHubSourceInstallation.fromPartial(base ?? {});
340
+ },
341
+ fromPartial(object) {
342
+ const message = createBaseGitHubSourceInstallation();
343
+ message.id = (object.id !== undefined && object.id !== null) ? BigInt(object.id) : 0n;
344
+ message.account = object.account ?? "";
345
+ return message;
346
+ },
347
+ };
348
+ function createBaseListGitHubSourceInstallationsResponse() {
349
+ return { installations: [], installationUrl: "" };
350
+ }
351
+ exports.ListGitHubSourceInstallationsResponse = {
352
+ encode(message, writer = new wire_1.BinaryWriter()) {
353
+ for (const v of message.installations) {
354
+ exports.GitHubSourceInstallation.encode(v, writer.uint32(10).fork()).join();
355
+ }
356
+ if (message.installationUrl !== "") {
357
+ writer.uint32(18).string(message.installationUrl);
358
+ }
359
+ return writer;
360
+ },
361
+ decode(input, length) {
362
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
363
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
364
+ if (previousRecursionDepth >= 100) {
365
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
366
+ }
367
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
368
+ try {
369
+ const end = length === undefined ? reader.len : reader.pos + length;
370
+ const message = createBaseListGitHubSourceInstallationsResponse();
371
+ while (reader.pos < end) {
372
+ const tag = reader.uint32();
373
+ switch (tag >>> 3) {
374
+ case 1: {
375
+ if (tag !== 10) {
376
+ break;
377
+ }
378
+ message.installations.push(exports.GitHubSourceInstallation.decode(reader, reader.uint32()));
379
+ continue;
380
+ }
381
+ case 2: {
382
+ if (tag !== 18) {
383
+ break;
384
+ }
385
+ message.installationUrl = reader.string();
386
+ continue;
387
+ }
388
+ }
389
+ if ((tag & 7) === 4 || tag === 0) {
390
+ break;
391
+ }
392
+ reader.skip(tag & 7);
393
+ }
394
+ return message;
395
+ }
396
+ finally {
397
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
398
+ }
399
+ },
400
+ fromJSON(object) {
401
+ return {
402
+ installations: globalThis.Array.isArray(object?.installations)
403
+ ? object.installations.map((e) => exports.GitHubSourceInstallation.fromJSON(e))
404
+ : [],
405
+ installationUrl: isSet(object.installationUrl)
406
+ ? globalThis.String(object.installationUrl)
407
+ : isSet(object.installation_url)
408
+ ? globalThis.String(object.installation_url)
409
+ : "",
410
+ };
411
+ },
412
+ toJSON(message) {
413
+ const obj = {};
414
+ if (message.installations?.length) {
415
+ obj.installations = message.installations.map((e) => exports.GitHubSourceInstallation.toJSON(e));
416
+ }
417
+ if (message.installationUrl !== "") {
418
+ obj.installationUrl = message.installationUrl;
419
+ }
420
+ return obj;
421
+ },
422
+ create(base) {
423
+ return exports.ListGitHubSourceInstallationsResponse.fromPartial(base ?? {});
424
+ },
425
+ fromPartial(object) {
426
+ const message = createBaseListGitHubSourceInstallationsResponse();
427
+ message.installations = object.installations?.map((e) => exports.GitHubSourceInstallation.fromPartial(e)) || [];
428
+ message.installationUrl = object.installationUrl ?? "";
429
+ return message;
430
+ },
431
+ };
432
+ function createBaseListGitHubSourceRepositoriesRequest() {
433
+ return { orgId: "", authorizationId: "", installationId: 0n };
434
+ }
435
+ exports.ListGitHubSourceRepositoriesRequest = {
436
+ encode(message, writer = new wire_1.BinaryWriter()) {
437
+ if (message.orgId !== "") {
438
+ writer.uint32(10).string(message.orgId);
439
+ }
440
+ if (message.authorizationId !== "") {
441
+ writer.uint32(18).string(message.authorizationId);
442
+ }
443
+ if (message.installationId !== 0n) {
444
+ if (BigInt.asIntN(64, message.installationId) !== message.installationId) {
445
+ throw new globalThis.Error("value provided for field message.installationId of type int64 too large");
446
+ }
447
+ writer.uint32(24).int64(message.installationId);
448
+ }
449
+ return writer;
450
+ },
451
+ decode(input, length) {
452
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
453
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
454
+ if (previousRecursionDepth >= 100) {
455
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
456
+ }
457
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
458
+ try {
459
+ const end = length === undefined ? reader.len : reader.pos + length;
460
+ const message = createBaseListGitHubSourceRepositoriesRequest();
461
+ while (reader.pos < end) {
462
+ const tag = reader.uint32();
463
+ switch (tag >>> 3) {
464
+ case 1: {
465
+ if (tag !== 10) {
466
+ break;
467
+ }
468
+ message.orgId = reader.string();
469
+ continue;
470
+ }
471
+ case 2: {
472
+ if (tag !== 18) {
473
+ break;
474
+ }
475
+ message.authorizationId = reader.string();
476
+ continue;
477
+ }
478
+ case 3: {
479
+ if (tag !== 24) {
480
+ break;
481
+ }
482
+ message.installationId = reader.int64();
483
+ continue;
484
+ }
485
+ }
486
+ if ((tag & 7) === 4 || tag === 0) {
487
+ break;
488
+ }
489
+ reader.skip(tag & 7);
490
+ }
491
+ return message;
492
+ }
493
+ finally {
494
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
495
+ }
496
+ },
497
+ fromJSON(object) {
498
+ return {
499
+ orgId: isSet(object.orgId)
500
+ ? globalThis.String(object.orgId)
501
+ : isSet(object.org_id)
502
+ ? globalThis.String(object.org_id)
503
+ : "",
504
+ authorizationId: isSet(object.authorizationId)
505
+ ? globalThis.String(object.authorizationId)
506
+ : isSet(object.authorization_id)
507
+ ? globalThis.String(object.authorization_id)
508
+ : "",
509
+ installationId: isSet(object.installationId)
510
+ ? BigInt(object.installationId)
511
+ : isSet(object.installation_id)
512
+ ? BigInt(object.installation_id)
513
+ : 0n,
514
+ };
515
+ },
516
+ toJSON(message) {
517
+ const obj = {};
518
+ if (message.orgId !== "") {
519
+ obj.orgId = message.orgId;
520
+ }
521
+ if (message.authorizationId !== "") {
522
+ obj.authorizationId = message.authorizationId;
523
+ }
524
+ if (message.installationId !== 0n) {
525
+ obj.installationId = message.installationId.toString();
526
+ }
527
+ return obj;
528
+ },
529
+ create(base) {
530
+ return exports.ListGitHubSourceRepositoriesRequest.fromPartial(base ?? {});
531
+ },
532
+ fromPartial(object) {
533
+ const message = createBaseListGitHubSourceRepositoriesRequest();
534
+ message.orgId = object.orgId ?? "";
535
+ message.authorizationId = object.authorizationId ?? "";
536
+ message.installationId = (object.installationId !== undefined && object.installationId !== null)
537
+ ? BigInt(object.installationId)
538
+ : 0n;
539
+ return message;
540
+ },
541
+ };
542
+ function createBaseGitHubSourceRepository() {
543
+ return { id: 0n, fullName: "", defaultBranch: "", private: false };
544
+ }
545
+ exports.GitHubSourceRepository = {
546
+ encode(message, writer = new wire_1.BinaryWriter()) {
547
+ if (message.id !== 0n) {
548
+ if (BigInt.asIntN(64, message.id) !== message.id) {
549
+ throw new globalThis.Error("value provided for field message.id of type int64 too large");
550
+ }
551
+ writer.uint32(8).int64(message.id);
552
+ }
553
+ if (message.fullName !== "") {
554
+ writer.uint32(18).string(message.fullName);
555
+ }
556
+ if (message.defaultBranch !== "") {
557
+ writer.uint32(26).string(message.defaultBranch);
558
+ }
559
+ if (message.private !== false) {
560
+ writer.uint32(32).bool(message.private);
561
+ }
562
+ return writer;
563
+ },
564
+ decode(input, length) {
565
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
566
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
567
+ if (previousRecursionDepth >= 100) {
568
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
569
+ }
570
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
571
+ try {
572
+ const end = length === undefined ? reader.len : reader.pos + length;
573
+ const message = createBaseGitHubSourceRepository();
574
+ while (reader.pos < end) {
575
+ const tag = reader.uint32();
576
+ switch (tag >>> 3) {
577
+ case 1: {
578
+ if (tag !== 8) {
579
+ break;
580
+ }
581
+ message.id = reader.int64();
582
+ continue;
583
+ }
584
+ case 2: {
585
+ if (tag !== 18) {
586
+ break;
587
+ }
588
+ message.fullName = reader.string();
589
+ continue;
590
+ }
591
+ case 3: {
592
+ if (tag !== 26) {
593
+ break;
594
+ }
595
+ message.defaultBranch = reader.string();
596
+ continue;
597
+ }
598
+ case 4: {
599
+ if (tag !== 32) {
600
+ break;
601
+ }
602
+ message.private = reader.bool();
603
+ continue;
604
+ }
605
+ }
606
+ if ((tag & 7) === 4 || tag === 0) {
607
+ break;
608
+ }
609
+ reader.skip(tag & 7);
610
+ }
611
+ return message;
612
+ }
613
+ finally {
614
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
615
+ }
616
+ },
617
+ fromJSON(object) {
618
+ return {
619
+ id: isSet(object.id) ? BigInt(object.id) : 0n,
620
+ fullName: isSet(object.fullName)
621
+ ? globalThis.String(object.fullName)
622
+ : isSet(object.full_name)
623
+ ? globalThis.String(object.full_name)
624
+ : "",
625
+ defaultBranch: isSet(object.defaultBranch)
626
+ ? globalThis.String(object.defaultBranch)
627
+ : isSet(object.default_branch)
628
+ ? globalThis.String(object.default_branch)
629
+ : "",
630
+ private: isSet(object.private) ? globalThis.Boolean(object.private) : false,
631
+ };
632
+ },
633
+ toJSON(message) {
634
+ const obj = {};
635
+ if (message.id !== 0n) {
636
+ obj.id = message.id.toString();
637
+ }
638
+ if (message.fullName !== "") {
639
+ obj.fullName = message.fullName;
640
+ }
641
+ if (message.defaultBranch !== "") {
642
+ obj.defaultBranch = message.defaultBranch;
643
+ }
644
+ if (message.private !== false) {
645
+ obj.private = message.private;
646
+ }
647
+ return obj;
648
+ },
649
+ create(base) {
650
+ return exports.GitHubSourceRepository.fromPartial(base ?? {});
651
+ },
652
+ fromPartial(object) {
653
+ const message = createBaseGitHubSourceRepository();
654
+ message.id = (object.id !== undefined && object.id !== null) ? BigInt(object.id) : 0n;
655
+ message.fullName = object.fullName ?? "";
656
+ message.defaultBranch = object.defaultBranch ?? "";
657
+ message.private = object.private ?? false;
658
+ return message;
659
+ },
660
+ };
661
+ function createBaseListGitHubSourceRepositoriesResponse() {
662
+ return { repositories: [] };
663
+ }
664
+ exports.ListGitHubSourceRepositoriesResponse = {
665
+ encode(message, writer = new wire_1.BinaryWriter()) {
666
+ for (const v of message.repositories) {
667
+ exports.GitHubSourceRepository.encode(v, writer.uint32(10).fork()).join();
668
+ }
669
+ return writer;
670
+ },
671
+ decode(input, length) {
672
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
673
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
674
+ if (previousRecursionDepth >= 100) {
675
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
676
+ }
677
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
678
+ try {
679
+ const end = length === undefined ? reader.len : reader.pos + length;
680
+ const message = createBaseListGitHubSourceRepositoriesResponse();
681
+ while (reader.pos < end) {
682
+ const tag = reader.uint32();
683
+ switch (tag >>> 3) {
684
+ case 1: {
685
+ if (tag !== 10) {
686
+ break;
687
+ }
688
+ message.repositories.push(exports.GitHubSourceRepository.decode(reader, reader.uint32()));
689
+ continue;
690
+ }
691
+ }
692
+ if ((tag & 7) === 4 || tag === 0) {
693
+ break;
694
+ }
695
+ reader.skip(tag & 7);
696
+ }
697
+ return message;
698
+ }
699
+ finally {
700
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
701
+ }
702
+ },
703
+ fromJSON(object) {
704
+ return {
705
+ repositories: globalThis.Array.isArray(object?.repositories)
706
+ ? object.repositories.map((e) => exports.GitHubSourceRepository.fromJSON(e))
707
+ : [],
708
+ };
709
+ },
710
+ toJSON(message) {
711
+ const obj = {};
712
+ if (message.repositories?.length) {
713
+ obj.repositories = message.repositories.map((e) => exports.GitHubSourceRepository.toJSON(e));
714
+ }
715
+ return obj;
716
+ },
717
+ create(base) {
718
+ return exports.ListGitHubSourceRepositoriesResponse.fromPartial(base ?? {});
719
+ },
720
+ fromPartial(object) {
721
+ const message = createBaseListGitHubSourceRepositoriesResponse();
722
+ message.repositories = object.repositories?.map((e) => exports.GitHubSourceRepository.fromPartial(e)) || [];
723
+ return message;
724
+ },
725
+ };
726
+ function createBaseConnectGitHubSourceRequest() {
727
+ return { orgId: "", authorizationId: "", installationId: 0n, repositoryIds: [] };
728
+ }
729
+ exports.ConnectGitHubSourceRequest = {
730
+ encode(message, writer = new wire_1.BinaryWriter()) {
731
+ if (message.orgId !== "") {
732
+ writer.uint32(10).string(message.orgId);
733
+ }
734
+ if (message.authorizationId !== "") {
735
+ writer.uint32(18).string(message.authorizationId);
736
+ }
737
+ if (message.installationId !== 0n) {
738
+ if (BigInt.asIntN(64, message.installationId) !== message.installationId) {
739
+ throw new globalThis.Error("value provided for field message.installationId of type int64 too large");
740
+ }
741
+ writer.uint32(24).int64(message.installationId);
742
+ }
743
+ for (const v of message.repositoryIds) {
744
+ if (BigInt.asIntN(64, v) !== v) {
745
+ throw new globalThis.Error("value provided for field v! of type int64 too large");
746
+ }
747
+ writer.uint32(32).int64(v);
748
+ }
749
+ return writer;
750
+ },
751
+ decode(input, length) {
752
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
753
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
754
+ if (previousRecursionDepth >= 100) {
755
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
756
+ }
757
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
758
+ try {
759
+ const end = length === undefined ? reader.len : reader.pos + length;
760
+ const message = createBaseConnectGitHubSourceRequest();
761
+ while (reader.pos < end) {
762
+ const tag = reader.uint32();
763
+ switch (tag >>> 3) {
764
+ case 1: {
765
+ if (tag !== 10) {
766
+ break;
767
+ }
768
+ message.orgId = reader.string();
769
+ continue;
770
+ }
771
+ case 2: {
772
+ if (tag !== 18) {
773
+ break;
774
+ }
775
+ message.authorizationId = reader.string();
776
+ continue;
777
+ }
778
+ case 3: {
779
+ if (tag !== 24) {
780
+ break;
781
+ }
782
+ message.installationId = reader.int64();
783
+ continue;
784
+ }
785
+ case 4: {
786
+ if (tag === 32) {
787
+ message.repositoryIds.push(reader.int64());
788
+ continue;
789
+ }
790
+ if (tag === 34) {
791
+ const end2 = reader.uint32() + reader.pos;
792
+ while (reader.pos < end2) {
793
+ message.repositoryIds.push(reader.int64());
794
+ }
795
+ continue;
796
+ }
797
+ break;
798
+ }
799
+ }
800
+ if ((tag & 7) === 4 || tag === 0) {
801
+ break;
802
+ }
803
+ reader.skip(tag & 7);
804
+ }
805
+ return message;
806
+ }
807
+ finally {
808
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
809
+ }
810
+ },
811
+ fromJSON(object) {
812
+ return {
813
+ orgId: isSet(object.orgId)
814
+ ? globalThis.String(object.orgId)
815
+ : isSet(object.org_id)
816
+ ? globalThis.String(object.org_id)
817
+ : "",
818
+ authorizationId: isSet(object.authorizationId)
819
+ ? globalThis.String(object.authorizationId)
820
+ : isSet(object.authorization_id)
821
+ ? globalThis.String(object.authorization_id)
822
+ : "",
823
+ installationId: isSet(object.installationId)
824
+ ? BigInt(object.installationId)
825
+ : isSet(object.installation_id)
826
+ ? BigInt(object.installation_id)
827
+ : 0n,
828
+ repositoryIds: globalThis.Array.isArray(object?.repositoryIds)
829
+ ? object.repositoryIds.map((e) => BigInt(e))
830
+ : globalThis.Array.isArray(object?.repository_ids)
831
+ ? object.repository_ids.map((e) => BigInt(e))
832
+ : [],
833
+ };
834
+ },
835
+ toJSON(message) {
836
+ const obj = {};
837
+ if (message.orgId !== "") {
838
+ obj.orgId = message.orgId;
839
+ }
840
+ if (message.authorizationId !== "") {
841
+ obj.authorizationId = message.authorizationId;
842
+ }
843
+ if (message.installationId !== 0n) {
844
+ obj.installationId = message.installationId.toString();
845
+ }
846
+ if (message.repositoryIds?.length) {
847
+ obj.repositoryIds = message.repositoryIds.map((e) => e.toString());
848
+ }
849
+ return obj;
850
+ },
851
+ create(base) {
852
+ return exports.ConnectGitHubSourceRequest.fromPartial(base ?? {});
853
+ },
854
+ fromPartial(object) {
855
+ const message = createBaseConnectGitHubSourceRequest();
856
+ message.orgId = object.orgId ?? "";
857
+ message.authorizationId = object.authorizationId ?? "";
858
+ message.installationId = (object.installationId !== undefined && object.installationId !== null)
859
+ ? BigInt(object.installationId)
860
+ : 0n;
861
+ message.repositoryIds = object.repositoryIds?.map((e) => BigInt(e)) || [];
862
+ return message;
863
+ },
864
+ };
865
+ function createBaseSourceRepository() {
866
+ return { id: "", fullName: "", defaultBranch: "", status: "" };
867
+ }
868
+ exports.SourceRepository = {
869
+ encode(message, writer = new wire_1.BinaryWriter()) {
870
+ if (message.id !== "") {
871
+ writer.uint32(10).string(message.id);
872
+ }
873
+ if (message.fullName !== "") {
874
+ writer.uint32(18).string(message.fullName);
875
+ }
876
+ if (message.defaultBranch !== "") {
877
+ writer.uint32(26).string(message.defaultBranch);
878
+ }
879
+ if (message.status !== "") {
880
+ writer.uint32(34).string(message.status);
881
+ }
882
+ return writer;
883
+ },
884
+ decode(input, length) {
885
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
886
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
887
+ if (previousRecursionDepth >= 100) {
888
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
889
+ }
890
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
891
+ try {
892
+ const end = length === undefined ? reader.len : reader.pos + length;
893
+ const message = createBaseSourceRepository();
894
+ while (reader.pos < end) {
895
+ const tag = reader.uint32();
896
+ switch (tag >>> 3) {
897
+ case 1: {
898
+ if (tag !== 10) {
899
+ break;
900
+ }
901
+ message.id = reader.string();
902
+ continue;
903
+ }
904
+ case 2: {
905
+ if (tag !== 18) {
906
+ break;
907
+ }
908
+ message.fullName = reader.string();
909
+ continue;
910
+ }
911
+ case 3: {
912
+ if (tag !== 26) {
913
+ break;
914
+ }
915
+ message.defaultBranch = reader.string();
916
+ continue;
917
+ }
918
+ case 4: {
919
+ if (tag !== 34) {
920
+ break;
921
+ }
922
+ message.status = reader.string();
923
+ continue;
924
+ }
925
+ }
926
+ if ((tag & 7) === 4 || tag === 0) {
927
+ break;
928
+ }
929
+ reader.skip(tag & 7);
930
+ }
931
+ return message;
932
+ }
933
+ finally {
934
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
935
+ }
936
+ },
937
+ fromJSON(object) {
938
+ return {
939
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
940
+ fullName: isSet(object.fullName)
941
+ ? globalThis.String(object.fullName)
942
+ : isSet(object.full_name)
943
+ ? globalThis.String(object.full_name)
944
+ : "",
945
+ defaultBranch: isSet(object.defaultBranch)
946
+ ? globalThis.String(object.defaultBranch)
947
+ : isSet(object.default_branch)
948
+ ? globalThis.String(object.default_branch)
949
+ : "",
950
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
951
+ };
952
+ },
953
+ toJSON(message) {
954
+ const obj = {};
955
+ if (message.id !== "") {
956
+ obj.id = message.id;
957
+ }
958
+ if (message.fullName !== "") {
959
+ obj.fullName = message.fullName;
960
+ }
961
+ if (message.defaultBranch !== "") {
962
+ obj.defaultBranch = message.defaultBranch;
963
+ }
964
+ if (message.status !== "") {
965
+ obj.status = message.status;
966
+ }
967
+ return obj;
968
+ },
969
+ create(base) {
970
+ return exports.SourceRepository.fromPartial(base ?? {});
971
+ },
972
+ fromPartial(object) {
973
+ const message = createBaseSourceRepository();
974
+ message.id = object.id ?? "";
975
+ message.fullName = object.fullName ?? "";
976
+ message.defaultBranch = object.defaultBranch ?? "";
977
+ message.status = object.status ?? "";
978
+ return message;
979
+ },
980
+ };
981
+ function createBaseSourceConnection() {
982
+ return { id: "", provider: "", status: "", repositories: [] };
983
+ }
984
+ exports.SourceConnection = {
985
+ encode(message, writer = new wire_1.BinaryWriter()) {
986
+ if (message.id !== "") {
987
+ writer.uint32(10).string(message.id);
988
+ }
989
+ if (message.provider !== "") {
990
+ writer.uint32(18).string(message.provider);
991
+ }
992
+ if (message.status !== "") {
993
+ writer.uint32(26).string(message.status);
994
+ }
995
+ for (const v of message.repositories) {
996
+ exports.SourceRepository.encode(v, writer.uint32(34).fork()).join();
997
+ }
998
+ return writer;
999
+ },
1000
+ decode(input, length) {
1001
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1002
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1003
+ if (previousRecursionDepth >= 100) {
1004
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1005
+ }
1006
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1007
+ try {
1008
+ const end = length === undefined ? reader.len : reader.pos + length;
1009
+ const message = createBaseSourceConnection();
1010
+ while (reader.pos < end) {
1011
+ const tag = reader.uint32();
1012
+ switch (tag >>> 3) {
1013
+ case 1: {
1014
+ if (tag !== 10) {
1015
+ break;
1016
+ }
1017
+ message.id = reader.string();
1018
+ continue;
1019
+ }
1020
+ case 2: {
1021
+ if (tag !== 18) {
1022
+ break;
1023
+ }
1024
+ message.provider = reader.string();
1025
+ continue;
1026
+ }
1027
+ case 3: {
1028
+ if (tag !== 26) {
1029
+ break;
1030
+ }
1031
+ message.status = reader.string();
1032
+ continue;
1033
+ }
1034
+ case 4: {
1035
+ if (tag !== 34) {
1036
+ break;
1037
+ }
1038
+ message.repositories.push(exports.SourceRepository.decode(reader, reader.uint32()));
1039
+ continue;
1040
+ }
1041
+ }
1042
+ if ((tag & 7) === 4 || tag === 0) {
1043
+ break;
1044
+ }
1045
+ reader.skip(tag & 7);
1046
+ }
1047
+ return message;
1048
+ }
1049
+ finally {
1050
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1051
+ }
1052
+ },
1053
+ fromJSON(object) {
1054
+ return {
1055
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1056
+ provider: isSet(object.provider) ? globalThis.String(object.provider) : "",
1057
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
1058
+ repositories: globalThis.Array.isArray(object?.repositories)
1059
+ ? object.repositories.map((e) => exports.SourceRepository.fromJSON(e))
1060
+ : [],
1061
+ };
1062
+ },
1063
+ toJSON(message) {
1064
+ const obj = {};
1065
+ if (message.id !== "") {
1066
+ obj.id = message.id;
1067
+ }
1068
+ if (message.provider !== "") {
1069
+ obj.provider = message.provider;
1070
+ }
1071
+ if (message.status !== "") {
1072
+ obj.status = message.status;
1073
+ }
1074
+ if (message.repositories?.length) {
1075
+ obj.repositories = message.repositories.map((e) => exports.SourceRepository.toJSON(e));
1076
+ }
1077
+ return obj;
1078
+ },
1079
+ create(base) {
1080
+ return exports.SourceConnection.fromPartial(base ?? {});
1081
+ },
1082
+ fromPartial(object) {
1083
+ const message = createBaseSourceConnection();
1084
+ message.id = object.id ?? "";
1085
+ message.provider = object.provider ?? "";
1086
+ message.status = object.status ?? "";
1087
+ message.repositories = object.repositories?.map((e) => exports.SourceRepository.fromPartial(e)) || [];
1088
+ return message;
1089
+ },
1090
+ };
1091
+ function createBaseListSourceConnectionsRequest() {
1092
+ return { orgId: "" };
1093
+ }
1094
+ exports.ListSourceConnectionsRequest = {
1095
+ encode(message, writer = new wire_1.BinaryWriter()) {
1096
+ if (message.orgId !== "") {
1097
+ writer.uint32(10).string(message.orgId);
1098
+ }
1099
+ return writer;
1100
+ },
1101
+ decode(input, length) {
1102
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1103
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1104
+ if (previousRecursionDepth >= 100) {
1105
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1106
+ }
1107
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1108
+ try {
1109
+ const end = length === undefined ? reader.len : reader.pos + length;
1110
+ const message = createBaseListSourceConnectionsRequest();
1111
+ while (reader.pos < end) {
1112
+ const tag = reader.uint32();
1113
+ switch (tag >>> 3) {
1114
+ case 1: {
1115
+ if (tag !== 10) {
1116
+ break;
1117
+ }
1118
+ message.orgId = reader.string();
1119
+ continue;
1120
+ }
1121
+ }
1122
+ if ((tag & 7) === 4 || tag === 0) {
1123
+ break;
1124
+ }
1125
+ reader.skip(tag & 7);
1126
+ }
1127
+ return message;
1128
+ }
1129
+ finally {
1130
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1131
+ }
1132
+ },
1133
+ fromJSON(object) {
1134
+ return {
1135
+ orgId: isSet(object.orgId)
1136
+ ? globalThis.String(object.orgId)
1137
+ : isSet(object.org_id)
1138
+ ? globalThis.String(object.org_id)
1139
+ : "",
1140
+ };
1141
+ },
1142
+ toJSON(message) {
1143
+ const obj = {};
1144
+ if (message.orgId !== "") {
1145
+ obj.orgId = message.orgId;
1146
+ }
1147
+ return obj;
1148
+ },
1149
+ create(base) {
1150
+ return exports.ListSourceConnectionsRequest.fromPartial(base ?? {});
1151
+ },
1152
+ fromPartial(object) {
1153
+ const message = createBaseListSourceConnectionsRequest();
1154
+ message.orgId = object.orgId ?? "";
1155
+ return message;
1156
+ },
1157
+ };
1158
+ function createBaseListSourceConnectionsResponse() {
1159
+ return { connections: [] };
1160
+ }
1161
+ exports.ListSourceConnectionsResponse = {
1162
+ encode(message, writer = new wire_1.BinaryWriter()) {
1163
+ for (const v of message.connections) {
1164
+ exports.SourceConnection.encode(v, writer.uint32(10).fork()).join();
1165
+ }
1166
+ return writer;
1167
+ },
1168
+ decode(input, length) {
1169
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1170
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1171
+ if (previousRecursionDepth >= 100) {
1172
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1173
+ }
1174
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1175
+ try {
1176
+ const end = length === undefined ? reader.len : reader.pos + length;
1177
+ const message = createBaseListSourceConnectionsResponse();
1178
+ while (reader.pos < end) {
1179
+ const tag = reader.uint32();
1180
+ switch (tag >>> 3) {
1181
+ case 1: {
1182
+ if (tag !== 10) {
1183
+ break;
1184
+ }
1185
+ message.connections.push(exports.SourceConnection.decode(reader, reader.uint32()));
1186
+ continue;
1187
+ }
1188
+ }
1189
+ if ((tag & 7) === 4 || tag === 0) {
1190
+ break;
1191
+ }
1192
+ reader.skip(tag & 7);
1193
+ }
1194
+ return message;
1195
+ }
1196
+ finally {
1197
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1198
+ }
1199
+ },
1200
+ fromJSON(object) {
1201
+ return {
1202
+ connections: globalThis.Array.isArray(object?.connections)
1203
+ ? object.connections.map((e) => exports.SourceConnection.fromJSON(e))
1204
+ : [],
1205
+ };
1206
+ },
1207
+ toJSON(message) {
1208
+ const obj = {};
1209
+ if (message.connections?.length) {
1210
+ obj.connections = message.connections.map((e) => exports.SourceConnection.toJSON(e));
1211
+ }
1212
+ return obj;
1213
+ },
1214
+ create(base) {
1215
+ return exports.ListSourceConnectionsResponse.fromPartial(base ?? {});
1216
+ },
1217
+ fromPartial(object) {
1218
+ const message = createBaseListSourceConnectionsResponse();
1219
+ message.connections = object.connections?.map((e) => exports.SourceConnection.fromPartial(e)) || [];
1220
+ return message;
1221
+ },
1222
+ };
1223
+ function createBaseDisconnectSourceConnectionRequest() {
1224
+ return { orgId: "", connectionId: "" };
1225
+ }
1226
+ exports.DisconnectSourceConnectionRequest = {
1227
+ encode(message, writer = new wire_1.BinaryWriter()) {
1228
+ if (message.orgId !== "") {
1229
+ writer.uint32(10).string(message.orgId);
1230
+ }
1231
+ if (message.connectionId !== "") {
1232
+ writer.uint32(18).string(message.connectionId);
1233
+ }
1234
+ return writer;
1235
+ },
1236
+ decode(input, length) {
1237
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1238
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1239
+ if (previousRecursionDepth >= 100) {
1240
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1241
+ }
1242
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1243
+ try {
1244
+ const end = length === undefined ? reader.len : reader.pos + length;
1245
+ const message = createBaseDisconnectSourceConnectionRequest();
1246
+ while (reader.pos < end) {
1247
+ const tag = reader.uint32();
1248
+ switch (tag >>> 3) {
1249
+ case 1: {
1250
+ if (tag !== 10) {
1251
+ break;
1252
+ }
1253
+ message.orgId = reader.string();
1254
+ continue;
1255
+ }
1256
+ case 2: {
1257
+ if (tag !== 18) {
1258
+ break;
1259
+ }
1260
+ message.connectionId = reader.string();
1261
+ continue;
1262
+ }
1263
+ }
1264
+ if ((tag & 7) === 4 || tag === 0) {
1265
+ break;
1266
+ }
1267
+ reader.skip(tag & 7);
1268
+ }
1269
+ return message;
1270
+ }
1271
+ finally {
1272
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1273
+ }
1274
+ },
1275
+ fromJSON(object) {
1276
+ return {
1277
+ orgId: isSet(object.orgId)
1278
+ ? globalThis.String(object.orgId)
1279
+ : isSet(object.org_id)
1280
+ ? globalThis.String(object.org_id)
1281
+ : "",
1282
+ connectionId: isSet(object.connectionId)
1283
+ ? globalThis.String(object.connectionId)
1284
+ : isSet(object.connection_id)
1285
+ ? globalThis.String(object.connection_id)
1286
+ : "",
1287
+ };
1288
+ },
1289
+ toJSON(message) {
1290
+ const obj = {};
1291
+ if (message.orgId !== "") {
1292
+ obj.orgId = message.orgId;
1293
+ }
1294
+ if (message.connectionId !== "") {
1295
+ obj.connectionId = message.connectionId;
1296
+ }
1297
+ return obj;
1298
+ },
1299
+ create(base) {
1300
+ return exports.DisconnectSourceConnectionRequest.fromPartial(base ?? {});
1301
+ },
1302
+ fromPartial(object) {
1303
+ const message = createBaseDisconnectSourceConnectionRequest();
1304
+ message.orgId = object.orgId ?? "";
1305
+ message.connectionId = object.connectionId ?? "";
1306
+ return message;
1307
+ },
1308
+ };
1309
+ function createBaseConnectHostedGitSourceRequest() {
1310
+ return { orgId: "", repositoryId: "" };
1311
+ }
1312
+ exports.ConnectHostedGitSourceRequest = {
1313
+ encode(message, writer = new wire_1.BinaryWriter()) {
1314
+ if (message.orgId !== "") {
1315
+ writer.uint32(10).string(message.orgId);
1316
+ }
1317
+ if (message.repositoryId !== "") {
1318
+ writer.uint32(18).string(message.repositoryId);
1319
+ }
1320
+ return writer;
1321
+ },
1322
+ decode(input, length) {
1323
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1324
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1325
+ if (previousRecursionDepth >= 100) {
1326
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1327
+ }
1328
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1329
+ try {
1330
+ const end = length === undefined ? reader.len : reader.pos + length;
1331
+ const message = createBaseConnectHostedGitSourceRequest();
1332
+ while (reader.pos < end) {
1333
+ const tag = reader.uint32();
1334
+ switch (tag >>> 3) {
1335
+ case 1: {
1336
+ if (tag !== 10) {
1337
+ break;
1338
+ }
1339
+ message.orgId = reader.string();
1340
+ continue;
1341
+ }
1342
+ case 2: {
1343
+ if (tag !== 18) {
1344
+ break;
1345
+ }
1346
+ message.repositoryId = reader.string();
1347
+ continue;
1348
+ }
1349
+ }
1350
+ if ((tag & 7) === 4 || tag === 0) {
1351
+ break;
1352
+ }
1353
+ reader.skip(tag & 7);
1354
+ }
1355
+ return message;
1356
+ }
1357
+ finally {
1358
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1359
+ }
1360
+ },
1361
+ fromJSON(object) {
1362
+ return {
1363
+ orgId: isSet(object.orgId)
1364
+ ? globalThis.String(object.orgId)
1365
+ : isSet(object.org_id)
1366
+ ? globalThis.String(object.org_id)
1367
+ : "",
1368
+ repositoryId: isSet(object.repositoryId)
1369
+ ? globalThis.String(object.repositoryId)
1370
+ : isSet(object.repository_id)
1371
+ ? globalThis.String(object.repository_id)
1372
+ : "",
1373
+ };
1374
+ },
1375
+ toJSON(message) {
1376
+ const obj = {};
1377
+ if (message.orgId !== "") {
1378
+ obj.orgId = message.orgId;
1379
+ }
1380
+ if (message.repositoryId !== "") {
1381
+ obj.repositoryId = message.repositoryId;
1382
+ }
1383
+ return obj;
1384
+ },
1385
+ create(base) {
1386
+ return exports.ConnectHostedGitSourceRequest.fromPartial(base ?? {});
1387
+ },
1388
+ fromPartial(object) {
1389
+ const message = createBaseConnectHostedGitSourceRequest();
1390
+ message.orgId = object.orgId ?? "";
1391
+ message.repositoryId = object.repositoryId ?? "";
1392
+ return message;
1393
+ },
1394
+ };
1395
+ function createBaseSourceBuildService() {
1396
+ return { name: "", context: "", dockerfile: "" };
1397
+ }
1398
+ exports.SourceBuildService = {
1399
+ encode(message, writer = new wire_1.BinaryWriter()) {
1400
+ if (message.name !== "") {
1401
+ writer.uint32(10).string(message.name);
1402
+ }
1403
+ if (message.context !== "") {
1404
+ writer.uint32(18).string(message.context);
1405
+ }
1406
+ if (message.dockerfile !== "") {
1407
+ writer.uint32(26).string(message.dockerfile);
1408
+ }
1409
+ return writer;
1410
+ },
1411
+ decode(input, length) {
1412
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1413
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1414
+ if (previousRecursionDepth >= 100) {
1415
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1416
+ }
1417
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1418
+ try {
1419
+ const end = length === undefined ? reader.len : reader.pos + length;
1420
+ const message = createBaseSourceBuildService();
1421
+ while (reader.pos < end) {
1422
+ const tag = reader.uint32();
1423
+ switch (tag >>> 3) {
1424
+ case 1: {
1425
+ if (tag !== 10) {
1426
+ break;
1427
+ }
1428
+ message.name = reader.string();
1429
+ continue;
1430
+ }
1431
+ case 2: {
1432
+ if (tag !== 18) {
1433
+ break;
1434
+ }
1435
+ message.context = reader.string();
1436
+ continue;
1437
+ }
1438
+ case 3: {
1439
+ if (tag !== 26) {
1440
+ break;
1441
+ }
1442
+ message.dockerfile = reader.string();
1443
+ continue;
1444
+ }
1445
+ }
1446
+ if ((tag & 7) === 4 || tag === 0) {
1447
+ break;
1448
+ }
1449
+ reader.skip(tag & 7);
1450
+ }
1451
+ return message;
1452
+ }
1453
+ finally {
1454
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1455
+ }
1456
+ },
1457
+ fromJSON(object) {
1458
+ return {
1459
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1460
+ context: isSet(object.context) ? globalThis.String(object.context) : "",
1461
+ dockerfile: isSet(object.dockerfile) ? globalThis.String(object.dockerfile) : "",
1462
+ };
1463
+ },
1464
+ toJSON(message) {
1465
+ const obj = {};
1466
+ if (message.name !== "") {
1467
+ obj.name = message.name;
1468
+ }
1469
+ if (message.context !== "") {
1470
+ obj.context = message.context;
1471
+ }
1472
+ if (message.dockerfile !== "") {
1473
+ obj.dockerfile = message.dockerfile;
1474
+ }
1475
+ return obj;
1476
+ },
1477
+ create(base) {
1478
+ return exports.SourceBuildService.fromPartial(base ?? {});
1479
+ },
1480
+ fromPartial(object) {
1481
+ const message = createBaseSourceBuildService();
1482
+ message.name = object.name ?? "";
1483
+ message.context = object.context ?? "";
1484
+ message.dockerfile = object.dockerfile ?? "";
1485
+ return message;
1486
+ },
1487
+ };
1488
+ function createBaseSourceBuildConfig() {
1489
+ return { services: [], composePath: "" };
1490
+ }
1491
+ exports.SourceBuildConfig = {
1492
+ encode(message, writer = new wire_1.BinaryWriter()) {
1493
+ for (const v of message.services) {
1494
+ exports.SourceBuildService.encode(v, writer.uint32(10).fork()).join();
1495
+ }
1496
+ if (message.composePath !== "") {
1497
+ writer.uint32(18).string(message.composePath);
1498
+ }
1499
+ return writer;
1500
+ },
1501
+ decode(input, length) {
1502
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1503
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1504
+ if (previousRecursionDepth >= 100) {
1505
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1506
+ }
1507
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1508
+ try {
1509
+ const end = length === undefined ? reader.len : reader.pos + length;
1510
+ const message = createBaseSourceBuildConfig();
1511
+ while (reader.pos < end) {
1512
+ const tag = reader.uint32();
1513
+ switch (tag >>> 3) {
1514
+ case 1: {
1515
+ if (tag !== 10) {
1516
+ break;
1517
+ }
1518
+ message.services.push(exports.SourceBuildService.decode(reader, reader.uint32()));
1519
+ continue;
1520
+ }
1521
+ case 2: {
1522
+ if (tag !== 18) {
1523
+ break;
1524
+ }
1525
+ message.composePath = reader.string();
1526
+ continue;
1527
+ }
1528
+ }
1529
+ if ((tag & 7) === 4 || tag === 0) {
1530
+ break;
1531
+ }
1532
+ reader.skip(tag & 7);
1533
+ }
1534
+ return message;
1535
+ }
1536
+ finally {
1537
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1538
+ }
1539
+ },
1540
+ fromJSON(object) {
1541
+ return {
1542
+ services: globalThis.Array.isArray(object?.services)
1543
+ ? object.services.map((e) => exports.SourceBuildService.fromJSON(e))
1544
+ : [],
1545
+ composePath: isSet(object.composePath)
1546
+ ? globalThis.String(object.composePath)
1547
+ : isSet(object.compose_path)
1548
+ ? globalThis.String(object.compose_path)
1549
+ : "",
1550
+ };
1551
+ },
1552
+ toJSON(message) {
1553
+ const obj = {};
1554
+ if (message.services?.length) {
1555
+ obj.services = message.services.map((e) => exports.SourceBuildService.toJSON(e));
1556
+ }
1557
+ if (message.composePath !== "") {
1558
+ obj.composePath = message.composePath;
1559
+ }
1560
+ return obj;
1561
+ },
1562
+ create(base) {
1563
+ return exports.SourceBuildConfig.fromPartial(base ?? {});
1564
+ },
1565
+ fromPartial(object) {
1566
+ const message = createBaseSourceBuildConfig();
1567
+ message.services = object.services?.map((e) => exports.SourceBuildService.fromPartial(e)) || [];
1568
+ message.composePath = object.composePath ?? "";
1569
+ return message;
1570
+ },
1571
+ };
1572
+ function createBaseGetSourceCapabilitiesRequest() {
1573
+ return { orgId: "" };
1574
+ }
1575
+ exports.GetSourceCapabilitiesRequest = {
1576
+ encode(message, writer = new wire_1.BinaryWriter()) {
1577
+ if (message.orgId !== "") {
1578
+ writer.uint32(10).string(message.orgId);
1579
+ }
1580
+ return writer;
1581
+ },
1582
+ decode(input, length) {
1583
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1584
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1585
+ if (previousRecursionDepth >= 100) {
1586
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1587
+ }
1588
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1589
+ try {
1590
+ const end = length === undefined ? reader.len : reader.pos + length;
1591
+ const message = createBaseGetSourceCapabilitiesRequest();
1592
+ while (reader.pos < end) {
1593
+ const tag = reader.uint32();
1594
+ switch (tag >>> 3) {
1595
+ case 1: {
1596
+ if (tag !== 10) {
1597
+ break;
1598
+ }
1599
+ message.orgId = reader.string();
1600
+ continue;
1601
+ }
1602
+ }
1603
+ if ((tag & 7) === 4 || tag === 0) {
1604
+ break;
1605
+ }
1606
+ reader.skip(tag & 7);
1607
+ }
1608
+ return message;
1609
+ }
1610
+ finally {
1611
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1612
+ }
1613
+ },
1614
+ fromJSON(object) {
1615
+ return {
1616
+ orgId: isSet(object.orgId)
1617
+ ? globalThis.String(object.orgId)
1618
+ : isSet(object.org_id)
1619
+ ? globalThis.String(object.org_id)
1620
+ : "",
1621
+ };
1622
+ },
1623
+ toJSON(message) {
1624
+ const obj = {};
1625
+ if (message.orgId !== "") {
1626
+ obj.orgId = message.orgId;
1627
+ }
1628
+ return obj;
1629
+ },
1630
+ create(base) {
1631
+ return exports.GetSourceCapabilitiesRequest.fromPartial(base ?? {});
1632
+ },
1633
+ fromPartial(object) {
1634
+ const message = createBaseGetSourceCapabilitiesRequest();
1635
+ message.orgId = object.orgId ?? "";
1636
+ return message;
1637
+ },
1638
+ };
1639
+ function createBaseGetSourceCapabilitiesResponse() {
1640
+ return { githubConnections: false, hostedGitConnections: false, builds: false };
1641
+ }
1642
+ exports.GetSourceCapabilitiesResponse = {
1643
+ encode(message, writer = new wire_1.BinaryWriter()) {
1644
+ if (message.githubConnections !== false) {
1645
+ writer.uint32(8).bool(message.githubConnections);
1646
+ }
1647
+ if (message.hostedGitConnections !== false) {
1648
+ writer.uint32(16).bool(message.hostedGitConnections);
1649
+ }
1650
+ if (message.builds !== false) {
1651
+ writer.uint32(24).bool(message.builds);
1652
+ }
1653
+ return writer;
1654
+ },
1655
+ decode(input, length) {
1656
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1657
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1658
+ if (previousRecursionDepth >= 100) {
1659
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1660
+ }
1661
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1662
+ try {
1663
+ const end = length === undefined ? reader.len : reader.pos + length;
1664
+ const message = createBaseGetSourceCapabilitiesResponse();
1665
+ while (reader.pos < end) {
1666
+ const tag = reader.uint32();
1667
+ switch (tag >>> 3) {
1668
+ case 1: {
1669
+ if (tag !== 8) {
1670
+ break;
1671
+ }
1672
+ message.githubConnections = reader.bool();
1673
+ continue;
1674
+ }
1675
+ case 2: {
1676
+ if (tag !== 16) {
1677
+ break;
1678
+ }
1679
+ message.hostedGitConnections = reader.bool();
1680
+ continue;
1681
+ }
1682
+ case 3: {
1683
+ if (tag !== 24) {
1684
+ break;
1685
+ }
1686
+ message.builds = reader.bool();
1687
+ continue;
1688
+ }
1689
+ }
1690
+ if ((tag & 7) === 4 || tag === 0) {
1691
+ break;
1692
+ }
1693
+ reader.skip(tag & 7);
1694
+ }
1695
+ return message;
1696
+ }
1697
+ finally {
1698
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1699
+ }
1700
+ },
1701
+ fromJSON(object) {
1702
+ return {
1703
+ githubConnections: isSet(object.githubConnections)
1704
+ ? globalThis.Boolean(object.githubConnections)
1705
+ : isSet(object.github_connections)
1706
+ ? globalThis.Boolean(object.github_connections)
1707
+ : false,
1708
+ hostedGitConnections: isSet(object.hostedGitConnections)
1709
+ ? globalThis.Boolean(object.hostedGitConnections)
1710
+ : isSet(object.hosted_git_connections)
1711
+ ? globalThis.Boolean(object.hosted_git_connections)
1712
+ : false,
1713
+ builds: isSet(object.builds) ? globalThis.Boolean(object.builds) : false,
1714
+ };
1715
+ },
1716
+ toJSON(message) {
1717
+ const obj = {};
1718
+ if (message.githubConnections !== false) {
1719
+ obj.githubConnections = message.githubConnections;
1720
+ }
1721
+ if (message.hostedGitConnections !== false) {
1722
+ obj.hostedGitConnections = message.hostedGitConnections;
1723
+ }
1724
+ if (message.builds !== false) {
1725
+ obj.builds = message.builds;
1726
+ }
1727
+ return obj;
1728
+ },
1729
+ create(base) {
1730
+ return exports.GetSourceCapabilitiesResponse.fromPartial(base ?? {});
1731
+ },
1732
+ fromPartial(object) {
1733
+ const message = createBaseGetSourceCapabilitiesResponse();
1734
+ message.githubConnections = object.githubConnections ?? false;
1735
+ message.hostedGitConnections = object.hostedGitConnections ?? false;
1736
+ message.builds = object.builds ?? false;
1737
+ return message;
1738
+ },
1739
+ };
1740
+ function createBasePreviewSourceRequest() {
1741
+ return { orgId: "", repositoryId: "", branch: "", composePath: "" };
1742
+ }
1743
+ exports.PreviewSourceRequest = {
1744
+ encode(message, writer = new wire_1.BinaryWriter()) {
1745
+ if (message.orgId !== "") {
1746
+ writer.uint32(10).string(message.orgId);
1747
+ }
1748
+ if (message.repositoryId !== "") {
1749
+ writer.uint32(18).string(message.repositoryId);
1750
+ }
1751
+ if (message.branch !== "") {
1752
+ writer.uint32(26).string(message.branch);
1753
+ }
1754
+ if (message.composePath !== "") {
1755
+ writer.uint32(34).string(message.composePath);
1756
+ }
1757
+ return writer;
1758
+ },
1759
+ decode(input, length) {
1760
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1761
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1762
+ if (previousRecursionDepth >= 100) {
1763
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1764
+ }
1765
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1766
+ try {
1767
+ const end = length === undefined ? reader.len : reader.pos + length;
1768
+ const message = createBasePreviewSourceRequest();
1769
+ while (reader.pos < end) {
1770
+ const tag = reader.uint32();
1771
+ switch (tag >>> 3) {
1772
+ case 1: {
1773
+ if (tag !== 10) {
1774
+ break;
1775
+ }
1776
+ message.orgId = reader.string();
1777
+ continue;
1778
+ }
1779
+ case 2: {
1780
+ if (tag !== 18) {
1781
+ break;
1782
+ }
1783
+ message.repositoryId = reader.string();
1784
+ continue;
1785
+ }
1786
+ case 3: {
1787
+ if (tag !== 26) {
1788
+ break;
1789
+ }
1790
+ message.branch = reader.string();
1791
+ continue;
1792
+ }
1793
+ case 4: {
1794
+ if (tag !== 34) {
1795
+ break;
1796
+ }
1797
+ message.composePath = reader.string();
1798
+ continue;
1799
+ }
1800
+ }
1801
+ if ((tag & 7) === 4 || tag === 0) {
1802
+ break;
1803
+ }
1804
+ reader.skip(tag & 7);
1805
+ }
1806
+ return message;
1807
+ }
1808
+ finally {
1809
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1810
+ }
1811
+ },
1812
+ fromJSON(object) {
1813
+ return {
1814
+ orgId: isSet(object.orgId)
1815
+ ? globalThis.String(object.orgId)
1816
+ : isSet(object.org_id)
1817
+ ? globalThis.String(object.org_id)
1818
+ : "",
1819
+ repositoryId: isSet(object.repositoryId)
1820
+ ? globalThis.String(object.repositoryId)
1821
+ : isSet(object.repository_id)
1822
+ ? globalThis.String(object.repository_id)
1823
+ : "",
1824
+ branch: isSet(object.branch) ? globalThis.String(object.branch) : "",
1825
+ composePath: isSet(object.composePath)
1826
+ ? globalThis.String(object.composePath)
1827
+ : isSet(object.compose_path)
1828
+ ? globalThis.String(object.compose_path)
1829
+ : "",
1830
+ };
1831
+ },
1832
+ toJSON(message) {
1833
+ const obj = {};
1834
+ if (message.orgId !== "") {
1835
+ obj.orgId = message.orgId;
1836
+ }
1837
+ if (message.repositoryId !== "") {
1838
+ obj.repositoryId = message.repositoryId;
1839
+ }
1840
+ if (message.branch !== "") {
1841
+ obj.branch = message.branch;
1842
+ }
1843
+ if (message.composePath !== "") {
1844
+ obj.composePath = message.composePath;
1845
+ }
1846
+ return obj;
1847
+ },
1848
+ create(base) {
1849
+ return exports.PreviewSourceRequest.fromPartial(base ?? {});
1850
+ },
1851
+ fromPartial(object) {
1852
+ const message = createBasePreviewSourceRequest();
1853
+ message.orgId = object.orgId ?? "";
1854
+ message.repositoryId = object.repositoryId ?? "";
1855
+ message.branch = object.branch ?? "";
1856
+ message.composePath = object.composePath ?? "";
1857
+ return message;
1858
+ },
1859
+ };
1860
+ function createBasePreviewSourceResponse() {
1861
+ return { repositoryId: "", branch: "", commitSha: "", composePath: "", composeYaml: "", config: undefined };
1862
+ }
1863
+ exports.PreviewSourceResponse = {
1864
+ encode(message, writer = new wire_1.BinaryWriter()) {
1865
+ if (message.repositoryId !== "") {
1866
+ writer.uint32(10).string(message.repositoryId);
1867
+ }
1868
+ if (message.branch !== "") {
1869
+ writer.uint32(18).string(message.branch);
1870
+ }
1871
+ if (message.commitSha !== "") {
1872
+ writer.uint32(26).string(message.commitSha);
1873
+ }
1874
+ if (message.composePath !== "") {
1875
+ writer.uint32(34).string(message.composePath);
1876
+ }
1877
+ if (message.composeYaml !== "") {
1878
+ writer.uint32(42).string(message.composeYaml);
1879
+ }
1880
+ if (message.config !== undefined) {
1881
+ exports.SourceBuildConfig.encode(message.config, writer.uint32(50).fork()).join();
1882
+ }
1883
+ return writer;
1884
+ },
1885
+ decode(input, length) {
1886
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1887
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1888
+ if (previousRecursionDepth >= 100) {
1889
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1890
+ }
1891
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1892
+ try {
1893
+ const end = length === undefined ? reader.len : reader.pos + length;
1894
+ const message = createBasePreviewSourceResponse();
1895
+ while (reader.pos < end) {
1896
+ const tag = reader.uint32();
1897
+ switch (tag >>> 3) {
1898
+ case 1: {
1899
+ if (tag !== 10) {
1900
+ break;
1901
+ }
1902
+ message.repositoryId = reader.string();
1903
+ continue;
1904
+ }
1905
+ case 2: {
1906
+ if (tag !== 18) {
1907
+ break;
1908
+ }
1909
+ message.branch = reader.string();
1910
+ continue;
1911
+ }
1912
+ case 3: {
1913
+ if (tag !== 26) {
1914
+ break;
1915
+ }
1916
+ message.commitSha = reader.string();
1917
+ continue;
1918
+ }
1919
+ case 4: {
1920
+ if (tag !== 34) {
1921
+ break;
1922
+ }
1923
+ message.composePath = reader.string();
1924
+ continue;
1925
+ }
1926
+ case 5: {
1927
+ if (tag !== 42) {
1928
+ break;
1929
+ }
1930
+ message.composeYaml = reader.string();
1931
+ continue;
1932
+ }
1933
+ case 6: {
1934
+ if (tag !== 50) {
1935
+ break;
1936
+ }
1937
+ message.config = exports.SourceBuildConfig.decode(reader, reader.uint32());
1938
+ continue;
1939
+ }
1940
+ }
1941
+ if ((tag & 7) === 4 || tag === 0) {
1942
+ break;
1943
+ }
1944
+ reader.skip(tag & 7);
1945
+ }
1946
+ return message;
1947
+ }
1948
+ finally {
1949
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1950
+ }
1951
+ },
1952
+ fromJSON(object) {
1953
+ return {
1954
+ repositoryId: isSet(object.repositoryId)
1955
+ ? globalThis.String(object.repositoryId)
1956
+ : isSet(object.repository_id)
1957
+ ? globalThis.String(object.repository_id)
1958
+ : "",
1959
+ branch: isSet(object.branch) ? globalThis.String(object.branch) : "",
1960
+ commitSha: isSet(object.commitSha)
1961
+ ? globalThis.String(object.commitSha)
1962
+ : isSet(object.commit_sha)
1963
+ ? globalThis.String(object.commit_sha)
1964
+ : "",
1965
+ composePath: isSet(object.composePath)
1966
+ ? globalThis.String(object.composePath)
1967
+ : isSet(object.compose_path)
1968
+ ? globalThis.String(object.compose_path)
1969
+ : "",
1970
+ composeYaml: isSet(object.composeYaml)
1971
+ ? globalThis.String(object.composeYaml)
1972
+ : isSet(object.compose_yaml)
1973
+ ? globalThis.String(object.compose_yaml)
1974
+ : "",
1975
+ config: isSet(object.config) ? exports.SourceBuildConfig.fromJSON(object.config) : undefined,
1976
+ };
1977
+ },
1978
+ toJSON(message) {
1979
+ const obj = {};
1980
+ if (message.repositoryId !== "") {
1981
+ obj.repositoryId = message.repositoryId;
1982
+ }
1983
+ if (message.branch !== "") {
1984
+ obj.branch = message.branch;
1985
+ }
1986
+ if (message.commitSha !== "") {
1987
+ obj.commitSha = message.commitSha;
1988
+ }
1989
+ if (message.composePath !== "") {
1990
+ obj.composePath = message.composePath;
1991
+ }
1992
+ if (message.composeYaml !== "") {
1993
+ obj.composeYaml = message.composeYaml;
1994
+ }
1995
+ if (message.config !== undefined) {
1996
+ obj.config = exports.SourceBuildConfig.toJSON(message.config);
1997
+ }
1998
+ return obj;
1999
+ },
2000
+ create(base) {
2001
+ return exports.PreviewSourceResponse.fromPartial(base ?? {});
2002
+ },
2003
+ fromPartial(object) {
2004
+ const message = createBasePreviewSourceResponse();
2005
+ message.repositoryId = object.repositoryId ?? "";
2006
+ message.branch = object.branch ?? "";
2007
+ message.commitSha = object.commitSha ?? "";
2008
+ message.composePath = object.composePath ?? "";
2009
+ message.composeYaml = object.composeYaml ?? "";
2010
+ message.config = (object.config !== undefined && object.config !== null)
2011
+ ? exports.SourceBuildConfig.fromPartial(object.config)
2012
+ : undefined;
2013
+ return message;
2014
+ },
2015
+ };
2016
+ function createBasePrepareSourceDeploymentRequest() {
2017
+ return { orgId: "", buildId: "" };
2018
+ }
2019
+ exports.PrepareSourceDeploymentRequest = {
2020
+ encode(message, writer = new wire_1.BinaryWriter()) {
2021
+ if (message.orgId !== "") {
2022
+ writer.uint32(10).string(message.orgId);
2023
+ }
2024
+ if (message.buildId !== "") {
2025
+ writer.uint32(18).string(message.buildId);
2026
+ }
2027
+ return writer;
2028
+ },
2029
+ decode(input, length) {
2030
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2031
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2032
+ if (previousRecursionDepth >= 100) {
2033
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2034
+ }
2035
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2036
+ try {
2037
+ const end = length === undefined ? reader.len : reader.pos + length;
2038
+ const message = createBasePrepareSourceDeploymentRequest();
2039
+ while (reader.pos < end) {
2040
+ const tag = reader.uint32();
2041
+ switch (tag >>> 3) {
2042
+ case 1: {
2043
+ if (tag !== 10) {
2044
+ break;
2045
+ }
2046
+ message.orgId = reader.string();
2047
+ continue;
2048
+ }
2049
+ case 2: {
2050
+ if (tag !== 18) {
2051
+ break;
2052
+ }
2053
+ message.buildId = reader.string();
2054
+ continue;
2055
+ }
2056
+ }
2057
+ if ((tag & 7) === 4 || tag === 0) {
2058
+ break;
2059
+ }
2060
+ reader.skip(tag & 7);
2061
+ }
2062
+ return message;
2063
+ }
2064
+ finally {
2065
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2066
+ }
2067
+ },
2068
+ fromJSON(object) {
2069
+ return {
2070
+ orgId: isSet(object.orgId)
2071
+ ? globalThis.String(object.orgId)
2072
+ : isSet(object.org_id)
2073
+ ? globalThis.String(object.org_id)
2074
+ : "",
2075
+ buildId: isSet(object.buildId)
2076
+ ? globalThis.String(object.buildId)
2077
+ : isSet(object.build_id)
2078
+ ? globalThis.String(object.build_id)
2079
+ : "",
2080
+ };
2081
+ },
2082
+ toJSON(message) {
2083
+ const obj = {};
2084
+ if (message.orgId !== "") {
2085
+ obj.orgId = message.orgId;
2086
+ }
2087
+ if (message.buildId !== "") {
2088
+ obj.buildId = message.buildId;
2089
+ }
2090
+ return obj;
2091
+ },
2092
+ create(base) {
2093
+ return exports.PrepareSourceDeploymentRequest.fromPartial(base ?? {});
2094
+ },
2095
+ fromPartial(object) {
2096
+ const message = createBasePrepareSourceDeploymentRequest();
2097
+ message.orgId = object.orgId ?? "";
2098
+ message.buildId = object.buildId ?? "";
2099
+ return message;
2100
+ },
2101
+ };
2102
+ function createBasePrepareSourceDeploymentResponse() {
2103
+ return { composeYaml: "", commitSha: "", images: {} };
2104
+ }
2105
+ exports.PrepareSourceDeploymentResponse = {
2106
+ encode(message, writer = new wire_1.BinaryWriter()) {
2107
+ if (message.composeYaml !== "") {
2108
+ writer.uint32(10).string(message.composeYaml);
2109
+ }
2110
+ if (message.commitSha !== "") {
2111
+ writer.uint32(18).string(message.commitSha);
2112
+ }
2113
+ globalThis.Object.entries(message.images).forEach(([key, value]) => {
2114
+ exports.PrepareSourceDeploymentResponse_ImagesEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
2115
+ });
2116
+ return writer;
2117
+ },
2118
+ decode(input, length) {
2119
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2120
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2121
+ if (previousRecursionDepth >= 100) {
2122
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2123
+ }
2124
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2125
+ try {
2126
+ const end = length === undefined ? reader.len : reader.pos + length;
2127
+ const message = createBasePrepareSourceDeploymentResponse();
2128
+ while (reader.pos < end) {
2129
+ const tag = reader.uint32();
2130
+ switch (tag >>> 3) {
2131
+ case 1: {
2132
+ if (tag !== 10) {
2133
+ break;
2134
+ }
2135
+ message.composeYaml = reader.string();
2136
+ continue;
2137
+ }
2138
+ case 2: {
2139
+ if (tag !== 18) {
2140
+ break;
2141
+ }
2142
+ message.commitSha = reader.string();
2143
+ continue;
2144
+ }
2145
+ case 3: {
2146
+ if (tag !== 26) {
2147
+ break;
2148
+ }
2149
+ const entry3 = exports.PrepareSourceDeploymentResponse_ImagesEntry.decode(reader, reader.uint32());
2150
+ if (entry3.value !== undefined) {
2151
+ message.images[entry3.key] = entry3.value;
2152
+ }
2153
+ continue;
2154
+ }
2155
+ }
2156
+ if ((tag & 7) === 4 || tag === 0) {
2157
+ break;
2158
+ }
2159
+ reader.skip(tag & 7);
2160
+ }
2161
+ return message;
2162
+ }
2163
+ finally {
2164
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2165
+ }
2166
+ },
2167
+ fromJSON(object) {
2168
+ return {
2169
+ composeYaml: isSet(object.composeYaml)
2170
+ ? globalThis.String(object.composeYaml)
2171
+ : isSet(object.compose_yaml)
2172
+ ? globalThis.String(object.compose_yaml)
2173
+ : "",
2174
+ commitSha: isSet(object.commitSha)
2175
+ ? globalThis.String(object.commitSha)
2176
+ : isSet(object.commit_sha)
2177
+ ? globalThis.String(object.commit_sha)
2178
+ : "",
2179
+ images: isObject(object.images)
2180
+ ? globalThis.Object.entries(object.images).reduce((acc, [key, value]) => {
2181
+ globalThis.Object.defineProperty(acc, key, {
2182
+ value: globalThis.String(value),
2183
+ enumerable: true,
2184
+ configurable: true,
2185
+ writable: true,
2186
+ });
2187
+ return acc;
2188
+ }, {})
2189
+ : {},
2190
+ };
2191
+ },
2192
+ toJSON(message) {
2193
+ const obj = {};
2194
+ if (message.composeYaml !== "") {
2195
+ obj.composeYaml = message.composeYaml;
2196
+ }
2197
+ if (message.commitSha !== "") {
2198
+ obj.commitSha = message.commitSha;
2199
+ }
2200
+ if (message.images) {
2201
+ const entries = globalThis.Object.entries(message.images);
2202
+ if (entries.length > 0) {
2203
+ obj.images = {};
2204
+ entries.forEach(([k, v]) => {
2205
+ obj.images[k] = v;
2206
+ });
2207
+ }
2208
+ }
2209
+ return obj;
2210
+ },
2211
+ create(base) {
2212
+ return exports.PrepareSourceDeploymentResponse.fromPartial(base ?? {});
2213
+ },
2214
+ fromPartial(object) {
2215
+ const message = createBasePrepareSourceDeploymentResponse();
2216
+ message.composeYaml = object.composeYaml ?? "";
2217
+ message.commitSha = object.commitSha ?? "";
2218
+ message.images = globalThis.Object.entries(object.images ?? {}).reduce((acc, [key, value]) => {
2219
+ if (value !== undefined) {
2220
+ acc[key] = globalThis.String(value);
2221
+ }
2222
+ return acc;
2223
+ }, {});
2224
+ return message;
2225
+ },
2226
+ };
2227
+ function createBasePrepareSourceDeploymentResponse_ImagesEntry() {
2228
+ return { key: "", value: "" };
2229
+ }
2230
+ exports.PrepareSourceDeploymentResponse_ImagesEntry = {
2231
+ encode(message, writer = new wire_1.BinaryWriter()) {
2232
+ if (message.key !== "") {
2233
+ writer.uint32(10).string(message.key);
2234
+ }
2235
+ if (message.value !== "") {
2236
+ writer.uint32(18).string(message.value);
2237
+ }
2238
+ return writer;
2239
+ },
2240
+ decode(input, length) {
2241
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2242
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2243
+ if (previousRecursionDepth >= 100) {
2244
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2245
+ }
2246
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2247
+ try {
2248
+ const end = length === undefined ? reader.len : reader.pos + length;
2249
+ const message = createBasePrepareSourceDeploymentResponse_ImagesEntry();
2250
+ while (reader.pos < end) {
2251
+ const tag = reader.uint32();
2252
+ switch (tag >>> 3) {
2253
+ case 1: {
2254
+ if (tag !== 10) {
2255
+ break;
2256
+ }
2257
+ message.key = reader.string();
2258
+ continue;
2259
+ }
2260
+ case 2: {
2261
+ if (tag !== 18) {
2262
+ break;
2263
+ }
2264
+ message.value = reader.string();
2265
+ continue;
2266
+ }
2267
+ }
2268
+ if ((tag & 7) === 4 || tag === 0) {
2269
+ break;
2270
+ }
2271
+ reader.skip(tag & 7);
2272
+ }
2273
+ return message;
2274
+ }
2275
+ finally {
2276
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2277
+ }
2278
+ },
2279
+ fromJSON(object) {
2280
+ return {
2281
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2282
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
2283
+ };
2284
+ },
2285
+ toJSON(message) {
2286
+ const obj = {};
2287
+ if (message.key !== "") {
2288
+ obj.key = message.key;
2289
+ }
2290
+ if (message.value !== "") {
2291
+ obj.value = message.value;
2292
+ }
2293
+ return obj;
2294
+ },
2295
+ create(base) {
2296
+ return exports.PrepareSourceDeploymentResponse_ImagesEntry.fromPartial(base ?? {});
2297
+ },
2298
+ fromPartial(object) {
2299
+ const message = createBasePrepareSourceDeploymentResponse_ImagesEntry();
2300
+ message.key = object.key ?? "";
2301
+ message.value = object.value ?? "";
2302
+ return message;
2303
+ },
2304
+ };
2305
+ function createBasePutSourceTargetRequest() {
2306
+ return {
2307
+ orgId: "",
2308
+ name: "",
2309
+ repositoryId: "",
2310
+ branch: "",
2311
+ config: undefined,
2312
+ autoBuild: false,
2313
+ expectedVersion: "",
2314
+ };
2315
+ }
2316
+ exports.PutSourceTargetRequest = {
2317
+ encode(message, writer = new wire_1.BinaryWriter()) {
2318
+ if (message.orgId !== "") {
2319
+ writer.uint32(10).string(message.orgId);
2320
+ }
2321
+ if (message.name !== "") {
2322
+ writer.uint32(18).string(message.name);
2323
+ }
2324
+ if (message.repositoryId !== "") {
2325
+ writer.uint32(26).string(message.repositoryId);
2326
+ }
2327
+ if (message.branch !== "") {
2328
+ writer.uint32(34).string(message.branch);
2329
+ }
2330
+ if (message.config !== undefined) {
2331
+ exports.SourceBuildConfig.encode(message.config, writer.uint32(42).fork()).join();
2332
+ }
2333
+ if (message.autoBuild !== false) {
2334
+ writer.uint32(48).bool(message.autoBuild);
2335
+ }
2336
+ if (message.expectedVersion !== "") {
2337
+ writer.uint32(58).string(message.expectedVersion);
2338
+ }
2339
+ return writer;
2340
+ },
2341
+ decode(input, length) {
2342
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2343
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2344
+ if (previousRecursionDepth >= 100) {
2345
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2346
+ }
2347
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2348
+ try {
2349
+ const end = length === undefined ? reader.len : reader.pos + length;
2350
+ const message = createBasePutSourceTargetRequest();
2351
+ while (reader.pos < end) {
2352
+ const tag = reader.uint32();
2353
+ switch (tag >>> 3) {
2354
+ case 1: {
2355
+ if (tag !== 10) {
2356
+ break;
2357
+ }
2358
+ message.orgId = reader.string();
2359
+ continue;
2360
+ }
2361
+ case 2: {
2362
+ if (tag !== 18) {
2363
+ break;
2364
+ }
2365
+ message.name = reader.string();
2366
+ continue;
2367
+ }
2368
+ case 3: {
2369
+ if (tag !== 26) {
2370
+ break;
2371
+ }
2372
+ message.repositoryId = reader.string();
2373
+ continue;
2374
+ }
2375
+ case 4: {
2376
+ if (tag !== 34) {
2377
+ break;
2378
+ }
2379
+ message.branch = reader.string();
2380
+ continue;
2381
+ }
2382
+ case 5: {
2383
+ if (tag !== 42) {
2384
+ break;
2385
+ }
2386
+ message.config = exports.SourceBuildConfig.decode(reader, reader.uint32());
2387
+ continue;
2388
+ }
2389
+ case 6: {
2390
+ if (tag !== 48) {
2391
+ break;
2392
+ }
2393
+ message.autoBuild = reader.bool();
2394
+ continue;
2395
+ }
2396
+ case 7: {
2397
+ if (tag !== 58) {
2398
+ break;
2399
+ }
2400
+ message.expectedVersion = reader.string();
2401
+ continue;
2402
+ }
2403
+ }
2404
+ if ((tag & 7) === 4 || tag === 0) {
2405
+ break;
2406
+ }
2407
+ reader.skip(tag & 7);
2408
+ }
2409
+ return message;
2410
+ }
2411
+ finally {
2412
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2413
+ }
2414
+ },
2415
+ fromJSON(object) {
2416
+ return {
2417
+ orgId: isSet(object.orgId)
2418
+ ? globalThis.String(object.orgId)
2419
+ : isSet(object.org_id)
2420
+ ? globalThis.String(object.org_id)
2421
+ : "",
2422
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
2423
+ repositoryId: isSet(object.repositoryId)
2424
+ ? globalThis.String(object.repositoryId)
2425
+ : isSet(object.repository_id)
2426
+ ? globalThis.String(object.repository_id)
2427
+ : "",
2428
+ branch: isSet(object.branch) ? globalThis.String(object.branch) : "",
2429
+ config: isSet(object.config) ? exports.SourceBuildConfig.fromJSON(object.config) : undefined,
2430
+ autoBuild: isSet(object.autoBuild)
2431
+ ? globalThis.Boolean(object.autoBuild)
2432
+ : isSet(object.auto_build)
2433
+ ? globalThis.Boolean(object.auto_build)
2434
+ : false,
2435
+ expectedVersion: isSet(object.expectedVersion)
2436
+ ? globalThis.String(object.expectedVersion)
2437
+ : isSet(object.expected_version)
2438
+ ? globalThis.String(object.expected_version)
2439
+ : "",
2440
+ };
2441
+ },
2442
+ toJSON(message) {
2443
+ const obj = {};
2444
+ if (message.orgId !== "") {
2445
+ obj.orgId = message.orgId;
2446
+ }
2447
+ if (message.name !== "") {
2448
+ obj.name = message.name;
2449
+ }
2450
+ if (message.repositoryId !== "") {
2451
+ obj.repositoryId = message.repositoryId;
2452
+ }
2453
+ if (message.branch !== "") {
2454
+ obj.branch = message.branch;
2455
+ }
2456
+ if (message.config !== undefined) {
2457
+ obj.config = exports.SourceBuildConfig.toJSON(message.config);
2458
+ }
2459
+ if (message.autoBuild !== false) {
2460
+ obj.autoBuild = message.autoBuild;
2461
+ }
2462
+ if (message.expectedVersion !== "") {
2463
+ obj.expectedVersion = message.expectedVersion;
2464
+ }
2465
+ return obj;
2466
+ },
2467
+ create(base) {
2468
+ return exports.PutSourceTargetRequest.fromPartial(base ?? {});
2469
+ },
2470
+ fromPartial(object) {
2471
+ const message = createBasePutSourceTargetRequest();
2472
+ message.orgId = object.orgId ?? "";
2473
+ message.name = object.name ?? "";
2474
+ message.repositoryId = object.repositoryId ?? "";
2475
+ message.branch = object.branch ?? "";
2476
+ message.config = (object.config !== undefined && object.config !== null)
2477
+ ? exports.SourceBuildConfig.fromPartial(object.config)
2478
+ : undefined;
2479
+ message.autoBuild = object.autoBuild ?? false;
2480
+ message.expectedVersion = object.expectedVersion ?? "";
2481
+ return message;
2482
+ },
2483
+ };
2484
+ function createBaseSourceTarget() {
2485
+ return { id: "", name: "", repositoryId: "", branch: "", config: undefined, autoBuild: false, version: "" };
2486
+ }
2487
+ exports.SourceTarget = {
2488
+ encode(message, writer = new wire_1.BinaryWriter()) {
2489
+ if (message.id !== "") {
2490
+ writer.uint32(10).string(message.id);
2491
+ }
2492
+ if (message.name !== "") {
2493
+ writer.uint32(18).string(message.name);
2494
+ }
2495
+ if (message.repositoryId !== "") {
2496
+ writer.uint32(26).string(message.repositoryId);
2497
+ }
2498
+ if (message.branch !== "") {
2499
+ writer.uint32(34).string(message.branch);
2500
+ }
2501
+ if (message.config !== undefined) {
2502
+ exports.SourceBuildConfig.encode(message.config, writer.uint32(42).fork()).join();
2503
+ }
2504
+ if (message.autoBuild !== false) {
2505
+ writer.uint32(48).bool(message.autoBuild);
2506
+ }
2507
+ if (message.version !== "") {
2508
+ writer.uint32(58).string(message.version);
2509
+ }
2510
+ return writer;
2511
+ },
2512
+ decode(input, length) {
2513
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2514
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2515
+ if (previousRecursionDepth >= 100) {
2516
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2517
+ }
2518
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2519
+ try {
2520
+ const end = length === undefined ? reader.len : reader.pos + length;
2521
+ const message = createBaseSourceTarget();
2522
+ while (reader.pos < end) {
2523
+ const tag = reader.uint32();
2524
+ switch (tag >>> 3) {
2525
+ case 1: {
2526
+ if (tag !== 10) {
2527
+ break;
2528
+ }
2529
+ message.id = reader.string();
2530
+ continue;
2531
+ }
2532
+ case 2: {
2533
+ if (tag !== 18) {
2534
+ break;
2535
+ }
2536
+ message.name = reader.string();
2537
+ continue;
2538
+ }
2539
+ case 3: {
2540
+ if (tag !== 26) {
2541
+ break;
2542
+ }
2543
+ message.repositoryId = reader.string();
2544
+ continue;
2545
+ }
2546
+ case 4: {
2547
+ if (tag !== 34) {
2548
+ break;
2549
+ }
2550
+ message.branch = reader.string();
2551
+ continue;
2552
+ }
2553
+ case 5: {
2554
+ if (tag !== 42) {
2555
+ break;
2556
+ }
2557
+ message.config = exports.SourceBuildConfig.decode(reader, reader.uint32());
2558
+ continue;
2559
+ }
2560
+ case 6: {
2561
+ if (tag !== 48) {
2562
+ break;
2563
+ }
2564
+ message.autoBuild = reader.bool();
2565
+ continue;
2566
+ }
2567
+ case 7: {
2568
+ if (tag !== 58) {
2569
+ break;
2570
+ }
2571
+ message.version = reader.string();
2572
+ continue;
2573
+ }
2574
+ }
2575
+ if ((tag & 7) === 4 || tag === 0) {
2576
+ break;
2577
+ }
2578
+ reader.skip(tag & 7);
2579
+ }
2580
+ return message;
2581
+ }
2582
+ finally {
2583
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2584
+ }
2585
+ },
2586
+ fromJSON(object) {
2587
+ return {
2588
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
2589
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
2590
+ repositoryId: isSet(object.repositoryId)
2591
+ ? globalThis.String(object.repositoryId)
2592
+ : isSet(object.repository_id)
2593
+ ? globalThis.String(object.repository_id)
2594
+ : "",
2595
+ branch: isSet(object.branch) ? globalThis.String(object.branch) : "",
2596
+ config: isSet(object.config) ? exports.SourceBuildConfig.fromJSON(object.config) : undefined,
2597
+ autoBuild: isSet(object.autoBuild)
2598
+ ? globalThis.Boolean(object.autoBuild)
2599
+ : isSet(object.auto_build)
2600
+ ? globalThis.Boolean(object.auto_build)
2601
+ : false,
2602
+ version: isSet(object.version) ? globalThis.String(object.version) : "",
2603
+ };
2604
+ },
2605
+ toJSON(message) {
2606
+ const obj = {};
2607
+ if (message.id !== "") {
2608
+ obj.id = message.id;
2609
+ }
2610
+ if (message.name !== "") {
2611
+ obj.name = message.name;
2612
+ }
2613
+ if (message.repositoryId !== "") {
2614
+ obj.repositoryId = message.repositoryId;
2615
+ }
2616
+ if (message.branch !== "") {
2617
+ obj.branch = message.branch;
2618
+ }
2619
+ if (message.config !== undefined) {
2620
+ obj.config = exports.SourceBuildConfig.toJSON(message.config);
2621
+ }
2622
+ if (message.autoBuild !== false) {
2623
+ obj.autoBuild = message.autoBuild;
2624
+ }
2625
+ if (message.version !== "") {
2626
+ obj.version = message.version;
2627
+ }
2628
+ return obj;
2629
+ },
2630
+ create(base) {
2631
+ return exports.SourceTarget.fromPartial(base ?? {});
2632
+ },
2633
+ fromPartial(object) {
2634
+ const message = createBaseSourceTarget();
2635
+ message.id = object.id ?? "";
2636
+ message.name = object.name ?? "";
2637
+ message.repositoryId = object.repositoryId ?? "";
2638
+ message.branch = object.branch ?? "";
2639
+ message.config = (object.config !== undefined && object.config !== null)
2640
+ ? exports.SourceBuildConfig.fromPartial(object.config)
2641
+ : undefined;
2642
+ message.autoBuild = object.autoBuild ?? false;
2643
+ message.version = object.version ?? "";
2644
+ return message;
2645
+ },
2646
+ };
2647
+ function createBaseListSourceTargetsRequest() {
2648
+ return { orgId: "" };
2649
+ }
2650
+ exports.ListSourceTargetsRequest = {
2651
+ encode(message, writer = new wire_1.BinaryWriter()) {
2652
+ if (message.orgId !== "") {
2653
+ writer.uint32(10).string(message.orgId);
2654
+ }
2655
+ return writer;
2656
+ },
2657
+ decode(input, length) {
2658
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2659
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2660
+ if (previousRecursionDepth >= 100) {
2661
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2662
+ }
2663
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2664
+ try {
2665
+ const end = length === undefined ? reader.len : reader.pos + length;
2666
+ const message = createBaseListSourceTargetsRequest();
2667
+ while (reader.pos < end) {
2668
+ const tag = reader.uint32();
2669
+ switch (tag >>> 3) {
2670
+ case 1: {
2671
+ if (tag !== 10) {
2672
+ break;
2673
+ }
2674
+ message.orgId = reader.string();
2675
+ continue;
2676
+ }
2677
+ }
2678
+ if ((tag & 7) === 4 || tag === 0) {
2679
+ break;
2680
+ }
2681
+ reader.skip(tag & 7);
2682
+ }
2683
+ return message;
2684
+ }
2685
+ finally {
2686
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2687
+ }
2688
+ },
2689
+ fromJSON(object) {
2690
+ return {
2691
+ orgId: isSet(object.orgId)
2692
+ ? globalThis.String(object.orgId)
2693
+ : isSet(object.org_id)
2694
+ ? globalThis.String(object.org_id)
2695
+ : "",
2696
+ };
2697
+ },
2698
+ toJSON(message) {
2699
+ const obj = {};
2700
+ if (message.orgId !== "") {
2701
+ obj.orgId = message.orgId;
2702
+ }
2703
+ return obj;
2704
+ },
2705
+ create(base) {
2706
+ return exports.ListSourceTargetsRequest.fromPartial(base ?? {});
2707
+ },
2708
+ fromPartial(object) {
2709
+ const message = createBaseListSourceTargetsRequest();
2710
+ message.orgId = object.orgId ?? "";
2711
+ return message;
2712
+ },
2713
+ };
2714
+ function createBaseListSourceTargetsResponse() {
2715
+ return { targets: [] };
2716
+ }
2717
+ exports.ListSourceTargetsResponse = {
2718
+ encode(message, writer = new wire_1.BinaryWriter()) {
2719
+ for (const v of message.targets) {
2720
+ exports.SourceTarget.encode(v, writer.uint32(10).fork()).join();
2721
+ }
2722
+ return writer;
2723
+ },
2724
+ decode(input, length) {
2725
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2726
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2727
+ if (previousRecursionDepth >= 100) {
2728
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2729
+ }
2730
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2731
+ try {
2732
+ const end = length === undefined ? reader.len : reader.pos + length;
2733
+ const message = createBaseListSourceTargetsResponse();
2734
+ while (reader.pos < end) {
2735
+ const tag = reader.uint32();
2736
+ switch (tag >>> 3) {
2737
+ case 1: {
2738
+ if (tag !== 10) {
2739
+ break;
2740
+ }
2741
+ message.targets.push(exports.SourceTarget.decode(reader, reader.uint32()));
2742
+ continue;
2743
+ }
2744
+ }
2745
+ if ((tag & 7) === 4 || tag === 0) {
2746
+ break;
2747
+ }
2748
+ reader.skip(tag & 7);
2749
+ }
2750
+ return message;
2751
+ }
2752
+ finally {
2753
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2754
+ }
2755
+ },
2756
+ fromJSON(object) {
2757
+ return {
2758
+ targets: globalThis.Array.isArray(object?.targets)
2759
+ ? object.targets.map((e) => exports.SourceTarget.fromJSON(e))
2760
+ : [],
2761
+ };
2762
+ },
2763
+ toJSON(message) {
2764
+ const obj = {};
2765
+ if (message.targets?.length) {
2766
+ obj.targets = message.targets.map((e) => exports.SourceTarget.toJSON(e));
2767
+ }
2768
+ return obj;
2769
+ },
2770
+ create(base) {
2771
+ return exports.ListSourceTargetsResponse.fromPartial(base ?? {});
2772
+ },
2773
+ fromPartial(object) {
2774
+ const message = createBaseListSourceTargetsResponse();
2775
+ message.targets = object.targets?.map((e) => exports.SourceTarget.fromPartial(e)) || [];
2776
+ return message;
2777
+ },
2778
+ };
2779
+ function createBaseStartSourceBuildRequest() {
2780
+ return { orgId: "", targetId: "", commitSha: "", idempotencyKey: "" };
2781
+ }
2782
+ exports.StartSourceBuildRequest = {
2783
+ encode(message, writer = new wire_1.BinaryWriter()) {
2784
+ if (message.orgId !== "") {
2785
+ writer.uint32(10).string(message.orgId);
2786
+ }
2787
+ if (message.targetId !== "") {
2788
+ writer.uint32(18).string(message.targetId);
2789
+ }
2790
+ if (message.commitSha !== "") {
2791
+ writer.uint32(26).string(message.commitSha);
2792
+ }
2793
+ if (message.idempotencyKey !== "") {
2794
+ writer.uint32(34).string(message.idempotencyKey);
2795
+ }
2796
+ return writer;
2797
+ },
2798
+ decode(input, length) {
2799
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2800
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2801
+ if (previousRecursionDepth >= 100) {
2802
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2803
+ }
2804
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2805
+ try {
2806
+ const end = length === undefined ? reader.len : reader.pos + length;
2807
+ const message = createBaseStartSourceBuildRequest();
2808
+ while (reader.pos < end) {
2809
+ const tag = reader.uint32();
2810
+ switch (tag >>> 3) {
2811
+ case 1: {
2812
+ if (tag !== 10) {
2813
+ break;
2814
+ }
2815
+ message.orgId = reader.string();
2816
+ continue;
2817
+ }
2818
+ case 2: {
2819
+ if (tag !== 18) {
2820
+ break;
2821
+ }
2822
+ message.targetId = reader.string();
2823
+ continue;
2824
+ }
2825
+ case 3: {
2826
+ if (tag !== 26) {
2827
+ break;
2828
+ }
2829
+ message.commitSha = reader.string();
2830
+ continue;
2831
+ }
2832
+ case 4: {
2833
+ if (tag !== 34) {
2834
+ break;
2835
+ }
2836
+ message.idempotencyKey = reader.string();
2837
+ continue;
2838
+ }
2839
+ }
2840
+ if ((tag & 7) === 4 || tag === 0) {
2841
+ break;
2842
+ }
2843
+ reader.skip(tag & 7);
2844
+ }
2845
+ return message;
2846
+ }
2847
+ finally {
2848
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2849
+ }
2850
+ },
2851
+ fromJSON(object) {
2852
+ return {
2853
+ orgId: isSet(object.orgId)
2854
+ ? globalThis.String(object.orgId)
2855
+ : isSet(object.org_id)
2856
+ ? globalThis.String(object.org_id)
2857
+ : "",
2858
+ targetId: isSet(object.targetId)
2859
+ ? globalThis.String(object.targetId)
2860
+ : isSet(object.target_id)
2861
+ ? globalThis.String(object.target_id)
2862
+ : "",
2863
+ commitSha: isSet(object.commitSha)
2864
+ ? globalThis.String(object.commitSha)
2865
+ : isSet(object.commit_sha)
2866
+ ? globalThis.String(object.commit_sha)
2867
+ : "",
2868
+ idempotencyKey: isSet(object.idempotencyKey)
2869
+ ? globalThis.String(object.idempotencyKey)
2870
+ : isSet(object.idempotency_key)
2871
+ ? globalThis.String(object.idempotency_key)
2872
+ : "",
2873
+ };
2874
+ },
2875
+ toJSON(message) {
2876
+ const obj = {};
2877
+ if (message.orgId !== "") {
2878
+ obj.orgId = message.orgId;
2879
+ }
2880
+ if (message.targetId !== "") {
2881
+ obj.targetId = message.targetId;
2882
+ }
2883
+ if (message.commitSha !== "") {
2884
+ obj.commitSha = message.commitSha;
2885
+ }
2886
+ if (message.idempotencyKey !== "") {
2887
+ obj.idempotencyKey = message.idempotencyKey;
2888
+ }
2889
+ return obj;
2890
+ },
2891
+ create(base) {
2892
+ return exports.StartSourceBuildRequest.fromPartial(base ?? {});
2893
+ },
2894
+ fromPartial(object) {
2895
+ const message = createBaseStartSourceBuildRequest();
2896
+ message.orgId = object.orgId ?? "";
2897
+ message.targetId = object.targetId ?? "";
2898
+ message.commitSha = object.commitSha ?? "";
2899
+ message.idempotencyKey = object.idempotencyKey ?? "";
2900
+ return message;
2901
+ },
2902
+ };
2903
+ function createBaseGetSourceBuildRequest() {
2904
+ return { orgId: "", buildId: "" };
2905
+ }
2906
+ exports.GetSourceBuildRequest = {
2907
+ encode(message, writer = new wire_1.BinaryWriter()) {
2908
+ if (message.orgId !== "") {
2909
+ writer.uint32(10).string(message.orgId);
2910
+ }
2911
+ if (message.buildId !== "") {
2912
+ writer.uint32(18).string(message.buildId);
2913
+ }
2914
+ return writer;
2915
+ },
2916
+ decode(input, length) {
2917
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2918
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2919
+ if (previousRecursionDepth >= 100) {
2920
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2921
+ }
2922
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2923
+ try {
2924
+ const end = length === undefined ? reader.len : reader.pos + length;
2925
+ const message = createBaseGetSourceBuildRequest();
2926
+ while (reader.pos < end) {
2927
+ const tag = reader.uint32();
2928
+ switch (tag >>> 3) {
2929
+ case 1: {
2930
+ if (tag !== 10) {
2931
+ break;
2932
+ }
2933
+ message.orgId = reader.string();
2934
+ continue;
2935
+ }
2936
+ case 2: {
2937
+ if (tag !== 18) {
2938
+ break;
2939
+ }
2940
+ message.buildId = reader.string();
2941
+ continue;
2942
+ }
2943
+ }
2944
+ if ((tag & 7) === 4 || tag === 0) {
2945
+ break;
2946
+ }
2947
+ reader.skip(tag & 7);
2948
+ }
2949
+ return message;
2950
+ }
2951
+ finally {
2952
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2953
+ }
2954
+ },
2955
+ fromJSON(object) {
2956
+ return {
2957
+ orgId: isSet(object.orgId)
2958
+ ? globalThis.String(object.orgId)
2959
+ : isSet(object.org_id)
2960
+ ? globalThis.String(object.org_id)
2961
+ : "",
2962
+ buildId: isSet(object.buildId)
2963
+ ? globalThis.String(object.buildId)
2964
+ : isSet(object.build_id)
2965
+ ? globalThis.String(object.build_id)
2966
+ : "",
2967
+ };
2968
+ },
2969
+ toJSON(message) {
2970
+ const obj = {};
2971
+ if (message.orgId !== "") {
2972
+ obj.orgId = message.orgId;
2973
+ }
2974
+ if (message.buildId !== "") {
2975
+ obj.buildId = message.buildId;
2976
+ }
2977
+ return obj;
2978
+ },
2979
+ create(base) {
2980
+ return exports.GetSourceBuildRequest.fromPartial(base ?? {});
2981
+ },
2982
+ fromPartial(object) {
2983
+ const message = createBaseGetSourceBuildRequest();
2984
+ message.orgId = object.orgId ?? "";
2985
+ message.buildId = object.buildId ?? "";
2986
+ return message;
2987
+ },
2988
+ };
2989
+ function createBaseCancelSourceBuildRequest() {
2990
+ return { orgId: "", buildId: "" };
2991
+ }
2992
+ exports.CancelSourceBuildRequest = {
2993
+ encode(message, writer = new wire_1.BinaryWriter()) {
2994
+ if (message.orgId !== "") {
2995
+ writer.uint32(10).string(message.orgId);
2996
+ }
2997
+ if (message.buildId !== "") {
2998
+ writer.uint32(18).string(message.buildId);
2999
+ }
3000
+ return writer;
3001
+ },
3002
+ decode(input, length) {
3003
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3004
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3005
+ if (previousRecursionDepth >= 100) {
3006
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3007
+ }
3008
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3009
+ try {
3010
+ const end = length === undefined ? reader.len : reader.pos + length;
3011
+ const message = createBaseCancelSourceBuildRequest();
3012
+ while (reader.pos < end) {
3013
+ const tag = reader.uint32();
3014
+ switch (tag >>> 3) {
3015
+ case 1: {
3016
+ if (tag !== 10) {
3017
+ break;
3018
+ }
3019
+ message.orgId = reader.string();
3020
+ continue;
3021
+ }
3022
+ case 2: {
3023
+ if (tag !== 18) {
3024
+ break;
3025
+ }
3026
+ message.buildId = reader.string();
3027
+ continue;
3028
+ }
3029
+ }
3030
+ if ((tag & 7) === 4 || tag === 0) {
3031
+ break;
3032
+ }
3033
+ reader.skip(tag & 7);
3034
+ }
3035
+ return message;
3036
+ }
3037
+ finally {
3038
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3039
+ }
3040
+ },
3041
+ fromJSON(object) {
3042
+ return {
3043
+ orgId: isSet(object.orgId)
3044
+ ? globalThis.String(object.orgId)
3045
+ : isSet(object.org_id)
3046
+ ? globalThis.String(object.org_id)
3047
+ : "",
3048
+ buildId: isSet(object.buildId)
3049
+ ? globalThis.String(object.buildId)
3050
+ : isSet(object.build_id)
3051
+ ? globalThis.String(object.build_id)
3052
+ : "",
3053
+ };
3054
+ },
3055
+ toJSON(message) {
3056
+ const obj = {};
3057
+ if (message.orgId !== "") {
3058
+ obj.orgId = message.orgId;
3059
+ }
3060
+ if (message.buildId !== "") {
3061
+ obj.buildId = message.buildId;
3062
+ }
3063
+ return obj;
3064
+ },
3065
+ create(base) {
3066
+ return exports.CancelSourceBuildRequest.fromPartial(base ?? {});
3067
+ },
3068
+ fromPartial(object) {
3069
+ const message = createBaseCancelSourceBuildRequest();
3070
+ message.orgId = object.orgId ?? "";
3071
+ message.buildId = object.buildId ?? "";
3072
+ return message;
3073
+ },
3074
+ };
3075
+ function createBaseListSourceBuildsRequest() {
3076
+ return { orgId: "", targetId: "" };
3077
+ }
3078
+ exports.ListSourceBuildsRequest = {
3079
+ encode(message, writer = new wire_1.BinaryWriter()) {
3080
+ if (message.orgId !== "") {
3081
+ writer.uint32(10).string(message.orgId);
3082
+ }
3083
+ if (message.targetId !== "") {
3084
+ writer.uint32(18).string(message.targetId);
3085
+ }
3086
+ return writer;
3087
+ },
3088
+ decode(input, length) {
3089
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3090
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3091
+ if (previousRecursionDepth >= 100) {
3092
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3093
+ }
3094
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3095
+ try {
3096
+ const end = length === undefined ? reader.len : reader.pos + length;
3097
+ const message = createBaseListSourceBuildsRequest();
3098
+ while (reader.pos < end) {
3099
+ const tag = reader.uint32();
3100
+ switch (tag >>> 3) {
3101
+ case 1: {
3102
+ if (tag !== 10) {
3103
+ break;
3104
+ }
3105
+ message.orgId = reader.string();
3106
+ continue;
3107
+ }
3108
+ case 2: {
3109
+ if (tag !== 18) {
3110
+ break;
3111
+ }
3112
+ message.targetId = reader.string();
3113
+ continue;
3114
+ }
3115
+ }
3116
+ if ((tag & 7) === 4 || tag === 0) {
3117
+ break;
3118
+ }
3119
+ reader.skip(tag & 7);
3120
+ }
3121
+ return message;
3122
+ }
3123
+ finally {
3124
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3125
+ }
3126
+ },
3127
+ fromJSON(object) {
3128
+ return {
3129
+ orgId: isSet(object.orgId)
3130
+ ? globalThis.String(object.orgId)
3131
+ : isSet(object.org_id)
3132
+ ? globalThis.String(object.org_id)
3133
+ : "",
3134
+ targetId: isSet(object.targetId)
3135
+ ? globalThis.String(object.targetId)
3136
+ : isSet(object.target_id)
3137
+ ? globalThis.String(object.target_id)
3138
+ : "",
3139
+ };
3140
+ },
3141
+ toJSON(message) {
3142
+ const obj = {};
3143
+ if (message.orgId !== "") {
3144
+ obj.orgId = message.orgId;
3145
+ }
3146
+ if (message.targetId !== "") {
3147
+ obj.targetId = message.targetId;
3148
+ }
3149
+ return obj;
3150
+ },
3151
+ create(base) {
3152
+ return exports.ListSourceBuildsRequest.fromPartial(base ?? {});
3153
+ },
3154
+ fromPartial(object) {
3155
+ const message = createBaseListSourceBuildsRequest();
3156
+ message.orgId = object.orgId ?? "";
3157
+ message.targetId = object.targetId ?? "";
3158
+ return message;
3159
+ },
3160
+ };
3161
+ function createBaseListSourceBuildsResponse() {
3162
+ return { builds: [] };
3163
+ }
3164
+ exports.ListSourceBuildsResponse = {
3165
+ encode(message, writer = new wire_1.BinaryWriter()) {
3166
+ for (const v of message.builds) {
3167
+ exports.SourceBuild.encode(v, writer.uint32(10).fork()).join();
3168
+ }
3169
+ return writer;
3170
+ },
3171
+ decode(input, length) {
3172
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3173
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3174
+ if (previousRecursionDepth >= 100) {
3175
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3176
+ }
3177
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3178
+ try {
3179
+ const end = length === undefined ? reader.len : reader.pos + length;
3180
+ const message = createBaseListSourceBuildsResponse();
3181
+ while (reader.pos < end) {
3182
+ const tag = reader.uint32();
3183
+ switch (tag >>> 3) {
3184
+ case 1: {
3185
+ if (tag !== 10) {
3186
+ break;
3187
+ }
3188
+ message.builds.push(exports.SourceBuild.decode(reader, reader.uint32()));
3189
+ continue;
3190
+ }
3191
+ }
3192
+ if ((tag & 7) === 4 || tag === 0) {
3193
+ break;
3194
+ }
3195
+ reader.skip(tag & 7);
3196
+ }
3197
+ return message;
3198
+ }
3199
+ finally {
3200
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3201
+ }
3202
+ },
3203
+ fromJSON(object) {
3204
+ return {
3205
+ builds: globalThis.Array.isArray(object?.builds) ? object.builds.map((e) => exports.SourceBuild.fromJSON(e)) : [],
3206
+ };
3207
+ },
3208
+ toJSON(message) {
3209
+ const obj = {};
3210
+ if (message.builds?.length) {
3211
+ obj.builds = message.builds.map((e) => exports.SourceBuild.toJSON(e));
3212
+ }
3213
+ return obj;
3214
+ },
3215
+ create(base) {
3216
+ return exports.ListSourceBuildsResponse.fromPartial(base ?? {});
3217
+ },
3218
+ fromPartial(object) {
3219
+ const message = createBaseListSourceBuildsResponse();
3220
+ message.builds = object.builds?.map((e) => exports.SourceBuild.fromPartial(e)) || [];
3221
+ return message;
3222
+ },
3223
+ };
3224
+ function createBaseSourceBuild() {
3225
+ return {
3226
+ id: "",
3227
+ targetId: "",
3228
+ commitSha: "",
3229
+ branch: "",
3230
+ status: "",
3231
+ cancelRequested: false,
3232
+ errorCode: "",
3233
+ images: {},
3234
+ createdAt: undefined,
3235
+ startedAt: undefined,
3236
+ finishedAt: undefined,
3237
+ allowanceConsumed: false,
3238
+ };
3239
+ }
3240
+ exports.SourceBuild = {
3241
+ encode(message, writer = new wire_1.BinaryWriter()) {
3242
+ if (message.id !== "") {
3243
+ writer.uint32(10).string(message.id);
3244
+ }
3245
+ if (message.targetId !== "") {
3246
+ writer.uint32(18).string(message.targetId);
3247
+ }
3248
+ if (message.commitSha !== "") {
3249
+ writer.uint32(26).string(message.commitSha);
3250
+ }
3251
+ if (message.branch !== "") {
3252
+ writer.uint32(34).string(message.branch);
3253
+ }
3254
+ if (message.status !== "") {
3255
+ writer.uint32(42).string(message.status);
3256
+ }
3257
+ if (message.cancelRequested !== false) {
3258
+ writer.uint32(48).bool(message.cancelRequested);
3259
+ }
3260
+ if (message.errorCode !== "") {
3261
+ writer.uint32(58).string(message.errorCode);
3262
+ }
3263
+ globalThis.Object.entries(message.images).forEach(([key, value]) => {
3264
+ exports.SourceBuild_ImagesEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
3265
+ });
3266
+ if (message.createdAt !== undefined) {
3267
+ timestamp_js_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(74).fork()).join();
3268
+ }
3269
+ if (message.startedAt !== undefined) {
3270
+ timestamp_js_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(82).fork()).join();
3271
+ }
3272
+ if (message.finishedAt !== undefined) {
3273
+ timestamp_js_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(90).fork()).join();
3274
+ }
3275
+ if (message.allowanceConsumed !== false) {
3276
+ writer.uint32(96).bool(message.allowanceConsumed);
3277
+ }
3278
+ return writer;
3279
+ },
3280
+ decode(input, length) {
3281
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3282
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3283
+ if (previousRecursionDepth >= 100) {
3284
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3285
+ }
3286
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3287
+ try {
3288
+ const end = length === undefined ? reader.len : reader.pos + length;
3289
+ const message = createBaseSourceBuild();
3290
+ while (reader.pos < end) {
3291
+ const tag = reader.uint32();
3292
+ switch (tag >>> 3) {
3293
+ case 1: {
3294
+ if (tag !== 10) {
3295
+ break;
3296
+ }
3297
+ message.id = reader.string();
3298
+ continue;
3299
+ }
3300
+ case 2: {
3301
+ if (tag !== 18) {
3302
+ break;
3303
+ }
3304
+ message.targetId = reader.string();
3305
+ continue;
3306
+ }
3307
+ case 3: {
3308
+ if (tag !== 26) {
3309
+ break;
3310
+ }
3311
+ message.commitSha = reader.string();
3312
+ continue;
3313
+ }
3314
+ case 4: {
3315
+ if (tag !== 34) {
3316
+ break;
3317
+ }
3318
+ message.branch = reader.string();
3319
+ continue;
3320
+ }
3321
+ case 5: {
3322
+ if (tag !== 42) {
3323
+ break;
3324
+ }
3325
+ message.status = reader.string();
3326
+ continue;
3327
+ }
3328
+ case 6: {
3329
+ if (tag !== 48) {
3330
+ break;
3331
+ }
3332
+ message.cancelRequested = reader.bool();
3333
+ continue;
3334
+ }
3335
+ case 7: {
3336
+ if (tag !== 58) {
3337
+ break;
3338
+ }
3339
+ message.errorCode = reader.string();
3340
+ continue;
3341
+ }
3342
+ case 8: {
3343
+ if (tag !== 66) {
3344
+ break;
3345
+ }
3346
+ const entry8 = exports.SourceBuild_ImagesEntry.decode(reader, reader.uint32());
3347
+ if (entry8.value !== undefined) {
3348
+ message.images[entry8.key] = entry8.value;
3349
+ }
3350
+ continue;
3351
+ }
3352
+ case 9: {
3353
+ if (tag !== 74) {
3354
+ break;
3355
+ }
3356
+ message.createdAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
3357
+ continue;
3358
+ }
3359
+ case 10: {
3360
+ if (tag !== 82) {
3361
+ break;
3362
+ }
3363
+ message.startedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
3364
+ continue;
3365
+ }
3366
+ case 11: {
3367
+ if (tag !== 90) {
3368
+ break;
3369
+ }
3370
+ message.finishedAt = fromTimestamp(timestamp_js_1.Timestamp.decode(reader, reader.uint32()));
3371
+ continue;
3372
+ }
3373
+ case 12: {
3374
+ if (tag !== 96) {
3375
+ break;
3376
+ }
3377
+ message.allowanceConsumed = reader.bool();
3378
+ continue;
3379
+ }
3380
+ }
3381
+ if ((tag & 7) === 4 || tag === 0) {
3382
+ break;
3383
+ }
3384
+ reader.skip(tag & 7);
3385
+ }
3386
+ return message;
3387
+ }
3388
+ finally {
3389
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3390
+ }
3391
+ },
3392
+ fromJSON(object) {
3393
+ return {
3394
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
3395
+ targetId: isSet(object.targetId)
3396
+ ? globalThis.String(object.targetId)
3397
+ : isSet(object.target_id)
3398
+ ? globalThis.String(object.target_id)
3399
+ : "",
3400
+ commitSha: isSet(object.commitSha)
3401
+ ? globalThis.String(object.commitSha)
3402
+ : isSet(object.commit_sha)
3403
+ ? globalThis.String(object.commit_sha)
3404
+ : "",
3405
+ branch: isSet(object.branch) ? globalThis.String(object.branch) : "",
3406
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
3407
+ cancelRequested: isSet(object.cancelRequested)
3408
+ ? globalThis.Boolean(object.cancelRequested)
3409
+ : isSet(object.cancel_requested)
3410
+ ? globalThis.Boolean(object.cancel_requested)
3411
+ : false,
3412
+ errorCode: isSet(object.errorCode)
3413
+ ? globalThis.String(object.errorCode)
3414
+ : isSet(object.error_code)
3415
+ ? globalThis.String(object.error_code)
3416
+ : "",
3417
+ images: isObject(object.images)
3418
+ ? globalThis.Object.entries(object.images).reduce((acc, [key, value]) => {
3419
+ globalThis.Object.defineProperty(acc, key, {
3420
+ value: globalThis.String(value),
3421
+ enumerable: true,
3422
+ configurable: true,
3423
+ writable: true,
3424
+ });
3425
+ return acc;
3426
+ }, {})
3427
+ : {},
3428
+ createdAt: isSet(object.createdAt)
3429
+ ? fromJsonTimestamp(object.createdAt)
3430
+ : isSet(object.created_at)
3431
+ ? fromJsonTimestamp(object.created_at)
3432
+ : undefined,
3433
+ startedAt: isSet(object.startedAt)
3434
+ ? fromJsonTimestamp(object.startedAt)
3435
+ : isSet(object.started_at)
3436
+ ? fromJsonTimestamp(object.started_at)
3437
+ : undefined,
3438
+ finishedAt: isSet(object.finishedAt)
3439
+ ? fromJsonTimestamp(object.finishedAt)
3440
+ : isSet(object.finished_at)
3441
+ ? fromJsonTimestamp(object.finished_at)
3442
+ : undefined,
3443
+ allowanceConsumed: isSet(object.allowanceConsumed)
3444
+ ? globalThis.Boolean(object.allowanceConsumed)
3445
+ : isSet(object.allowance_consumed)
3446
+ ? globalThis.Boolean(object.allowance_consumed)
3447
+ : false,
3448
+ };
3449
+ },
3450
+ toJSON(message) {
3451
+ const obj = {};
3452
+ if (message.id !== "") {
3453
+ obj.id = message.id;
3454
+ }
3455
+ if (message.targetId !== "") {
3456
+ obj.targetId = message.targetId;
3457
+ }
3458
+ if (message.commitSha !== "") {
3459
+ obj.commitSha = message.commitSha;
3460
+ }
3461
+ if (message.branch !== "") {
3462
+ obj.branch = message.branch;
3463
+ }
3464
+ if (message.status !== "") {
3465
+ obj.status = message.status;
3466
+ }
3467
+ if (message.cancelRequested !== false) {
3468
+ obj.cancelRequested = message.cancelRequested;
3469
+ }
3470
+ if (message.errorCode !== "") {
3471
+ obj.errorCode = message.errorCode;
3472
+ }
3473
+ if (message.images) {
3474
+ const entries = globalThis.Object.entries(message.images);
3475
+ if (entries.length > 0) {
3476
+ obj.images = {};
3477
+ entries.forEach(([k, v]) => {
3478
+ obj.images[k] = v;
3479
+ });
3480
+ }
3481
+ }
3482
+ if (message.createdAt !== undefined) {
3483
+ obj.createdAt = message.createdAt.toISOString();
3484
+ }
3485
+ if (message.startedAt !== undefined) {
3486
+ obj.startedAt = message.startedAt.toISOString();
3487
+ }
3488
+ if (message.finishedAt !== undefined) {
3489
+ obj.finishedAt = message.finishedAt.toISOString();
3490
+ }
3491
+ if (message.allowanceConsumed !== false) {
3492
+ obj.allowanceConsumed = message.allowanceConsumed;
3493
+ }
3494
+ return obj;
3495
+ },
3496
+ create(base) {
3497
+ return exports.SourceBuild.fromPartial(base ?? {});
3498
+ },
3499
+ fromPartial(object) {
3500
+ const message = createBaseSourceBuild();
3501
+ message.id = object.id ?? "";
3502
+ message.targetId = object.targetId ?? "";
3503
+ message.commitSha = object.commitSha ?? "";
3504
+ message.branch = object.branch ?? "";
3505
+ message.status = object.status ?? "";
3506
+ message.cancelRequested = object.cancelRequested ?? false;
3507
+ message.errorCode = object.errorCode ?? "";
3508
+ message.images = globalThis.Object.entries(object.images ?? {}).reduce((acc, [key, value]) => {
3509
+ if (value !== undefined) {
3510
+ acc[key] = globalThis.String(value);
3511
+ }
3512
+ return acc;
3513
+ }, {});
3514
+ message.createdAt = object.createdAt ?? undefined;
3515
+ message.startedAt = object.startedAt ?? undefined;
3516
+ message.finishedAt = object.finishedAt ?? undefined;
3517
+ message.allowanceConsumed = object.allowanceConsumed ?? false;
3518
+ return message;
3519
+ },
3520
+ };
3521
+ function createBaseSourceBuild_ImagesEntry() {
3522
+ return { key: "", value: "" };
3523
+ }
3524
+ exports.SourceBuild_ImagesEntry = {
3525
+ encode(message, writer = new wire_1.BinaryWriter()) {
3526
+ if (message.key !== "") {
3527
+ writer.uint32(10).string(message.key);
3528
+ }
3529
+ if (message.value !== "") {
3530
+ writer.uint32(18).string(message.value);
3531
+ }
3532
+ return writer;
3533
+ },
3534
+ decode(input, length) {
3535
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3536
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3537
+ if (previousRecursionDepth >= 100) {
3538
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3539
+ }
3540
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3541
+ try {
3542
+ const end = length === undefined ? reader.len : reader.pos + length;
3543
+ const message = createBaseSourceBuild_ImagesEntry();
3544
+ while (reader.pos < end) {
3545
+ const tag = reader.uint32();
3546
+ switch (tag >>> 3) {
3547
+ case 1: {
3548
+ if (tag !== 10) {
3549
+ break;
3550
+ }
3551
+ message.key = reader.string();
3552
+ continue;
3553
+ }
3554
+ case 2: {
3555
+ if (tag !== 18) {
3556
+ break;
3557
+ }
3558
+ message.value = reader.string();
3559
+ continue;
3560
+ }
3561
+ }
3562
+ if ((tag & 7) === 4 || tag === 0) {
3563
+ break;
3564
+ }
3565
+ reader.skip(tag & 7);
3566
+ }
3567
+ return message;
3568
+ }
3569
+ finally {
3570
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3571
+ }
3572
+ },
3573
+ fromJSON(object) {
3574
+ return {
3575
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3576
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
3577
+ };
3578
+ },
3579
+ toJSON(message) {
3580
+ const obj = {};
3581
+ if (message.key !== "") {
3582
+ obj.key = message.key;
3583
+ }
3584
+ if (message.value !== "") {
3585
+ obj.value = message.value;
3586
+ }
3587
+ return obj;
3588
+ },
3589
+ create(base) {
3590
+ return exports.SourceBuild_ImagesEntry.fromPartial(base ?? {});
3591
+ },
3592
+ fromPartial(object) {
3593
+ const message = createBaseSourceBuild_ImagesEntry();
3594
+ message.key = object.key ?? "";
3595
+ message.value = object.value ?? "";
3596
+ return message;
3597
+ },
3598
+ };
3599
+ function createBaseGetSourceBuildLogsRequest() {
3600
+ return { orgId: "", buildId: "", fromSequence: 0n };
3601
+ }
3602
+ exports.GetSourceBuildLogsRequest = {
3603
+ encode(message, writer = new wire_1.BinaryWriter()) {
3604
+ if (message.orgId !== "") {
3605
+ writer.uint32(10).string(message.orgId);
3606
+ }
3607
+ if (message.buildId !== "") {
3608
+ writer.uint32(18).string(message.buildId);
3609
+ }
3610
+ if (message.fromSequence !== 0n) {
3611
+ if (BigInt.asIntN(64, message.fromSequence) !== message.fromSequence) {
3612
+ throw new globalThis.Error("value provided for field message.fromSequence of type int64 too large");
3613
+ }
3614
+ writer.uint32(24).int64(message.fromSequence);
3615
+ }
3616
+ return writer;
3617
+ },
3618
+ decode(input, length) {
3619
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3620
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3621
+ if (previousRecursionDepth >= 100) {
3622
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3623
+ }
3624
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3625
+ try {
3626
+ const end = length === undefined ? reader.len : reader.pos + length;
3627
+ const message = createBaseGetSourceBuildLogsRequest();
3628
+ while (reader.pos < end) {
3629
+ const tag = reader.uint32();
3630
+ switch (tag >>> 3) {
3631
+ case 1: {
3632
+ if (tag !== 10) {
3633
+ break;
3634
+ }
3635
+ message.orgId = reader.string();
3636
+ continue;
3637
+ }
3638
+ case 2: {
3639
+ if (tag !== 18) {
3640
+ break;
3641
+ }
3642
+ message.buildId = reader.string();
3643
+ continue;
3644
+ }
3645
+ case 3: {
3646
+ if (tag !== 24) {
3647
+ break;
3648
+ }
3649
+ message.fromSequence = reader.int64();
3650
+ continue;
3651
+ }
3652
+ }
3653
+ if ((tag & 7) === 4 || tag === 0) {
3654
+ break;
3655
+ }
3656
+ reader.skip(tag & 7);
3657
+ }
3658
+ return message;
3659
+ }
3660
+ finally {
3661
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3662
+ }
3663
+ },
3664
+ fromJSON(object) {
3665
+ return {
3666
+ orgId: isSet(object.orgId)
3667
+ ? globalThis.String(object.orgId)
3668
+ : isSet(object.org_id)
3669
+ ? globalThis.String(object.org_id)
3670
+ : "",
3671
+ buildId: isSet(object.buildId)
3672
+ ? globalThis.String(object.buildId)
3673
+ : isSet(object.build_id)
3674
+ ? globalThis.String(object.build_id)
3675
+ : "",
3676
+ fromSequence: isSet(object.fromSequence)
3677
+ ? BigInt(object.fromSequence)
3678
+ : isSet(object.from_sequence)
3679
+ ? BigInt(object.from_sequence)
3680
+ : 0n,
3681
+ };
3682
+ },
3683
+ toJSON(message) {
3684
+ const obj = {};
3685
+ if (message.orgId !== "") {
3686
+ obj.orgId = message.orgId;
3687
+ }
3688
+ if (message.buildId !== "") {
3689
+ obj.buildId = message.buildId;
3690
+ }
3691
+ if (message.fromSequence !== 0n) {
3692
+ obj.fromSequence = message.fromSequence.toString();
3693
+ }
3694
+ return obj;
3695
+ },
3696
+ create(base) {
3697
+ return exports.GetSourceBuildLogsRequest.fromPartial(base ?? {});
3698
+ },
3699
+ fromPartial(object) {
3700
+ const message = createBaseGetSourceBuildLogsRequest();
3701
+ message.orgId = object.orgId ?? "";
3702
+ message.buildId = object.buildId ?? "";
3703
+ message.fromSequence = (object.fromSequence !== undefined && object.fromSequence !== null)
3704
+ ? BigInt(object.fromSequence)
3705
+ : 0n;
3706
+ return message;
3707
+ },
3708
+ };
3709
+ function createBaseSourceBuildLogChunk() {
3710
+ return { sequence: 0n, text: "" };
3711
+ }
3712
+ exports.SourceBuildLogChunk = {
3713
+ encode(message, writer = new wire_1.BinaryWriter()) {
3714
+ if (message.sequence !== 0n) {
3715
+ if (BigInt.asIntN(64, message.sequence) !== message.sequence) {
3716
+ throw new globalThis.Error("value provided for field message.sequence of type int64 too large");
3717
+ }
3718
+ writer.uint32(8).int64(message.sequence);
3719
+ }
3720
+ if (message.text !== "") {
3721
+ writer.uint32(18).string(message.text);
3722
+ }
3723
+ return writer;
3724
+ },
3725
+ decode(input, length) {
3726
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3727
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3728
+ if (previousRecursionDepth >= 100) {
3729
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3730
+ }
3731
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3732
+ try {
3733
+ const end = length === undefined ? reader.len : reader.pos + length;
3734
+ const message = createBaseSourceBuildLogChunk();
3735
+ while (reader.pos < end) {
3736
+ const tag = reader.uint32();
3737
+ switch (tag >>> 3) {
3738
+ case 1: {
3739
+ if (tag !== 8) {
3740
+ break;
3741
+ }
3742
+ message.sequence = reader.int64();
3743
+ continue;
3744
+ }
3745
+ case 2: {
3746
+ if (tag !== 18) {
3747
+ break;
3748
+ }
3749
+ message.text = reader.string();
3750
+ continue;
3751
+ }
3752
+ }
3753
+ if ((tag & 7) === 4 || tag === 0) {
3754
+ break;
3755
+ }
3756
+ reader.skip(tag & 7);
3757
+ }
3758
+ return message;
3759
+ }
3760
+ finally {
3761
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3762
+ }
3763
+ },
3764
+ fromJSON(object) {
3765
+ return {
3766
+ sequence: isSet(object.sequence) ? BigInt(object.sequence) : 0n,
3767
+ text: isSet(object.text) ? globalThis.String(object.text) : "",
3768
+ };
3769
+ },
3770
+ toJSON(message) {
3771
+ const obj = {};
3772
+ if (message.sequence !== 0n) {
3773
+ obj.sequence = message.sequence.toString();
3774
+ }
3775
+ if (message.text !== "") {
3776
+ obj.text = message.text;
3777
+ }
3778
+ return obj;
3779
+ },
3780
+ create(base) {
3781
+ return exports.SourceBuildLogChunk.fromPartial(base ?? {});
3782
+ },
3783
+ fromPartial(object) {
3784
+ const message = createBaseSourceBuildLogChunk();
3785
+ message.sequence = (object.sequence !== undefined && object.sequence !== null) ? BigInt(object.sequence) : 0n;
3786
+ message.text = object.text ?? "";
3787
+ return message;
3788
+ },
3789
+ };
3790
+ function createBaseGetSourceBuildLogsResponse() {
3791
+ return { chunks: [], nextSequence: 0n, truncated: false };
3792
+ }
3793
+ exports.GetSourceBuildLogsResponse = {
3794
+ encode(message, writer = new wire_1.BinaryWriter()) {
3795
+ for (const v of message.chunks) {
3796
+ exports.SourceBuildLogChunk.encode(v, writer.uint32(10).fork()).join();
3797
+ }
3798
+ if (message.nextSequence !== 0n) {
3799
+ if (BigInt.asIntN(64, message.nextSequence) !== message.nextSequence) {
3800
+ throw new globalThis.Error("value provided for field message.nextSequence of type int64 too large");
3801
+ }
3802
+ writer.uint32(16).int64(message.nextSequence);
3803
+ }
3804
+ if (message.truncated !== false) {
3805
+ writer.uint32(24).bool(message.truncated);
3806
+ }
3807
+ return writer;
3808
+ },
3809
+ decode(input, length) {
3810
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3811
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3812
+ if (previousRecursionDepth >= 100) {
3813
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3814
+ }
3815
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3816
+ try {
3817
+ const end = length === undefined ? reader.len : reader.pos + length;
3818
+ const message = createBaseGetSourceBuildLogsResponse();
3819
+ while (reader.pos < end) {
3820
+ const tag = reader.uint32();
3821
+ switch (tag >>> 3) {
3822
+ case 1: {
3823
+ if (tag !== 10) {
3824
+ break;
3825
+ }
3826
+ message.chunks.push(exports.SourceBuildLogChunk.decode(reader, reader.uint32()));
3827
+ continue;
3828
+ }
3829
+ case 2: {
3830
+ if (tag !== 16) {
3831
+ break;
3832
+ }
3833
+ message.nextSequence = reader.int64();
3834
+ continue;
3835
+ }
3836
+ case 3: {
3837
+ if (tag !== 24) {
3838
+ break;
3839
+ }
3840
+ message.truncated = reader.bool();
3841
+ continue;
3842
+ }
3843
+ }
3844
+ if ((tag & 7) === 4 || tag === 0) {
3845
+ break;
3846
+ }
3847
+ reader.skip(tag & 7);
3848
+ }
3849
+ return message;
3850
+ }
3851
+ finally {
3852
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3853
+ }
3854
+ },
3855
+ fromJSON(object) {
3856
+ return {
3857
+ chunks: globalThis.Array.isArray(object?.chunks)
3858
+ ? object.chunks.map((e) => exports.SourceBuildLogChunk.fromJSON(e))
3859
+ : [],
3860
+ nextSequence: isSet(object.nextSequence)
3861
+ ? BigInt(object.nextSequence)
3862
+ : isSet(object.next_sequence)
3863
+ ? BigInt(object.next_sequence)
3864
+ : 0n,
3865
+ truncated: isSet(object.truncated) ? globalThis.Boolean(object.truncated) : false,
3866
+ };
3867
+ },
3868
+ toJSON(message) {
3869
+ const obj = {};
3870
+ if (message.chunks?.length) {
3871
+ obj.chunks = message.chunks.map((e) => exports.SourceBuildLogChunk.toJSON(e));
3872
+ }
3873
+ if (message.nextSequence !== 0n) {
3874
+ obj.nextSequence = message.nextSequence.toString();
3875
+ }
3876
+ if (message.truncated !== false) {
3877
+ obj.truncated = message.truncated;
3878
+ }
3879
+ return obj;
3880
+ },
3881
+ create(base) {
3882
+ return exports.GetSourceBuildLogsResponse.fromPartial(base ?? {});
3883
+ },
3884
+ fromPartial(object) {
3885
+ const message = createBaseGetSourceBuildLogsResponse();
3886
+ message.chunks = object.chunks?.map((e) => exports.SourceBuildLogChunk.fromPartial(e)) || [];
3887
+ message.nextSequence = (object.nextSequence !== undefined && object.nextSequence !== null)
3888
+ ? BigInt(object.nextSequence)
3889
+ : 0n;
3890
+ message.truncated = object.truncated ?? false;
3891
+ return message;
3892
+ },
3893
+ };
3894
+ function toTimestamp(date) {
3895
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
3896
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
3897
+ return { seconds, nanos };
3898
+ }
3899
+ function fromTimestamp(t) {
3900
+ let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
3901
+ millis += (t.nanos || 0) / 1_000_000;
3902
+ return new globalThis.Date(millis);
3903
+ }
3904
+ function fromJsonTimestamp(o) {
3905
+ if (o instanceof globalThis.Date) {
3906
+ return o;
3907
+ }
3908
+ else if (typeof o === "string") {
3909
+ return new globalThis.Date(o);
3910
+ }
3911
+ else {
3912
+ return fromTimestamp(timestamp_js_1.Timestamp.fromJSON(o));
3913
+ }
3914
+ }
3915
+ function isObject(value) {
3916
+ return typeof value === "object" && value !== null;
3917
+ }
3918
+ function isSet(value) {
3919
+ return value !== null && value !== undefined;
3920
+ }