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