@nebius/js-sdk 0.2.78 → 0.2.80

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,9 +1,9 @@
1
1
  "use strict";
2
2
  /* Generated by Nebius TS generator. DO NOT EDIT! */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.InventorySpec = exports.Inventory = exports.InventoryStatus_Error = exports.InventorySpec_Schedule = exports.InventorySpec_OptionalField = exports.InventorySpec_OutputFormat = exports.InventoryService = exports.InventoryServiceBaseClient = exports.InventoryServiceServiceDescription = exports.DeleteInventoryRequest = exports.UpdateInventoryRequest = exports.CreateInventoryRequest = exports.ListInventoriesResponse = exports.ListInventoriesRequest = exports.GetInventoryRequest = exports.InsecureEndpoint = exports.InsecureEndpoint_Mode = exports.CORSRule = exports.CORSConfiguration = exports.BucketStatus = exports.BucketSpec_FilesystemBucketType = exports.BucketSpec = exports.Bucket = exports.BucketStatus_BucketType = exports.BucketStatus_SuspensionState = exports.BucketStatus_State = exports.BucketSpec_ObjectAuditLogging = exports.BucketService = exports.BucketServiceBaseClient = exports.BucketServiceServiceDescription = exports.ListBucketsWithFilterResponse = exports.ListBucketsWithFilterRequest_Filters = exports.ListBucketsWithFilterRequest = 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.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 = 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_Tag = exports.LifecycleFilter = exports.LifecycleRule = exports.LifecycleConfiguration = exports.LifecycleAccessFilter_Condition_Method = exports.LifecycleAccessFilter_Condition_Type = exports.LifecycleRule_Status = exports.InventoryStatus = void 0;
6
- exports.TransferError = exports.TransferIteration = void 0;
4
+ exports.InventorySpec_OptionalField = exports.InventorySpec_OutputFormat = exports.InventoryService = exports.InventoryServiceBaseClient = exports.InventoryServiceServiceDescription = exports.DeleteInventoryRequest = exports.UpdateInventoryRequest = exports.CreateInventoryRequest = exports.ListInventoriesResponse = exports.ListInventoriesRequest = exports.GetInventoryRequest = exports.InsecureEndpoint = exports.InsecureEndpoint_Mode = exports.CORSRule = exports.CORSConfiguration = exports.LastAccessConfiguration_Condition = exports.LastAccessConfiguration = exports.BucketStatus = exports.BucketSpec_FilesystemBucketType = exports.BucketSpec = exports.Bucket = exports.LastAccessConfiguration_Condition_Method = exports.LastAccessConfiguration_Condition_Type = exports.BucketStatus_BucketType = exports.BucketStatus_SuspensionState = exports.BucketStatus_State = exports.BucketSpec_ObjectAuditLogging = exports.BucketService = exports.BucketServiceBaseClient = exports.BucketServiceServiceDescription = exports.ListBucketsWithFilterResponse = exports.ListBucketsWithFilterRequest_Filters = exports.ListBucketsWithFilterRequest = 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.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 = 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_Tag = exports.LifecycleFilter = exports.LifecycleRule = exports.LifecycleConfiguration = exports.LifecycleAccessFilter_Condition_Method = exports.LifecycleAccessFilter_Condition_Type = exports.LifecycleRule_Status = exports.InventoryStatus = exports.InventorySpec = exports.Inventory = exports.InventoryStatus_Error = exports.InventorySpec_Schedule = void 0;
6
+ exports.TransferError = exports.TransferIteration = exports.TransferStatus = exports.TransferCredentialsAzureStorageAccount = exports.TransferCredentialsAccessKey = exports.TransferCredentialsAnonymous = void 0;
7
7
  const index_js_1 = require("../../../../runtime/protos/index.js");
8
8
  const util_1 = require("util");
9
9
  const protobuf_js_1 = require("../../../protobuf.js");
@@ -3164,6 +3164,66 @@ exports.BucketStatus_BucketType = (0, index_js_1.createEnum)("nebius.storage.v1.
3164
3164
  FILESYSTEM: 2,
3165
3165
  }, BucketStatus_BucketType_VALUE_COMMENTS);
3166
3166
  protobuf_js_1.protoRegistry.registerEnum(exports.BucketStatus_BucketType);
3167
+ const LastAccessConfiguration_Condition_Type_VALUE_COMMENTS = {
3168
+ INCLUDE: " If an include type condition is the first condition that the request match, the request will be included in\n `days_since_last_access` calculation.\n",
3169
+ EXCLUDE: " If an exclude type condition is the first condition that the request match, the request will be ignored in `days_since_last_access`\n calculation.\n",
3170
+ };
3171
+ /** Converts and creates {@link LastAccessConfiguration_Condition_Type} values. */
3172
+ exports.LastAccessConfiguration_Condition_Type = (0, index_js_1.createEnum)("nebius.storage.v1.LastAccessConfiguration.Condition.Type", {
3173
+ /**
3174
+ * Represents the `TYPE_UNSPECIFIED` protobuf enum value.
3175
+ */
3176
+ TYPE_UNSPECIFIED: 0,
3177
+ /**
3178
+ * If an include type condition is the first condition that the request match, the request will be included in
3179
+ * `days_since_last_access` calculation.
3180
+ *
3181
+ */
3182
+ INCLUDE: 1,
3183
+ /**
3184
+ * If an exclude type condition is the first condition that the request match, the request will be ignored in `days_since_last_access`
3185
+ * calculation.
3186
+ *
3187
+ */
3188
+ EXCLUDE: 2,
3189
+ }, LastAccessConfiguration_Condition_Type_VALUE_COMMENTS);
3190
+ protobuf_js_1.protoRegistry.registerEnum(exports.LastAccessConfiguration_Condition_Type);
3191
+ const LastAccessConfiguration_Condition_Method_VALUE_COMMENTS = {
3192
+ COPY_OBJECT: " Copy object method reads the source object.\n We account for those operations as source object accesses when calculating `days_since_last_access` for source object.\n",
3193
+ UPLOAD_PART_COPY: " Upload part copy method reads the source object.\n We account for those operations as source object accesses when calculating `days_since_last_access` for source object.\n",
3194
+ };
3195
+ /** Converts and creates {@link LastAccessConfiguration_Condition_Method} values. */
3196
+ exports.LastAccessConfiguration_Condition_Method = (0, index_js_1.createEnum)("nebius.storage.v1.LastAccessConfiguration.Condition.Method", {
3197
+ /**
3198
+ * Represents the `METHOD_UNSPECIFIED` protobuf enum value.
3199
+ */
3200
+ METHOD_UNSPECIFIED: 0,
3201
+ /**
3202
+ * Represents the `GET_OBJECT` protobuf enum value.
3203
+ */
3204
+ GET_OBJECT: 1,
3205
+ /**
3206
+ * Represents the `HEAD_OBJECT` protobuf enum value.
3207
+ */
3208
+ HEAD_OBJECT: 2,
3209
+ /**
3210
+ * Represents the `GET_OBJECT_TAGGING` protobuf enum value.
3211
+ */
3212
+ GET_OBJECT_TAGGING: 3,
3213
+ /**
3214
+ * Copy object method reads the source object.
3215
+ * We account for those operations as source object accesses when calculating `days_since_last_access` for source object.
3216
+ *
3217
+ */
3218
+ COPY_OBJECT: 4,
3219
+ /**
3220
+ * Upload part copy method reads the source object.
3221
+ * We account for those operations as source object accesses when calculating `days_since_last_access` for source object.
3222
+ *
3223
+ */
3224
+ UPLOAD_PART_COPY: 5,
3225
+ }, LastAccessConfiguration_Condition_Method_VALUE_COMMENTS);
3226
+ protobuf_js_1.protoRegistry.registerEnum(exports.LastAccessConfiguration_Condition_Method);
3167
3227
  const Bucket_MESSAGE_DESCRIPTOR = {
3168
3228
  type: "nebius.storage.v1.Bucket",
3169
3229
  create: () => createBaseBucket(),
@@ -3351,6 +3411,7 @@ const BucketSpec_MESSAGE_DESCRIPTOR = {
3351
3411
  "forceStorageClass": { pbName: "force_storage_class", jsonName: "forceStorageClass", scalarType: 8 },
3352
3412
  "objectAuditLogging": { pbName: "object_audit_logging", jsonName: "objectAuditLogging", scalarType: 14, enumNames: ["OBJECT_AUDIT_LOGGING_UNSPECIFIED", "NONE", "MUTATE_ONLY", "ALL"] },
3353
3413
  "bucketPolicy": { pbName: "bucket_policy", jsonName: "bucketPolicy", presence: true, message: () => exports.BucketPolicy.$descriptor },
3414
+ "lastAccess": { pbName: "last_access", jsonName: "lastAccess", presence: true, message: () => exports.LastAccessConfiguration.$descriptor },
3354
3415
  "bucketType": { pbName: "bucket_type", oneof: true, immutableOneof: true, message: () => BucketSpec_bucketType_ONEOF_DESCRIPTOR },
3355
3416
  },
3356
3417
  };
@@ -3389,6 +3450,11 @@ exports.BucketSpec = {
3389
3450
  exports.BucketPolicy.encode(message.bucketPolicy, w);
3390
3451
  w.join();
3391
3452
  }
3453
+ if (message.lastAccess !== undefined) {
3454
+ const w = writer.uint32(122).fork();
3455
+ exports.LastAccessConfiguration.encode(message.lastAccess, w);
3456
+ w.join();
3457
+ }
3392
3458
  if (message.bucketType?.$case === undefined) { /* noop */ }
3393
3459
  else if (message.bucketType?.$case === "filesystemBucket") {
3394
3460
  const w = writer.uint32(242).fork();
@@ -3458,6 +3524,12 @@ exports.BucketSpec = {
3458
3524
  message.bucketPolicy = exports.BucketPolicy.decode(reader, reader.uint32(), message.bucketPolicy);
3459
3525
  continue;
3460
3526
  }
3527
+ case 15: {
3528
+ if (tag !== 122)
3529
+ break;
3530
+ message.lastAccess = exports.LastAccessConfiguration.decode(reader, reader.uint32(), message.lastAccess);
3531
+ continue;
3532
+ }
3461
3533
  case 30: {
3462
3534
  if (tag !== 242)
3463
3535
  break;
@@ -3512,6 +3584,9 @@ exports.BucketSpec = {
3512
3584
  bucketPolicy: (0, index_js_1.isSet)(object.bucketPolicy ?? object.bucket_policy)
3513
3585
  ? exports.BucketPolicy.fromJSON(object.bucketPolicy ?? object.bucket_policy)
3514
3586
  : undefined,
3587
+ lastAccess: (0, index_js_1.isSet)(object.lastAccess ?? object.last_access)
3588
+ ? exports.LastAccessConfiguration.fromJSON(object.lastAccess ?? object.last_access)
3589
+ : undefined,
3515
3590
  bucketType: (() => {
3516
3591
  if ((0, index_js_1.isSet)(object.filesystemBucket) || (0, index_js_1.isSet)(object.filesystem_bucket)) {
3517
3592
  return {
@@ -3556,6 +3631,11 @@ exports.BucketSpec = {
3556
3631
  ? exports.BucketPolicy.toJSON(message.bucketPolicy, use)
3557
3632
  : undefined;
3558
3633
  }
3634
+ if (message.lastAccess !== undefined) {
3635
+ obj[pick("lastAccess", "last_access")] = message.lastAccess
3636
+ ? exports.LastAccessConfiguration.toJSON(message.lastAccess, use)
3637
+ : undefined;
3638
+ }
3559
3639
  switch (message.bucketType?.$case) {
3560
3640
  case "filesystemBucket": {
3561
3641
  obj[pick("filesystemBucket", "filesystem_bucket")] = exports.BucketSpec_FilesystemBucketType.toJSON(message.bucketType.filesystemBucket, use);
@@ -3594,6 +3674,9 @@ exports.BucketSpec = {
3594
3674
  message.bucketPolicy = (object.bucketPolicy !== undefined && object.bucketPolicy !== null)
3595
3675
  ? exports.BucketPolicy.fromPartial(object.bucketPolicy)
3596
3676
  : undefined;
3677
+ message.lastAccess = (object.lastAccess !== undefined && object.lastAccess !== null)
3678
+ ? exports.LastAccessConfiguration.fromPartial(object.lastAccess)
3679
+ : undefined;
3597
3680
  switch (object.bucketType?.$case) {
3598
3681
  case "filesystemBucket": {
3599
3682
  if (object.bucketType.filesystemBucket !== undefined && object.bucketType.filesystemBucket !== null) {
@@ -3630,6 +3713,8 @@ function BucketSpecCustomInspect() {
3630
3713
  parts.push("objectAuditLogging" + "=" + (0, util_1.inspect)(this.objectAuditLogging));
3631
3714
  if (this.bucketPolicy !== undefined)
3632
3715
  parts.push("bucketPolicy" + "=" + (0, util_1.inspect)(this.bucketPolicy));
3716
+ if (this.lastAccess !== undefined)
3717
+ parts.push("lastAccess" + "=" + (0, util_1.inspect)(this.lastAccess));
3633
3718
  return `${this.$type}(${parts.join(", ")})`;
3634
3719
  }
3635
3720
  function BucketSpecCustomJson() {
@@ -3652,6 +3737,8 @@ function BucketSpecCustomJson() {
3652
3737
  obj.objectAuditLogging = (0, logging_js_1.inspectJson)(this.objectAuditLogging);
3653
3738
  if (this.bucketPolicy !== undefined)
3654
3739
  obj.bucketPolicy = (0, logging_js_1.inspectJson)(this.bucketPolicy);
3740
+ if (this.lastAccess !== undefined)
3741
+ obj.lastAccess = (0, logging_js_1.inspectJson)(this.lastAccess);
3655
3742
  return obj;
3656
3743
  }
3657
3744
  function applyBucketSpecCustom(message) {
@@ -3670,6 +3757,7 @@ function createBaseBucketSpec() {
3670
3757
  forceStorageClass: false,
3671
3758
  objectAuditLogging: exports.BucketSpec_ObjectAuditLogging.OBJECT_AUDIT_LOGGING_UNSPECIFIED,
3672
3759
  bucketPolicy: undefined,
3760
+ lastAccess: undefined,
3673
3761
  bucketType: undefined,
3674
3762
  };
3675
3763
  return applyBucketSpecCustom(message);
@@ -4240,6 +4328,282 @@ function createBaseBucketStatus() {
4240
4328
  };
4241
4329
  return applyBucketStatusCustom(message);
4242
4330
  }
4331
+ const LastAccessConfiguration_MESSAGE_DESCRIPTOR = {
4332
+ type: "nebius.storage.v1.LastAccessConfiguration",
4333
+ create: () => createBaseLastAccessConfiguration(),
4334
+ fields: {
4335
+ "conditions": { pbName: "conditions", jsonName: "conditions", repeated: true, message: () => exports.LastAccessConfiguration_Condition.$descriptor },
4336
+ },
4337
+ };
4338
+ /** Encodes, decodes, converts, and creates {@link LastAccessConfiguration} messages. */
4339
+ exports.LastAccessConfiguration = {
4340
+ $type: "nebius.storage.v1.LastAccessConfiguration",
4341
+ $descriptor: LastAccessConfiguration_MESSAGE_DESCRIPTOR,
4342
+ encode(message, writer = new index_js_1.BinaryWriter()) {
4343
+ for (const v of (message.conditions ?? [])) {
4344
+ const w = writer.uint32(10).fork();
4345
+ exports.LastAccessConfiguration_Condition.encode(v, w);
4346
+ w.join();
4347
+ }
4348
+ if (message[index_js_1.unknownFieldsSymbol]) {
4349
+ writer.raw(message[index_js_1.unknownFieldsSymbol]);
4350
+ }
4351
+ return writer;
4352
+ },
4353
+ decode(input, length, base) {
4354
+ const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
4355
+ const end = length === undefined ? reader.len : reader.pos + length;
4356
+ const message = base ?? createBaseLastAccessConfiguration();
4357
+ let writer = undefined;
4358
+ if (message[index_js_1.unknownFieldsSymbol])
4359
+ writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
4360
+ while (reader.pos < end) {
4361
+ const tag = reader.uint32();
4362
+ switch (tag >>> 3) {
4363
+ case 1: {
4364
+ if (tag !== 10)
4365
+ break;
4366
+ message.conditions.push(exports.LastAccessConfiguration_Condition.decode(reader, reader.uint32()));
4367
+ continue;
4368
+ }
4369
+ default:
4370
+ break;
4371
+ }
4372
+ if ((tag & 7) === 4 || tag === 0) {
4373
+ break;
4374
+ }
4375
+ {
4376
+ if (!writer)
4377
+ writer = new index_js_1.BinaryWriter();
4378
+ const skipped = reader.skip(tag & 7, tag >>> 3);
4379
+ writer.uint32(tag).raw(skipped);
4380
+ }
4381
+ }
4382
+ if (writer) {
4383
+ message[index_js_1.unknownFieldsSymbol] = writer.finish();
4384
+ }
4385
+ return message;
4386
+ },
4387
+ fromJSON(object) {
4388
+ return applyLastAccessConfigurationCustom({
4389
+ $type: "nebius.storage.v1.LastAccessConfiguration",
4390
+ conditions: globalThis.Array.isArray(object?.conditions ?? object?.conditions)
4391
+ ? (object.conditions ?? object.conditions).map((e) => exports.LastAccessConfiguration_Condition.fromJSON(e))
4392
+ : [],
4393
+ });
4394
+ },
4395
+ toJSON(message, use = "json") {
4396
+ const obj = {};
4397
+ const pick = (json, pb) => (use === "json" ? json : pb);
4398
+ if (message.conditions?.length) {
4399
+ obj[pick("conditions", "conditions")] = message.conditions.map((e) => e ? exports.LastAccessConfiguration_Condition.toJSON(e, use) : undefined);
4400
+ }
4401
+ return obj;
4402
+ },
4403
+ create(base) {
4404
+ return exports.LastAccessConfiguration.fromPartial(base ?? {});
4405
+ },
4406
+ fromPartial(object) {
4407
+ const message = createBaseLastAccessConfiguration();
4408
+ message.conditions = object.conditions?.map((e) => exports.LastAccessConfiguration_Condition.fromPartial(e)) || [];
4409
+ for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.storage.v1.LastAccessConfiguration"))
4410
+ ext.fromPartial?.(message, object);
4411
+ return message;
4412
+ },
4413
+ };
4414
+ protobuf_js_1.protoRegistry.registerMessage(exports.LastAccessConfiguration);
4415
+ function LastAccessConfigurationCustomInspect() {
4416
+ const parts = [];
4417
+ if ((this.conditions?.length ?? 0) !== 0)
4418
+ parts.push("conditions" + "=" + (0, util_1.inspect)(this.conditions));
4419
+ return `${this.$type}(${parts.join(", ")})`;
4420
+ }
4421
+ function LastAccessConfigurationCustomJson() {
4422
+ const obj = {
4423
+ type: this.$type,
4424
+ };
4425
+ if ((this.conditions?.length ?? 0) !== 0)
4426
+ obj.conditions = (0, logging_js_1.inspectJson)(this.conditions);
4427
+ return obj;
4428
+ }
4429
+ function applyLastAccessConfigurationCustom(message) {
4430
+ message[logging_js_1.custom] = LastAccessConfigurationCustomInspect;
4431
+ message[logging_js_1.customJson] = LastAccessConfigurationCustomJson;
4432
+ return (0, index_js_1.attachMessageDescriptor)(message, exports.LastAccessConfiguration.$descriptor);
4433
+ }
4434
+ function createBaseLastAccessConfiguration() {
4435
+ const message = {
4436
+ $type: "nebius.storage.v1.LastAccessConfiguration",
4437
+ conditions: [],
4438
+ };
4439
+ return applyLastAccessConfigurationCustom(message);
4440
+ }
4441
+ const LastAccessConfiguration_Condition_MESSAGE_DESCRIPTOR = {
4442
+ type: "nebius.storage.v1.LastAccessConfiguration.Condition",
4443
+ create: () => createBaseLastAccessConfiguration_Condition(),
4444
+ fields: {
4445
+ "type": { pbName: "type", jsonName: "type", scalarType: 14, enumNames: ["TYPE_UNSPECIFIED", "INCLUDE", "EXCLUDE"] },
4446
+ "methods": { pbName: "methods", jsonName: "methods", elementDefault: () => exports.LastAccessConfiguration_Condition_Method.METHOD_UNSPECIFIED, scalarType: 14, enumNames: ["METHOD_UNSPECIFIED", "GET_OBJECT", "HEAD_OBJECT", "GET_OBJECT_TAGGING", "COPY_OBJECT", "UPLOAD_PART_COPY"], repeated: true },
4447
+ "userAgents": { pbName: "user_agents", jsonName: "userAgents", elementDefault: () => "", scalarType: 9, repeated: true },
4448
+ },
4449
+ };
4450
+ /** Encodes, decodes, converts, and creates {@link LastAccessConfiguration_Condition} messages. */
4451
+ exports.LastAccessConfiguration_Condition = {
4452
+ $type: "nebius.storage.v1.LastAccessConfiguration.Condition",
4453
+ $descriptor: LastAccessConfiguration_Condition_MESSAGE_DESCRIPTOR,
4454
+ encode(message, writer = new index_js_1.BinaryWriter()) {
4455
+ if ((message.type ?? exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) !== exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) {
4456
+ exports.LastAccessConfiguration_Condition_Type.encodeField(writer, 1, message.type);
4457
+ }
4458
+ if (message.methods?.length) {
4459
+ const w = writer.uint32(18).fork();
4460
+ for (const v of message.methods)
4461
+ w.int32(v?.code | 0);
4462
+ w.join();
4463
+ }
4464
+ for (const v of (message.userAgents ?? [])) {
4465
+ writer.uint32(26).string(v);
4466
+ }
4467
+ if (message[index_js_1.unknownFieldsSymbol]) {
4468
+ writer.raw(message[index_js_1.unknownFieldsSymbol]);
4469
+ }
4470
+ return writer;
4471
+ },
4472
+ decode(input, length, base) {
4473
+ const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
4474
+ const end = length === undefined ? reader.len : reader.pos + length;
4475
+ const message = base ?? createBaseLastAccessConfiguration_Condition();
4476
+ let writer = undefined;
4477
+ if (message[index_js_1.unknownFieldsSymbol])
4478
+ writer = new index_js_1.BinaryWriter().raw(message[index_js_1.unknownFieldsSymbol]);
4479
+ while (reader.pos < end) {
4480
+ const tag = reader.uint32();
4481
+ switch (tag >>> 3) {
4482
+ case 1: {
4483
+ if (tag !== 8)
4484
+ break;
4485
+ message.type = exports.LastAccessConfiguration_Condition_Type.fromNumber(reader.int32());
4486
+ continue;
4487
+ }
4488
+ case 2: {
4489
+ // packed or unpacked repeated enum
4490
+ if ((tag & 7) === 2) {
4491
+ const end2 = reader.uint32() + reader.pos;
4492
+ while (reader.pos < end2) {
4493
+ message.methods.push(exports.LastAccessConfiguration_Condition_Method.fromNumber(reader.int32()));
4494
+ }
4495
+ continue;
4496
+ }
4497
+ else if ((tag & 7) === 0) {
4498
+ message.methods.push(exports.LastAccessConfiguration_Condition_Method.fromNumber(reader.int32()));
4499
+ continue;
4500
+ }
4501
+ break; // wrong wire type
4502
+ }
4503
+ case 3: {
4504
+ if (tag !== 26)
4505
+ break;
4506
+ message.userAgents.push(reader.string());
4507
+ continue;
4508
+ }
4509
+ default:
4510
+ break;
4511
+ }
4512
+ if ((tag & 7) === 4 || tag === 0) {
4513
+ break;
4514
+ }
4515
+ {
4516
+ if (!writer)
4517
+ writer = new index_js_1.BinaryWriter();
4518
+ const skipped = reader.skip(tag & 7, tag >>> 3);
4519
+ writer.uint32(tag).raw(skipped);
4520
+ }
4521
+ }
4522
+ if (writer) {
4523
+ message[index_js_1.unknownFieldsSymbol] = writer.finish();
4524
+ }
4525
+ return message;
4526
+ },
4527
+ fromJSON(object) {
4528
+ return applyLastAccessConfiguration_ConditionCustom({
4529
+ $type: "nebius.storage.v1.LastAccessConfiguration.Condition",
4530
+ type: (0, index_js_1.isSet)(object.type ?? object.type)
4531
+ ? exports.LastAccessConfiguration_Condition_Type.fromJSON(object.type ?? object.type)
4532
+ : exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED,
4533
+ methods: globalThis.Array.isArray(object?.methods ?? object?.methods)
4534
+ ? (object.methods ?? object.methods).map((e) => exports.LastAccessConfiguration_Condition_Method.fromJSON(e))
4535
+ : [],
4536
+ userAgents: globalThis.Array.isArray(object?.userAgents ?? object?.user_agents)
4537
+ ? (object.userAgents ?? object.user_agents).map((e) => String(e))
4538
+ : [],
4539
+ });
4540
+ },
4541
+ toJSON(message, use = "json") {
4542
+ const obj = {};
4543
+ const pick = (json, pb) => (use === "json" ? json : pb);
4544
+ if ((message.type ?? exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) !== exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) {
4545
+ obj[pick("type", "type")] = exports.LastAccessConfiguration_Condition_Type.toJSON(message.type);
4546
+ }
4547
+ if (message.methods?.length) {
4548
+ obj[pick("methods", "methods")] = message.methods.map((e) => exports.LastAccessConfiguration_Condition_Method.toJSON(e));
4549
+ }
4550
+ if (message.userAgents?.length) {
4551
+ obj[pick("userAgents", "user_agents")] = message.userAgents.map((e) => e);
4552
+ }
4553
+ return obj;
4554
+ },
4555
+ create(base) {
4556
+ return exports.LastAccessConfiguration_Condition.fromPartial(base ?? {});
4557
+ },
4558
+ fromPartial(object) {
4559
+ const message = createBaseLastAccessConfiguration_Condition();
4560
+ message.type = (object.type !== undefined && object.type !== null)
4561
+ ? exports.LastAccessConfiguration_Condition_Type.fromJSON(object.type.code ?? object.type.name)
4562
+ : exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED;
4563
+ message.methods = object.methods?.map((e) => exports.LastAccessConfiguration_Condition_Method.fromJSON(e.code ?? e.name)) || [];
4564
+ message.userAgents = object.userAgents?.map((e) => e) || [];
4565
+ for (const ext of protobuf_js_1.protoRegistry.listExtensions("nebius.storage.v1.LastAccessConfiguration.Condition"))
4566
+ ext.fromPartial?.(message, object);
4567
+ return message;
4568
+ },
4569
+ };
4570
+ protobuf_js_1.protoRegistry.registerMessage(exports.LastAccessConfiguration_Condition);
4571
+ function LastAccessConfiguration_ConditionCustomInspect() {
4572
+ const parts = [];
4573
+ if (this.type !== undefined)
4574
+ parts.push("type" + "=" + (0, util_1.inspect)(this.type));
4575
+ if ((this.methods?.length ?? 0) !== 0)
4576
+ parts.push("methods" + "=" + (0, util_1.inspect)(this.methods));
4577
+ if ((this.userAgents?.length ?? 0) !== 0)
4578
+ parts.push("userAgents" + "=" + (0, util_1.inspect)(this.userAgents));
4579
+ return `${this.$type}(${parts.join(", ")})`;
4580
+ }
4581
+ function LastAccessConfiguration_ConditionCustomJson() {
4582
+ const obj = {
4583
+ type: this.$type,
4584
+ };
4585
+ if (this.type !== undefined)
4586
+ obj.type = (0, logging_js_1.inspectJson)(this.type);
4587
+ if ((this.methods?.length ?? 0) !== 0)
4588
+ obj.methods = (0, logging_js_1.inspectJson)(this.methods);
4589
+ if ((this.userAgents?.length ?? 0) !== 0)
4590
+ obj.userAgents = (0, logging_js_1.inspectJson)(this.userAgents);
4591
+ return obj;
4592
+ }
4593
+ function applyLastAccessConfiguration_ConditionCustom(message) {
4594
+ message[logging_js_1.custom] = LastAccessConfiguration_ConditionCustomInspect;
4595
+ message[logging_js_1.customJson] = LastAccessConfiguration_ConditionCustomJson;
4596
+ return (0, index_js_1.attachMessageDescriptor)(message, exports.LastAccessConfiguration_Condition.$descriptor);
4597
+ }
4598
+ function createBaseLastAccessConfiguration_Condition() {
4599
+ const message = {
4600
+ $type: "nebius.storage.v1.LastAccessConfiguration.Condition",
4601
+ type: exports.LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED,
4602
+ methods: [],
4603
+ userAgents: [],
4604
+ };
4605
+ return applyLastAccessConfiguration_ConditionCustom(message);
4606
+ }
4243
4607
  const CORSConfiguration_MESSAGE_DESCRIPTOR = {
4244
4608
  type: "nebius.storage.v1.CORSConfiguration",
4245
4609
  create: () => createBaseCORSConfiguration(),