@nebius/js-sdk 0.2.1 → 0.2.2

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.
@@ -6,7 +6,7 @@ import { custom, customJson, inspectJson } from "../../../../runtime/util/loggin
6
6
  import { makeGenericClientConstructor } from "@grpc/grpc-js";
7
7
  import { Request as SDKRequestClass } from "../../../../runtime/request.js";
8
8
  import { Operation as OperationWrapper } from "../../../../runtime/operation.js";
9
- import { Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js";
9
+ import { GetByNameRequest, Operation, OperationService, ResourceMetadata } from "../../common/v1/index.js";
10
10
  const __deprecatedWarned = new Set();
11
11
  export const StorageClass = createEnum("nebius.storage.v1.StorageClass", {
12
12
  STORAGE_CLASS_UNSPECIFIED: 0,
@@ -4878,4 +4878,4593 @@ function createBaseLifecycleNoncurrentVersionTransition() {
4878
4878
  };
4879
4879
  return applyLifecycleNoncurrentVersionTransitionCustom(message);
4880
4880
  }
4881
+ export const GetTransferRequest = {
4882
+ $type: "nebius.storage.v1.GetTransferRequest",
4883
+ encode(message, writer = new BinaryWriter()) {
4884
+ if (message.id !== "") {
4885
+ writer.uint32(10).string(message.id);
4886
+ }
4887
+ if (message[unknownFieldsSymbol]) {
4888
+ writer.raw(message[unknownFieldsSymbol]);
4889
+ }
4890
+ return writer;
4891
+ },
4892
+ decode(input, length) {
4893
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4894
+ const end = length === undefined ? reader.len : reader.pos + length;
4895
+ const message = createBaseGetTransferRequest();
4896
+ let writer = undefined;
4897
+ while (reader.pos < end) {
4898
+ const tag = reader.uint32();
4899
+ switch (tag >>> 3) {
4900
+ case 1: {
4901
+ if (tag !== 10)
4902
+ break;
4903
+ message.id = reader.string();
4904
+ continue;
4905
+ }
4906
+ default:
4907
+ break;
4908
+ }
4909
+ if ((tag & 7) === 4 || tag === 0) {
4910
+ break;
4911
+ }
4912
+ {
4913
+ if (!writer)
4914
+ writer = new BinaryWriter();
4915
+ const skipped = reader.skip(tag & 7, tag >>> 3);
4916
+ writer.uint32(tag).raw(skipped);
4917
+ }
4918
+ }
4919
+ if (writer) {
4920
+ message[unknownFieldsSymbol] = writer.finish();
4921
+ }
4922
+ return message;
4923
+ },
4924
+ fromJSON(object) {
4925
+ return applyGetTransferRequestCustom({
4926
+ $type: "nebius.storage.v1.GetTransferRequest",
4927
+ id: isSet(object.id ?? object.id)
4928
+ ? String(object.id ?? object.id)
4929
+ : "",
4930
+ });
4931
+ },
4932
+ toJSON(message, use = "json") {
4933
+ const obj = {};
4934
+ const pick = (json, pb) => (use === "json" ? json : pb);
4935
+ if (message.id !== "") {
4936
+ obj[pick("id", "id")] = message.id;
4937
+ }
4938
+ return obj;
4939
+ },
4940
+ create(base) {
4941
+ return GetTransferRequest.fromPartial(base ?? {});
4942
+ },
4943
+ fromPartial(object) {
4944
+ const message = createBaseGetTransferRequest();
4945
+ message.id = (object.id !== undefined && object.id !== null)
4946
+ ? object.id
4947
+ : "";
4948
+ return message;
4949
+ },
4950
+ };
4951
+ protoRegistry.registerMessage(GetTransferRequest);
4952
+ function GetTransferRequestCustomInspect() {
4953
+ const parts = [];
4954
+ if (this.id !== "")
4955
+ parts.push("id" + "=" + inspect(this.id));
4956
+ return `${this.$type}(${parts.join(", ")})`;
4957
+ }
4958
+ function GetTransferRequestCustomJson() {
4959
+ const obj = {
4960
+ type: this.$type,
4961
+ };
4962
+ if (this.id !== "")
4963
+ obj.id = inspectJson(this.id);
4964
+ return obj;
4965
+ }
4966
+ function applyGetTransferRequestCustom(message) {
4967
+ message[custom] = GetTransferRequestCustomInspect;
4968
+ message[customJson] = GetTransferRequestCustomJson;
4969
+ return message;
4970
+ }
4971
+ function createBaseGetTransferRequest() {
4972
+ const message = {
4973
+ $type: "nebius.storage.v1.GetTransferRequest",
4974
+ id: "",
4975
+ };
4976
+ return applyGetTransferRequestCustom(message);
4977
+ }
4978
+ export const ListTransfersRequest = {
4979
+ $type: "nebius.storage.v1.ListTransfersRequest",
4980
+ encode(message, writer = new BinaryWriter()) {
4981
+ if (message.parentId !== "") {
4982
+ writer.uint32(10).string(message.parentId);
4983
+ }
4984
+ if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
4985
+ writer.uint32(16).int64(message.pageSize.toString());
4986
+ }
4987
+ if (message.pageToken !== "") {
4988
+ writer.uint32(26).string(message.pageToken);
4989
+ }
4990
+ if (message[unknownFieldsSymbol]) {
4991
+ writer.raw(message[unknownFieldsSymbol]);
4992
+ }
4993
+ return writer;
4994
+ },
4995
+ decode(input, length) {
4996
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4997
+ const end = length === undefined ? reader.len : reader.pos + length;
4998
+ const message = createBaseListTransfersRequest();
4999
+ let writer = undefined;
5000
+ while (reader.pos < end) {
5001
+ const tag = reader.uint32();
5002
+ switch (tag >>> 3) {
5003
+ case 1: {
5004
+ if (tag !== 10)
5005
+ break;
5006
+ message.parentId = reader.string();
5007
+ continue;
5008
+ }
5009
+ case 2: {
5010
+ if (tag !== 16)
5011
+ break;
5012
+ message.pageSize = Long.fromValue(reader.int64());
5013
+ continue;
5014
+ }
5015
+ case 3: {
5016
+ if (tag !== 26)
5017
+ break;
5018
+ message.pageToken = reader.string();
5019
+ continue;
5020
+ }
5021
+ default:
5022
+ break;
5023
+ }
5024
+ if ((tag & 7) === 4 || tag === 0) {
5025
+ break;
5026
+ }
5027
+ {
5028
+ if (!writer)
5029
+ writer = new BinaryWriter();
5030
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5031
+ writer.uint32(tag).raw(skipped);
5032
+ }
5033
+ }
5034
+ if (writer) {
5035
+ message[unknownFieldsSymbol] = writer.finish();
5036
+ }
5037
+ return message;
5038
+ },
5039
+ fromJSON(object) {
5040
+ return applyListTransfersRequestCustom({
5041
+ $type: "nebius.storage.v1.ListTransfersRequest",
5042
+ parentId: isSet(object.parentId ?? object.parent_id)
5043
+ ? String(object.parentId ?? object.parent_id)
5044
+ : "",
5045
+ pageSize: isSet(object.pageSize ?? object.page_size)
5046
+ ? Long.fromValue(object.pageSize ?? object.page_size)
5047
+ : Long.ZERO,
5048
+ pageToken: isSet(object.pageToken ?? object.page_token)
5049
+ ? String(object.pageToken ?? object.page_token)
5050
+ : "",
5051
+ });
5052
+ },
5053
+ toJSON(message, use = "json") {
5054
+ const obj = {};
5055
+ const pick = (json, pb) => (use === "json" ? json : pb);
5056
+ if (message.parentId !== "") {
5057
+ obj[pick("parentId", "parent_id")] = message.parentId;
5058
+ }
5059
+ if (!message.pageSize?.isZero?.()) {
5060
+ obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
5061
+ }
5062
+ if (message.pageToken !== "") {
5063
+ obj[pick("pageToken", "page_token")] = message.pageToken;
5064
+ }
5065
+ return obj;
5066
+ },
5067
+ create(base) {
5068
+ return ListTransfersRequest.fromPartial(base ?? {});
5069
+ },
5070
+ fromPartial(object) {
5071
+ const message = createBaseListTransfersRequest();
5072
+ message.parentId = (object.parentId !== undefined && object.parentId !== null)
5073
+ ? object.parentId
5074
+ : "";
5075
+ message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
5076
+ ? Long.fromValue(object.pageSize)
5077
+ : Long.ZERO;
5078
+ message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
5079
+ ? object.pageToken
5080
+ : "";
5081
+ return message;
5082
+ },
5083
+ };
5084
+ protoRegistry.registerMessage(ListTransfersRequest);
5085
+ function ListTransfersRequestCustomInspect() {
5086
+ const parts = [];
5087
+ if (this.parentId !== "")
5088
+ parts.push("parentId" + "=" + inspect(this.parentId));
5089
+ if (!this.pageSize?.isZero?.())
5090
+ parts.push("pageSize" + "=" + inspect(this.pageSize));
5091
+ if (this.pageToken !== "")
5092
+ parts.push("pageToken" + "=" + inspect(this.pageToken));
5093
+ return `${this.$type}(${parts.join(", ")})`;
5094
+ }
5095
+ function ListTransfersRequestCustomJson() {
5096
+ const obj = {
5097
+ type: this.$type,
5098
+ };
5099
+ if (this.parentId !== "")
5100
+ obj.parentId = inspectJson(this.parentId);
5101
+ if (!this.pageSize?.isZero?.())
5102
+ obj.pageSize = inspectJson(this.pageSize);
5103
+ if (this.pageToken !== "")
5104
+ obj.pageToken = inspectJson(this.pageToken);
5105
+ return obj;
5106
+ }
5107
+ function applyListTransfersRequestCustom(message) {
5108
+ message[custom] = ListTransfersRequestCustomInspect;
5109
+ message[customJson] = ListTransfersRequestCustomJson;
5110
+ return message;
5111
+ }
5112
+ function createBaseListTransfersRequest() {
5113
+ const message = {
5114
+ $type: "nebius.storage.v1.ListTransfersRequest",
5115
+ parentId: "",
5116
+ pageSize: Long.ZERO,
5117
+ pageToken: "",
5118
+ };
5119
+ return applyListTransfersRequestCustom(message);
5120
+ }
5121
+ export const ListTransfersResponse = {
5122
+ $type: "nebius.storage.v1.ListTransfersResponse",
5123
+ encode(message, writer = new BinaryWriter()) {
5124
+ for (const v of (message.items ?? [])) {
5125
+ const w = writer.uint32(10).fork();
5126
+ Transfer.encode(v, w);
5127
+ w.join();
5128
+ }
5129
+ if (message.nextPageToken !== "") {
5130
+ writer.uint32(18).string(message.nextPageToken);
5131
+ }
5132
+ if (message[unknownFieldsSymbol]) {
5133
+ writer.raw(message[unknownFieldsSymbol]);
5134
+ }
5135
+ return writer;
5136
+ },
5137
+ decode(input, length) {
5138
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5139
+ const end = length === undefined ? reader.len : reader.pos + length;
5140
+ const message = createBaseListTransfersResponse();
5141
+ let writer = undefined;
5142
+ while (reader.pos < end) {
5143
+ const tag = reader.uint32();
5144
+ switch (tag >>> 3) {
5145
+ case 1: {
5146
+ if (tag !== 10)
5147
+ break;
5148
+ message.items.push(Transfer.decode(reader, reader.uint32()));
5149
+ continue;
5150
+ }
5151
+ case 2: {
5152
+ if (tag !== 18)
5153
+ break;
5154
+ message.nextPageToken = reader.string();
5155
+ continue;
5156
+ }
5157
+ default:
5158
+ break;
5159
+ }
5160
+ if ((tag & 7) === 4 || tag === 0) {
5161
+ break;
5162
+ }
5163
+ {
5164
+ if (!writer)
5165
+ writer = new BinaryWriter();
5166
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5167
+ writer.uint32(tag).raw(skipped);
5168
+ }
5169
+ }
5170
+ if (writer) {
5171
+ message[unknownFieldsSymbol] = writer.finish();
5172
+ }
5173
+ return message;
5174
+ },
5175
+ fromJSON(object) {
5176
+ return applyListTransfersResponseCustom({
5177
+ $type: "nebius.storage.v1.ListTransfersResponse",
5178
+ items: globalThis.Array.isArray(object?.items ?? object?.items)
5179
+ ? (object.items ?? object.items).map((e) => Transfer.fromJSON(e))
5180
+ : [],
5181
+ nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
5182
+ ? String(object.nextPageToken ?? object.next_page_token)
5183
+ : "",
5184
+ });
5185
+ },
5186
+ toJSON(message, use = "json") {
5187
+ const obj = {};
5188
+ const pick = (json, pb) => (use === "json" ? json : pb);
5189
+ if (message.items?.length) {
5190
+ obj[pick("items", "items")] = message.items.map((e) => e ? Transfer.toJSON(e, use) : undefined);
5191
+ }
5192
+ if (message.nextPageToken !== "") {
5193
+ obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
5194
+ }
5195
+ return obj;
5196
+ },
5197
+ create(base) {
5198
+ return ListTransfersResponse.fromPartial(base ?? {});
5199
+ },
5200
+ fromPartial(object) {
5201
+ const message = createBaseListTransfersResponse();
5202
+ message.items = object.items?.map((e) => Transfer.fromPartial(e)) || [];
5203
+ message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
5204
+ ? object.nextPageToken
5205
+ : "";
5206
+ return message;
5207
+ },
5208
+ };
5209
+ protoRegistry.registerMessage(ListTransfersResponse);
5210
+ function ListTransfersResponseCustomInspect() {
5211
+ const parts = [];
5212
+ if ((this.items?.length ?? 0) !== 0)
5213
+ parts.push("items" + "=" + inspect(this.items));
5214
+ if (this.nextPageToken !== "")
5215
+ parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
5216
+ return `${this.$type}(${parts.join(", ")})`;
5217
+ }
5218
+ function ListTransfersResponseCustomJson() {
5219
+ const obj = {
5220
+ type: this.$type,
5221
+ };
5222
+ if ((this.items?.length ?? 0) !== 0)
5223
+ obj.items = inspectJson(this.items);
5224
+ if (this.nextPageToken !== "")
5225
+ obj.nextPageToken = inspectJson(this.nextPageToken);
5226
+ return obj;
5227
+ }
5228
+ function applyListTransfersResponseCustom(message) {
5229
+ message[custom] = ListTransfersResponseCustomInspect;
5230
+ message[customJson] = ListTransfersResponseCustomJson;
5231
+ return message;
5232
+ }
5233
+ function createBaseListTransfersResponse() {
5234
+ const message = {
5235
+ $type: "nebius.storage.v1.ListTransfersResponse",
5236
+ items: [],
5237
+ nextPageToken: "",
5238
+ };
5239
+ return applyListTransfersResponseCustom(message);
5240
+ }
5241
+ export const CreateTransferRequest = {
5242
+ $type: "nebius.storage.v1.CreateTransferRequest",
5243
+ encode(message, writer = new BinaryWriter()) {
5244
+ if (message.metadata !== undefined) {
5245
+ const w = writer.uint32(10).fork();
5246
+ ResourceMetadata.encode(message.metadata, w);
5247
+ w.join();
5248
+ }
5249
+ if (message.spec !== undefined) {
5250
+ const w = writer.uint32(18).fork();
5251
+ TransferSpec.encode(message.spec, w);
5252
+ w.join();
5253
+ }
5254
+ if (message[unknownFieldsSymbol]) {
5255
+ writer.raw(message[unknownFieldsSymbol]);
5256
+ }
5257
+ return writer;
5258
+ },
5259
+ decode(input, length) {
5260
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5261
+ const end = length === undefined ? reader.len : reader.pos + length;
5262
+ const message = createBaseCreateTransferRequest();
5263
+ let writer = undefined;
5264
+ while (reader.pos < end) {
5265
+ const tag = reader.uint32();
5266
+ switch (tag >>> 3) {
5267
+ case 1: {
5268
+ if (tag !== 10)
5269
+ break;
5270
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
5271
+ continue;
5272
+ }
5273
+ case 2: {
5274
+ if (tag !== 18)
5275
+ break;
5276
+ message.spec = TransferSpec.decode(reader, reader.uint32());
5277
+ continue;
5278
+ }
5279
+ default:
5280
+ break;
5281
+ }
5282
+ if ((tag & 7) === 4 || tag === 0) {
5283
+ break;
5284
+ }
5285
+ {
5286
+ if (!writer)
5287
+ writer = new BinaryWriter();
5288
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5289
+ writer.uint32(tag).raw(skipped);
5290
+ }
5291
+ }
5292
+ if (writer) {
5293
+ message[unknownFieldsSymbol] = writer.finish();
5294
+ }
5295
+ return message;
5296
+ },
5297
+ fromJSON(object) {
5298
+ return applyCreateTransferRequestCustom({
5299
+ $type: "nebius.storage.v1.CreateTransferRequest",
5300
+ metadata: isSet(object.metadata ?? object.metadata)
5301
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
5302
+ : undefined,
5303
+ spec: isSet(object.spec ?? object.spec)
5304
+ ? TransferSpec.fromJSON(object.spec ?? object.spec)
5305
+ : undefined,
5306
+ });
5307
+ },
5308
+ toJSON(message, use = "json") {
5309
+ const obj = {};
5310
+ const pick = (json, pb) => (use === "json" ? json : pb);
5311
+ if (message.metadata !== undefined) {
5312
+ obj[pick("metadata", "metadata")] = message.metadata
5313
+ ? ResourceMetadata.toJSON(message.metadata, use)
5314
+ : undefined;
5315
+ }
5316
+ if (message.spec !== undefined) {
5317
+ obj[pick("spec", "spec")] = message.spec
5318
+ ? TransferSpec.toJSON(message.spec, use)
5319
+ : undefined;
5320
+ }
5321
+ return obj;
5322
+ },
5323
+ create(base) {
5324
+ return CreateTransferRequest.fromPartial(base ?? {});
5325
+ },
5326
+ fromPartial(object) {
5327
+ const message = createBaseCreateTransferRequest();
5328
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
5329
+ ? ResourceMetadata.fromPartial(object.metadata)
5330
+ : undefined;
5331
+ message.spec = (object.spec !== undefined && object.spec !== null)
5332
+ ? TransferSpec.fromPartial(object.spec)
5333
+ : undefined;
5334
+ return message;
5335
+ },
5336
+ };
5337
+ protoRegistry.registerMessage(CreateTransferRequest);
5338
+ function CreateTransferRequestCustomInspect() {
5339
+ const parts = [];
5340
+ if (this.metadata !== undefined)
5341
+ parts.push("metadata" + "=" + inspect(this.metadata));
5342
+ if (this.spec !== undefined)
5343
+ parts.push("spec" + "=" + inspect(this.spec));
5344
+ return `${this.$type}(${parts.join(", ")})`;
5345
+ }
5346
+ function CreateTransferRequestCustomJson() {
5347
+ const obj = {
5348
+ type: this.$type,
5349
+ };
5350
+ if (this.metadata !== undefined)
5351
+ obj.metadata = inspectJson(this.metadata);
5352
+ if (this.spec !== undefined)
5353
+ obj.spec = inspectJson(this.spec);
5354
+ return obj;
5355
+ }
5356
+ function applyCreateTransferRequestCustom(message) {
5357
+ message[custom] = CreateTransferRequestCustomInspect;
5358
+ message[customJson] = CreateTransferRequestCustomJson;
5359
+ return message;
5360
+ }
5361
+ function createBaseCreateTransferRequest() {
5362
+ const message = {
5363
+ $type: "nebius.storage.v1.CreateTransferRequest",
5364
+ metadata: undefined,
5365
+ spec: undefined,
5366
+ };
5367
+ return applyCreateTransferRequestCustom(message);
5368
+ }
5369
+ export const UpdateTransferRequest = {
5370
+ $type: "nebius.storage.v1.UpdateTransferRequest",
5371
+ encode(message, writer = new BinaryWriter()) {
5372
+ if (message.metadata !== undefined) {
5373
+ const w = writer.uint32(10).fork();
5374
+ ResourceMetadata.encode(message.metadata, w);
5375
+ w.join();
5376
+ }
5377
+ if (message.spec !== undefined) {
5378
+ const w = writer.uint32(18).fork();
5379
+ TransferSpec.encode(message.spec, w);
5380
+ w.join();
5381
+ }
5382
+ if (message[unknownFieldsSymbol]) {
5383
+ writer.raw(message[unknownFieldsSymbol]);
5384
+ }
5385
+ return writer;
5386
+ },
5387
+ decode(input, length) {
5388
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5389
+ const end = length === undefined ? reader.len : reader.pos + length;
5390
+ const message = createBaseUpdateTransferRequest();
5391
+ let writer = undefined;
5392
+ while (reader.pos < end) {
5393
+ const tag = reader.uint32();
5394
+ switch (tag >>> 3) {
5395
+ case 1: {
5396
+ if (tag !== 10)
5397
+ break;
5398
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
5399
+ continue;
5400
+ }
5401
+ case 2: {
5402
+ if (tag !== 18)
5403
+ break;
5404
+ message.spec = TransferSpec.decode(reader, reader.uint32());
5405
+ continue;
5406
+ }
5407
+ default:
5408
+ break;
5409
+ }
5410
+ if ((tag & 7) === 4 || tag === 0) {
5411
+ break;
5412
+ }
5413
+ {
5414
+ if (!writer)
5415
+ writer = new BinaryWriter();
5416
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5417
+ writer.uint32(tag).raw(skipped);
5418
+ }
5419
+ }
5420
+ if (writer) {
5421
+ message[unknownFieldsSymbol] = writer.finish();
5422
+ }
5423
+ return message;
5424
+ },
5425
+ fromJSON(object) {
5426
+ return applyUpdateTransferRequestCustom({
5427
+ $type: "nebius.storage.v1.UpdateTransferRequest",
5428
+ metadata: isSet(object.metadata ?? object.metadata)
5429
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
5430
+ : undefined,
5431
+ spec: isSet(object.spec ?? object.spec)
5432
+ ? TransferSpec.fromJSON(object.spec ?? object.spec)
5433
+ : undefined,
5434
+ });
5435
+ },
5436
+ toJSON(message, use = "json") {
5437
+ const obj = {};
5438
+ const pick = (json, pb) => (use === "json" ? json : pb);
5439
+ if (message.metadata !== undefined) {
5440
+ obj[pick("metadata", "metadata")] = message.metadata
5441
+ ? ResourceMetadata.toJSON(message.metadata, use)
5442
+ : undefined;
5443
+ }
5444
+ if (message.spec !== undefined) {
5445
+ obj[pick("spec", "spec")] = message.spec
5446
+ ? TransferSpec.toJSON(message.spec, use)
5447
+ : undefined;
5448
+ }
5449
+ return obj;
5450
+ },
5451
+ create(base) {
5452
+ return UpdateTransferRequest.fromPartial(base ?? {});
5453
+ },
5454
+ fromPartial(object) {
5455
+ const message = createBaseUpdateTransferRequest();
5456
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
5457
+ ? ResourceMetadata.fromPartial(object.metadata)
5458
+ : undefined;
5459
+ message.spec = (object.spec !== undefined && object.spec !== null)
5460
+ ? TransferSpec.fromPartial(object.spec)
5461
+ : undefined;
5462
+ return message;
5463
+ },
5464
+ };
5465
+ protoRegistry.registerMessage(UpdateTransferRequest);
5466
+ function UpdateTransferRequestCustomInspect() {
5467
+ const parts = [];
5468
+ if (this.metadata !== undefined)
5469
+ parts.push("metadata" + "=" + inspect(this.metadata));
5470
+ if (this.spec !== undefined)
5471
+ parts.push("spec" + "=" + inspect(this.spec));
5472
+ return `${this.$type}(${parts.join(", ")})`;
5473
+ }
5474
+ function UpdateTransferRequestCustomJson() {
5475
+ const obj = {
5476
+ type: this.$type,
5477
+ };
5478
+ if (this.metadata !== undefined)
5479
+ obj.metadata = inspectJson(this.metadata);
5480
+ if (this.spec !== undefined)
5481
+ obj.spec = inspectJson(this.spec);
5482
+ return obj;
5483
+ }
5484
+ function applyUpdateTransferRequestCustom(message) {
5485
+ message[custom] = UpdateTransferRequestCustomInspect;
5486
+ message[customJson] = UpdateTransferRequestCustomJson;
5487
+ return message;
5488
+ }
5489
+ function createBaseUpdateTransferRequest() {
5490
+ const message = {
5491
+ $type: "nebius.storage.v1.UpdateTransferRequest",
5492
+ metadata: undefined,
5493
+ spec: undefined,
5494
+ };
5495
+ return applyUpdateTransferRequestCustom(message);
5496
+ }
5497
+ export const StopTransferRequest = {
5498
+ $type: "nebius.storage.v1.StopTransferRequest",
5499
+ encode(message, writer = new BinaryWriter()) {
5500
+ if (message.id !== "") {
5501
+ writer.uint32(10).string(message.id);
5502
+ }
5503
+ if (message[unknownFieldsSymbol]) {
5504
+ writer.raw(message[unknownFieldsSymbol]);
5505
+ }
5506
+ return writer;
5507
+ },
5508
+ decode(input, length) {
5509
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5510
+ const end = length === undefined ? reader.len : reader.pos + length;
5511
+ const message = createBaseStopTransferRequest();
5512
+ let writer = undefined;
5513
+ while (reader.pos < end) {
5514
+ const tag = reader.uint32();
5515
+ switch (tag >>> 3) {
5516
+ case 1: {
5517
+ if (tag !== 10)
5518
+ break;
5519
+ message.id = reader.string();
5520
+ continue;
5521
+ }
5522
+ default:
5523
+ break;
5524
+ }
5525
+ if ((tag & 7) === 4 || tag === 0) {
5526
+ break;
5527
+ }
5528
+ {
5529
+ if (!writer)
5530
+ writer = new BinaryWriter();
5531
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5532
+ writer.uint32(tag).raw(skipped);
5533
+ }
5534
+ }
5535
+ if (writer) {
5536
+ message[unknownFieldsSymbol] = writer.finish();
5537
+ }
5538
+ return message;
5539
+ },
5540
+ fromJSON(object) {
5541
+ return applyStopTransferRequestCustom({
5542
+ $type: "nebius.storage.v1.StopTransferRequest",
5543
+ id: isSet(object.id ?? object.id)
5544
+ ? String(object.id ?? object.id)
5545
+ : "",
5546
+ });
5547
+ },
5548
+ toJSON(message, use = "json") {
5549
+ const obj = {};
5550
+ const pick = (json, pb) => (use === "json" ? json : pb);
5551
+ if (message.id !== "") {
5552
+ obj[pick("id", "id")] = message.id;
5553
+ }
5554
+ return obj;
5555
+ },
5556
+ create(base) {
5557
+ return StopTransferRequest.fromPartial(base ?? {});
5558
+ },
5559
+ fromPartial(object) {
5560
+ const message = createBaseStopTransferRequest();
5561
+ message.id = (object.id !== undefined && object.id !== null)
5562
+ ? object.id
5563
+ : "";
5564
+ return message;
5565
+ },
5566
+ };
5567
+ protoRegistry.registerMessage(StopTransferRequest);
5568
+ function StopTransferRequestCustomInspect() {
5569
+ const parts = [];
5570
+ if (this.id !== "")
5571
+ parts.push("id" + "=" + inspect(this.id));
5572
+ return `${this.$type}(${parts.join(", ")})`;
5573
+ }
5574
+ function StopTransferRequestCustomJson() {
5575
+ const obj = {
5576
+ type: this.$type,
5577
+ };
5578
+ if (this.id !== "")
5579
+ obj.id = inspectJson(this.id);
5580
+ return obj;
5581
+ }
5582
+ function applyStopTransferRequestCustom(message) {
5583
+ message[custom] = StopTransferRequestCustomInspect;
5584
+ message[customJson] = StopTransferRequestCustomJson;
5585
+ return message;
5586
+ }
5587
+ function createBaseStopTransferRequest() {
5588
+ const message = {
5589
+ $type: "nebius.storage.v1.StopTransferRequest",
5590
+ id: "",
5591
+ };
5592
+ return applyStopTransferRequestCustom(message);
5593
+ }
5594
+ export const ResumeTransferRequest = {
5595
+ $type: "nebius.storage.v1.ResumeTransferRequest",
5596
+ encode(message, writer = new BinaryWriter()) {
5597
+ if (message.id !== "") {
5598
+ writer.uint32(10).string(message.id);
5599
+ }
5600
+ if (message[unknownFieldsSymbol]) {
5601
+ writer.raw(message[unknownFieldsSymbol]);
5602
+ }
5603
+ return writer;
5604
+ },
5605
+ decode(input, length) {
5606
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5607
+ const end = length === undefined ? reader.len : reader.pos + length;
5608
+ const message = createBaseResumeTransferRequest();
5609
+ let writer = undefined;
5610
+ while (reader.pos < end) {
5611
+ const tag = reader.uint32();
5612
+ switch (tag >>> 3) {
5613
+ case 1: {
5614
+ if (tag !== 10)
5615
+ break;
5616
+ message.id = reader.string();
5617
+ continue;
5618
+ }
5619
+ default:
5620
+ break;
5621
+ }
5622
+ if ((tag & 7) === 4 || tag === 0) {
5623
+ break;
5624
+ }
5625
+ {
5626
+ if (!writer)
5627
+ writer = new BinaryWriter();
5628
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5629
+ writer.uint32(tag).raw(skipped);
5630
+ }
5631
+ }
5632
+ if (writer) {
5633
+ message[unknownFieldsSymbol] = writer.finish();
5634
+ }
5635
+ return message;
5636
+ },
5637
+ fromJSON(object) {
5638
+ return applyResumeTransferRequestCustom({
5639
+ $type: "nebius.storage.v1.ResumeTransferRequest",
5640
+ id: isSet(object.id ?? object.id)
5641
+ ? String(object.id ?? object.id)
5642
+ : "",
5643
+ });
5644
+ },
5645
+ toJSON(message, use = "json") {
5646
+ const obj = {};
5647
+ const pick = (json, pb) => (use === "json" ? json : pb);
5648
+ if (message.id !== "") {
5649
+ obj[pick("id", "id")] = message.id;
5650
+ }
5651
+ return obj;
5652
+ },
5653
+ create(base) {
5654
+ return ResumeTransferRequest.fromPartial(base ?? {});
5655
+ },
5656
+ fromPartial(object) {
5657
+ const message = createBaseResumeTransferRequest();
5658
+ message.id = (object.id !== undefined && object.id !== null)
5659
+ ? object.id
5660
+ : "";
5661
+ return message;
5662
+ },
5663
+ };
5664
+ protoRegistry.registerMessage(ResumeTransferRequest);
5665
+ function ResumeTransferRequestCustomInspect() {
5666
+ const parts = [];
5667
+ if (this.id !== "")
5668
+ parts.push("id" + "=" + inspect(this.id));
5669
+ return `${this.$type}(${parts.join(", ")})`;
5670
+ }
5671
+ function ResumeTransferRequestCustomJson() {
5672
+ const obj = {
5673
+ type: this.$type,
5674
+ };
5675
+ if (this.id !== "")
5676
+ obj.id = inspectJson(this.id);
5677
+ return obj;
5678
+ }
5679
+ function applyResumeTransferRequestCustom(message) {
5680
+ message[custom] = ResumeTransferRequestCustomInspect;
5681
+ message[customJson] = ResumeTransferRequestCustomJson;
5682
+ return message;
5683
+ }
5684
+ function createBaseResumeTransferRequest() {
5685
+ const message = {
5686
+ $type: "nebius.storage.v1.ResumeTransferRequest",
5687
+ id: "",
5688
+ };
5689
+ return applyResumeTransferRequestCustom(message);
5690
+ }
5691
+ export const DeleteTransferRequest = {
5692
+ $type: "nebius.storage.v1.DeleteTransferRequest",
5693
+ encode(message, writer = new BinaryWriter()) {
5694
+ if (message.id !== "") {
5695
+ writer.uint32(10).string(message.id);
5696
+ }
5697
+ if (message.resourceVersion !== undefined && !message.resourceVersion.isZero?.()) {
5698
+ writer.uint32(16).int64(message.resourceVersion.toString());
5699
+ }
5700
+ if (message[unknownFieldsSymbol]) {
5701
+ writer.raw(message[unknownFieldsSymbol]);
5702
+ }
5703
+ return writer;
5704
+ },
5705
+ decode(input, length) {
5706
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5707
+ const end = length === undefined ? reader.len : reader.pos + length;
5708
+ const message = createBaseDeleteTransferRequest();
5709
+ let writer = undefined;
5710
+ while (reader.pos < end) {
5711
+ const tag = reader.uint32();
5712
+ switch (tag >>> 3) {
5713
+ case 1: {
5714
+ if (tag !== 10)
5715
+ break;
5716
+ message.id = reader.string();
5717
+ continue;
5718
+ }
5719
+ case 2: {
5720
+ if (tag !== 16)
5721
+ break;
5722
+ message.resourceVersion = Long.fromValue(reader.int64());
5723
+ continue;
5724
+ }
5725
+ default:
5726
+ break;
5727
+ }
5728
+ if ((tag & 7) === 4 || tag === 0) {
5729
+ break;
5730
+ }
5731
+ {
5732
+ if (!writer)
5733
+ writer = new BinaryWriter();
5734
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5735
+ writer.uint32(tag).raw(skipped);
5736
+ }
5737
+ }
5738
+ if (writer) {
5739
+ message[unknownFieldsSymbol] = writer.finish();
5740
+ }
5741
+ return message;
5742
+ },
5743
+ fromJSON(object) {
5744
+ return applyDeleteTransferRequestCustom({
5745
+ $type: "nebius.storage.v1.DeleteTransferRequest",
5746
+ id: isSet(object.id ?? object.id)
5747
+ ? String(object.id ?? object.id)
5748
+ : "",
5749
+ resourceVersion: isSet(object.resourceVersion ?? object.resource_version)
5750
+ ? Long.fromValue(object.resourceVersion ?? object.resource_version)
5751
+ : Long.ZERO,
5752
+ });
5753
+ },
5754
+ toJSON(message, use = "json") {
5755
+ const obj = {};
5756
+ const pick = (json, pb) => (use === "json" ? json : pb);
5757
+ if (message.id !== "") {
5758
+ obj[pick("id", "id")] = message.id;
5759
+ }
5760
+ if (!message.resourceVersion?.isZero?.()) {
5761
+ obj[pick("resourceVersion", "resource_version")] = (message.resourceVersion || Long.ZERO).toString();
5762
+ }
5763
+ return obj;
5764
+ },
5765
+ create(base) {
5766
+ return DeleteTransferRequest.fromPartial(base ?? {});
5767
+ },
5768
+ fromPartial(object) {
5769
+ const message = createBaseDeleteTransferRequest();
5770
+ message.id = (object.id !== undefined && object.id !== null)
5771
+ ? object.id
5772
+ : "";
5773
+ message.resourceVersion = (object.resourceVersion !== undefined && object.resourceVersion !== null)
5774
+ ? Long.fromValue(object.resourceVersion)
5775
+ : Long.ZERO;
5776
+ return message;
5777
+ },
5778
+ };
5779
+ protoRegistry.registerMessage(DeleteTransferRequest);
5780
+ function DeleteTransferRequestCustomInspect() {
5781
+ const parts = [];
5782
+ if (this.id !== "")
5783
+ parts.push("id" + "=" + inspect(this.id));
5784
+ if (!this.resourceVersion?.isZero?.())
5785
+ parts.push("resourceVersion" + "=" + inspect(this.resourceVersion));
5786
+ return `${this.$type}(${parts.join(", ")})`;
5787
+ }
5788
+ function DeleteTransferRequestCustomJson() {
5789
+ const obj = {
5790
+ type: this.$type,
5791
+ };
5792
+ if (this.id !== "")
5793
+ obj.id = inspectJson(this.id);
5794
+ if (!this.resourceVersion?.isZero?.())
5795
+ obj.resourceVersion = inspectJson(this.resourceVersion);
5796
+ return obj;
5797
+ }
5798
+ function applyDeleteTransferRequestCustom(message) {
5799
+ message[custom] = DeleteTransferRequestCustomInspect;
5800
+ message[customJson] = DeleteTransferRequestCustomJson;
5801
+ return message;
5802
+ }
5803
+ function createBaseDeleteTransferRequest() {
5804
+ const message = {
5805
+ $type: "nebius.storage.v1.DeleteTransferRequest",
5806
+ id: "",
5807
+ resourceVersion: Long.ZERO,
5808
+ };
5809
+ return applyDeleteTransferRequestCustom(message);
5810
+ }
5811
+ export const GetIterationHistoryRequest = {
5812
+ $type: "nebius.storage.v1.GetIterationHistoryRequest",
5813
+ encode(message, writer = new BinaryWriter()) {
5814
+ if (message.transferId !== "") {
5815
+ writer.uint32(10).string(message.transferId);
5816
+ }
5817
+ if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
5818
+ writer.uint32(16).int64(message.pageSize.toString());
5819
+ }
5820
+ if (message.pageToken !== "") {
5821
+ writer.uint32(26).string(message.pageToken);
5822
+ }
5823
+ if (message[unknownFieldsSymbol]) {
5824
+ writer.raw(message[unknownFieldsSymbol]);
5825
+ }
5826
+ return writer;
5827
+ },
5828
+ decode(input, length) {
5829
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5830
+ const end = length === undefined ? reader.len : reader.pos + length;
5831
+ const message = createBaseGetIterationHistoryRequest();
5832
+ let writer = undefined;
5833
+ while (reader.pos < end) {
5834
+ const tag = reader.uint32();
5835
+ switch (tag >>> 3) {
5836
+ case 1: {
5837
+ if (tag !== 10)
5838
+ break;
5839
+ message.transferId = reader.string();
5840
+ continue;
5841
+ }
5842
+ case 2: {
5843
+ if (tag !== 16)
5844
+ break;
5845
+ message.pageSize = Long.fromValue(reader.int64());
5846
+ continue;
5847
+ }
5848
+ case 3: {
5849
+ if (tag !== 26)
5850
+ break;
5851
+ message.pageToken = reader.string();
5852
+ continue;
5853
+ }
5854
+ default:
5855
+ break;
5856
+ }
5857
+ if ((tag & 7) === 4 || tag === 0) {
5858
+ break;
5859
+ }
5860
+ {
5861
+ if (!writer)
5862
+ writer = new BinaryWriter();
5863
+ const skipped = reader.skip(tag & 7, tag >>> 3);
5864
+ writer.uint32(tag).raw(skipped);
5865
+ }
5866
+ }
5867
+ if (writer) {
5868
+ message[unknownFieldsSymbol] = writer.finish();
5869
+ }
5870
+ return message;
5871
+ },
5872
+ fromJSON(object) {
5873
+ return applyGetIterationHistoryRequestCustom({
5874
+ $type: "nebius.storage.v1.GetIterationHistoryRequest",
5875
+ transferId: isSet(object.transferId ?? object.transfer_id)
5876
+ ? String(object.transferId ?? object.transfer_id)
5877
+ : "",
5878
+ pageSize: isSet(object.pageSize ?? object.page_size)
5879
+ ? Long.fromValue(object.pageSize ?? object.page_size)
5880
+ : Long.ZERO,
5881
+ pageToken: isSet(object.pageToken ?? object.page_token)
5882
+ ? String(object.pageToken ?? object.page_token)
5883
+ : "",
5884
+ });
5885
+ },
5886
+ toJSON(message, use = "json") {
5887
+ const obj = {};
5888
+ const pick = (json, pb) => (use === "json" ? json : pb);
5889
+ if (message.transferId !== "") {
5890
+ obj[pick("transferId", "transfer_id")] = message.transferId;
5891
+ }
5892
+ if (!message.pageSize?.isZero?.()) {
5893
+ obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
5894
+ }
5895
+ if (message.pageToken !== "") {
5896
+ obj[pick("pageToken", "page_token")] = message.pageToken;
5897
+ }
5898
+ return obj;
5899
+ },
5900
+ create(base) {
5901
+ return GetIterationHistoryRequest.fromPartial(base ?? {});
5902
+ },
5903
+ fromPartial(object) {
5904
+ const message = createBaseGetIterationHistoryRequest();
5905
+ message.transferId = (object.transferId !== undefined && object.transferId !== null)
5906
+ ? object.transferId
5907
+ : "";
5908
+ message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
5909
+ ? Long.fromValue(object.pageSize)
5910
+ : Long.ZERO;
5911
+ message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
5912
+ ? object.pageToken
5913
+ : "";
5914
+ return message;
5915
+ },
5916
+ };
5917
+ protoRegistry.registerMessage(GetIterationHistoryRequest);
5918
+ function GetIterationHistoryRequestCustomInspect() {
5919
+ const parts = [];
5920
+ if (this.transferId !== "")
5921
+ parts.push("transferId" + "=" + inspect(this.transferId));
5922
+ if (!this.pageSize?.isZero?.())
5923
+ parts.push("pageSize" + "=" + inspect(this.pageSize));
5924
+ if (this.pageToken !== "")
5925
+ parts.push("pageToken" + "=" + inspect(this.pageToken));
5926
+ return `${this.$type}(${parts.join(", ")})`;
5927
+ }
5928
+ function GetIterationHistoryRequestCustomJson() {
5929
+ const obj = {
5930
+ type: this.$type,
5931
+ };
5932
+ if (this.transferId !== "")
5933
+ obj.transferId = inspectJson(this.transferId);
5934
+ if (!this.pageSize?.isZero?.())
5935
+ obj.pageSize = inspectJson(this.pageSize);
5936
+ if (this.pageToken !== "")
5937
+ obj.pageToken = inspectJson(this.pageToken);
5938
+ return obj;
5939
+ }
5940
+ function applyGetIterationHistoryRequestCustom(message) {
5941
+ message[custom] = GetIterationHistoryRequestCustomInspect;
5942
+ message[customJson] = GetIterationHistoryRequestCustomJson;
5943
+ return message;
5944
+ }
5945
+ function createBaseGetIterationHistoryRequest() {
5946
+ const message = {
5947
+ $type: "nebius.storage.v1.GetIterationHistoryRequest",
5948
+ transferId: "",
5949
+ pageSize: Long.ZERO,
5950
+ pageToken: "",
5951
+ };
5952
+ return applyGetIterationHistoryRequestCustom(message);
5953
+ }
5954
+ export const GetIterationHistoryResponse = {
5955
+ $type: "nebius.storage.v1.GetIterationHistoryResponse",
5956
+ encode(message, writer = new BinaryWriter()) {
5957
+ for (const v of (message.iterations ?? [])) {
5958
+ const w = writer.uint32(10).fork();
5959
+ TransferIteration.encode(v, w);
5960
+ w.join();
5961
+ }
5962
+ if (message.nextPageToken !== "") {
5963
+ writer.uint32(18).string(message.nextPageToken);
5964
+ }
5965
+ if (message[unknownFieldsSymbol]) {
5966
+ writer.raw(message[unknownFieldsSymbol]);
5967
+ }
5968
+ return writer;
5969
+ },
5970
+ decode(input, length) {
5971
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5972
+ const end = length === undefined ? reader.len : reader.pos + length;
5973
+ const message = createBaseGetIterationHistoryResponse();
5974
+ let writer = undefined;
5975
+ while (reader.pos < end) {
5976
+ const tag = reader.uint32();
5977
+ switch (tag >>> 3) {
5978
+ case 1: {
5979
+ if (tag !== 10)
5980
+ break;
5981
+ message.iterations.push(TransferIteration.decode(reader, reader.uint32()));
5982
+ continue;
5983
+ }
5984
+ case 2: {
5985
+ if (tag !== 18)
5986
+ break;
5987
+ message.nextPageToken = reader.string();
5988
+ continue;
5989
+ }
5990
+ default:
5991
+ break;
5992
+ }
5993
+ if ((tag & 7) === 4 || tag === 0) {
5994
+ break;
5995
+ }
5996
+ {
5997
+ if (!writer)
5998
+ writer = new BinaryWriter();
5999
+ const skipped = reader.skip(tag & 7, tag >>> 3);
6000
+ writer.uint32(tag).raw(skipped);
6001
+ }
6002
+ }
6003
+ if (writer) {
6004
+ message[unknownFieldsSymbol] = writer.finish();
6005
+ }
6006
+ return message;
6007
+ },
6008
+ fromJSON(object) {
6009
+ return applyGetIterationHistoryResponseCustom({
6010
+ $type: "nebius.storage.v1.GetIterationHistoryResponse",
6011
+ iterations: globalThis.Array.isArray(object?.iterations ?? object?.iterations)
6012
+ ? (object.iterations ?? object.iterations).map((e) => TransferIteration.fromJSON(e))
6013
+ : [],
6014
+ nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
6015
+ ? String(object.nextPageToken ?? object.next_page_token)
6016
+ : "",
6017
+ });
6018
+ },
6019
+ toJSON(message, use = "json") {
6020
+ const obj = {};
6021
+ const pick = (json, pb) => (use === "json" ? json : pb);
6022
+ if (message.iterations?.length) {
6023
+ obj[pick("iterations", "iterations")] = message.iterations.map((e) => e ? TransferIteration.toJSON(e, use) : undefined);
6024
+ }
6025
+ if (message.nextPageToken !== "") {
6026
+ obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
6027
+ }
6028
+ return obj;
6029
+ },
6030
+ create(base) {
6031
+ return GetIterationHistoryResponse.fromPartial(base ?? {});
6032
+ },
6033
+ fromPartial(object) {
6034
+ const message = createBaseGetIterationHistoryResponse();
6035
+ message.iterations = object.iterations?.map((e) => TransferIteration.fromPartial(e)) || [];
6036
+ message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
6037
+ ? object.nextPageToken
6038
+ : "";
6039
+ return message;
6040
+ },
6041
+ };
6042
+ protoRegistry.registerMessage(GetIterationHistoryResponse);
6043
+ function GetIterationHistoryResponseCustomInspect() {
6044
+ const parts = [];
6045
+ if ((this.iterations?.length ?? 0) !== 0)
6046
+ parts.push("iterations" + "=" + inspect(this.iterations));
6047
+ if (this.nextPageToken !== "")
6048
+ parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
6049
+ return `${this.$type}(${parts.join(", ")})`;
6050
+ }
6051
+ function GetIterationHistoryResponseCustomJson() {
6052
+ const obj = {
6053
+ type: this.$type,
6054
+ };
6055
+ if ((this.iterations?.length ?? 0) !== 0)
6056
+ obj.iterations = inspectJson(this.iterations);
6057
+ if (this.nextPageToken !== "")
6058
+ obj.nextPageToken = inspectJson(this.nextPageToken);
6059
+ return obj;
6060
+ }
6061
+ function applyGetIterationHistoryResponseCustom(message) {
6062
+ message[custom] = GetIterationHistoryResponseCustomInspect;
6063
+ message[customJson] = GetIterationHistoryResponseCustomJson;
6064
+ return message;
6065
+ }
6066
+ function createBaseGetIterationHistoryResponse() {
6067
+ const message = {
6068
+ $type: "nebius.storage.v1.GetIterationHistoryResponse",
6069
+ iterations: [],
6070
+ nextPageToken: "",
6071
+ };
6072
+ return applyGetIterationHistoryResponseCustom(message);
6073
+ }
6074
+ export const TransferServiceServiceDescription = {
6075
+ get: {
6076
+ path: "/nebius.storage.v1.TransferService/Get",
6077
+ requestStream: false,
6078
+ responseStream: false,
6079
+ requestSerialize: (value) => Buffer.from(GetTransferRequest.encode(value).finish()),
6080
+ sendResetMask: false,
6081
+ requestDeserialize: (value) => GetTransferRequest.decode(value),
6082
+ responseSerialize: (value) => Buffer.from(Transfer.encode(value).finish()),
6083
+ responseDeserialize: (value) => Transfer.decode(value),
6084
+ },
6085
+ getByName: {
6086
+ path: "/nebius.storage.v1.TransferService/GetByName",
6087
+ requestStream: false,
6088
+ responseStream: false,
6089
+ requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
6090
+ sendResetMask: false,
6091
+ requestDeserialize: (value) => GetByNameRequest.decode(value),
6092
+ responseSerialize: (value) => Buffer.from(Transfer.encode(value).finish()),
6093
+ responseDeserialize: (value) => Transfer.decode(value),
6094
+ },
6095
+ list: {
6096
+ path: "/nebius.storage.v1.TransferService/List",
6097
+ requestStream: false,
6098
+ responseStream: false,
6099
+ requestSerialize: (value) => Buffer.from(ListTransfersRequest.encode(value).finish()),
6100
+ sendResetMask: false,
6101
+ requestDeserialize: (value) => ListTransfersRequest.decode(value),
6102
+ responseSerialize: (value) => Buffer.from(ListTransfersResponse.encode(value).finish()),
6103
+ responseDeserialize: (value) => ListTransfersResponse.decode(value),
6104
+ },
6105
+ create: {
6106
+ path: "/nebius.storage.v1.TransferService/Create",
6107
+ requestStream: false,
6108
+ responseStream: false,
6109
+ requestSerialize: (value) => Buffer.from(CreateTransferRequest.encode(value).finish()),
6110
+ sendResetMask: false,
6111
+ requestDeserialize: (value) => CreateTransferRequest.decode(value),
6112
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
6113
+ responseDeserialize: (value) => Operation.decode(value),
6114
+ },
6115
+ update: {
6116
+ path: "/nebius.storage.v1.TransferService/Update",
6117
+ requestStream: false,
6118
+ responseStream: false,
6119
+ requestSerialize: (value) => Buffer.from(UpdateTransferRequest.encode(value).finish()),
6120
+ sendResetMask: true,
6121
+ requestDeserialize: (value) => UpdateTransferRequest.decode(value),
6122
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
6123
+ responseDeserialize: (value) => Operation.decode(value),
6124
+ },
6125
+ stop: {
6126
+ path: "/nebius.storage.v1.TransferService/Stop",
6127
+ requestStream: false,
6128
+ responseStream: false,
6129
+ requestSerialize: (value) => Buffer.from(StopTransferRequest.encode(value).finish()),
6130
+ sendResetMask: false,
6131
+ requestDeserialize: (value) => StopTransferRequest.decode(value),
6132
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
6133
+ responseDeserialize: (value) => Operation.decode(value),
6134
+ },
6135
+ resume: {
6136
+ path: "/nebius.storage.v1.TransferService/Resume",
6137
+ requestStream: false,
6138
+ responseStream: false,
6139
+ requestSerialize: (value) => Buffer.from(ResumeTransferRequest.encode(value).finish()),
6140
+ sendResetMask: false,
6141
+ requestDeserialize: (value) => ResumeTransferRequest.decode(value),
6142
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
6143
+ responseDeserialize: (value) => Operation.decode(value),
6144
+ },
6145
+ delete: {
6146
+ path: "/nebius.storage.v1.TransferService/Delete",
6147
+ requestStream: false,
6148
+ responseStream: false,
6149
+ requestSerialize: (value) => Buffer.from(DeleteTransferRequest.encode(value).finish()),
6150
+ sendResetMask: false,
6151
+ requestDeserialize: (value) => DeleteTransferRequest.decode(value),
6152
+ responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
6153
+ responseDeserialize: (value) => Operation.decode(value),
6154
+ },
6155
+ getIterationHistory: {
6156
+ path: "/nebius.storage.v1.TransferService/GetIterationHistory",
6157
+ requestStream: false,
6158
+ responseStream: false,
6159
+ requestSerialize: (value) => Buffer.from(GetIterationHistoryRequest.encode(value).finish()),
6160
+ sendResetMask: false,
6161
+ requestDeserialize: (value) => GetIterationHistoryRequest.decode(value),
6162
+ responseSerialize: (value) => Buffer.from(GetIterationHistoryResponse.encode(value).finish()),
6163
+ responseDeserialize: (value) => GetIterationHistoryResponse.decode(value),
6164
+ },
6165
+ };
6166
+ export const TransferServiceBaseClient = makeGenericClientConstructor(TransferServiceServiceDescription, "nebius.storage.v1.TransferService");
6167
+ export class TransferService {
6168
+ sdk;
6169
+ $type = "nebius.storage.v1.TransferService";
6170
+ addr;
6171
+ spec;
6172
+ apiServiceName = "transfer.storage";
6173
+ constructor(sdk) {
6174
+ this.sdk = sdk;
6175
+ const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
6176
+ this.addr = addr;
6177
+ this.spec = TransferServiceServiceDescription;
6178
+ }
6179
+ getOperationService() {
6180
+ return new OperationService(this.sdk, this.addr);
6181
+ }
6182
+ get(...args) {
6183
+ const spec = this.spec.get;
6184
+ const request = args[0];
6185
+ const metadata = (args.length > 1 ? args[1] : undefined);
6186
+ const options = (args.length > 2 ? args[2] : undefined);
6187
+ const deserialize = spec.responseDeserialize;
6188
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6189
+ }
6190
+ getByName(...args) {
6191
+ const spec = this.spec.getByName;
6192
+ const request = args[0];
6193
+ const metadata = (args.length > 1 ? args[1] : undefined);
6194
+ const options = (args.length > 2 ? args[2] : undefined);
6195
+ const deserialize = spec.responseDeserialize;
6196
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6197
+ }
6198
+ list(...args) {
6199
+ const spec = this.spec.list;
6200
+ const request = args[0];
6201
+ const metadata = (args.length > 1 ? args[1] : undefined);
6202
+ const options = (args.length > 2 ? args[2] : undefined);
6203
+ const deserialize = spec.responseDeserialize;
6204
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6205
+ }
6206
+ create(...args) {
6207
+ const spec = this.spec.create;
6208
+ const request = args[0];
6209
+ const metadata = (args.length > 1 ? args[1] : undefined);
6210
+ const options = (args.length > 2 ? args[2] : undefined);
6211
+ const deserialize = (value) => {
6212
+ const resp = spec.responseDeserialize(value);
6213
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
6214
+ };
6215
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6216
+ }
6217
+ update(...args) {
6218
+ const spec = this.spec.update;
6219
+ const request = args[0];
6220
+ const metadata = (args.length > 1 ? args[1] : undefined);
6221
+ const options = (args.length > 2 ? args[2] : undefined);
6222
+ const deserialize = (value) => {
6223
+ const resp = spec.responseDeserialize(value);
6224
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
6225
+ };
6226
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6227
+ }
6228
+ stop(...args) {
6229
+ const spec = this.spec.stop;
6230
+ const request = args[0];
6231
+ const metadata = (args.length > 1 ? args[1] : undefined);
6232
+ const options = (args.length > 2 ? args[2] : undefined);
6233
+ const deserialize = (value) => {
6234
+ const resp = spec.responseDeserialize(value);
6235
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
6236
+ };
6237
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6238
+ }
6239
+ resume(...args) {
6240
+ const spec = this.spec.resume;
6241
+ const request = args[0];
6242
+ const metadata = (args.length > 1 ? args[1] : undefined);
6243
+ const options = (args.length > 2 ? args[2] : undefined);
6244
+ const deserialize = (value) => {
6245
+ const resp = spec.responseDeserialize(value);
6246
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
6247
+ };
6248
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6249
+ }
6250
+ delete(...args) {
6251
+ const spec = this.spec.delete;
6252
+ const request = args[0];
6253
+ const metadata = (args.length > 1 ? args[1] : undefined);
6254
+ const options = (args.length > 2 ? args[2] : undefined);
6255
+ const deserialize = (value) => {
6256
+ const resp = spec.responseDeserialize(value);
6257
+ return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
6258
+ };
6259
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6260
+ }
6261
+ getIterationHistory(...args) {
6262
+ const spec = this.spec.getIterationHistory;
6263
+ const request = args[0];
6264
+ const metadata = (args.length > 1 ? args[1] : undefined);
6265
+ const options = (args.length > 2 ? args[2] : undefined);
6266
+ const deserialize = spec.responseDeserialize;
6267
+ return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
6268
+ }
6269
+ }
6270
+ const TransferSpec_OverwriteStrategy_VALUE_COMMENTS = {
6271
+ NEVER: " Never overwrite objects that exist in the destination.\n If object exists in destination bucket, skip it.\n Safest option to prevent any data loss.\n",
6272
+ IF_NEWER: " Overwrite only if source object is newer than destination.\n Comparison based on Last-Modified timestamp.\n Recommended for incremental sync scenarios.\n If touch_unmanaged flag isn't set, we do not overwrite objects that haven't been created by Data Transfer service.\n",
6273
+ };
6274
+ export const TransferSpec_OverwriteStrategy = createEnum("nebius.storage.v1.TransferSpec.OverwriteStrategy", {
6275
+ OVERWRITE_STRATEGY_UNSPECIFIED: 0,
6276
+ /**
6277
+ * Never overwrite objects that exist in the destination.
6278
+ * If object exists in destination bucket, skip it.
6279
+ * Safest option to prevent any data loss.
6280
+ *
6281
+ */
6282
+ NEVER: 1,
6283
+ /**
6284
+ * Overwrite only if source object is newer than destination.
6285
+ * Comparison based on Last-Modified timestamp.
6286
+ * Recommended for incremental sync scenarios.
6287
+ * If touch_unmanaged flag isn't set, we do not overwrite objects that haven't been created by Data Transfer service.
6288
+ *
6289
+ */
6290
+ IF_NEWER: 2,
6291
+ }, TransferSpec_OverwriteStrategy_VALUE_COMMENTS);
6292
+ protoRegistry.registerEnum(TransferSpec_OverwriteStrategy);
6293
+ export const TransferStatus_State = createEnum("nebius.storage.v1.TransferStatus.State", {
6294
+ STATE_UNSPECIFIED: 0,
6295
+ ACTIVE: 1,
6296
+ STOPPING: 2,
6297
+ STOPPED: 3,
6298
+ FAILING: 4,
6299
+ FAILED: 5,
6300
+ DELETING: 6,
6301
+ });
6302
+ protoRegistry.registerEnum(TransferStatus_State);
6303
+ export const TransferStatus_SuspensionState = createEnum("nebius.storage.v1.TransferStatus.SuspensionState", {
6304
+ SUSPENSION_STATE_UNSPECIFIED: 0,
6305
+ NOT_SUSPENDED: 1,
6306
+ SUSPENDED: 2,
6307
+ });
6308
+ protoRegistry.registerEnum(TransferStatus_SuspensionState);
6309
+ export const TransferIteration_State = createEnum("nebius.storage.v1.TransferIteration.State", {
6310
+ STATE_UNSPECIFIED: 0,
6311
+ IN_PROGRESS: 1,
6312
+ COMPLETED: 2,
6313
+ INTERRUPTED: 3,
6314
+ FAILED: 4,
6315
+ });
6316
+ protoRegistry.registerEnum(TransferIteration_State);
6317
+ const TransferError_Origin_VALUE_COMMENTS = {
6318
+ SOURCE: " Error originated from the source.\n",
6319
+ DESTINATION: " Error originated from the destination.\n",
6320
+ };
6321
+ export const TransferError_Origin = createEnum("nebius.storage.v1.TransferError.Origin", {
6322
+ ORIGIN_UNSPECIFIED: 0,
6323
+ /**
6324
+ * Error originated from the source.
6325
+ *
6326
+ */
6327
+ SOURCE: 1,
6328
+ /**
6329
+ * Error originated from the destination.
6330
+ *
6331
+ */
6332
+ DESTINATION: 2,
6333
+ }, TransferError_Origin_VALUE_COMMENTS);
6334
+ protoRegistry.registerEnum(TransferError_Origin);
6335
+ export const Transfer = {
6336
+ $type: "nebius.storage.v1.Transfer",
6337
+ encode(message, writer = new BinaryWriter()) {
6338
+ if (message.metadata !== undefined) {
6339
+ const w = writer.uint32(10).fork();
6340
+ ResourceMetadata.encode(message.metadata, w);
6341
+ w.join();
6342
+ }
6343
+ if (message.spec !== undefined) {
6344
+ const w = writer.uint32(18).fork();
6345
+ TransferSpec.encode(message.spec, w);
6346
+ w.join();
6347
+ }
6348
+ if (message.status !== undefined) {
6349
+ const w = writer.uint32(26).fork();
6350
+ TransferStatus.encode(message.status, w);
6351
+ w.join();
6352
+ }
6353
+ if (message[unknownFieldsSymbol]) {
6354
+ writer.raw(message[unknownFieldsSymbol]);
6355
+ }
6356
+ return writer;
6357
+ },
6358
+ decode(input, length) {
6359
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6360
+ const end = length === undefined ? reader.len : reader.pos + length;
6361
+ const message = createBaseTransfer();
6362
+ let writer = undefined;
6363
+ while (reader.pos < end) {
6364
+ const tag = reader.uint32();
6365
+ switch (tag >>> 3) {
6366
+ case 1: {
6367
+ if (tag !== 10)
6368
+ break;
6369
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
6370
+ continue;
6371
+ }
6372
+ case 2: {
6373
+ if (tag !== 18)
6374
+ break;
6375
+ message.spec = TransferSpec.decode(reader, reader.uint32());
6376
+ continue;
6377
+ }
6378
+ case 3: {
6379
+ if (tag !== 26)
6380
+ break;
6381
+ message.status = TransferStatus.decode(reader, reader.uint32());
6382
+ continue;
6383
+ }
6384
+ default:
6385
+ break;
6386
+ }
6387
+ if ((tag & 7) === 4 || tag === 0) {
6388
+ break;
6389
+ }
6390
+ {
6391
+ if (!writer)
6392
+ writer = new BinaryWriter();
6393
+ const skipped = reader.skip(tag & 7, tag >>> 3);
6394
+ writer.uint32(tag).raw(skipped);
6395
+ }
6396
+ }
6397
+ if (writer) {
6398
+ message[unknownFieldsSymbol] = writer.finish();
6399
+ }
6400
+ return message;
6401
+ },
6402
+ fromJSON(object) {
6403
+ return applyTransferCustom({
6404
+ $type: "nebius.storage.v1.Transfer",
6405
+ metadata: isSet(object.metadata ?? object.metadata)
6406
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
6407
+ : undefined,
6408
+ spec: isSet(object.spec ?? object.spec)
6409
+ ? TransferSpec.fromJSON(object.spec ?? object.spec)
6410
+ : undefined,
6411
+ status: isSet(object.status ?? object.status)
6412
+ ? TransferStatus.fromJSON(object.status ?? object.status)
6413
+ : undefined,
6414
+ });
6415
+ },
6416
+ toJSON(message, use = "json") {
6417
+ const obj = {};
6418
+ const pick = (json, pb) => (use === "json" ? json : pb);
6419
+ if (message.metadata !== undefined) {
6420
+ obj[pick("metadata", "metadata")] = message.metadata
6421
+ ? ResourceMetadata.toJSON(message.metadata, use)
6422
+ : undefined;
6423
+ }
6424
+ if (message.spec !== undefined) {
6425
+ obj[pick("spec", "spec")] = message.spec
6426
+ ? TransferSpec.toJSON(message.spec, use)
6427
+ : undefined;
6428
+ }
6429
+ if (message.status !== undefined) {
6430
+ obj[pick("status", "status")] = message.status
6431
+ ? TransferStatus.toJSON(message.status, use)
6432
+ : undefined;
6433
+ }
6434
+ return obj;
6435
+ },
6436
+ create(base) {
6437
+ return Transfer.fromPartial(base ?? {});
6438
+ },
6439
+ fromPartial(object) {
6440
+ const message = createBaseTransfer();
6441
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
6442
+ ? ResourceMetadata.fromPartial(object.metadata)
6443
+ : undefined;
6444
+ message.spec = (object.spec !== undefined && object.spec !== null)
6445
+ ? TransferSpec.fromPartial(object.spec)
6446
+ : undefined;
6447
+ message.status = (object.status !== undefined && object.status !== null)
6448
+ ? TransferStatus.fromPartial(object.status)
6449
+ : undefined;
6450
+ return message;
6451
+ },
6452
+ };
6453
+ protoRegistry.registerMessage(Transfer);
6454
+ function TransferCustomInspect() {
6455
+ const parts = [];
6456
+ if (this.metadata !== undefined)
6457
+ parts.push("metadata" + "=" + inspect(this.metadata));
6458
+ if (this.spec !== undefined)
6459
+ parts.push("spec" + "=" + inspect(this.spec));
6460
+ if (this.status !== undefined)
6461
+ parts.push("status" + "=" + inspect(this.status));
6462
+ return `${this.$type}(${parts.join(", ")})`;
6463
+ }
6464
+ function TransferCustomJson() {
6465
+ const obj = {
6466
+ type: this.$type,
6467
+ };
6468
+ if (this.metadata !== undefined)
6469
+ obj.metadata = inspectJson(this.metadata);
6470
+ if (this.spec !== undefined)
6471
+ obj.spec = inspectJson(this.spec);
6472
+ if (this.status !== undefined)
6473
+ obj.status = inspectJson(this.status);
6474
+ return obj;
6475
+ }
6476
+ function applyTransferCustom(message) {
6477
+ message[custom] = TransferCustomInspect;
6478
+ message[customJson] = TransferCustomJson;
6479
+ return message;
6480
+ }
6481
+ function createBaseTransfer() {
6482
+ const message = {
6483
+ $type: "nebius.storage.v1.Transfer",
6484
+ metadata: undefined,
6485
+ spec: undefined,
6486
+ status: undefined,
6487
+ };
6488
+ return applyTransferCustom(message);
6489
+ }
6490
+ export const TransferSpec = {
6491
+ $type: "nebius.storage.v1.TransferSpec",
6492
+ encode(message, writer = new BinaryWriter()) {
6493
+ if (message.source !== undefined) {
6494
+ const w = writer.uint32(10).fork();
6495
+ TransferSource.encode(message.source, w);
6496
+ w.join();
6497
+ }
6498
+ if (message.destination !== undefined) {
6499
+ const w = writer.uint32(18).fork();
6500
+ TransferDestination.encode(message.destination, w);
6501
+ w.join();
6502
+ }
6503
+ if (message.limiters !== undefined) {
6504
+ const w = writer.uint32(26).fork();
6505
+ TransferSpec_Limiters.encode(message.limiters, w);
6506
+ w.join();
6507
+ }
6508
+ if (message.interIterationInterval !== undefined) {
6509
+ const w = writer.uint32(58).fork();
6510
+ wkt[".google.protobuf.Duration"].writeMessage(w, message.interIterationInterval);
6511
+ w.join();
6512
+ }
6513
+ if ((message.overwriteStrategy ?? TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED) !== TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED) {
6514
+ TransferSpec_OverwriteStrategy.encodeField(writer, 8, message.overwriteStrategy);
6515
+ }
6516
+ if (message.touchUnmanaged === true) {
6517
+ writer.uint32(80).bool(message.touchUnmanaged);
6518
+ }
6519
+ if (message.stopCondition?.$case === undefined) { /* noop */ }
6520
+ else if (message.stopCondition?.$case === "afterOneIteration") {
6521
+ const w = writer.uint32(34).fork();
6522
+ TransferSpec_StopConditionAfterOneIteration.encode(message.stopCondition.afterOneIteration, w);
6523
+ w.join();
6524
+ }
6525
+ else if (message.stopCondition?.$case === "afterNEmptyIterations") {
6526
+ const w = writer.uint32(42).fork();
6527
+ TransferSpec_StopConditionAfterNEmptyIterations.encode(message.stopCondition.afterNEmptyIterations, w);
6528
+ w.join();
6529
+ }
6530
+ else if (message.stopCondition?.$case === "infinite") {
6531
+ const w = writer.uint32(50).fork();
6532
+ TransferSpec_StopConditionInfinite.encode(message.stopCondition.infinite, w);
6533
+ w.join();
6534
+ }
6535
+ if (message[unknownFieldsSymbol]) {
6536
+ writer.raw(message[unknownFieldsSymbol]);
6537
+ }
6538
+ return writer;
6539
+ },
6540
+ decode(input, length) {
6541
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6542
+ const end = length === undefined ? reader.len : reader.pos + length;
6543
+ const message = createBaseTransferSpec();
6544
+ let writer = undefined;
6545
+ while (reader.pos < end) {
6546
+ const tag = reader.uint32();
6547
+ switch (tag >>> 3) {
6548
+ case 1: {
6549
+ if (tag !== 10)
6550
+ break;
6551
+ message.source = TransferSource.decode(reader, reader.uint32());
6552
+ continue;
6553
+ }
6554
+ case 2: {
6555
+ if (tag !== 18)
6556
+ break;
6557
+ message.destination = TransferDestination.decode(reader, reader.uint32());
6558
+ continue;
6559
+ }
6560
+ case 3: {
6561
+ if (tag !== 26)
6562
+ break;
6563
+ message.limiters = TransferSpec_Limiters.decode(reader, reader.uint32());
6564
+ continue;
6565
+ }
6566
+ case 7: {
6567
+ if (tag !== 58)
6568
+ break;
6569
+ const len = reader.uint32();
6570
+ message.interIterationInterval = wkt[".google.protobuf.Duration"].readMessage(reader, len);
6571
+ continue;
6572
+ }
6573
+ case 8: {
6574
+ if (tag !== 64)
6575
+ break;
6576
+ message.overwriteStrategy = TransferSpec_OverwriteStrategy.fromNumber(reader.int32());
6577
+ continue;
6578
+ }
6579
+ case 10: {
6580
+ if (tag !== 80)
6581
+ break;
6582
+ message.touchUnmanaged = reader.bool();
6583
+ continue;
6584
+ }
6585
+ case 4: {
6586
+ if (tag !== 34)
6587
+ break;
6588
+ message.stopCondition = {
6589
+ $case: "afterOneIteration",
6590
+ afterOneIteration: TransferSpec_StopConditionAfterOneIteration.decode(reader, reader.uint32())
6591
+ };
6592
+ continue;
6593
+ }
6594
+ case 5: {
6595
+ if (tag !== 42)
6596
+ break;
6597
+ message.stopCondition = {
6598
+ $case: "afterNEmptyIterations",
6599
+ afterNEmptyIterations: TransferSpec_StopConditionAfterNEmptyIterations.decode(reader, reader.uint32())
6600
+ };
6601
+ continue;
6602
+ }
6603
+ case 6: {
6604
+ if (tag !== 50)
6605
+ break;
6606
+ message.stopCondition = {
6607
+ $case: "infinite",
6608
+ infinite: TransferSpec_StopConditionInfinite.decode(reader, reader.uint32())
6609
+ };
6610
+ continue;
6611
+ }
6612
+ default:
6613
+ break;
6614
+ }
6615
+ if ((tag & 7) === 4 || tag === 0) {
6616
+ break;
6617
+ }
6618
+ {
6619
+ if (!writer)
6620
+ writer = new BinaryWriter();
6621
+ const skipped = reader.skip(tag & 7, tag >>> 3);
6622
+ writer.uint32(tag).raw(skipped);
6623
+ }
6624
+ }
6625
+ if (writer) {
6626
+ message[unknownFieldsSymbol] = writer.finish();
6627
+ }
6628
+ return message;
6629
+ },
6630
+ fromJSON(object) {
6631
+ return applyTransferSpecCustom({
6632
+ $type: "nebius.storage.v1.TransferSpec",
6633
+ source: isSet(object.source ?? object.source)
6634
+ ? TransferSource.fromJSON(object.source ?? object.source)
6635
+ : undefined,
6636
+ destination: isSet(object.destination ?? object.destination)
6637
+ ? TransferDestination.fromJSON(object.destination ?? object.destination)
6638
+ : undefined,
6639
+ limiters: isSet(object.limiters ?? object.limiters)
6640
+ ? TransferSpec_Limiters.fromJSON(object.limiters ?? object.limiters)
6641
+ : undefined,
6642
+ interIterationInterval: isSet(object.interIterationInterval ?? object.inter_iteration_interval)
6643
+ ? wkt[".google.protobuf.Duration"].fromJSON(object.interIterationInterval ?? object.inter_iteration_interval)
6644
+ : undefined,
6645
+ overwriteStrategy: isSet(object.overwriteStrategy ?? object.overwrite_strategy)
6646
+ ? TransferSpec_OverwriteStrategy.fromJSON(object.overwriteStrategy ?? object.overwrite_strategy)
6647
+ : TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED,
6648
+ touchUnmanaged: isSet(object.touchUnmanaged ?? object.touch_unmanaged)
6649
+ ? Boolean(object.touchUnmanaged ?? object.touch_unmanaged)
6650
+ : false,
6651
+ stopCondition: (() => {
6652
+ if (isSet(object.afterOneIteration) || isSet(object.after_one_iteration)) {
6653
+ return {
6654
+ $case: "afterOneIteration",
6655
+ afterOneIteration: TransferSpec_StopConditionAfterOneIteration.fromJSON(object.afterOneIteration ?? object.after_one_iteration)
6656
+ };
6657
+ }
6658
+ if (isSet(object.afterNEmptyIterations) || isSet(object.after_n_empty_iterations)) {
6659
+ return {
6660
+ $case: "afterNEmptyIterations",
6661
+ afterNEmptyIterations: TransferSpec_StopConditionAfterNEmptyIterations.fromJSON(object.afterNEmptyIterations ?? object.after_n_empty_iterations)
6662
+ };
6663
+ }
6664
+ if (isSet(object.infinite) || isSet(object.infinite)) {
6665
+ return {
6666
+ $case: "infinite",
6667
+ infinite: TransferSpec_StopConditionInfinite.fromJSON(object.infinite ?? object.infinite)
6668
+ };
6669
+ }
6670
+ return undefined;
6671
+ })(),
6672
+ });
6673
+ },
6674
+ toJSON(message, use = "json") {
6675
+ const obj = {};
6676
+ const pick = (json, pb) => (use === "json" ? json : pb);
6677
+ if (message.source !== undefined) {
6678
+ obj[pick("source", "source")] = message.source
6679
+ ? TransferSource.toJSON(message.source, use)
6680
+ : undefined;
6681
+ }
6682
+ if (message.destination !== undefined) {
6683
+ obj[pick("destination", "destination")] = message.destination
6684
+ ? TransferDestination.toJSON(message.destination, use)
6685
+ : undefined;
6686
+ }
6687
+ if (message.limiters !== undefined) {
6688
+ obj[pick("limiters", "limiters")] = message.limiters
6689
+ ? TransferSpec_Limiters.toJSON(message.limiters, use)
6690
+ : undefined;
6691
+ }
6692
+ if (message.interIterationInterval !== undefined) {
6693
+ obj[pick("interIterationInterval", "inter_iteration_interval")] = wkt[".google.protobuf.Duration"].toJSON(message.interIterationInterval, use);
6694
+ }
6695
+ if ((message.overwriteStrategy ?? TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED) !== TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED) {
6696
+ obj[pick("overwriteStrategy", "overwrite_strategy")] = TransferSpec_OverwriteStrategy.toJSON(message.overwriteStrategy);
6697
+ }
6698
+ if (message.touchUnmanaged === true) {
6699
+ obj[pick("touchUnmanaged", "touch_unmanaged")] = message.touchUnmanaged;
6700
+ }
6701
+ switch (message.stopCondition?.$case) {
6702
+ case "afterOneIteration": {
6703
+ obj[pick("afterOneIteration", "after_one_iteration")] = TransferSpec_StopConditionAfterOneIteration.toJSON(message.stopCondition.afterOneIteration, use);
6704
+ break;
6705
+ }
6706
+ case "afterNEmptyIterations": {
6707
+ obj[pick("afterNEmptyIterations", "after_n_empty_iterations")] = TransferSpec_StopConditionAfterNEmptyIterations.toJSON(message.stopCondition.afterNEmptyIterations, use);
6708
+ break;
6709
+ }
6710
+ case "infinite": {
6711
+ obj[pick("infinite", "infinite")] = TransferSpec_StopConditionInfinite.toJSON(message.stopCondition.infinite, use);
6712
+ break;
6713
+ }
6714
+ default: break;
6715
+ }
6716
+ return obj;
6717
+ },
6718
+ create(base) {
6719
+ return TransferSpec.fromPartial(base ?? {});
6720
+ },
6721
+ fromPartial(object) {
6722
+ const message = createBaseTransferSpec();
6723
+ message.source = (object.source !== undefined && object.source !== null)
6724
+ ? TransferSource.fromPartial(object.source)
6725
+ : undefined;
6726
+ message.destination = (object.destination !== undefined && object.destination !== null)
6727
+ ? TransferDestination.fromPartial(object.destination)
6728
+ : undefined;
6729
+ message.limiters = (object.limiters !== undefined && object.limiters !== null)
6730
+ ? TransferSpec_Limiters.fromPartial(object.limiters)
6731
+ : undefined;
6732
+ message.interIterationInterval = (object.interIterationInterval !== undefined && object.interIterationInterval !== null)
6733
+ ? wkt[".google.protobuf.Duration"].fromPartial(object.interIterationInterval)
6734
+ : undefined;
6735
+ message.overwriteStrategy = (object.overwriteStrategy !== undefined && object.overwriteStrategy !== null)
6736
+ ? TransferSpec_OverwriteStrategy.fromJSON(object.overwriteStrategy.name)
6737
+ : TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED;
6738
+ message.touchUnmanaged = (object.touchUnmanaged !== undefined && object.touchUnmanaged !== null)
6739
+ ? object.touchUnmanaged
6740
+ : false;
6741
+ switch (object.stopCondition?.$case) {
6742
+ case "afterOneIteration": {
6743
+ if (object.stopCondition.afterOneIteration !== undefined && object.stopCondition.afterOneIteration !== null) {
6744
+ message.stopCondition = {
6745
+ $case: "afterOneIteration",
6746
+ afterOneIteration: TransferSpec_StopConditionAfterOneIteration.fromPartial(object.stopCondition.afterOneIteration),
6747
+ };
6748
+ }
6749
+ break;
6750
+ }
6751
+ case "afterNEmptyIterations": {
6752
+ if (object.stopCondition.afterNEmptyIterations !== undefined && object.stopCondition.afterNEmptyIterations !== null) {
6753
+ message.stopCondition = {
6754
+ $case: "afterNEmptyIterations",
6755
+ afterNEmptyIterations: TransferSpec_StopConditionAfterNEmptyIterations.fromPartial(object.stopCondition.afterNEmptyIterations),
6756
+ };
6757
+ }
6758
+ break;
6759
+ }
6760
+ case "infinite": {
6761
+ if (object.stopCondition.infinite !== undefined && object.stopCondition.infinite !== null) {
6762
+ message.stopCondition = {
6763
+ $case: "infinite",
6764
+ infinite: TransferSpec_StopConditionInfinite.fromPartial(object.stopCondition.infinite),
6765
+ };
6766
+ }
6767
+ break;
6768
+ }
6769
+ default: break;
6770
+ }
6771
+ return message;
6772
+ },
6773
+ };
6774
+ protoRegistry.registerMessage(TransferSpec);
6775
+ function TransferSpecCustomInspect() {
6776
+ const parts = [];
6777
+ if (this.source !== undefined)
6778
+ parts.push("source" + "=" + inspect(this.source));
6779
+ if (this.destination !== undefined)
6780
+ parts.push("destination" + "=" + inspect(this.destination));
6781
+ if (this.limiters !== undefined)
6782
+ parts.push("limiters" + "=" + inspect(this.limiters));
6783
+ if (this.interIterationInterval !== undefined)
6784
+ parts.push("interIterationInterval" + "=" + inspect(this.interIterationInterval));
6785
+ if (this.overwriteStrategy !== undefined)
6786
+ parts.push("overwriteStrategy" + "=" + inspect(this.overwriteStrategy));
6787
+ if (this.touchUnmanaged === true)
6788
+ parts.push("touchUnmanaged" + "=" + inspect(this.touchUnmanaged));
6789
+ return `${this.$type}(${parts.join(", ")})`;
6790
+ }
6791
+ function TransferSpecCustomJson() {
6792
+ const obj = {
6793
+ type: this.$type,
6794
+ };
6795
+ if (this.source !== undefined)
6796
+ obj.source = inspectJson(this.source);
6797
+ if (this.destination !== undefined)
6798
+ obj.destination = inspectJson(this.destination);
6799
+ if (this.limiters !== undefined)
6800
+ obj.limiters = inspectJson(this.limiters);
6801
+ if (this.interIterationInterval !== undefined)
6802
+ obj.interIterationInterval = inspectJson(this.interIterationInterval);
6803
+ if (this.overwriteStrategy !== undefined)
6804
+ obj.overwriteStrategy = inspectJson(this.overwriteStrategy);
6805
+ if (this.touchUnmanaged === true)
6806
+ obj.touchUnmanaged = inspectJson(this.touchUnmanaged);
6807
+ return obj;
6808
+ }
6809
+ function applyTransferSpecCustom(message) {
6810
+ message[custom] = TransferSpecCustomInspect;
6811
+ message[customJson] = TransferSpecCustomJson;
6812
+ return message;
6813
+ }
6814
+ function createBaseTransferSpec() {
6815
+ const message = {
6816
+ $type: "nebius.storage.v1.TransferSpec",
6817
+ source: undefined,
6818
+ destination: undefined,
6819
+ limiters: undefined,
6820
+ interIterationInterval: undefined,
6821
+ overwriteStrategy: TransferSpec_OverwriteStrategy.OVERWRITE_STRATEGY_UNSPECIFIED,
6822
+ touchUnmanaged: false,
6823
+ stopCondition: undefined,
6824
+ };
6825
+ return applyTransferSpecCustom(message);
6826
+ }
6827
+ export const TransferSpec_Limiters = {
6828
+ $type: "nebius.storage.v1.TransferSpec.Limiters",
6829
+ encode(message, writer = new BinaryWriter()) {
6830
+ if (message.bandwidthBytesPerSecond !== undefined && !message.bandwidthBytesPerSecond.isZero?.()) {
6831
+ writer.uint32(8).uint64(message.bandwidthBytesPerSecond.toString());
6832
+ }
6833
+ if (message.requestsPerSecond !== undefined && !message.requestsPerSecond.isZero?.()) {
6834
+ writer.uint32(16).uint64(message.requestsPerSecond.toString());
6835
+ }
6836
+ if (message[unknownFieldsSymbol]) {
6837
+ writer.raw(message[unknownFieldsSymbol]);
6838
+ }
6839
+ return writer;
6840
+ },
6841
+ decode(input, length) {
6842
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6843
+ const end = length === undefined ? reader.len : reader.pos + length;
6844
+ const message = createBaseTransferSpec_Limiters();
6845
+ let writer = undefined;
6846
+ while (reader.pos < end) {
6847
+ const tag = reader.uint32();
6848
+ switch (tag >>> 3) {
6849
+ case 1: {
6850
+ if (tag !== 8)
6851
+ break;
6852
+ message.bandwidthBytesPerSecond = Long.fromValue(reader.uint64());
6853
+ continue;
6854
+ }
6855
+ case 2: {
6856
+ if (tag !== 16)
6857
+ break;
6858
+ message.requestsPerSecond = Long.fromValue(reader.uint64());
6859
+ continue;
6860
+ }
6861
+ default:
6862
+ break;
6863
+ }
6864
+ if ((tag & 7) === 4 || tag === 0) {
6865
+ break;
6866
+ }
6867
+ {
6868
+ if (!writer)
6869
+ writer = new BinaryWriter();
6870
+ const skipped = reader.skip(tag & 7, tag >>> 3);
6871
+ writer.uint32(tag).raw(skipped);
6872
+ }
6873
+ }
6874
+ if (writer) {
6875
+ message[unknownFieldsSymbol] = writer.finish();
6876
+ }
6877
+ return message;
6878
+ },
6879
+ fromJSON(object) {
6880
+ return applyTransferSpec_LimitersCustom({
6881
+ $type: "nebius.storage.v1.TransferSpec.Limiters",
6882
+ bandwidthBytesPerSecond: isSet(object.bandwidthBytesPerSecond ?? object.bandwidth_bytes_per_second)
6883
+ ? Long.fromValue(object.bandwidthBytesPerSecond ?? object.bandwidth_bytes_per_second)
6884
+ : Long.ZERO,
6885
+ requestsPerSecond: isSet(object.requestsPerSecond ?? object.requests_per_second)
6886
+ ? Long.fromValue(object.requestsPerSecond ?? object.requests_per_second)
6887
+ : Long.ZERO,
6888
+ });
6889
+ },
6890
+ toJSON(message, use = "json") {
6891
+ const obj = {};
6892
+ const pick = (json, pb) => (use === "json" ? json : pb);
6893
+ if (!message.bandwidthBytesPerSecond?.isZero?.()) {
6894
+ obj[pick("bandwidthBytesPerSecond", "bandwidth_bytes_per_second")] = (message.bandwidthBytesPerSecond || Long.ZERO).toString();
6895
+ }
6896
+ if (!message.requestsPerSecond?.isZero?.()) {
6897
+ obj[pick("requestsPerSecond", "requests_per_second")] = (message.requestsPerSecond || Long.ZERO).toString();
6898
+ }
6899
+ return obj;
6900
+ },
6901
+ create(base) {
6902
+ return TransferSpec_Limiters.fromPartial(base ?? {});
6903
+ },
6904
+ fromPartial(object) {
6905
+ const message = createBaseTransferSpec_Limiters();
6906
+ message.bandwidthBytesPerSecond = (object.bandwidthBytesPerSecond !== undefined && object.bandwidthBytesPerSecond !== null)
6907
+ ? Long.fromValue(object.bandwidthBytesPerSecond)
6908
+ : Long.ZERO;
6909
+ message.requestsPerSecond = (object.requestsPerSecond !== undefined && object.requestsPerSecond !== null)
6910
+ ? Long.fromValue(object.requestsPerSecond)
6911
+ : Long.ZERO;
6912
+ return message;
6913
+ },
6914
+ };
6915
+ protoRegistry.registerMessage(TransferSpec_Limiters);
6916
+ function TransferSpec_LimitersCustomInspect() {
6917
+ const parts = [];
6918
+ if (!this.bandwidthBytesPerSecond?.isZero?.())
6919
+ parts.push("bandwidthBytesPerSecond" + "=" + inspect(this.bandwidthBytesPerSecond));
6920
+ if (!this.requestsPerSecond?.isZero?.())
6921
+ parts.push("requestsPerSecond" + "=" + inspect(this.requestsPerSecond));
6922
+ return `${this.$type}(${parts.join(", ")})`;
6923
+ }
6924
+ function TransferSpec_LimitersCustomJson() {
6925
+ const obj = {
6926
+ type: this.$type,
6927
+ };
6928
+ if (!this.bandwidthBytesPerSecond?.isZero?.())
6929
+ obj.bandwidthBytesPerSecond = inspectJson(this.bandwidthBytesPerSecond);
6930
+ if (!this.requestsPerSecond?.isZero?.())
6931
+ obj.requestsPerSecond = inspectJson(this.requestsPerSecond);
6932
+ return obj;
6933
+ }
6934
+ function applyTransferSpec_LimitersCustom(message) {
6935
+ message[custom] = TransferSpec_LimitersCustomInspect;
6936
+ message[customJson] = TransferSpec_LimitersCustomJson;
6937
+ return message;
6938
+ }
6939
+ function createBaseTransferSpec_Limiters() {
6940
+ const message = {
6941
+ $type: "nebius.storage.v1.TransferSpec.Limiters",
6942
+ bandwidthBytesPerSecond: Long.ZERO,
6943
+ requestsPerSecond: Long.ZERO,
6944
+ };
6945
+ return applyTransferSpec_LimitersCustom(message);
6946
+ }
6947
+ export const TransferSpec_StopConditionAfterOneIteration = {
6948
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterOneIteration",
6949
+ encode(message, writer = new BinaryWriter()) {
6950
+ if (message[unknownFieldsSymbol]) {
6951
+ writer.raw(message[unknownFieldsSymbol]);
6952
+ }
6953
+ return writer;
6954
+ },
6955
+ decode(input, length) {
6956
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6957
+ const end = length === undefined ? reader.len : reader.pos + length;
6958
+ const message = createBaseTransferSpec_StopConditionAfterOneIteration();
6959
+ let writer = undefined;
6960
+ while (reader.pos < end) {
6961
+ const tag = reader.uint32();
6962
+ switch (tag >>> 3) {
6963
+ default:
6964
+ break;
6965
+ }
6966
+ if ((tag & 7) === 4 || tag === 0) {
6967
+ break;
6968
+ }
6969
+ {
6970
+ if (!writer)
6971
+ writer = new BinaryWriter();
6972
+ const skipped = reader.skip(tag & 7, tag >>> 3);
6973
+ writer.uint32(tag).raw(skipped);
6974
+ }
6975
+ }
6976
+ if (writer) {
6977
+ message[unknownFieldsSymbol] = writer.finish();
6978
+ }
6979
+ return message;
6980
+ },
6981
+ fromJSON(object) {
6982
+ return applyTransferSpec_StopConditionAfterOneIterationCustom({
6983
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterOneIteration",
6984
+ });
6985
+ },
6986
+ toJSON(message, use = "json") {
6987
+ const obj = {};
6988
+ const pick = (json, pb) => (use === "json" ? json : pb);
6989
+ return obj;
6990
+ },
6991
+ create(base) {
6992
+ return TransferSpec_StopConditionAfterOneIteration.fromPartial(base ?? {});
6993
+ },
6994
+ fromPartial(object) {
6995
+ const message = createBaseTransferSpec_StopConditionAfterOneIteration();
6996
+ return message;
6997
+ },
6998
+ };
6999
+ protoRegistry.registerMessage(TransferSpec_StopConditionAfterOneIteration);
7000
+ function TransferSpec_StopConditionAfterOneIterationCustomInspect() {
7001
+ const parts = [];
7002
+ return `${this.$type}(${parts.join(", ")})`;
7003
+ }
7004
+ function TransferSpec_StopConditionAfterOneIterationCustomJson() {
7005
+ const obj = {
7006
+ type: this.$type,
7007
+ };
7008
+ return obj;
7009
+ }
7010
+ function applyTransferSpec_StopConditionAfterOneIterationCustom(message) {
7011
+ message[custom] = TransferSpec_StopConditionAfterOneIterationCustomInspect;
7012
+ message[customJson] = TransferSpec_StopConditionAfterOneIterationCustomJson;
7013
+ return message;
7014
+ }
7015
+ function createBaseTransferSpec_StopConditionAfterOneIteration() {
7016
+ const message = {
7017
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterOneIteration",
7018
+ };
7019
+ return applyTransferSpec_StopConditionAfterOneIterationCustom(message);
7020
+ }
7021
+ export const TransferSpec_StopConditionAfterNEmptyIterations = {
7022
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterNEmptyIterations",
7023
+ encode(message, writer = new BinaryWriter()) {
7024
+ if ((message.emptyIterationsThreshold ?? 0) !== 0) {
7025
+ writer.uint32(8).uint32(message.emptyIterationsThreshold);
7026
+ }
7027
+ if (message[unknownFieldsSymbol]) {
7028
+ writer.raw(message[unknownFieldsSymbol]);
7029
+ }
7030
+ return writer;
7031
+ },
7032
+ decode(input, length) {
7033
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7034
+ const end = length === undefined ? reader.len : reader.pos + length;
7035
+ const message = createBaseTransferSpec_StopConditionAfterNEmptyIterations();
7036
+ let writer = undefined;
7037
+ while (reader.pos < end) {
7038
+ const tag = reader.uint32();
7039
+ switch (tag >>> 3) {
7040
+ case 1: {
7041
+ if (tag !== 8)
7042
+ break;
7043
+ message.emptyIterationsThreshold = reader.uint32();
7044
+ continue;
7045
+ }
7046
+ default:
7047
+ break;
7048
+ }
7049
+ if ((tag & 7) === 4 || tag === 0) {
7050
+ break;
7051
+ }
7052
+ {
7053
+ if (!writer)
7054
+ writer = new BinaryWriter();
7055
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7056
+ writer.uint32(tag).raw(skipped);
7057
+ }
7058
+ }
7059
+ if (writer) {
7060
+ message[unknownFieldsSymbol] = writer.finish();
7061
+ }
7062
+ return message;
7063
+ },
7064
+ fromJSON(object) {
7065
+ return applyTransferSpec_StopConditionAfterNEmptyIterationsCustom({
7066
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterNEmptyIterations",
7067
+ emptyIterationsThreshold: isSet(object.emptyIterationsThreshold ?? object.empty_iterations_threshold)
7068
+ ? Number(object.emptyIterationsThreshold ?? object.empty_iterations_threshold)
7069
+ : 0,
7070
+ });
7071
+ },
7072
+ toJSON(message, use = "json") {
7073
+ const obj = {};
7074
+ const pick = (json, pb) => (use === "json" ? json : pb);
7075
+ if ((message.emptyIterationsThreshold ?? 0) !== 0) {
7076
+ obj[pick("emptyIterationsThreshold", "empty_iterations_threshold")] = message.emptyIterationsThreshold;
7077
+ }
7078
+ return obj;
7079
+ },
7080
+ create(base) {
7081
+ return TransferSpec_StopConditionAfterNEmptyIterations.fromPartial(base ?? {});
7082
+ },
7083
+ fromPartial(object) {
7084
+ const message = createBaseTransferSpec_StopConditionAfterNEmptyIterations();
7085
+ message.emptyIterationsThreshold = (object.emptyIterationsThreshold !== undefined && object.emptyIterationsThreshold !== null)
7086
+ ? object.emptyIterationsThreshold
7087
+ : 0;
7088
+ return message;
7089
+ },
7090
+ };
7091
+ protoRegistry.registerMessage(TransferSpec_StopConditionAfterNEmptyIterations);
7092
+ function TransferSpec_StopConditionAfterNEmptyIterationsCustomInspect() {
7093
+ const parts = [];
7094
+ if ((this.emptyIterationsThreshold ?? 0) !== 0)
7095
+ parts.push("emptyIterationsThreshold" + "=" + inspect(this.emptyIterationsThreshold));
7096
+ return `${this.$type}(${parts.join(", ")})`;
7097
+ }
7098
+ function TransferSpec_StopConditionAfterNEmptyIterationsCustomJson() {
7099
+ const obj = {
7100
+ type: this.$type,
7101
+ };
7102
+ if ((this.emptyIterationsThreshold ?? 0) !== 0)
7103
+ obj.emptyIterationsThreshold = inspectJson(this.emptyIterationsThreshold);
7104
+ return obj;
7105
+ }
7106
+ function applyTransferSpec_StopConditionAfterNEmptyIterationsCustom(message) {
7107
+ message[custom] = TransferSpec_StopConditionAfterNEmptyIterationsCustomInspect;
7108
+ message[customJson] = TransferSpec_StopConditionAfterNEmptyIterationsCustomJson;
7109
+ return message;
7110
+ }
7111
+ function createBaseTransferSpec_StopConditionAfterNEmptyIterations() {
7112
+ const message = {
7113
+ $type: "nebius.storage.v1.TransferSpec.StopConditionAfterNEmptyIterations",
7114
+ emptyIterationsThreshold: 0,
7115
+ };
7116
+ return applyTransferSpec_StopConditionAfterNEmptyIterationsCustom(message);
7117
+ }
7118
+ export const TransferSpec_StopConditionInfinite = {
7119
+ $type: "nebius.storage.v1.TransferSpec.StopConditionInfinite",
7120
+ encode(message, writer = new BinaryWriter()) {
7121
+ if (message[unknownFieldsSymbol]) {
7122
+ writer.raw(message[unknownFieldsSymbol]);
7123
+ }
7124
+ return writer;
7125
+ },
7126
+ decode(input, length) {
7127
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7128
+ const end = length === undefined ? reader.len : reader.pos + length;
7129
+ const message = createBaseTransferSpec_StopConditionInfinite();
7130
+ let writer = undefined;
7131
+ while (reader.pos < end) {
7132
+ const tag = reader.uint32();
7133
+ switch (tag >>> 3) {
7134
+ default:
7135
+ break;
7136
+ }
7137
+ if ((tag & 7) === 4 || tag === 0) {
7138
+ break;
7139
+ }
7140
+ {
7141
+ if (!writer)
7142
+ writer = new BinaryWriter();
7143
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7144
+ writer.uint32(tag).raw(skipped);
7145
+ }
7146
+ }
7147
+ if (writer) {
7148
+ message[unknownFieldsSymbol] = writer.finish();
7149
+ }
7150
+ return message;
7151
+ },
7152
+ fromJSON(object) {
7153
+ return applyTransferSpec_StopConditionInfiniteCustom({
7154
+ $type: "nebius.storage.v1.TransferSpec.StopConditionInfinite",
7155
+ });
7156
+ },
7157
+ toJSON(message, use = "json") {
7158
+ const obj = {};
7159
+ const pick = (json, pb) => (use === "json" ? json : pb);
7160
+ return obj;
7161
+ },
7162
+ create(base) {
7163
+ return TransferSpec_StopConditionInfinite.fromPartial(base ?? {});
7164
+ },
7165
+ fromPartial(object) {
7166
+ const message = createBaseTransferSpec_StopConditionInfinite();
7167
+ return message;
7168
+ },
7169
+ };
7170
+ protoRegistry.registerMessage(TransferSpec_StopConditionInfinite);
7171
+ function TransferSpec_StopConditionInfiniteCustomInspect() {
7172
+ const parts = [];
7173
+ return `${this.$type}(${parts.join(", ")})`;
7174
+ }
7175
+ function TransferSpec_StopConditionInfiniteCustomJson() {
7176
+ const obj = {
7177
+ type: this.$type,
7178
+ };
7179
+ return obj;
7180
+ }
7181
+ function applyTransferSpec_StopConditionInfiniteCustom(message) {
7182
+ message[custom] = TransferSpec_StopConditionInfiniteCustomInspect;
7183
+ message[customJson] = TransferSpec_StopConditionInfiniteCustomJson;
7184
+ return message;
7185
+ }
7186
+ function createBaseTransferSpec_StopConditionInfinite() {
7187
+ const message = {
7188
+ $type: "nebius.storage.v1.TransferSpec.StopConditionInfinite",
7189
+ };
7190
+ return applyTransferSpec_StopConditionInfiniteCustom(message);
7191
+ }
7192
+ export const TransferSource = {
7193
+ $type: "nebius.storage.v1.TransferSource",
7194
+ encode(message, writer = new BinaryWriter()) {
7195
+ if (message.prefix !== "") {
7196
+ writer.uint32(34).string(message.prefix);
7197
+ }
7198
+ if (message.provider?.$case === undefined) { /* noop */ }
7199
+ else if (message.provider?.$case === "nebius") {
7200
+ const w = writer.uint32(10).fork();
7201
+ TransferSource_NebiusProvider.encode(message.provider.nebius, w);
7202
+ w.join();
7203
+ }
7204
+ else if (message.provider?.$case === "s3Compatible") {
7205
+ const w = writer.uint32(18).fork();
7206
+ TransferSource_S3CompatibleProvider.encode(message.provider.s3Compatible, w);
7207
+ w.join();
7208
+ }
7209
+ else if (message.provider?.$case === "azureBlobStorage") {
7210
+ const w = writer.uint32(26).fork();
7211
+ TransferSource_AzureBlobStorageProvider.encode(message.provider.azureBlobStorage, w);
7212
+ w.join();
7213
+ }
7214
+ if (message[unknownFieldsSymbol]) {
7215
+ writer.raw(message[unknownFieldsSymbol]);
7216
+ }
7217
+ return writer;
7218
+ },
7219
+ decode(input, length) {
7220
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7221
+ const end = length === undefined ? reader.len : reader.pos + length;
7222
+ const message = createBaseTransferSource();
7223
+ let writer = undefined;
7224
+ while (reader.pos < end) {
7225
+ const tag = reader.uint32();
7226
+ switch (tag >>> 3) {
7227
+ case 4: {
7228
+ if (tag !== 34)
7229
+ break;
7230
+ message.prefix = reader.string();
7231
+ continue;
7232
+ }
7233
+ case 1: {
7234
+ if (tag !== 10)
7235
+ break;
7236
+ message.provider = {
7237
+ $case: "nebius",
7238
+ nebius: TransferSource_NebiusProvider.decode(reader, reader.uint32())
7239
+ };
7240
+ continue;
7241
+ }
7242
+ case 2: {
7243
+ if (tag !== 18)
7244
+ break;
7245
+ message.provider = {
7246
+ $case: "s3Compatible",
7247
+ s3Compatible: TransferSource_S3CompatibleProvider.decode(reader, reader.uint32())
7248
+ };
7249
+ continue;
7250
+ }
7251
+ case 3: {
7252
+ if (tag !== 26)
7253
+ break;
7254
+ message.provider = {
7255
+ $case: "azureBlobStorage",
7256
+ azureBlobStorage: TransferSource_AzureBlobStorageProvider.decode(reader, reader.uint32())
7257
+ };
7258
+ continue;
7259
+ }
7260
+ default:
7261
+ break;
7262
+ }
7263
+ if ((tag & 7) === 4 || tag === 0) {
7264
+ break;
7265
+ }
7266
+ {
7267
+ if (!writer)
7268
+ writer = new BinaryWriter();
7269
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7270
+ writer.uint32(tag).raw(skipped);
7271
+ }
7272
+ }
7273
+ if (writer) {
7274
+ message[unknownFieldsSymbol] = writer.finish();
7275
+ }
7276
+ return message;
7277
+ },
7278
+ fromJSON(object) {
7279
+ return applyTransferSourceCustom({
7280
+ $type: "nebius.storage.v1.TransferSource",
7281
+ prefix: isSet(object.prefix ?? object.prefix)
7282
+ ? String(object.prefix ?? object.prefix)
7283
+ : "",
7284
+ provider: (() => {
7285
+ if (isSet(object.nebius) || isSet(object.nebius)) {
7286
+ return {
7287
+ $case: "nebius",
7288
+ nebius: TransferSource_NebiusProvider.fromJSON(object.nebius ?? object.nebius)
7289
+ };
7290
+ }
7291
+ if (isSet(object.s3Compatible) || isSet(object.s3_compatible)) {
7292
+ return {
7293
+ $case: "s3Compatible",
7294
+ s3Compatible: TransferSource_S3CompatibleProvider.fromJSON(object.s3Compatible ?? object.s3_compatible)
7295
+ };
7296
+ }
7297
+ if (isSet(object.azureBlobStorage) || isSet(object.azure_blob_storage)) {
7298
+ return {
7299
+ $case: "azureBlobStorage",
7300
+ azureBlobStorage: TransferSource_AzureBlobStorageProvider.fromJSON(object.azureBlobStorage ?? object.azure_blob_storage)
7301
+ };
7302
+ }
7303
+ return undefined;
7304
+ })(),
7305
+ });
7306
+ },
7307
+ toJSON(message, use = "json") {
7308
+ const obj = {};
7309
+ const pick = (json, pb) => (use === "json" ? json : pb);
7310
+ if (message.prefix !== "") {
7311
+ obj[pick("prefix", "prefix")] = message.prefix;
7312
+ }
7313
+ switch (message.provider?.$case) {
7314
+ case "nebius": {
7315
+ obj[pick("nebius", "nebius")] = TransferSource_NebiusProvider.toJSON(message.provider.nebius, use);
7316
+ break;
7317
+ }
7318
+ case "s3Compatible": {
7319
+ obj[pick("s3Compatible", "s3_compatible")] = TransferSource_S3CompatibleProvider.toJSON(message.provider.s3Compatible, use);
7320
+ break;
7321
+ }
7322
+ case "azureBlobStorage": {
7323
+ obj[pick("azureBlobStorage", "azure_blob_storage")] = TransferSource_AzureBlobStorageProvider.toJSON(message.provider.azureBlobStorage, use);
7324
+ break;
7325
+ }
7326
+ default: break;
7327
+ }
7328
+ return obj;
7329
+ },
7330
+ create(base) {
7331
+ return TransferSource.fromPartial(base ?? {});
7332
+ },
7333
+ fromPartial(object) {
7334
+ const message = createBaseTransferSource();
7335
+ message.prefix = (object.prefix !== undefined && object.prefix !== null)
7336
+ ? object.prefix
7337
+ : "";
7338
+ switch (object.provider?.$case) {
7339
+ case "nebius": {
7340
+ if (object.provider.nebius !== undefined && object.provider.nebius !== null) {
7341
+ message.provider = {
7342
+ $case: "nebius",
7343
+ nebius: TransferSource_NebiusProvider.fromPartial(object.provider.nebius),
7344
+ };
7345
+ }
7346
+ break;
7347
+ }
7348
+ case "s3Compatible": {
7349
+ if (object.provider.s3Compatible !== undefined && object.provider.s3Compatible !== null) {
7350
+ message.provider = {
7351
+ $case: "s3Compatible",
7352
+ s3Compatible: TransferSource_S3CompatibleProvider.fromPartial(object.provider.s3Compatible),
7353
+ };
7354
+ }
7355
+ break;
7356
+ }
7357
+ case "azureBlobStorage": {
7358
+ if (object.provider.azureBlobStorage !== undefined && object.provider.azureBlobStorage !== null) {
7359
+ message.provider = {
7360
+ $case: "azureBlobStorage",
7361
+ azureBlobStorage: TransferSource_AzureBlobStorageProvider.fromPartial(object.provider.azureBlobStorage),
7362
+ };
7363
+ }
7364
+ break;
7365
+ }
7366
+ default: break;
7367
+ }
7368
+ return message;
7369
+ },
7370
+ };
7371
+ protoRegistry.registerMessage(TransferSource);
7372
+ function TransferSourceCustomInspect() {
7373
+ const parts = [];
7374
+ if (this.prefix !== "")
7375
+ parts.push("prefix" + "=" + inspect(this.prefix));
7376
+ return `${this.$type}(${parts.join(", ")})`;
7377
+ }
7378
+ function TransferSourceCustomJson() {
7379
+ const obj = {
7380
+ type: this.$type,
7381
+ };
7382
+ if (this.prefix !== "")
7383
+ obj.prefix = inspectJson(this.prefix);
7384
+ return obj;
7385
+ }
7386
+ function applyTransferSourceCustom(message) {
7387
+ message[custom] = TransferSourceCustomInspect;
7388
+ message[customJson] = TransferSourceCustomJson;
7389
+ return message;
7390
+ }
7391
+ function createBaseTransferSource() {
7392
+ const message = {
7393
+ $type: "nebius.storage.v1.TransferSource",
7394
+ prefix: "",
7395
+ provider: undefined,
7396
+ };
7397
+ return applyTransferSourceCustom(message);
7398
+ }
7399
+ export const TransferSource_NebiusProvider = {
7400
+ $type: "nebius.storage.v1.TransferSource.NebiusProvider",
7401
+ encode(message, writer = new BinaryWriter()) {
7402
+ if (message.region !== "") {
7403
+ writer.uint32(10).string(message.region);
7404
+ }
7405
+ if (message.bucketName !== "") {
7406
+ writer.uint32(18).string(message.bucketName);
7407
+ }
7408
+ if (message.credentials?.$case === undefined) { /* noop */ }
7409
+ else if (message.credentials?.$case === "anonymous") {
7410
+ const w = writer.uint32(26).fork();
7411
+ TransferCredentialsAnonymous.encode(message.credentials.anonymous, w);
7412
+ w.join();
7413
+ }
7414
+ else if (message.credentials?.$case === "accessKey") {
7415
+ const w = writer.uint32(34).fork();
7416
+ TransferCredentialsAccessKey.encode(message.credentials.accessKey, w);
7417
+ w.join();
7418
+ }
7419
+ if (message[unknownFieldsSymbol]) {
7420
+ writer.raw(message[unknownFieldsSymbol]);
7421
+ }
7422
+ return writer;
7423
+ },
7424
+ decode(input, length) {
7425
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7426
+ const end = length === undefined ? reader.len : reader.pos + length;
7427
+ const message = createBaseTransferSource_NebiusProvider();
7428
+ let writer = undefined;
7429
+ while (reader.pos < end) {
7430
+ const tag = reader.uint32();
7431
+ switch (tag >>> 3) {
7432
+ case 1: {
7433
+ if (tag !== 10)
7434
+ break;
7435
+ message.region = reader.string();
7436
+ continue;
7437
+ }
7438
+ case 2: {
7439
+ if (tag !== 18)
7440
+ break;
7441
+ message.bucketName = reader.string();
7442
+ continue;
7443
+ }
7444
+ case 3: {
7445
+ if (tag !== 26)
7446
+ break;
7447
+ message.credentials = {
7448
+ $case: "anonymous",
7449
+ anonymous: TransferCredentialsAnonymous.decode(reader, reader.uint32())
7450
+ };
7451
+ continue;
7452
+ }
7453
+ case 4: {
7454
+ if (tag !== 34)
7455
+ break;
7456
+ message.credentials = {
7457
+ $case: "accessKey",
7458
+ accessKey: TransferCredentialsAccessKey.decode(reader, reader.uint32())
7459
+ };
7460
+ continue;
7461
+ }
7462
+ default:
7463
+ break;
7464
+ }
7465
+ if ((tag & 7) === 4 || tag === 0) {
7466
+ break;
7467
+ }
7468
+ {
7469
+ if (!writer)
7470
+ writer = new BinaryWriter();
7471
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7472
+ writer.uint32(tag).raw(skipped);
7473
+ }
7474
+ }
7475
+ if (writer) {
7476
+ message[unknownFieldsSymbol] = writer.finish();
7477
+ }
7478
+ return message;
7479
+ },
7480
+ fromJSON(object) {
7481
+ return applyTransferSource_NebiusProviderCustom({
7482
+ $type: "nebius.storage.v1.TransferSource.NebiusProvider",
7483
+ region: isSet(object.region ?? object.region)
7484
+ ? String(object.region ?? object.region)
7485
+ : "",
7486
+ bucketName: isSet(object.bucketName ?? object.bucket_name)
7487
+ ? String(object.bucketName ?? object.bucket_name)
7488
+ : "",
7489
+ credentials: (() => {
7490
+ if (isSet(object.anonymous) || isSet(object.anonymous)) {
7491
+ return {
7492
+ $case: "anonymous",
7493
+ anonymous: TransferCredentialsAnonymous.fromJSON(object.anonymous ?? object.anonymous)
7494
+ };
7495
+ }
7496
+ if (isSet(object.accessKey) || isSet(object.access_key)) {
7497
+ return {
7498
+ $case: "accessKey",
7499
+ accessKey: TransferCredentialsAccessKey.fromJSON(object.accessKey ?? object.access_key)
7500
+ };
7501
+ }
7502
+ return undefined;
7503
+ })(),
7504
+ });
7505
+ },
7506
+ toJSON(message, use = "json") {
7507
+ const obj = {};
7508
+ const pick = (json, pb) => (use === "json" ? json : pb);
7509
+ if (message.region !== "") {
7510
+ obj[pick("region", "region")] = message.region;
7511
+ }
7512
+ if (message.bucketName !== "") {
7513
+ obj[pick("bucketName", "bucket_name")] = message.bucketName;
7514
+ }
7515
+ switch (message.credentials?.$case) {
7516
+ case "anonymous": {
7517
+ obj[pick("anonymous", "anonymous")] = TransferCredentialsAnonymous.toJSON(message.credentials.anonymous, use);
7518
+ break;
7519
+ }
7520
+ case "accessKey": {
7521
+ obj[pick("accessKey", "access_key")] = TransferCredentialsAccessKey.toJSON(message.credentials.accessKey, use);
7522
+ break;
7523
+ }
7524
+ default: break;
7525
+ }
7526
+ return obj;
7527
+ },
7528
+ create(base) {
7529
+ return TransferSource_NebiusProvider.fromPartial(base ?? {});
7530
+ },
7531
+ fromPartial(object) {
7532
+ const message = createBaseTransferSource_NebiusProvider();
7533
+ message.region = (object.region !== undefined && object.region !== null)
7534
+ ? object.region
7535
+ : "";
7536
+ message.bucketName = (object.bucketName !== undefined && object.bucketName !== null)
7537
+ ? object.bucketName
7538
+ : "";
7539
+ switch (object.credentials?.$case) {
7540
+ case "anonymous": {
7541
+ if (object.credentials.anonymous !== undefined && object.credentials.anonymous !== null) {
7542
+ message.credentials = {
7543
+ $case: "anonymous",
7544
+ anonymous: TransferCredentialsAnonymous.fromPartial(object.credentials.anonymous),
7545
+ };
7546
+ }
7547
+ break;
7548
+ }
7549
+ case "accessKey": {
7550
+ if (object.credentials.accessKey !== undefined && object.credentials.accessKey !== null) {
7551
+ message.credentials = {
7552
+ $case: "accessKey",
7553
+ accessKey: TransferCredentialsAccessKey.fromPartial(object.credentials.accessKey),
7554
+ };
7555
+ }
7556
+ break;
7557
+ }
7558
+ default: break;
7559
+ }
7560
+ return message;
7561
+ },
7562
+ };
7563
+ protoRegistry.registerMessage(TransferSource_NebiusProvider);
7564
+ function TransferSource_NebiusProviderCustomInspect() {
7565
+ const parts = [];
7566
+ if (this.region !== "")
7567
+ parts.push("region" + "=" + inspect(this.region));
7568
+ if (this.bucketName !== "")
7569
+ parts.push("bucketName" + "=" + inspect(this.bucketName));
7570
+ return `${this.$type}(${parts.join(", ")})`;
7571
+ }
7572
+ function TransferSource_NebiusProviderCustomJson() {
7573
+ const obj = {
7574
+ type: this.$type,
7575
+ };
7576
+ if (this.region !== "")
7577
+ obj.region = inspectJson(this.region);
7578
+ if (this.bucketName !== "")
7579
+ obj.bucketName = inspectJson(this.bucketName);
7580
+ return obj;
7581
+ }
7582
+ function applyTransferSource_NebiusProviderCustom(message) {
7583
+ message[custom] = TransferSource_NebiusProviderCustomInspect;
7584
+ message[customJson] = TransferSource_NebiusProviderCustomJson;
7585
+ return message;
7586
+ }
7587
+ function createBaseTransferSource_NebiusProvider() {
7588
+ const message = {
7589
+ $type: "nebius.storage.v1.TransferSource.NebiusProvider",
7590
+ region: "",
7591
+ bucketName: "",
7592
+ credentials: undefined,
7593
+ };
7594
+ return applyTransferSource_NebiusProviderCustom(message);
7595
+ }
7596
+ export const TransferSource_S3CompatibleProvider = {
7597
+ $type: "nebius.storage.v1.TransferSource.S3CompatibleProvider",
7598
+ encode(message, writer = new BinaryWriter()) {
7599
+ if (message.endpoint !== "") {
7600
+ writer.uint32(10).string(message.endpoint);
7601
+ }
7602
+ if (message.region !== "") {
7603
+ writer.uint32(18).string(message.region);
7604
+ }
7605
+ if (message.bucketName !== "") {
7606
+ writer.uint32(26).string(message.bucketName);
7607
+ }
7608
+ if (message.credentials?.$case === undefined) { /* noop */ }
7609
+ else if (message.credentials?.$case === "anonymous") {
7610
+ const w = writer.uint32(34).fork();
7611
+ TransferCredentialsAnonymous.encode(message.credentials.anonymous, w);
7612
+ w.join();
7613
+ }
7614
+ else if (message.credentials?.$case === "accessKey") {
7615
+ const w = writer.uint32(42).fork();
7616
+ TransferCredentialsAccessKey.encode(message.credentials.accessKey, w);
7617
+ w.join();
7618
+ }
7619
+ if (message[unknownFieldsSymbol]) {
7620
+ writer.raw(message[unknownFieldsSymbol]);
7621
+ }
7622
+ return writer;
7623
+ },
7624
+ decode(input, length) {
7625
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7626
+ const end = length === undefined ? reader.len : reader.pos + length;
7627
+ const message = createBaseTransferSource_S3CompatibleProvider();
7628
+ let writer = undefined;
7629
+ while (reader.pos < end) {
7630
+ const tag = reader.uint32();
7631
+ switch (tag >>> 3) {
7632
+ case 1: {
7633
+ if (tag !== 10)
7634
+ break;
7635
+ message.endpoint = reader.string();
7636
+ continue;
7637
+ }
7638
+ case 2: {
7639
+ if (tag !== 18)
7640
+ break;
7641
+ message.region = reader.string();
7642
+ continue;
7643
+ }
7644
+ case 3: {
7645
+ if (tag !== 26)
7646
+ break;
7647
+ message.bucketName = reader.string();
7648
+ continue;
7649
+ }
7650
+ case 4: {
7651
+ if (tag !== 34)
7652
+ break;
7653
+ message.credentials = {
7654
+ $case: "anonymous",
7655
+ anonymous: TransferCredentialsAnonymous.decode(reader, reader.uint32())
7656
+ };
7657
+ continue;
7658
+ }
7659
+ case 5: {
7660
+ if (tag !== 42)
7661
+ break;
7662
+ message.credentials = {
7663
+ $case: "accessKey",
7664
+ accessKey: TransferCredentialsAccessKey.decode(reader, reader.uint32())
7665
+ };
7666
+ continue;
7667
+ }
7668
+ default:
7669
+ break;
7670
+ }
7671
+ if ((tag & 7) === 4 || tag === 0) {
7672
+ break;
7673
+ }
7674
+ {
7675
+ if (!writer)
7676
+ writer = new BinaryWriter();
7677
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7678
+ writer.uint32(tag).raw(skipped);
7679
+ }
7680
+ }
7681
+ if (writer) {
7682
+ message[unknownFieldsSymbol] = writer.finish();
7683
+ }
7684
+ return message;
7685
+ },
7686
+ fromJSON(object) {
7687
+ return applyTransferSource_S3CompatibleProviderCustom({
7688
+ $type: "nebius.storage.v1.TransferSource.S3CompatibleProvider",
7689
+ endpoint: isSet(object.endpoint ?? object.endpoint)
7690
+ ? String(object.endpoint ?? object.endpoint)
7691
+ : "",
7692
+ region: isSet(object.region ?? object.region)
7693
+ ? String(object.region ?? object.region)
7694
+ : "",
7695
+ bucketName: isSet(object.bucketName ?? object.bucket_name)
7696
+ ? String(object.bucketName ?? object.bucket_name)
7697
+ : "",
7698
+ credentials: (() => {
7699
+ if (isSet(object.anonymous) || isSet(object.anonymous)) {
7700
+ return {
7701
+ $case: "anonymous",
7702
+ anonymous: TransferCredentialsAnonymous.fromJSON(object.anonymous ?? object.anonymous)
7703
+ };
7704
+ }
7705
+ if (isSet(object.accessKey) || isSet(object.access_key)) {
7706
+ return {
7707
+ $case: "accessKey",
7708
+ accessKey: TransferCredentialsAccessKey.fromJSON(object.accessKey ?? object.access_key)
7709
+ };
7710
+ }
7711
+ return undefined;
7712
+ })(),
7713
+ });
7714
+ },
7715
+ toJSON(message, use = "json") {
7716
+ const obj = {};
7717
+ const pick = (json, pb) => (use === "json" ? json : pb);
7718
+ if (message.endpoint !== "") {
7719
+ obj[pick("endpoint", "endpoint")] = message.endpoint;
7720
+ }
7721
+ if (message.region !== "") {
7722
+ obj[pick("region", "region")] = message.region;
7723
+ }
7724
+ if (message.bucketName !== "") {
7725
+ obj[pick("bucketName", "bucket_name")] = message.bucketName;
7726
+ }
7727
+ switch (message.credentials?.$case) {
7728
+ case "anonymous": {
7729
+ obj[pick("anonymous", "anonymous")] = TransferCredentialsAnonymous.toJSON(message.credentials.anonymous, use);
7730
+ break;
7731
+ }
7732
+ case "accessKey": {
7733
+ obj[pick("accessKey", "access_key")] = TransferCredentialsAccessKey.toJSON(message.credentials.accessKey, use);
7734
+ break;
7735
+ }
7736
+ default: break;
7737
+ }
7738
+ return obj;
7739
+ },
7740
+ create(base) {
7741
+ return TransferSource_S3CompatibleProvider.fromPartial(base ?? {});
7742
+ },
7743
+ fromPartial(object) {
7744
+ const message = createBaseTransferSource_S3CompatibleProvider();
7745
+ message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
7746
+ ? object.endpoint
7747
+ : "";
7748
+ message.region = (object.region !== undefined && object.region !== null)
7749
+ ? object.region
7750
+ : "";
7751
+ message.bucketName = (object.bucketName !== undefined && object.bucketName !== null)
7752
+ ? object.bucketName
7753
+ : "";
7754
+ switch (object.credentials?.$case) {
7755
+ case "anonymous": {
7756
+ if (object.credentials.anonymous !== undefined && object.credentials.anonymous !== null) {
7757
+ message.credentials = {
7758
+ $case: "anonymous",
7759
+ anonymous: TransferCredentialsAnonymous.fromPartial(object.credentials.anonymous),
7760
+ };
7761
+ }
7762
+ break;
7763
+ }
7764
+ case "accessKey": {
7765
+ if (object.credentials.accessKey !== undefined && object.credentials.accessKey !== null) {
7766
+ message.credentials = {
7767
+ $case: "accessKey",
7768
+ accessKey: TransferCredentialsAccessKey.fromPartial(object.credentials.accessKey),
7769
+ };
7770
+ }
7771
+ break;
7772
+ }
7773
+ default: break;
7774
+ }
7775
+ return message;
7776
+ },
7777
+ };
7778
+ protoRegistry.registerMessage(TransferSource_S3CompatibleProvider);
7779
+ function TransferSource_S3CompatibleProviderCustomInspect() {
7780
+ const parts = [];
7781
+ if (this.endpoint !== "")
7782
+ parts.push("endpoint" + "=" + inspect(this.endpoint));
7783
+ if (this.region !== "")
7784
+ parts.push("region" + "=" + inspect(this.region));
7785
+ if (this.bucketName !== "")
7786
+ parts.push("bucketName" + "=" + inspect(this.bucketName));
7787
+ return `${this.$type}(${parts.join(", ")})`;
7788
+ }
7789
+ function TransferSource_S3CompatibleProviderCustomJson() {
7790
+ const obj = {
7791
+ type: this.$type,
7792
+ };
7793
+ if (this.endpoint !== "")
7794
+ obj.endpoint = inspectJson(this.endpoint);
7795
+ if (this.region !== "")
7796
+ obj.region = inspectJson(this.region);
7797
+ if (this.bucketName !== "")
7798
+ obj.bucketName = inspectJson(this.bucketName);
7799
+ return obj;
7800
+ }
7801
+ function applyTransferSource_S3CompatibleProviderCustom(message) {
7802
+ message[custom] = TransferSource_S3CompatibleProviderCustomInspect;
7803
+ message[customJson] = TransferSource_S3CompatibleProviderCustomJson;
7804
+ return message;
7805
+ }
7806
+ function createBaseTransferSource_S3CompatibleProvider() {
7807
+ const message = {
7808
+ $type: "nebius.storage.v1.TransferSource.S3CompatibleProvider",
7809
+ endpoint: "",
7810
+ region: "",
7811
+ bucketName: "",
7812
+ credentials: undefined,
7813
+ };
7814
+ return applyTransferSource_S3CompatibleProviderCustom(message);
7815
+ }
7816
+ export const TransferSource_AzureBlobStorageProvider = {
7817
+ $type: "nebius.storage.v1.TransferSource.AzureBlobStorageProvider",
7818
+ encode(message, writer = new BinaryWriter()) {
7819
+ if (message.endpoint !== "") {
7820
+ writer.uint32(10).string(message.endpoint);
7821
+ }
7822
+ if (message.containerName !== "") {
7823
+ writer.uint32(18).string(message.containerName);
7824
+ }
7825
+ if (message.credentials?.$case === undefined) { /* noop */ }
7826
+ else if (message.credentials?.$case === "anonymous") {
7827
+ const w = writer.uint32(26).fork();
7828
+ TransferCredentialsAnonymous.encode(message.credentials.anonymous, w);
7829
+ w.join();
7830
+ }
7831
+ else if (message.credentials?.$case === "azureStorageAccount") {
7832
+ const w = writer.uint32(34).fork();
7833
+ TransferCredentialsAzureStorageAccount.encode(message.credentials.azureStorageAccount, w);
7834
+ w.join();
7835
+ }
7836
+ if (message[unknownFieldsSymbol]) {
7837
+ writer.raw(message[unknownFieldsSymbol]);
7838
+ }
7839
+ return writer;
7840
+ },
7841
+ decode(input, length) {
7842
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
7843
+ const end = length === undefined ? reader.len : reader.pos + length;
7844
+ const message = createBaseTransferSource_AzureBlobStorageProvider();
7845
+ let writer = undefined;
7846
+ while (reader.pos < end) {
7847
+ const tag = reader.uint32();
7848
+ switch (tag >>> 3) {
7849
+ case 1: {
7850
+ if (tag !== 10)
7851
+ break;
7852
+ message.endpoint = reader.string();
7853
+ continue;
7854
+ }
7855
+ case 2: {
7856
+ if (tag !== 18)
7857
+ break;
7858
+ message.containerName = reader.string();
7859
+ continue;
7860
+ }
7861
+ case 3: {
7862
+ if (tag !== 26)
7863
+ break;
7864
+ message.credentials = {
7865
+ $case: "anonymous",
7866
+ anonymous: TransferCredentialsAnonymous.decode(reader, reader.uint32())
7867
+ };
7868
+ continue;
7869
+ }
7870
+ case 4: {
7871
+ if (tag !== 34)
7872
+ break;
7873
+ message.credentials = {
7874
+ $case: "azureStorageAccount",
7875
+ azureStorageAccount: TransferCredentialsAzureStorageAccount.decode(reader, reader.uint32())
7876
+ };
7877
+ continue;
7878
+ }
7879
+ default:
7880
+ break;
7881
+ }
7882
+ if ((tag & 7) === 4 || tag === 0) {
7883
+ break;
7884
+ }
7885
+ {
7886
+ if (!writer)
7887
+ writer = new BinaryWriter();
7888
+ const skipped = reader.skip(tag & 7, tag >>> 3);
7889
+ writer.uint32(tag).raw(skipped);
7890
+ }
7891
+ }
7892
+ if (writer) {
7893
+ message[unknownFieldsSymbol] = writer.finish();
7894
+ }
7895
+ return message;
7896
+ },
7897
+ fromJSON(object) {
7898
+ return applyTransferSource_AzureBlobStorageProviderCustom({
7899
+ $type: "nebius.storage.v1.TransferSource.AzureBlobStorageProvider",
7900
+ endpoint: isSet(object.endpoint ?? object.endpoint)
7901
+ ? String(object.endpoint ?? object.endpoint)
7902
+ : "",
7903
+ containerName: isSet(object.containerName ?? object.container_name)
7904
+ ? String(object.containerName ?? object.container_name)
7905
+ : "",
7906
+ credentials: (() => {
7907
+ if (isSet(object.anonymous) || isSet(object.anonymous)) {
7908
+ return {
7909
+ $case: "anonymous",
7910
+ anonymous: TransferCredentialsAnonymous.fromJSON(object.anonymous ?? object.anonymous)
7911
+ };
7912
+ }
7913
+ if (isSet(object.azureStorageAccount) || isSet(object.azure_storage_account)) {
7914
+ return {
7915
+ $case: "azureStorageAccount",
7916
+ azureStorageAccount: TransferCredentialsAzureStorageAccount.fromJSON(object.azureStorageAccount ?? object.azure_storage_account)
7917
+ };
7918
+ }
7919
+ return undefined;
7920
+ })(),
7921
+ });
7922
+ },
7923
+ toJSON(message, use = "json") {
7924
+ const obj = {};
7925
+ const pick = (json, pb) => (use === "json" ? json : pb);
7926
+ if (message.endpoint !== "") {
7927
+ obj[pick("endpoint", "endpoint")] = message.endpoint;
7928
+ }
7929
+ if (message.containerName !== "") {
7930
+ obj[pick("containerName", "container_name")] = message.containerName;
7931
+ }
7932
+ switch (message.credentials?.$case) {
7933
+ case "anonymous": {
7934
+ obj[pick("anonymous", "anonymous")] = TransferCredentialsAnonymous.toJSON(message.credentials.anonymous, use);
7935
+ break;
7936
+ }
7937
+ case "azureStorageAccount": {
7938
+ obj[pick("azureStorageAccount", "azure_storage_account")] = TransferCredentialsAzureStorageAccount.toJSON(message.credentials.azureStorageAccount, use);
7939
+ break;
7940
+ }
7941
+ default: break;
7942
+ }
7943
+ return obj;
7944
+ },
7945
+ create(base) {
7946
+ return TransferSource_AzureBlobStorageProvider.fromPartial(base ?? {});
7947
+ },
7948
+ fromPartial(object) {
7949
+ const message = createBaseTransferSource_AzureBlobStorageProvider();
7950
+ message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
7951
+ ? object.endpoint
7952
+ : "";
7953
+ message.containerName = (object.containerName !== undefined && object.containerName !== null)
7954
+ ? object.containerName
7955
+ : "";
7956
+ switch (object.credentials?.$case) {
7957
+ case "anonymous": {
7958
+ if (object.credentials.anonymous !== undefined && object.credentials.anonymous !== null) {
7959
+ message.credentials = {
7960
+ $case: "anonymous",
7961
+ anonymous: TransferCredentialsAnonymous.fromPartial(object.credentials.anonymous),
7962
+ };
7963
+ }
7964
+ break;
7965
+ }
7966
+ case "azureStorageAccount": {
7967
+ if (object.credentials.azureStorageAccount !== undefined && object.credentials.azureStorageAccount !== null) {
7968
+ message.credentials = {
7969
+ $case: "azureStorageAccount",
7970
+ azureStorageAccount: TransferCredentialsAzureStorageAccount.fromPartial(object.credentials.azureStorageAccount),
7971
+ };
7972
+ }
7973
+ break;
7974
+ }
7975
+ default: break;
7976
+ }
7977
+ return message;
7978
+ },
7979
+ };
7980
+ protoRegistry.registerMessage(TransferSource_AzureBlobStorageProvider);
7981
+ function TransferSource_AzureBlobStorageProviderCustomInspect() {
7982
+ const parts = [];
7983
+ if (this.endpoint !== "")
7984
+ parts.push("endpoint" + "=" + inspect(this.endpoint));
7985
+ if (this.containerName !== "")
7986
+ parts.push("containerName" + "=" + inspect(this.containerName));
7987
+ return `${this.$type}(${parts.join(", ")})`;
7988
+ }
7989
+ function TransferSource_AzureBlobStorageProviderCustomJson() {
7990
+ const obj = {
7991
+ type: this.$type,
7992
+ };
7993
+ if (this.endpoint !== "")
7994
+ obj.endpoint = inspectJson(this.endpoint);
7995
+ if (this.containerName !== "")
7996
+ obj.containerName = inspectJson(this.containerName);
7997
+ return obj;
7998
+ }
7999
+ function applyTransferSource_AzureBlobStorageProviderCustom(message) {
8000
+ message[custom] = TransferSource_AzureBlobStorageProviderCustomInspect;
8001
+ message[customJson] = TransferSource_AzureBlobStorageProviderCustomJson;
8002
+ return message;
8003
+ }
8004
+ function createBaseTransferSource_AzureBlobStorageProvider() {
8005
+ const message = {
8006
+ $type: "nebius.storage.v1.TransferSource.AzureBlobStorageProvider",
8007
+ endpoint: "",
8008
+ containerName: "",
8009
+ credentials: undefined,
8010
+ };
8011
+ return applyTransferSource_AzureBlobStorageProviderCustom(message);
8012
+ }
8013
+ export const TransferDestination = {
8014
+ $type: "nebius.storage.v1.TransferDestination",
8015
+ encode(message, writer = new BinaryWriter()) {
8016
+ if (message.prefix !== "") {
8017
+ writer.uint32(26).string(message.prefix);
8018
+ }
8019
+ if (message.provider?.$case === undefined) { /* noop */ }
8020
+ else if (message.provider?.$case === "nebius") {
8021
+ const w = writer.uint32(10).fork();
8022
+ TransferDestination_NebiusProvider.encode(message.provider.nebius, w);
8023
+ w.join();
8024
+ }
8025
+ else if (message.provider?.$case === "s3Compatible") {
8026
+ const w = writer.uint32(18).fork();
8027
+ TransferDestination_S3CompatibleProvider.encode(message.provider.s3Compatible, w);
8028
+ w.join();
8029
+ }
8030
+ if (message[unknownFieldsSymbol]) {
8031
+ writer.raw(message[unknownFieldsSymbol]);
8032
+ }
8033
+ return writer;
8034
+ },
8035
+ decode(input, length) {
8036
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8037
+ const end = length === undefined ? reader.len : reader.pos + length;
8038
+ const message = createBaseTransferDestination();
8039
+ let writer = undefined;
8040
+ while (reader.pos < end) {
8041
+ const tag = reader.uint32();
8042
+ switch (tag >>> 3) {
8043
+ case 3: {
8044
+ if (tag !== 26)
8045
+ break;
8046
+ message.prefix = reader.string();
8047
+ continue;
8048
+ }
8049
+ case 1: {
8050
+ if (tag !== 10)
8051
+ break;
8052
+ message.provider = {
8053
+ $case: "nebius",
8054
+ nebius: TransferDestination_NebiusProvider.decode(reader, reader.uint32())
8055
+ };
8056
+ continue;
8057
+ }
8058
+ case 2: {
8059
+ if (tag !== 18)
8060
+ break;
8061
+ message.provider = {
8062
+ $case: "s3Compatible",
8063
+ s3Compatible: TransferDestination_S3CompatibleProvider.decode(reader, reader.uint32())
8064
+ };
8065
+ continue;
8066
+ }
8067
+ default:
8068
+ break;
8069
+ }
8070
+ if ((tag & 7) === 4 || tag === 0) {
8071
+ break;
8072
+ }
8073
+ {
8074
+ if (!writer)
8075
+ writer = new BinaryWriter();
8076
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8077
+ writer.uint32(tag).raw(skipped);
8078
+ }
8079
+ }
8080
+ if (writer) {
8081
+ message[unknownFieldsSymbol] = writer.finish();
8082
+ }
8083
+ return message;
8084
+ },
8085
+ fromJSON(object) {
8086
+ return applyTransferDestinationCustom({
8087
+ $type: "nebius.storage.v1.TransferDestination",
8088
+ prefix: isSet(object.prefix ?? object.prefix)
8089
+ ? String(object.prefix ?? object.prefix)
8090
+ : "",
8091
+ provider: (() => {
8092
+ if (isSet(object.nebius) || isSet(object.nebius)) {
8093
+ return {
8094
+ $case: "nebius",
8095
+ nebius: TransferDestination_NebiusProvider.fromJSON(object.nebius ?? object.nebius)
8096
+ };
8097
+ }
8098
+ if (isSet(object.s3Compatible) || isSet(object.s3_compatible)) {
8099
+ return {
8100
+ $case: "s3Compatible",
8101
+ s3Compatible: TransferDestination_S3CompatibleProvider.fromJSON(object.s3Compatible ?? object.s3_compatible)
8102
+ };
8103
+ }
8104
+ return undefined;
8105
+ })(),
8106
+ });
8107
+ },
8108
+ toJSON(message, use = "json") {
8109
+ const obj = {};
8110
+ const pick = (json, pb) => (use === "json" ? json : pb);
8111
+ if (message.prefix !== "") {
8112
+ obj[pick("prefix", "prefix")] = message.prefix;
8113
+ }
8114
+ switch (message.provider?.$case) {
8115
+ case "nebius": {
8116
+ obj[pick("nebius", "nebius")] = TransferDestination_NebiusProvider.toJSON(message.provider.nebius, use);
8117
+ break;
8118
+ }
8119
+ case "s3Compatible": {
8120
+ obj[pick("s3Compatible", "s3_compatible")] = TransferDestination_S3CompatibleProvider.toJSON(message.provider.s3Compatible, use);
8121
+ break;
8122
+ }
8123
+ default: break;
8124
+ }
8125
+ return obj;
8126
+ },
8127
+ create(base) {
8128
+ return TransferDestination.fromPartial(base ?? {});
8129
+ },
8130
+ fromPartial(object) {
8131
+ const message = createBaseTransferDestination();
8132
+ message.prefix = (object.prefix !== undefined && object.prefix !== null)
8133
+ ? object.prefix
8134
+ : "";
8135
+ switch (object.provider?.$case) {
8136
+ case "nebius": {
8137
+ if (object.provider.nebius !== undefined && object.provider.nebius !== null) {
8138
+ message.provider = {
8139
+ $case: "nebius",
8140
+ nebius: TransferDestination_NebiusProvider.fromPartial(object.provider.nebius),
8141
+ };
8142
+ }
8143
+ break;
8144
+ }
8145
+ case "s3Compatible": {
8146
+ if (object.provider.s3Compatible !== undefined && object.provider.s3Compatible !== null) {
8147
+ message.provider = {
8148
+ $case: "s3Compatible",
8149
+ s3Compatible: TransferDestination_S3CompatibleProvider.fromPartial(object.provider.s3Compatible),
8150
+ };
8151
+ }
8152
+ break;
8153
+ }
8154
+ default: break;
8155
+ }
8156
+ return message;
8157
+ },
8158
+ };
8159
+ protoRegistry.registerMessage(TransferDestination);
8160
+ function TransferDestinationCustomInspect() {
8161
+ const parts = [];
8162
+ if (this.prefix !== "")
8163
+ parts.push("prefix" + "=" + inspect(this.prefix));
8164
+ return `${this.$type}(${parts.join(", ")})`;
8165
+ }
8166
+ function TransferDestinationCustomJson() {
8167
+ const obj = {
8168
+ type: this.$type,
8169
+ };
8170
+ if (this.prefix !== "")
8171
+ obj.prefix = inspectJson(this.prefix);
8172
+ return obj;
8173
+ }
8174
+ function applyTransferDestinationCustom(message) {
8175
+ message[custom] = TransferDestinationCustomInspect;
8176
+ message[customJson] = TransferDestinationCustomJson;
8177
+ return message;
8178
+ }
8179
+ function createBaseTransferDestination() {
8180
+ const message = {
8181
+ $type: "nebius.storage.v1.TransferDestination",
8182
+ prefix: "",
8183
+ provider: undefined,
8184
+ };
8185
+ return applyTransferDestinationCustom(message);
8186
+ }
8187
+ export const TransferDestination_NebiusProvider = {
8188
+ $type: "nebius.storage.v1.TransferDestination.NebiusProvider",
8189
+ encode(message, writer = new BinaryWriter()) {
8190
+ if (message.region !== "") {
8191
+ writer.uint32(10).string(message.region);
8192
+ }
8193
+ if (message.bucketName !== "") {
8194
+ writer.uint32(18).string(message.bucketName);
8195
+ }
8196
+ if (message.credentials?.$case === undefined) { /* noop */ }
8197
+ else if (message.credentials?.$case === "accessKey") {
8198
+ const w = writer.uint32(26).fork();
8199
+ TransferCredentialsAccessKey.encode(message.credentials.accessKey, w);
8200
+ w.join();
8201
+ }
8202
+ if (message[unknownFieldsSymbol]) {
8203
+ writer.raw(message[unknownFieldsSymbol]);
8204
+ }
8205
+ return writer;
8206
+ },
8207
+ decode(input, length) {
8208
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8209
+ const end = length === undefined ? reader.len : reader.pos + length;
8210
+ const message = createBaseTransferDestination_NebiusProvider();
8211
+ let writer = undefined;
8212
+ while (reader.pos < end) {
8213
+ const tag = reader.uint32();
8214
+ switch (tag >>> 3) {
8215
+ case 1: {
8216
+ if (tag !== 10)
8217
+ break;
8218
+ message.region = reader.string();
8219
+ continue;
8220
+ }
8221
+ case 2: {
8222
+ if (tag !== 18)
8223
+ break;
8224
+ message.bucketName = reader.string();
8225
+ continue;
8226
+ }
8227
+ case 3: {
8228
+ if (tag !== 26)
8229
+ break;
8230
+ message.credentials = {
8231
+ $case: "accessKey",
8232
+ accessKey: TransferCredentialsAccessKey.decode(reader, reader.uint32())
8233
+ };
8234
+ continue;
8235
+ }
8236
+ default:
8237
+ break;
8238
+ }
8239
+ if ((tag & 7) === 4 || tag === 0) {
8240
+ break;
8241
+ }
8242
+ {
8243
+ if (!writer)
8244
+ writer = new BinaryWriter();
8245
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8246
+ writer.uint32(tag).raw(skipped);
8247
+ }
8248
+ }
8249
+ if (writer) {
8250
+ message[unknownFieldsSymbol] = writer.finish();
8251
+ }
8252
+ return message;
8253
+ },
8254
+ fromJSON(object) {
8255
+ return applyTransferDestination_NebiusProviderCustom({
8256
+ $type: "nebius.storage.v1.TransferDestination.NebiusProvider",
8257
+ region: isSet(object.region ?? object.region)
8258
+ ? String(object.region ?? object.region)
8259
+ : "",
8260
+ bucketName: isSet(object.bucketName ?? object.bucket_name)
8261
+ ? String(object.bucketName ?? object.bucket_name)
8262
+ : "",
8263
+ credentials: (() => {
8264
+ if (isSet(object.accessKey) || isSet(object.access_key)) {
8265
+ return {
8266
+ $case: "accessKey",
8267
+ accessKey: TransferCredentialsAccessKey.fromJSON(object.accessKey ?? object.access_key)
8268
+ };
8269
+ }
8270
+ return undefined;
8271
+ })(),
8272
+ });
8273
+ },
8274
+ toJSON(message, use = "json") {
8275
+ const obj = {};
8276
+ const pick = (json, pb) => (use === "json" ? json : pb);
8277
+ if (message.region !== "") {
8278
+ obj[pick("region", "region")] = message.region;
8279
+ }
8280
+ if (message.bucketName !== "") {
8281
+ obj[pick("bucketName", "bucket_name")] = message.bucketName;
8282
+ }
8283
+ switch (message.credentials?.$case) {
8284
+ case "accessKey": {
8285
+ obj[pick("accessKey", "access_key")] = TransferCredentialsAccessKey.toJSON(message.credentials.accessKey, use);
8286
+ break;
8287
+ }
8288
+ default: break;
8289
+ }
8290
+ return obj;
8291
+ },
8292
+ create(base) {
8293
+ return TransferDestination_NebiusProvider.fromPartial(base ?? {});
8294
+ },
8295
+ fromPartial(object) {
8296
+ const message = createBaseTransferDestination_NebiusProvider();
8297
+ message.region = (object.region !== undefined && object.region !== null)
8298
+ ? object.region
8299
+ : "";
8300
+ message.bucketName = (object.bucketName !== undefined && object.bucketName !== null)
8301
+ ? object.bucketName
8302
+ : "";
8303
+ switch (object.credentials?.$case) {
8304
+ case "accessKey": {
8305
+ if (object.credentials.accessKey !== undefined && object.credentials.accessKey !== null) {
8306
+ message.credentials = {
8307
+ $case: "accessKey",
8308
+ accessKey: TransferCredentialsAccessKey.fromPartial(object.credentials.accessKey),
8309
+ };
8310
+ }
8311
+ break;
8312
+ }
8313
+ default: break;
8314
+ }
8315
+ return message;
8316
+ },
8317
+ };
8318
+ protoRegistry.registerMessage(TransferDestination_NebiusProvider);
8319
+ function TransferDestination_NebiusProviderCustomInspect() {
8320
+ const parts = [];
8321
+ if (this.region !== "")
8322
+ parts.push("region" + "=" + inspect(this.region));
8323
+ if (this.bucketName !== "")
8324
+ parts.push("bucketName" + "=" + inspect(this.bucketName));
8325
+ return `${this.$type}(${parts.join(", ")})`;
8326
+ }
8327
+ function TransferDestination_NebiusProviderCustomJson() {
8328
+ const obj = {
8329
+ type: this.$type,
8330
+ };
8331
+ if (this.region !== "")
8332
+ obj.region = inspectJson(this.region);
8333
+ if (this.bucketName !== "")
8334
+ obj.bucketName = inspectJson(this.bucketName);
8335
+ return obj;
8336
+ }
8337
+ function applyTransferDestination_NebiusProviderCustom(message) {
8338
+ message[custom] = TransferDestination_NebiusProviderCustomInspect;
8339
+ message[customJson] = TransferDestination_NebiusProviderCustomJson;
8340
+ return message;
8341
+ }
8342
+ function createBaseTransferDestination_NebiusProvider() {
8343
+ const message = {
8344
+ $type: "nebius.storage.v1.TransferDestination.NebiusProvider",
8345
+ region: "",
8346
+ bucketName: "",
8347
+ credentials: undefined,
8348
+ };
8349
+ return applyTransferDestination_NebiusProviderCustom(message);
8350
+ }
8351
+ export const TransferDestination_S3CompatibleProvider = {
8352
+ $type: "nebius.storage.v1.TransferDestination.S3CompatibleProvider",
8353
+ encode(message, writer = new BinaryWriter()) {
8354
+ if (message.endpoint !== "") {
8355
+ writer.uint32(10).string(message.endpoint);
8356
+ }
8357
+ if (message.region !== "") {
8358
+ writer.uint32(18).string(message.region);
8359
+ }
8360
+ if (message.bucketName !== "") {
8361
+ writer.uint32(26).string(message.bucketName);
8362
+ }
8363
+ if (message.credentials?.$case === undefined) { /* noop */ }
8364
+ else if (message.credentials?.$case === "anonymous") {
8365
+ const w = writer.uint32(34).fork();
8366
+ TransferCredentialsAnonymous.encode(message.credentials.anonymous, w);
8367
+ w.join();
8368
+ }
8369
+ else if (message.credentials?.$case === "accessKey") {
8370
+ const w = writer.uint32(42).fork();
8371
+ TransferCredentialsAccessKey.encode(message.credentials.accessKey, w);
8372
+ w.join();
8373
+ }
8374
+ if (message[unknownFieldsSymbol]) {
8375
+ writer.raw(message[unknownFieldsSymbol]);
8376
+ }
8377
+ return writer;
8378
+ },
8379
+ decode(input, length) {
8380
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8381
+ const end = length === undefined ? reader.len : reader.pos + length;
8382
+ const message = createBaseTransferDestination_S3CompatibleProvider();
8383
+ let writer = undefined;
8384
+ while (reader.pos < end) {
8385
+ const tag = reader.uint32();
8386
+ switch (tag >>> 3) {
8387
+ case 1: {
8388
+ if (tag !== 10)
8389
+ break;
8390
+ message.endpoint = reader.string();
8391
+ continue;
8392
+ }
8393
+ case 2: {
8394
+ if (tag !== 18)
8395
+ break;
8396
+ message.region = reader.string();
8397
+ continue;
8398
+ }
8399
+ case 3: {
8400
+ if (tag !== 26)
8401
+ break;
8402
+ message.bucketName = reader.string();
8403
+ continue;
8404
+ }
8405
+ case 4: {
8406
+ if (tag !== 34)
8407
+ break;
8408
+ message.credentials = {
8409
+ $case: "anonymous",
8410
+ anonymous: TransferCredentialsAnonymous.decode(reader, reader.uint32())
8411
+ };
8412
+ continue;
8413
+ }
8414
+ case 5: {
8415
+ if (tag !== 42)
8416
+ break;
8417
+ message.credentials = {
8418
+ $case: "accessKey",
8419
+ accessKey: TransferCredentialsAccessKey.decode(reader, reader.uint32())
8420
+ };
8421
+ continue;
8422
+ }
8423
+ default:
8424
+ break;
8425
+ }
8426
+ if ((tag & 7) === 4 || tag === 0) {
8427
+ break;
8428
+ }
8429
+ {
8430
+ if (!writer)
8431
+ writer = new BinaryWriter();
8432
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8433
+ writer.uint32(tag).raw(skipped);
8434
+ }
8435
+ }
8436
+ if (writer) {
8437
+ message[unknownFieldsSymbol] = writer.finish();
8438
+ }
8439
+ return message;
8440
+ },
8441
+ fromJSON(object) {
8442
+ return applyTransferDestination_S3CompatibleProviderCustom({
8443
+ $type: "nebius.storage.v1.TransferDestination.S3CompatibleProvider",
8444
+ endpoint: isSet(object.endpoint ?? object.endpoint)
8445
+ ? String(object.endpoint ?? object.endpoint)
8446
+ : "",
8447
+ region: isSet(object.region ?? object.region)
8448
+ ? String(object.region ?? object.region)
8449
+ : "",
8450
+ bucketName: isSet(object.bucketName ?? object.bucket_name)
8451
+ ? String(object.bucketName ?? object.bucket_name)
8452
+ : "",
8453
+ credentials: (() => {
8454
+ if (isSet(object.anonymous) || isSet(object.anonymous)) {
8455
+ return {
8456
+ $case: "anonymous",
8457
+ anonymous: TransferCredentialsAnonymous.fromJSON(object.anonymous ?? object.anonymous)
8458
+ };
8459
+ }
8460
+ if (isSet(object.accessKey) || isSet(object.access_key)) {
8461
+ return {
8462
+ $case: "accessKey",
8463
+ accessKey: TransferCredentialsAccessKey.fromJSON(object.accessKey ?? object.access_key)
8464
+ };
8465
+ }
8466
+ return undefined;
8467
+ })(),
8468
+ });
8469
+ },
8470
+ toJSON(message, use = "json") {
8471
+ const obj = {};
8472
+ const pick = (json, pb) => (use === "json" ? json : pb);
8473
+ if (message.endpoint !== "") {
8474
+ obj[pick("endpoint", "endpoint")] = message.endpoint;
8475
+ }
8476
+ if (message.region !== "") {
8477
+ obj[pick("region", "region")] = message.region;
8478
+ }
8479
+ if (message.bucketName !== "") {
8480
+ obj[pick("bucketName", "bucket_name")] = message.bucketName;
8481
+ }
8482
+ switch (message.credentials?.$case) {
8483
+ case "anonymous": {
8484
+ obj[pick("anonymous", "anonymous")] = TransferCredentialsAnonymous.toJSON(message.credentials.anonymous, use);
8485
+ break;
8486
+ }
8487
+ case "accessKey": {
8488
+ obj[pick("accessKey", "access_key")] = TransferCredentialsAccessKey.toJSON(message.credentials.accessKey, use);
8489
+ break;
8490
+ }
8491
+ default: break;
8492
+ }
8493
+ return obj;
8494
+ },
8495
+ create(base) {
8496
+ return TransferDestination_S3CompatibleProvider.fromPartial(base ?? {});
8497
+ },
8498
+ fromPartial(object) {
8499
+ const message = createBaseTransferDestination_S3CompatibleProvider();
8500
+ message.endpoint = (object.endpoint !== undefined && object.endpoint !== null)
8501
+ ? object.endpoint
8502
+ : "";
8503
+ message.region = (object.region !== undefined && object.region !== null)
8504
+ ? object.region
8505
+ : "";
8506
+ message.bucketName = (object.bucketName !== undefined && object.bucketName !== null)
8507
+ ? object.bucketName
8508
+ : "";
8509
+ switch (object.credentials?.$case) {
8510
+ case "anonymous": {
8511
+ if (object.credentials.anonymous !== undefined && object.credentials.anonymous !== null) {
8512
+ message.credentials = {
8513
+ $case: "anonymous",
8514
+ anonymous: TransferCredentialsAnonymous.fromPartial(object.credentials.anonymous),
8515
+ };
8516
+ }
8517
+ break;
8518
+ }
8519
+ case "accessKey": {
8520
+ if (object.credentials.accessKey !== undefined && object.credentials.accessKey !== null) {
8521
+ message.credentials = {
8522
+ $case: "accessKey",
8523
+ accessKey: TransferCredentialsAccessKey.fromPartial(object.credentials.accessKey),
8524
+ };
8525
+ }
8526
+ break;
8527
+ }
8528
+ default: break;
8529
+ }
8530
+ return message;
8531
+ },
8532
+ };
8533
+ protoRegistry.registerMessage(TransferDestination_S3CompatibleProvider);
8534
+ function TransferDestination_S3CompatibleProviderCustomInspect() {
8535
+ const parts = [];
8536
+ if (this.endpoint !== "")
8537
+ parts.push("endpoint" + "=" + inspect(this.endpoint));
8538
+ if (this.region !== "")
8539
+ parts.push("region" + "=" + inspect(this.region));
8540
+ if (this.bucketName !== "")
8541
+ parts.push("bucketName" + "=" + inspect(this.bucketName));
8542
+ return `${this.$type}(${parts.join(", ")})`;
8543
+ }
8544
+ function TransferDestination_S3CompatibleProviderCustomJson() {
8545
+ const obj = {
8546
+ type: this.$type,
8547
+ };
8548
+ if (this.endpoint !== "")
8549
+ obj.endpoint = inspectJson(this.endpoint);
8550
+ if (this.region !== "")
8551
+ obj.region = inspectJson(this.region);
8552
+ if (this.bucketName !== "")
8553
+ obj.bucketName = inspectJson(this.bucketName);
8554
+ return obj;
8555
+ }
8556
+ function applyTransferDestination_S3CompatibleProviderCustom(message) {
8557
+ message[custom] = TransferDestination_S3CompatibleProviderCustomInspect;
8558
+ message[customJson] = TransferDestination_S3CompatibleProviderCustomJson;
8559
+ return message;
8560
+ }
8561
+ function createBaseTransferDestination_S3CompatibleProvider() {
8562
+ const message = {
8563
+ $type: "nebius.storage.v1.TransferDestination.S3CompatibleProvider",
8564
+ endpoint: "",
8565
+ region: "",
8566
+ bucketName: "",
8567
+ credentials: undefined,
8568
+ };
8569
+ return applyTransferDestination_S3CompatibleProviderCustom(message);
8570
+ }
8571
+ export const TransferCredentialsAnonymous = {
8572
+ $type: "nebius.storage.v1.TransferCredentialsAnonymous",
8573
+ encode(message, writer = new BinaryWriter()) {
8574
+ if (message[unknownFieldsSymbol]) {
8575
+ writer.raw(message[unknownFieldsSymbol]);
8576
+ }
8577
+ return writer;
8578
+ },
8579
+ decode(input, length) {
8580
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8581
+ const end = length === undefined ? reader.len : reader.pos + length;
8582
+ const message = createBaseTransferCredentialsAnonymous();
8583
+ let writer = undefined;
8584
+ while (reader.pos < end) {
8585
+ const tag = reader.uint32();
8586
+ switch (tag >>> 3) {
8587
+ default:
8588
+ break;
8589
+ }
8590
+ if ((tag & 7) === 4 || tag === 0) {
8591
+ break;
8592
+ }
8593
+ {
8594
+ if (!writer)
8595
+ writer = new BinaryWriter();
8596
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8597
+ writer.uint32(tag).raw(skipped);
8598
+ }
8599
+ }
8600
+ if (writer) {
8601
+ message[unknownFieldsSymbol] = writer.finish();
8602
+ }
8603
+ return message;
8604
+ },
8605
+ fromJSON(object) {
8606
+ return applyTransferCredentialsAnonymousCustom({
8607
+ $type: "nebius.storage.v1.TransferCredentialsAnonymous",
8608
+ });
8609
+ },
8610
+ toJSON(message, use = "json") {
8611
+ const obj = {};
8612
+ const pick = (json, pb) => (use === "json" ? json : pb);
8613
+ return obj;
8614
+ },
8615
+ create(base) {
8616
+ return TransferCredentialsAnonymous.fromPartial(base ?? {});
8617
+ },
8618
+ fromPartial(object) {
8619
+ const message = createBaseTransferCredentialsAnonymous();
8620
+ return message;
8621
+ },
8622
+ };
8623
+ protoRegistry.registerMessage(TransferCredentialsAnonymous);
8624
+ function TransferCredentialsAnonymousCustomInspect() {
8625
+ const parts = [];
8626
+ return `${this.$type}(${parts.join(", ")})`;
8627
+ }
8628
+ function TransferCredentialsAnonymousCustomJson() {
8629
+ const obj = {
8630
+ type: this.$type,
8631
+ };
8632
+ return obj;
8633
+ }
8634
+ function applyTransferCredentialsAnonymousCustom(message) {
8635
+ message[custom] = TransferCredentialsAnonymousCustomInspect;
8636
+ message[customJson] = TransferCredentialsAnonymousCustomJson;
8637
+ return message;
8638
+ }
8639
+ function createBaseTransferCredentialsAnonymous() {
8640
+ const message = {
8641
+ $type: "nebius.storage.v1.TransferCredentialsAnonymous",
8642
+ };
8643
+ return applyTransferCredentialsAnonymousCustom(message);
8644
+ }
8645
+ export const TransferCredentialsAccessKey = {
8646
+ $type: "nebius.storage.v1.TransferCredentialsAccessKey",
8647
+ encode(message, writer = new BinaryWriter()) {
8648
+ if (message.accessKeyId !== "") {
8649
+ writer.uint32(10).string(message.accessKeyId);
8650
+ }
8651
+ if (message.secretAccessKey !== "") {
8652
+ writer.uint32(18).string(message.secretAccessKey);
8653
+ }
8654
+ if (message[unknownFieldsSymbol]) {
8655
+ writer.raw(message[unknownFieldsSymbol]);
8656
+ }
8657
+ return writer;
8658
+ },
8659
+ decode(input, length) {
8660
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8661
+ const end = length === undefined ? reader.len : reader.pos + length;
8662
+ const message = createBaseTransferCredentialsAccessKey();
8663
+ let writer = undefined;
8664
+ while (reader.pos < end) {
8665
+ const tag = reader.uint32();
8666
+ switch (tag >>> 3) {
8667
+ case 1: {
8668
+ if (tag !== 10)
8669
+ break;
8670
+ message.accessKeyId = reader.string();
8671
+ continue;
8672
+ }
8673
+ case 2: {
8674
+ if (tag !== 18)
8675
+ break;
8676
+ message.secretAccessKey = reader.string();
8677
+ continue;
8678
+ }
8679
+ default:
8680
+ break;
8681
+ }
8682
+ if ((tag & 7) === 4 || tag === 0) {
8683
+ break;
8684
+ }
8685
+ {
8686
+ if (!writer)
8687
+ writer = new BinaryWriter();
8688
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8689
+ writer.uint32(tag).raw(skipped);
8690
+ }
8691
+ }
8692
+ if (writer) {
8693
+ message[unknownFieldsSymbol] = writer.finish();
8694
+ }
8695
+ return message;
8696
+ },
8697
+ fromJSON(object) {
8698
+ return applyTransferCredentialsAccessKeyCustom({
8699
+ $type: "nebius.storage.v1.TransferCredentialsAccessKey",
8700
+ accessKeyId: isSet(object.accessKeyId ?? object.access_key_id)
8701
+ ? String(object.accessKeyId ?? object.access_key_id)
8702
+ : "",
8703
+ secretAccessKey: isSet(object.secretAccessKey ?? object.secret_access_key)
8704
+ ? String(object.secretAccessKey ?? object.secret_access_key)
8705
+ : "",
8706
+ });
8707
+ },
8708
+ toJSON(message, use = "json") {
8709
+ const obj = {};
8710
+ const pick = (json, pb) => (use === "json" ? json : pb);
8711
+ if (message.accessKeyId !== "") {
8712
+ obj[pick("accessKeyId", "access_key_id")] = message.accessKeyId;
8713
+ }
8714
+ if (message.secretAccessKey !== "") {
8715
+ obj[pick("secretAccessKey", "secret_access_key")] = message.secretAccessKey;
8716
+ }
8717
+ return obj;
8718
+ },
8719
+ create(base) {
8720
+ return TransferCredentialsAccessKey.fromPartial(base ?? {});
8721
+ },
8722
+ fromPartial(object) {
8723
+ const message = createBaseTransferCredentialsAccessKey();
8724
+ message.accessKeyId = (object.accessKeyId !== undefined && object.accessKeyId !== null)
8725
+ ? object.accessKeyId
8726
+ : "";
8727
+ message.secretAccessKey = (object.secretAccessKey !== undefined && object.secretAccessKey !== null)
8728
+ ? object.secretAccessKey
8729
+ : "";
8730
+ return message;
8731
+ },
8732
+ };
8733
+ protoRegistry.registerMessage(TransferCredentialsAccessKey);
8734
+ function TransferCredentialsAccessKeyCustomInspect() {
8735
+ const parts = [];
8736
+ if (this.accessKeyId !== "")
8737
+ parts.push("accessKeyId" + "=" + inspect(this.accessKeyId));
8738
+ if (this.secretAccessKey !== "")
8739
+ parts.push("secretAccessKey" + "=***");
8740
+ return `${this.$type}(${parts.join(", ")})`;
8741
+ }
8742
+ function TransferCredentialsAccessKeyCustomJson() {
8743
+ const obj = {
8744
+ type: this.$type,
8745
+ };
8746
+ if (this.accessKeyId !== "")
8747
+ obj.accessKeyId = inspectJson(this.accessKeyId);
8748
+ if (this.secretAccessKey !== "")
8749
+ obj.secretAccessKey = "***";
8750
+ return obj;
8751
+ }
8752
+ function applyTransferCredentialsAccessKeyCustom(message) {
8753
+ message[custom] = TransferCredentialsAccessKeyCustomInspect;
8754
+ message[customJson] = TransferCredentialsAccessKeyCustomJson;
8755
+ return message;
8756
+ }
8757
+ function createBaseTransferCredentialsAccessKey() {
8758
+ const message = {
8759
+ $type: "nebius.storage.v1.TransferCredentialsAccessKey",
8760
+ accessKeyId: "",
8761
+ secretAccessKey: "",
8762
+ };
8763
+ return applyTransferCredentialsAccessKeyCustom(message);
8764
+ }
8765
+ export const TransferCredentialsAzureStorageAccount = {
8766
+ $type: "nebius.storage.v1.TransferCredentialsAzureStorageAccount",
8767
+ encode(message, writer = new BinaryWriter()) {
8768
+ if (message.accountName !== "") {
8769
+ writer.uint32(10).string(message.accountName);
8770
+ }
8771
+ if (message.accessKey !== "") {
8772
+ writer.uint32(18).string(message.accessKey);
8773
+ }
8774
+ if (message[unknownFieldsSymbol]) {
8775
+ writer.raw(message[unknownFieldsSymbol]);
8776
+ }
8777
+ return writer;
8778
+ },
8779
+ decode(input, length) {
8780
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8781
+ const end = length === undefined ? reader.len : reader.pos + length;
8782
+ const message = createBaseTransferCredentialsAzureStorageAccount();
8783
+ let writer = undefined;
8784
+ while (reader.pos < end) {
8785
+ const tag = reader.uint32();
8786
+ switch (tag >>> 3) {
8787
+ case 1: {
8788
+ if (tag !== 10)
8789
+ break;
8790
+ message.accountName = reader.string();
8791
+ continue;
8792
+ }
8793
+ case 2: {
8794
+ if (tag !== 18)
8795
+ break;
8796
+ message.accessKey = reader.string();
8797
+ continue;
8798
+ }
8799
+ default:
8800
+ break;
8801
+ }
8802
+ if ((tag & 7) === 4 || tag === 0) {
8803
+ break;
8804
+ }
8805
+ {
8806
+ if (!writer)
8807
+ writer = new BinaryWriter();
8808
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8809
+ writer.uint32(tag).raw(skipped);
8810
+ }
8811
+ }
8812
+ if (writer) {
8813
+ message[unknownFieldsSymbol] = writer.finish();
8814
+ }
8815
+ return message;
8816
+ },
8817
+ fromJSON(object) {
8818
+ return applyTransferCredentialsAzureStorageAccountCustom({
8819
+ $type: "nebius.storage.v1.TransferCredentialsAzureStorageAccount",
8820
+ accountName: isSet(object.accountName ?? object.account_name)
8821
+ ? String(object.accountName ?? object.account_name)
8822
+ : "",
8823
+ accessKey: isSet(object.accessKey ?? object.access_key)
8824
+ ? String(object.accessKey ?? object.access_key)
8825
+ : "",
8826
+ });
8827
+ },
8828
+ toJSON(message, use = "json") {
8829
+ const obj = {};
8830
+ const pick = (json, pb) => (use === "json" ? json : pb);
8831
+ if (message.accountName !== "") {
8832
+ obj[pick("accountName", "account_name")] = message.accountName;
8833
+ }
8834
+ if (message.accessKey !== "") {
8835
+ obj[pick("accessKey", "access_key")] = message.accessKey;
8836
+ }
8837
+ return obj;
8838
+ },
8839
+ create(base) {
8840
+ return TransferCredentialsAzureStorageAccount.fromPartial(base ?? {});
8841
+ },
8842
+ fromPartial(object) {
8843
+ const message = createBaseTransferCredentialsAzureStorageAccount();
8844
+ message.accountName = (object.accountName !== undefined && object.accountName !== null)
8845
+ ? object.accountName
8846
+ : "";
8847
+ message.accessKey = (object.accessKey !== undefined && object.accessKey !== null)
8848
+ ? object.accessKey
8849
+ : "";
8850
+ return message;
8851
+ },
8852
+ };
8853
+ protoRegistry.registerMessage(TransferCredentialsAzureStorageAccount);
8854
+ function TransferCredentialsAzureStorageAccountCustomInspect() {
8855
+ const parts = [];
8856
+ if (this.accountName !== "")
8857
+ parts.push("accountName" + "=" + inspect(this.accountName));
8858
+ if (this.accessKey !== "")
8859
+ parts.push("accessKey" + "=***");
8860
+ return `${this.$type}(${parts.join(", ")})`;
8861
+ }
8862
+ function TransferCredentialsAzureStorageAccountCustomJson() {
8863
+ const obj = {
8864
+ type: this.$type,
8865
+ };
8866
+ if (this.accountName !== "")
8867
+ obj.accountName = inspectJson(this.accountName);
8868
+ if (this.accessKey !== "")
8869
+ obj.accessKey = "***";
8870
+ return obj;
8871
+ }
8872
+ function applyTransferCredentialsAzureStorageAccountCustom(message) {
8873
+ message[custom] = TransferCredentialsAzureStorageAccountCustomInspect;
8874
+ message[customJson] = TransferCredentialsAzureStorageAccountCustomJson;
8875
+ return message;
8876
+ }
8877
+ function createBaseTransferCredentialsAzureStorageAccount() {
8878
+ const message = {
8879
+ $type: "nebius.storage.v1.TransferCredentialsAzureStorageAccount",
8880
+ accountName: "",
8881
+ accessKey: "",
8882
+ };
8883
+ return applyTransferCredentialsAzureStorageAccountCustom(message);
8884
+ }
8885
+ export const TransferStatus = {
8886
+ $type: "nebius.storage.v1.TransferStatus",
8887
+ encode(message, writer = new BinaryWriter()) {
8888
+ if ((message.state ?? TransferStatus_State.STATE_UNSPECIFIED) !== TransferStatus_State.STATE_UNSPECIFIED) {
8889
+ TransferStatus_State.encodeField(writer, 1, message.state);
8890
+ }
8891
+ if (message.error !== undefined) {
8892
+ const w = writer.uint32(18).fork();
8893
+ TransferError.encode(message.error, w);
8894
+ w.join();
8895
+ }
8896
+ if ((message.suspensionState ?? TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED) !== TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED) {
8897
+ TransferStatus_SuspensionState.encodeField(writer, 3, message.suspensionState);
8898
+ }
8899
+ if (message.lastIteration !== undefined) {
8900
+ const w = writer.uint32(34).fork();
8901
+ TransferIteration.encode(message.lastIteration, w);
8902
+ w.join();
8903
+ }
8904
+ if (message[unknownFieldsSymbol]) {
8905
+ writer.raw(message[unknownFieldsSymbol]);
8906
+ }
8907
+ return writer;
8908
+ },
8909
+ decode(input, length) {
8910
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8911
+ const end = length === undefined ? reader.len : reader.pos + length;
8912
+ const message = createBaseTransferStatus();
8913
+ let writer = undefined;
8914
+ while (reader.pos < end) {
8915
+ const tag = reader.uint32();
8916
+ switch (tag >>> 3) {
8917
+ case 1: {
8918
+ if (tag !== 8)
8919
+ break;
8920
+ message.state = TransferStatus_State.fromNumber(reader.int32());
8921
+ continue;
8922
+ }
8923
+ case 2: {
8924
+ if (tag !== 18)
8925
+ break;
8926
+ message.error = TransferError.decode(reader, reader.uint32());
8927
+ continue;
8928
+ }
8929
+ case 3: {
8930
+ if (tag !== 24)
8931
+ break;
8932
+ message.suspensionState = TransferStatus_SuspensionState.fromNumber(reader.int32());
8933
+ continue;
8934
+ }
8935
+ case 4: {
8936
+ if (tag !== 34)
8937
+ break;
8938
+ message.lastIteration = TransferIteration.decode(reader, reader.uint32());
8939
+ continue;
8940
+ }
8941
+ default:
8942
+ break;
8943
+ }
8944
+ if ((tag & 7) === 4 || tag === 0) {
8945
+ break;
8946
+ }
8947
+ {
8948
+ if (!writer)
8949
+ writer = new BinaryWriter();
8950
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8951
+ writer.uint32(tag).raw(skipped);
8952
+ }
8953
+ }
8954
+ if (writer) {
8955
+ message[unknownFieldsSymbol] = writer.finish();
8956
+ }
8957
+ return message;
8958
+ },
8959
+ fromJSON(object) {
8960
+ return applyTransferStatusCustom({
8961
+ $type: "nebius.storage.v1.TransferStatus",
8962
+ state: isSet(object.state ?? object.state)
8963
+ ? TransferStatus_State.fromJSON(object.state ?? object.state)
8964
+ : TransferStatus_State.STATE_UNSPECIFIED,
8965
+ error: isSet(object.error ?? object.error)
8966
+ ? TransferError.fromJSON(object.error ?? object.error)
8967
+ : undefined,
8968
+ suspensionState: isSet(object.suspensionState ?? object.suspension_state)
8969
+ ? TransferStatus_SuspensionState.fromJSON(object.suspensionState ?? object.suspension_state)
8970
+ : TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED,
8971
+ lastIteration: isSet(object.lastIteration ?? object.last_iteration)
8972
+ ? TransferIteration.fromJSON(object.lastIteration ?? object.last_iteration)
8973
+ : undefined,
8974
+ });
8975
+ },
8976
+ toJSON(message, use = "json") {
8977
+ const obj = {};
8978
+ const pick = (json, pb) => (use === "json" ? json : pb);
8979
+ if ((message.state ?? TransferStatus_State.STATE_UNSPECIFIED) !== TransferStatus_State.STATE_UNSPECIFIED) {
8980
+ obj[pick("state", "state")] = TransferStatus_State.toJSON(message.state);
8981
+ }
8982
+ if (message.error !== undefined) {
8983
+ obj[pick("error", "error")] = message.error
8984
+ ? TransferError.toJSON(message.error, use)
8985
+ : undefined;
8986
+ }
8987
+ if ((message.suspensionState ?? TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED) !== TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED) {
8988
+ obj[pick("suspensionState", "suspension_state")] = TransferStatus_SuspensionState.toJSON(message.suspensionState);
8989
+ }
8990
+ if (message.lastIteration !== undefined) {
8991
+ obj[pick("lastIteration", "last_iteration")] = message.lastIteration
8992
+ ? TransferIteration.toJSON(message.lastIteration, use)
8993
+ : undefined;
8994
+ }
8995
+ return obj;
8996
+ },
8997
+ create(base) {
8998
+ return TransferStatus.fromPartial(base ?? {});
8999
+ },
9000
+ fromPartial(object) {
9001
+ const message = createBaseTransferStatus();
9002
+ message.state = (object.state !== undefined && object.state !== null)
9003
+ ? TransferStatus_State.fromJSON(object.state.name)
9004
+ : TransferStatus_State.STATE_UNSPECIFIED;
9005
+ message.error = (object.error !== undefined && object.error !== null)
9006
+ ? TransferError.fromPartial(object.error)
9007
+ : undefined;
9008
+ message.suspensionState = (object.suspensionState !== undefined && object.suspensionState !== null)
9009
+ ? TransferStatus_SuspensionState.fromJSON(object.suspensionState.name)
9010
+ : TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED;
9011
+ message.lastIteration = (object.lastIteration !== undefined && object.lastIteration !== null)
9012
+ ? TransferIteration.fromPartial(object.lastIteration)
9013
+ : undefined;
9014
+ return message;
9015
+ },
9016
+ };
9017
+ protoRegistry.registerMessage(TransferStatus);
9018
+ function TransferStatusCustomInspect() {
9019
+ const parts = [];
9020
+ if (this.state !== undefined)
9021
+ parts.push("state" + "=" + inspect(this.state));
9022
+ if (this.error !== undefined)
9023
+ parts.push("error" + "=" + inspect(this.error));
9024
+ if (this.suspensionState !== undefined)
9025
+ parts.push("suspensionState" + "=" + inspect(this.suspensionState));
9026
+ if (this.lastIteration !== undefined)
9027
+ parts.push("lastIteration" + "=" + inspect(this.lastIteration));
9028
+ return `${this.$type}(${parts.join(", ")})`;
9029
+ }
9030
+ function TransferStatusCustomJson() {
9031
+ const obj = {
9032
+ type: this.$type,
9033
+ };
9034
+ if (this.state !== undefined)
9035
+ obj.state = inspectJson(this.state);
9036
+ if (this.error !== undefined)
9037
+ obj.error = inspectJson(this.error);
9038
+ if (this.suspensionState !== undefined)
9039
+ obj.suspensionState = inspectJson(this.suspensionState);
9040
+ if (this.lastIteration !== undefined)
9041
+ obj.lastIteration = inspectJson(this.lastIteration);
9042
+ return obj;
9043
+ }
9044
+ function applyTransferStatusCustom(message) {
9045
+ message[custom] = TransferStatusCustomInspect;
9046
+ message[customJson] = TransferStatusCustomJson;
9047
+ return message;
9048
+ }
9049
+ function createBaseTransferStatus() {
9050
+ const message = {
9051
+ $type: "nebius.storage.v1.TransferStatus",
9052
+ state: TransferStatus_State.STATE_UNSPECIFIED,
9053
+ error: undefined,
9054
+ suspensionState: TransferStatus_SuspensionState.SUSPENSION_STATE_UNSPECIFIED,
9055
+ lastIteration: undefined,
9056
+ };
9057
+ return applyTransferStatusCustom(message);
9058
+ }
9059
+ export const TransferIteration = {
9060
+ $type: "nebius.storage.v1.TransferIteration",
9061
+ encode(message, writer = new BinaryWriter()) {
9062
+ if (message.sequenceNumber !== undefined && !message.sequenceNumber.isZero?.()) {
9063
+ writer.uint32(8).int64(message.sequenceNumber.toString());
9064
+ }
9065
+ if ((message.state ?? TransferIteration_State.STATE_UNSPECIFIED) !== TransferIteration_State.STATE_UNSPECIFIED) {
9066
+ TransferIteration_State.encodeField(writer, 2, message.state);
9067
+ }
9068
+ if (message.error !== undefined) {
9069
+ const w = writer.uint32(26).fork();
9070
+ TransferError.encode(message.error, w);
9071
+ w.join();
9072
+ }
9073
+ if (message.startTime !== undefined) {
9074
+ const w = writer.uint32(34).fork();
9075
+ wkt[".google.protobuf.Timestamp"].writeMessage(w, message.startTime);
9076
+ w.join();
9077
+ }
9078
+ if (message.endTime !== undefined) {
9079
+ const w = writer.uint32(42).fork();
9080
+ wkt[".google.protobuf.Timestamp"].writeMessage(w, message.endTime);
9081
+ w.join();
9082
+ }
9083
+ if (message.objectsTransferredCount !== undefined && !message.objectsTransferredCount.isZero?.()) {
9084
+ writer.uint32(48).int64(message.objectsTransferredCount.toString());
9085
+ }
9086
+ if (message.objectsTransferredSize !== undefined && !message.objectsTransferredSize.isZero?.()) {
9087
+ writer.uint32(64).int64(message.objectsTransferredSize.toString());
9088
+ }
9089
+ if (message.averageThroughputBytes !== undefined && !message.averageThroughputBytes.isZero?.()) {
9090
+ writer.uint32(72).int64(message.averageThroughputBytes.toString());
9091
+ }
9092
+ if (message[unknownFieldsSymbol]) {
9093
+ writer.raw(message[unknownFieldsSymbol]);
9094
+ }
9095
+ return writer;
9096
+ },
9097
+ decode(input, length) {
9098
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9099
+ const end = length === undefined ? reader.len : reader.pos + length;
9100
+ const message = createBaseTransferIteration();
9101
+ let writer = undefined;
9102
+ while (reader.pos < end) {
9103
+ const tag = reader.uint32();
9104
+ switch (tag >>> 3) {
9105
+ case 1: {
9106
+ if (tag !== 8)
9107
+ break;
9108
+ message.sequenceNumber = Long.fromValue(reader.int64());
9109
+ continue;
9110
+ }
9111
+ case 2: {
9112
+ if (tag !== 16)
9113
+ break;
9114
+ message.state = TransferIteration_State.fromNumber(reader.int32());
9115
+ continue;
9116
+ }
9117
+ case 3: {
9118
+ if (tag !== 26)
9119
+ break;
9120
+ message.error = TransferError.decode(reader, reader.uint32());
9121
+ continue;
9122
+ }
9123
+ case 4: {
9124
+ if (tag !== 34)
9125
+ break;
9126
+ const len = reader.uint32();
9127
+ message.startTime = wkt[".google.protobuf.Timestamp"].readMessage(reader, len);
9128
+ continue;
9129
+ }
9130
+ case 5: {
9131
+ if (tag !== 42)
9132
+ break;
9133
+ const len = reader.uint32();
9134
+ message.endTime = wkt[".google.protobuf.Timestamp"].readMessage(reader, len);
9135
+ continue;
9136
+ }
9137
+ case 6: {
9138
+ if (tag !== 48)
9139
+ break;
9140
+ message.objectsTransferredCount = Long.fromValue(reader.int64());
9141
+ continue;
9142
+ }
9143
+ case 8: {
9144
+ if (tag !== 64)
9145
+ break;
9146
+ message.objectsTransferredSize = Long.fromValue(reader.int64());
9147
+ continue;
9148
+ }
9149
+ case 9: {
9150
+ if (tag !== 72)
9151
+ break;
9152
+ message.averageThroughputBytes = Long.fromValue(reader.int64());
9153
+ continue;
9154
+ }
9155
+ default:
9156
+ break;
9157
+ }
9158
+ if ((tag & 7) === 4 || tag === 0) {
9159
+ break;
9160
+ }
9161
+ {
9162
+ if (!writer)
9163
+ writer = new BinaryWriter();
9164
+ const skipped = reader.skip(tag & 7, tag >>> 3);
9165
+ writer.uint32(tag).raw(skipped);
9166
+ }
9167
+ }
9168
+ if (writer) {
9169
+ message[unknownFieldsSymbol] = writer.finish();
9170
+ }
9171
+ return message;
9172
+ },
9173
+ fromJSON(object) {
9174
+ return applyTransferIterationCustom({
9175
+ $type: "nebius.storage.v1.TransferIteration",
9176
+ sequenceNumber: isSet(object.sequenceNumber ?? object.sequence_number)
9177
+ ? Long.fromValue(object.sequenceNumber ?? object.sequence_number)
9178
+ : Long.ZERO,
9179
+ state: isSet(object.state ?? object.state)
9180
+ ? TransferIteration_State.fromJSON(object.state ?? object.state)
9181
+ : TransferIteration_State.STATE_UNSPECIFIED,
9182
+ error: isSet(object.error ?? object.error)
9183
+ ? TransferError.fromJSON(object.error ?? object.error)
9184
+ : undefined,
9185
+ startTime: isSet(object.startTime ?? object.start_time)
9186
+ ? wkt[".google.protobuf.Timestamp"].fromJSON(object.startTime ?? object.start_time)
9187
+ : undefined,
9188
+ endTime: isSet(object.endTime ?? object.end_time)
9189
+ ? wkt[".google.protobuf.Timestamp"].fromJSON(object.endTime ?? object.end_time)
9190
+ : undefined,
9191
+ objectsTransferredCount: isSet(object.objectsTransferredCount ?? object.objects_transferred_count)
9192
+ ? Long.fromValue(object.objectsTransferredCount ?? object.objects_transferred_count)
9193
+ : Long.ZERO,
9194
+ objectsTransferredSize: isSet(object.objectsTransferredSize ?? object.objects_transferred_size)
9195
+ ? Long.fromValue(object.objectsTransferredSize ?? object.objects_transferred_size)
9196
+ : Long.ZERO,
9197
+ averageThroughputBytes: isSet(object.averageThroughputBytes ?? object.average_throughput_bytes)
9198
+ ? Long.fromValue(object.averageThroughputBytes ?? object.average_throughput_bytes)
9199
+ : Long.ZERO,
9200
+ });
9201
+ },
9202
+ toJSON(message, use = "json") {
9203
+ const obj = {};
9204
+ const pick = (json, pb) => (use === "json" ? json : pb);
9205
+ if (!message.sequenceNumber?.isZero?.()) {
9206
+ obj[pick("sequenceNumber", "sequence_number")] = (message.sequenceNumber || Long.ZERO).toString();
9207
+ }
9208
+ if ((message.state ?? TransferIteration_State.STATE_UNSPECIFIED) !== TransferIteration_State.STATE_UNSPECIFIED) {
9209
+ obj[pick("state", "state")] = TransferIteration_State.toJSON(message.state);
9210
+ }
9211
+ if (message.error !== undefined) {
9212
+ obj[pick("error", "error")] = message.error
9213
+ ? TransferError.toJSON(message.error, use)
9214
+ : undefined;
9215
+ }
9216
+ if (message.startTime !== undefined) {
9217
+ obj[pick("startTime", "start_time")] = wkt[".google.protobuf.Timestamp"].toJSON(message.startTime, use);
9218
+ }
9219
+ if (message.endTime !== undefined) {
9220
+ obj[pick("endTime", "end_time")] = wkt[".google.protobuf.Timestamp"].toJSON(message.endTime, use);
9221
+ }
9222
+ if (!message.objectsTransferredCount?.isZero?.()) {
9223
+ obj[pick("objectsTransferredCount", "objects_transferred_count")] = (message.objectsTransferredCount || Long.ZERO).toString();
9224
+ }
9225
+ if (!message.objectsTransferredSize?.isZero?.()) {
9226
+ obj[pick("objectsTransferredSize", "objects_transferred_size")] = (message.objectsTransferredSize || Long.ZERO).toString();
9227
+ }
9228
+ if (!message.averageThroughputBytes?.isZero?.()) {
9229
+ obj[pick("averageThroughputBytes", "average_throughput_bytes")] = (message.averageThroughputBytes || Long.ZERO).toString();
9230
+ }
9231
+ return obj;
9232
+ },
9233
+ create(base) {
9234
+ return TransferIteration.fromPartial(base ?? {});
9235
+ },
9236
+ fromPartial(object) {
9237
+ const message = createBaseTransferIteration();
9238
+ message.sequenceNumber = (object.sequenceNumber !== undefined && object.sequenceNumber !== null)
9239
+ ? Long.fromValue(object.sequenceNumber)
9240
+ : Long.ZERO;
9241
+ message.state = (object.state !== undefined && object.state !== null)
9242
+ ? TransferIteration_State.fromJSON(object.state.name)
9243
+ : TransferIteration_State.STATE_UNSPECIFIED;
9244
+ message.error = (object.error !== undefined && object.error !== null)
9245
+ ? TransferError.fromPartial(object.error)
9246
+ : undefined;
9247
+ message.startTime = (object.startTime !== undefined && object.startTime !== null)
9248
+ ? wkt[".google.protobuf.Timestamp"].fromPartial(object.startTime)
9249
+ : undefined;
9250
+ message.endTime = (object.endTime !== undefined && object.endTime !== null)
9251
+ ? wkt[".google.protobuf.Timestamp"].fromPartial(object.endTime)
9252
+ : undefined;
9253
+ message.objectsTransferredCount = (object.objectsTransferredCount !== undefined && object.objectsTransferredCount !== null)
9254
+ ? Long.fromValue(object.objectsTransferredCount)
9255
+ : Long.ZERO;
9256
+ message.objectsTransferredSize = (object.objectsTransferredSize !== undefined && object.objectsTransferredSize !== null)
9257
+ ? Long.fromValue(object.objectsTransferredSize)
9258
+ : Long.ZERO;
9259
+ message.averageThroughputBytes = (object.averageThroughputBytes !== undefined && object.averageThroughputBytes !== null)
9260
+ ? Long.fromValue(object.averageThroughputBytes)
9261
+ : Long.ZERO;
9262
+ return message;
9263
+ },
9264
+ };
9265
+ protoRegistry.registerMessage(TransferIteration);
9266
+ function TransferIterationCustomInspect() {
9267
+ const parts = [];
9268
+ if (!this.sequenceNumber?.isZero?.())
9269
+ parts.push("sequenceNumber" + "=" + inspect(this.sequenceNumber));
9270
+ if (this.state !== undefined)
9271
+ parts.push("state" + "=" + inspect(this.state));
9272
+ if (this.error !== undefined)
9273
+ parts.push("error" + "=" + inspect(this.error));
9274
+ if (this.startTime !== undefined)
9275
+ parts.push("startTime" + "=" + inspect(this.startTime));
9276
+ if (this.endTime !== undefined)
9277
+ parts.push("endTime" + "=" + inspect(this.endTime));
9278
+ if (!this.objectsTransferredCount?.isZero?.())
9279
+ parts.push("objectsTransferredCount" + "=" + inspect(this.objectsTransferredCount));
9280
+ if (!this.objectsTransferredSize?.isZero?.())
9281
+ parts.push("objectsTransferredSize" + "=" + inspect(this.objectsTransferredSize));
9282
+ if (!this.averageThroughputBytes?.isZero?.())
9283
+ parts.push("averageThroughputBytes" + "=" + inspect(this.averageThroughputBytes));
9284
+ return `${this.$type}(${parts.join(", ")})`;
9285
+ }
9286
+ function TransferIterationCustomJson() {
9287
+ const obj = {
9288
+ type: this.$type,
9289
+ };
9290
+ if (!this.sequenceNumber?.isZero?.())
9291
+ obj.sequenceNumber = inspectJson(this.sequenceNumber);
9292
+ if (this.state !== undefined)
9293
+ obj.state = inspectJson(this.state);
9294
+ if (this.error !== undefined)
9295
+ obj.error = inspectJson(this.error);
9296
+ if (this.startTime !== undefined)
9297
+ obj.startTime = inspectJson(this.startTime);
9298
+ if (this.endTime !== undefined)
9299
+ obj.endTime = inspectJson(this.endTime);
9300
+ if (!this.objectsTransferredCount?.isZero?.())
9301
+ obj.objectsTransferredCount = inspectJson(this.objectsTransferredCount);
9302
+ if (!this.objectsTransferredSize?.isZero?.())
9303
+ obj.objectsTransferredSize = inspectJson(this.objectsTransferredSize);
9304
+ if (!this.averageThroughputBytes?.isZero?.())
9305
+ obj.averageThroughputBytes = inspectJson(this.averageThroughputBytes);
9306
+ return obj;
9307
+ }
9308
+ function applyTransferIterationCustom(message) {
9309
+ message[custom] = TransferIterationCustomInspect;
9310
+ message[customJson] = TransferIterationCustomJson;
9311
+ return message;
9312
+ }
9313
+ function createBaseTransferIteration() {
9314
+ const message = {
9315
+ $type: "nebius.storage.v1.TransferIteration",
9316
+ sequenceNumber: Long.ZERO,
9317
+ state: TransferIteration_State.STATE_UNSPECIFIED,
9318
+ error: undefined,
9319
+ startTime: undefined,
9320
+ endTime: undefined,
9321
+ objectsTransferredCount: Long.ZERO,
9322
+ objectsTransferredSize: Long.ZERO,
9323
+ averageThroughputBytes: Long.ZERO,
9324
+ };
9325
+ return applyTransferIterationCustom(message);
9326
+ }
9327
+ export const TransferError = {
9328
+ $type: "nebius.storage.v1.TransferError",
9329
+ encode(message, writer = new BinaryWriter()) {
9330
+ if ((message.origin ?? TransferError_Origin.ORIGIN_UNSPECIFIED) !== TransferError_Origin.ORIGIN_UNSPECIFIED) {
9331
+ TransferError_Origin.encodeField(writer, 1, message.origin);
9332
+ }
9333
+ if (message.code !== "") {
9334
+ writer.uint32(18).string(message.code);
9335
+ }
9336
+ if (message.message !== "") {
9337
+ writer.uint32(26).string(message.message);
9338
+ }
9339
+ if (message[unknownFieldsSymbol]) {
9340
+ writer.raw(message[unknownFieldsSymbol]);
9341
+ }
9342
+ return writer;
9343
+ },
9344
+ decode(input, length) {
9345
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
9346
+ const end = length === undefined ? reader.len : reader.pos + length;
9347
+ const message = createBaseTransferError();
9348
+ let writer = undefined;
9349
+ while (reader.pos < end) {
9350
+ const tag = reader.uint32();
9351
+ switch (tag >>> 3) {
9352
+ case 1: {
9353
+ if (tag !== 8)
9354
+ break;
9355
+ message.origin = TransferError_Origin.fromNumber(reader.int32());
9356
+ continue;
9357
+ }
9358
+ case 2: {
9359
+ if (tag !== 18)
9360
+ break;
9361
+ message.code = reader.string();
9362
+ continue;
9363
+ }
9364
+ case 3: {
9365
+ if (tag !== 26)
9366
+ break;
9367
+ message.message = reader.string();
9368
+ continue;
9369
+ }
9370
+ default:
9371
+ break;
9372
+ }
9373
+ if ((tag & 7) === 4 || tag === 0) {
9374
+ break;
9375
+ }
9376
+ {
9377
+ if (!writer)
9378
+ writer = new BinaryWriter();
9379
+ const skipped = reader.skip(tag & 7, tag >>> 3);
9380
+ writer.uint32(tag).raw(skipped);
9381
+ }
9382
+ }
9383
+ if (writer) {
9384
+ message[unknownFieldsSymbol] = writer.finish();
9385
+ }
9386
+ return message;
9387
+ },
9388
+ fromJSON(object) {
9389
+ return applyTransferErrorCustom({
9390
+ $type: "nebius.storage.v1.TransferError",
9391
+ origin: isSet(object.origin ?? object.origin)
9392
+ ? TransferError_Origin.fromJSON(object.origin ?? object.origin)
9393
+ : TransferError_Origin.ORIGIN_UNSPECIFIED,
9394
+ code: isSet(object.code ?? object.code)
9395
+ ? String(object.code ?? object.code)
9396
+ : "",
9397
+ message: isSet(object.message ?? object.message)
9398
+ ? String(object.message ?? object.message)
9399
+ : "",
9400
+ });
9401
+ },
9402
+ toJSON(message, use = "json") {
9403
+ const obj = {};
9404
+ const pick = (json, pb) => (use === "json" ? json : pb);
9405
+ if ((message.origin ?? TransferError_Origin.ORIGIN_UNSPECIFIED) !== TransferError_Origin.ORIGIN_UNSPECIFIED) {
9406
+ obj[pick("origin", "origin")] = TransferError_Origin.toJSON(message.origin);
9407
+ }
9408
+ if (message.code !== "") {
9409
+ obj[pick("code", "code")] = message.code;
9410
+ }
9411
+ if (message.message !== "") {
9412
+ obj[pick("message", "message")] = message.message;
9413
+ }
9414
+ return obj;
9415
+ },
9416
+ create(base) {
9417
+ return TransferError.fromPartial(base ?? {});
9418
+ },
9419
+ fromPartial(object) {
9420
+ const message = createBaseTransferError();
9421
+ message.origin = (object.origin !== undefined && object.origin !== null)
9422
+ ? TransferError_Origin.fromJSON(object.origin.name)
9423
+ : TransferError_Origin.ORIGIN_UNSPECIFIED;
9424
+ message.code = (object.code !== undefined && object.code !== null)
9425
+ ? object.code
9426
+ : "";
9427
+ message.message = (object.message !== undefined && object.message !== null)
9428
+ ? object.message
9429
+ : "";
9430
+ return message;
9431
+ },
9432
+ };
9433
+ protoRegistry.registerMessage(TransferError);
9434
+ function TransferErrorCustomInspect() {
9435
+ const parts = [];
9436
+ if (this.origin !== undefined)
9437
+ parts.push("origin" + "=" + inspect(this.origin));
9438
+ if (this.code !== "")
9439
+ parts.push("code" + "=" + inspect(this.code));
9440
+ if (this.message !== "")
9441
+ parts.push("message" + "=" + inspect(this.message));
9442
+ return `${this.$type}(${parts.join(", ")})`;
9443
+ }
9444
+ function TransferErrorCustomJson() {
9445
+ const obj = {
9446
+ type: this.$type,
9447
+ };
9448
+ if (this.origin !== undefined)
9449
+ obj.origin = inspectJson(this.origin);
9450
+ if (this.code !== "")
9451
+ obj.code = inspectJson(this.code);
9452
+ if (this.message !== "")
9453
+ obj.message = inspectJson(this.message);
9454
+ return obj;
9455
+ }
9456
+ function applyTransferErrorCustom(message) {
9457
+ message[custom] = TransferErrorCustomInspect;
9458
+ message[customJson] = TransferErrorCustomJson;
9459
+ return message;
9460
+ }
9461
+ function createBaseTransferError() {
9462
+ const message = {
9463
+ $type: "nebius.storage.v1.TransferError",
9464
+ origin: TransferError_Origin.ORIGIN_UNSPECIFIED,
9465
+ code: "",
9466
+ message: "",
9467
+ };
9468
+ return applyTransferErrorCustom(message);
9469
+ }
4881
9470
  //# sourceMappingURL=index.js.map