@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.
- package/dist/cjs/api/nebius/storage/v1/index.d.ts +123 -0
- package/dist/cjs/api/nebius/storage/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/storage/v1/index.js +367 -3
- package/dist/cjs/api/nebius/storage/v1/index.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/nebius/storage/v1/index.d.ts +123 -0
- package/dist/esm/api/nebius/storage/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/storage/v1/index.js +364 -0
- package/dist/esm/api/nebius/storage/v1/index.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -3158,6 +3158,66 @@ export const BucketStatus_BucketType = createEnum("nebius.storage.v1.BucketStatu
|
|
|
3158
3158
|
FILESYSTEM: 2,
|
|
3159
3159
|
}, BucketStatus_BucketType_VALUE_COMMENTS);
|
|
3160
3160
|
protoRegistry.registerEnum(BucketStatus_BucketType);
|
|
3161
|
+
const LastAccessConfiguration_Condition_Type_VALUE_COMMENTS = {
|
|
3162
|
+
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",
|
|
3163
|
+
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",
|
|
3164
|
+
};
|
|
3165
|
+
/** Converts and creates {@link LastAccessConfiguration_Condition_Type} values. */
|
|
3166
|
+
export const LastAccessConfiguration_Condition_Type = createEnum("nebius.storage.v1.LastAccessConfiguration.Condition.Type", {
|
|
3167
|
+
/**
|
|
3168
|
+
* Represents the `TYPE_UNSPECIFIED` protobuf enum value.
|
|
3169
|
+
*/
|
|
3170
|
+
TYPE_UNSPECIFIED: 0,
|
|
3171
|
+
/**
|
|
3172
|
+
* If an include type condition is the first condition that the request match, the request will be included in
|
|
3173
|
+
* `days_since_last_access` calculation.
|
|
3174
|
+
*
|
|
3175
|
+
*/
|
|
3176
|
+
INCLUDE: 1,
|
|
3177
|
+
/**
|
|
3178
|
+
* If an exclude type condition is the first condition that the request match, the request will be ignored in `days_since_last_access`
|
|
3179
|
+
* calculation.
|
|
3180
|
+
*
|
|
3181
|
+
*/
|
|
3182
|
+
EXCLUDE: 2,
|
|
3183
|
+
}, LastAccessConfiguration_Condition_Type_VALUE_COMMENTS);
|
|
3184
|
+
protoRegistry.registerEnum(LastAccessConfiguration_Condition_Type);
|
|
3185
|
+
const LastAccessConfiguration_Condition_Method_VALUE_COMMENTS = {
|
|
3186
|
+
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",
|
|
3187
|
+
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",
|
|
3188
|
+
};
|
|
3189
|
+
/** Converts and creates {@link LastAccessConfiguration_Condition_Method} values. */
|
|
3190
|
+
export const LastAccessConfiguration_Condition_Method = createEnum("nebius.storage.v1.LastAccessConfiguration.Condition.Method", {
|
|
3191
|
+
/**
|
|
3192
|
+
* Represents the `METHOD_UNSPECIFIED` protobuf enum value.
|
|
3193
|
+
*/
|
|
3194
|
+
METHOD_UNSPECIFIED: 0,
|
|
3195
|
+
/**
|
|
3196
|
+
* Represents the `GET_OBJECT` protobuf enum value.
|
|
3197
|
+
*/
|
|
3198
|
+
GET_OBJECT: 1,
|
|
3199
|
+
/**
|
|
3200
|
+
* Represents the `HEAD_OBJECT` protobuf enum value.
|
|
3201
|
+
*/
|
|
3202
|
+
HEAD_OBJECT: 2,
|
|
3203
|
+
/**
|
|
3204
|
+
* Represents the `GET_OBJECT_TAGGING` protobuf enum value.
|
|
3205
|
+
*/
|
|
3206
|
+
GET_OBJECT_TAGGING: 3,
|
|
3207
|
+
/**
|
|
3208
|
+
* Copy object method reads the source object.
|
|
3209
|
+
* We account for those operations as source object accesses when calculating `days_since_last_access` for source object.
|
|
3210
|
+
*
|
|
3211
|
+
*/
|
|
3212
|
+
COPY_OBJECT: 4,
|
|
3213
|
+
/**
|
|
3214
|
+
* Upload part copy 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
|
+
UPLOAD_PART_COPY: 5,
|
|
3219
|
+
}, LastAccessConfiguration_Condition_Method_VALUE_COMMENTS);
|
|
3220
|
+
protoRegistry.registerEnum(LastAccessConfiguration_Condition_Method);
|
|
3161
3221
|
const Bucket_MESSAGE_DESCRIPTOR = {
|
|
3162
3222
|
type: "nebius.storage.v1.Bucket",
|
|
3163
3223
|
create: () => createBaseBucket(),
|
|
@@ -3345,6 +3405,7 @@ const BucketSpec_MESSAGE_DESCRIPTOR = {
|
|
|
3345
3405
|
"forceStorageClass": { pbName: "force_storage_class", jsonName: "forceStorageClass", scalarType: 8 },
|
|
3346
3406
|
"objectAuditLogging": { pbName: "object_audit_logging", jsonName: "objectAuditLogging", scalarType: 14, enumNames: ["OBJECT_AUDIT_LOGGING_UNSPECIFIED", "NONE", "MUTATE_ONLY", "ALL"] },
|
|
3347
3407
|
"bucketPolicy": { pbName: "bucket_policy", jsonName: "bucketPolicy", presence: true, message: () => BucketPolicy.$descriptor },
|
|
3408
|
+
"lastAccess": { pbName: "last_access", jsonName: "lastAccess", presence: true, message: () => LastAccessConfiguration.$descriptor },
|
|
3348
3409
|
"bucketType": { pbName: "bucket_type", oneof: true, immutableOneof: true, message: () => BucketSpec_bucketType_ONEOF_DESCRIPTOR },
|
|
3349
3410
|
},
|
|
3350
3411
|
};
|
|
@@ -3383,6 +3444,11 @@ export const BucketSpec = {
|
|
|
3383
3444
|
BucketPolicy.encode(message.bucketPolicy, w);
|
|
3384
3445
|
w.join();
|
|
3385
3446
|
}
|
|
3447
|
+
if (message.lastAccess !== undefined) {
|
|
3448
|
+
const w = writer.uint32(122).fork();
|
|
3449
|
+
LastAccessConfiguration.encode(message.lastAccess, w);
|
|
3450
|
+
w.join();
|
|
3451
|
+
}
|
|
3386
3452
|
if (message.bucketType?.$case === undefined) { /* noop */ }
|
|
3387
3453
|
else if (message.bucketType?.$case === "filesystemBucket") {
|
|
3388
3454
|
const w = writer.uint32(242).fork();
|
|
@@ -3452,6 +3518,12 @@ export const BucketSpec = {
|
|
|
3452
3518
|
message.bucketPolicy = BucketPolicy.decode(reader, reader.uint32(), message.bucketPolicy);
|
|
3453
3519
|
continue;
|
|
3454
3520
|
}
|
|
3521
|
+
case 15: {
|
|
3522
|
+
if (tag !== 122)
|
|
3523
|
+
break;
|
|
3524
|
+
message.lastAccess = LastAccessConfiguration.decode(reader, reader.uint32(), message.lastAccess);
|
|
3525
|
+
continue;
|
|
3526
|
+
}
|
|
3455
3527
|
case 30: {
|
|
3456
3528
|
if (tag !== 242)
|
|
3457
3529
|
break;
|
|
@@ -3506,6 +3578,9 @@ export const BucketSpec = {
|
|
|
3506
3578
|
bucketPolicy: isSet(object.bucketPolicy ?? object.bucket_policy)
|
|
3507
3579
|
? BucketPolicy.fromJSON(object.bucketPolicy ?? object.bucket_policy)
|
|
3508
3580
|
: undefined,
|
|
3581
|
+
lastAccess: isSet(object.lastAccess ?? object.last_access)
|
|
3582
|
+
? LastAccessConfiguration.fromJSON(object.lastAccess ?? object.last_access)
|
|
3583
|
+
: undefined,
|
|
3509
3584
|
bucketType: (() => {
|
|
3510
3585
|
if (isSet(object.filesystemBucket) || isSet(object.filesystem_bucket)) {
|
|
3511
3586
|
return {
|
|
@@ -3550,6 +3625,11 @@ export const BucketSpec = {
|
|
|
3550
3625
|
? BucketPolicy.toJSON(message.bucketPolicy, use)
|
|
3551
3626
|
: undefined;
|
|
3552
3627
|
}
|
|
3628
|
+
if (message.lastAccess !== undefined) {
|
|
3629
|
+
obj[pick("lastAccess", "last_access")] = message.lastAccess
|
|
3630
|
+
? LastAccessConfiguration.toJSON(message.lastAccess, use)
|
|
3631
|
+
: undefined;
|
|
3632
|
+
}
|
|
3553
3633
|
switch (message.bucketType?.$case) {
|
|
3554
3634
|
case "filesystemBucket": {
|
|
3555
3635
|
obj[pick("filesystemBucket", "filesystem_bucket")] = BucketSpec_FilesystemBucketType.toJSON(message.bucketType.filesystemBucket, use);
|
|
@@ -3588,6 +3668,9 @@ export const BucketSpec = {
|
|
|
3588
3668
|
message.bucketPolicy = (object.bucketPolicy !== undefined && object.bucketPolicy !== null)
|
|
3589
3669
|
? BucketPolicy.fromPartial(object.bucketPolicy)
|
|
3590
3670
|
: undefined;
|
|
3671
|
+
message.lastAccess = (object.lastAccess !== undefined && object.lastAccess !== null)
|
|
3672
|
+
? LastAccessConfiguration.fromPartial(object.lastAccess)
|
|
3673
|
+
: undefined;
|
|
3591
3674
|
switch (object.bucketType?.$case) {
|
|
3592
3675
|
case "filesystemBucket": {
|
|
3593
3676
|
if (object.bucketType.filesystemBucket !== undefined && object.bucketType.filesystemBucket !== null) {
|
|
@@ -3624,6 +3707,8 @@ function BucketSpecCustomInspect() {
|
|
|
3624
3707
|
parts.push("objectAuditLogging" + "=" + inspect(this.objectAuditLogging));
|
|
3625
3708
|
if (this.bucketPolicy !== undefined)
|
|
3626
3709
|
parts.push("bucketPolicy" + "=" + inspect(this.bucketPolicy));
|
|
3710
|
+
if (this.lastAccess !== undefined)
|
|
3711
|
+
parts.push("lastAccess" + "=" + inspect(this.lastAccess));
|
|
3627
3712
|
return `${this.$type}(${parts.join(", ")})`;
|
|
3628
3713
|
}
|
|
3629
3714
|
function BucketSpecCustomJson() {
|
|
@@ -3646,6 +3731,8 @@ function BucketSpecCustomJson() {
|
|
|
3646
3731
|
obj.objectAuditLogging = inspectJson(this.objectAuditLogging);
|
|
3647
3732
|
if (this.bucketPolicy !== undefined)
|
|
3648
3733
|
obj.bucketPolicy = inspectJson(this.bucketPolicy);
|
|
3734
|
+
if (this.lastAccess !== undefined)
|
|
3735
|
+
obj.lastAccess = inspectJson(this.lastAccess);
|
|
3649
3736
|
return obj;
|
|
3650
3737
|
}
|
|
3651
3738
|
function applyBucketSpecCustom(message) {
|
|
@@ -3664,6 +3751,7 @@ function createBaseBucketSpec() {
|
|
|
3664
3751
|
forceStorageClass: false,
|
|
3665
3752
|
objectAuditLogging: BucketSpec_ObjectAuditLogging.OBJECT_AUDIT_LOGGING_UNSPECIFIED,
|
|
3666
3753
|
bucketPolicy: undefined,
|
|
3754
|
+
lastAccess: undefined,
|
|
3667
3755
|
bucketType: undefined,
|
|
3668
3756
|
};
|
|
3669
3757
|
return applyBucketSpecCustom(message);
|
|
@@ -4234,6 +4322,282 @@ function createBaseBucketStatus() {
|
|
|
4234
4322
|
};
|
|
4235
4323
|
return applyBucketStatusCustom(message);
|
|
4236
4324
|
}
|
|
4325
|
+
const LastAccessConfiguration_MESSAGE_DESCRIPTOR = {
|
|
4326
|
+
type: "nebius.storage.v1.LastAccessConfiguration",
|
|
4327
|
+
create: () => createBaseLastAccessConfiguration(),
|
|
4328
|
+
fields: {
|
|
4329
|
+
"conditions": { pbName: "conditions", jsonName: "conditions", repeated: true, message: () => LastAccessConfiguration_Condition.$descriptor },
|
|
4330
|
+
},
|
|
4331
|
+
};
|
|
4332
|
+
/** Encodes, decodes, converts, and creates {@link LastAccessConfiguration} messages. */
|
|
4333
|
+
export const LastAccessConfiguration = {
|
|
4334
|
+
$type: "nebius.storage.v1.LastAccessConfiguration",
|
|
4335
|
+
$descriptor: LastAccessConfiguration_MESSAGE_DESCRIPTOR,
|
|
4336
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4337
|
+
for (const v of (message.conditions ?? [])) {
|
|
4338
|
+
const w = writer.uint32(10).fork();
|
|
4339
|
+
LastAccessConfiguration_Condition.encode(v, w);
|
|
4340
|
+
w.join();
|
|
4341
|
+
}
|
|
4342
|
+
if (message[unknownFieldsSymbol]) {
|
|
4343
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4344
|
+
}
|
|
4345
|
+
return writer;
|
|
4346
|
+
},
|
|
4347
|
+
decode(input, length, base) {
|
|
4348
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4349
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4350
|
+
const message = base ?? createBaseLastAccessConfiguration();
|
|
4351
|
+
let writer = undefined;
|
|
4352
|
+
if (message[unknownFieldsSymbol])
|
|
4353
|
+
writer = new BinaryWriter().raw(message[unknownFieldsSymbol]);
|
|
4354
|
+
while (reader.pos < end) {
|
|
4355
|
+
const tag = reader.uint32();
|
|
4356
|
+
switch (tag >>> 3) {
|
|
4357
|
+
case 1: {
|
|
4358
|
+
if (tag !== 10)
|
|
4359
|
+
break;
|
|
4360
|
+
message.conditions.push(LastAccessConfiguration_Condition.decode(reader, reader.uint32()));
|
|
4361
|
+
continue;
|
|
4362
|
+
}
|
|
4363
|
+
default:
|
|
4364
|
+
break;
|
|
4365
|
+
}
|
|
4366
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4367
|
+
break;
|
|
4368
|
+
}
|
|
4369
|
+
{
|
|
4370
|
+
if (!writer)
|
|
4371
|
+
writer = new BinaryWriter();
|
|
4372
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4373
|
+
writer.uint32(tag).raw(skipped);
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
if (writer) {
|
|
4377
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4378
|
+
}
|
|
4379
|
+
return message;
|
|
4380
|
+
},
|
|
4381
|
+
fromJSON(object) {
|
|
4382
|
+
return applyLastAccessConfigurationCustom({
|
|
4383
|
+
$type: "nebius.storage.v1.LastAccessConfiguration",
|
|
4384
|
+
conditions: globalThis.Array.isArray(object?.conditions ?? object?.conditions)
|
|
4385
|
+
? (object.conditions ?? object.conditions).map((e) => LastAccessConfiguration_Condition.fromJSON(e))
|
|
4386
|
+
: [],
|
|
4387
|
+
});
|
|
4388
|
+
},
|
|
4389
|
+
toJSON(message, use = "json") {
|
|
4390
|
+
const obj = {};
|
|
4391
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4392
|
+
if (message.conditions?.length) {
|
|
4393
|
+
obj[pick("conditions", "conditions")] = message.conditions.map((e) => e ? LastAccessConfiguration_Condition.toJSON(e, use) : undefined);
|
|
4394
|
+
}
|
|
4395
|
+
return obj;
|
|
4396
|
+
},
|
|
4397
|
+
create(base) {
|
|
4398
|
+
return LastAccessConfiguration.fromPartial(base ?? {});
|
|
4399
|
+
},
|
|
4400
|
+
fromPartial(object) {
|
|
4401
|
+
const message = createBaseLastAccessConfiguration();
|
|
4402
|
+
message.conditions = object.conditions?.map((e) => LastAccessConfiguration_Condition.fromPartial(e)) || [];
|
|
4403
|
+
for (const ext of protoRegistry.listExtensions("nebius.storage.v1.LastAccessConfiguration"))
|
|
4404
|
+
ext.fromPartial?.(message, object);
|
|
4405
|
+
return message;
|
|
4406
|
+
},
|
|
4407
|
+
};
|
|
4408
|
+
protoRegistry.registerMessage(LastAccessConfiguration);
|
|
4409
|
+
function LastAccessConfigurationCustomInspect() {
|
|
4410
|
+
const parts = [];
|
|
4411
|
+
if ((this.conditions?.length ?? 0) !== 0)
|
|
4412
|
+
parts.push("conditions" + "=" + inspect(this.conditions));
|
|
4413
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4414
|
+
}
|
|
4415
|
+
function LastAccessConfigurationCustomJson() {
|
|
4416
|
+
const obj = {
|
|
4417
|
+
type: this.$type,
|
|
4418
|
+
};
|
|
4419
|
+
if ((this.conditions?.length ?? 0) !== 0)
|
|
4420
|
+
obj.conditions = inspectJson(this.conditions);
|
|
4421
|
+
return obj;
|
|
4422
|
+
}
|
|
4423
|
+
function applyLastAccessConfigurationCustom(message) {
|
|
4424
|
+
message[custom] = LastAccessConfigurationCustomInspect;
|
|
4425
|
+
message[customJson] = LastAccessConfigurationCustomJson;
|
|
4426
|
+
return attachMessageDescriptor(message, LastAccessConfiguration.$descriptor);
|
|
4427
|
+
}
|
|
4428
|
+
function createBaseLastAccessConfiguration() {
|
|
4429
|
+
const message = {
|
|
4430
|
+
$type: "nebius.storage.v1.LastAccessConfiguration",
|
|
4431
|
+
conditions: [],
|
|
4432
|
+
};
|
|
4433
|
+
return applyLastAccessConfigurationCustom(message);
|
|
4434
|
+
}
|
|
4435
|
+
const LastAccessConfiguration_Condition_MESSAGE_DESCRIPTOR = {
|
|
4436
|
+
type: "nebius.storage.v1.LastAccessConfiguration.Condition",
|
|
4437
|
+
create: () => createBaseLastAccessConfiguration_Condition(),
|
|
4438
|
+
fields: {
|
|
4439
|
+
"type": { pbName: "type", jsonName: "type", scalarType: 14, enumNames: ["TYPE_UNSPECIFIED", "INCLUDE", "EXCLUDE"] },
|
|
4440
|
+
"methods": { pbName: "methods", jsonName: "methods", elementDefault: () => LastAccessConfiguration_Condition_Method.METHOD_UNSPECIFIED, scalarType: 14, enumNames: ["METHOD_UNSPECIFIED", "GET_OBJECT", "HEAD_OBJECT", "GET_OBJECT_TAGGING", "COPY_OBJECT", "UPLOAD_PART_COPY"], repeated: true },
|
|
4441
|
+
"userAgents": { pbName: "user_agents", jsonName: "userAgents", elementDefault: () => "", scalarType: 9, repeated: true },
|
|
4442
|
+
},
|
|
4443
|
+
};
|
|
4444
|
+
/** Encodes, decodes, converts, and creates {@link LastAccessConfiguration_Condition} messages. */
|
|
4445
|
+
export const LastAccessConfiguration_Condition = {
|
|
4446
|
+
$type: "nebius.storage.v1.LastAccessConfiguration.Condition",
|
|
4447
|
+
$descriptor: LastAccessConfiguration_Condition_MESSAGE_DESCRIPTOR,
|
|
4448
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4449
|
+
if ((message.type ?? LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) !== LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) {
|
|
4450
|
+
LastAccessConfiguration_Condition_Type.encodeField(writer, 1, message.type);
|
|
4451
|
+
}
|
|
4452
|
+
if (message.methods?.length) {
|
|
4453
|
+
const w = writer.uint32(18).fork();
|
|
4454
|
+
for (const v of message.methods)
|
|
4455
|
+
w.int32(v?.code | 0);
|
|
4456
|
+
w.join();
|
|
4457
|
+
}
|
|
4458
|
+
for (const v of (message.userAgents ?? [])) {
|
|
4459
|
+
writer.uint32(26).string(v);
|
|
4460
|
+
}
|
|
4461
|
+
if (message[unknownFieldsSymbol]) {
|
|
4462
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4463
|
+
}
|
|
4464
|
+
return writer;
|
|
4465
|
+
},
|
|
4466
|
+
decode(input, length, base) {
|
|
4467
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4468
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4469
|
+
const message = base ?? createBaseLastAccessConfiguration_Condition();
|
|
4470
|
+
let writer = undefined;
|
|
4471
|
+
if (message[unknownFieldsSymbol])
|
|
4472
|
+
writer = new BinaryWriter().raw(message[unknownFieldsSymbol]);
|
|
4473
|
+
while (reader.pos < end) {
|
|
4474
|
+
const tag = reader.uint32();
|
|
4475
|
+
switch (tag >>> 3) {
|
|
4476
|
+
case 1: {
|
|
4477
|
+
if (tag !== 8)
|
|
4478
|
+
break;
|
|
4479
|
+
message.type = LastAccessConfiguration_Condition_Type.fromNumber(reader.int32());
|
|
4480
|
+
continue;
|
|
4481
|
+
}
|
|
4482
|
+
case 2: {
|
|
4483
|
+
// packed or unpacked repeated enum
|
|
4484
|
+
if ((tag & 7) === 2) {
|
|
4485
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4486
|
+
while (reader.pos < end2) {
|
|
4487
|
+
message.methods.push(LastAccessConfiguration_Condition_Method.fromNumber(reader.int32()));
|
|
4488
|
+
}
|
|
4489
|
+
continue;
|
|
4490
|
+
}
|
|
4491
|
+
else if ((tag & 7) === 0) {
|
|
4492
|
+
message.methods.push(LastAccessConfiguration_Condition_Method.fromNumber(reader.int32()));
|
|
4493
|
+
continue;
|
|
4494
|
+
}
|
|
4495
|
+
break; // wrong wire type
|
|
4496
|
+
}
|
|
4497
|
+
case 3: {
|
|
4498
|
+
if (tag !== 26)
|
|
4499
|
+
break;
|
|
4500
|
+
message.userAgents.push(reader.string());
|
|
4501
|
+
continue;
|
|
4502
|
+
}
|
|
4503
|
+
default:
|
|
4504
|
+
break;
|
|
4505
|
+
}
|
|
4506
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4507
|
+
break;
|
|
4508
|
+
}
|
|
4509
|
+
{
|
|
4510
|
+
if (!writer)
|
|
4511
|
+
writer = new BinaryWriter();
|
|
4512
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4513
|
+
writer.uint32(tag).raw(skipped);
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
if (writer) {
|
|
4517
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4518
|
+
}
|
|
4519
|
+
return message;
|
|
4520
|
+
},
|
|
4521
|
+
fromJSON(object) {
|
|
4522
|
+
return applyLastAccessConfiguration_ConditionCustom({
|
|
4523
|
+
$type: "nebius.storage.v1.LastAccessConfiguration.Condition",
|
|
4524
|
+
type: isSet(object.type ?? object.type)
|
|
4525
|
+
? LastAccessConfiguration_Condition_Type.fromJSON(object.type ?? object.type)
|
|
4526
|
+
: LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED,
|
|
4527
|
+
methods: globalThis.Array.isArray(object?.methods ?? object?.methods)
|
|
4528
|
+
? (object.methods ?? object.methods).map((e) => LastAccessConfiguration_Condition_Method.fromJSON(e))
|
|
4529
|
+
: [],
|
|
4530
|
+
userAgents: globalThis.Array.isArray(object?.userAgents ?? object?.user_agents)
|
|
4531
|
+
? (object.userAgents ?? object.user_agents).map((e) => String(e))
|
|
4532
|
+
: [],
|
|
4533
|
+
});
|
|
4534
|
+
},
|
|
4535
|
+
toJSON(message, use = "json") {
|
|
4536
|
+
const obj = {};
|
|
4537
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4538
|
+
if ((message.type ?? LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) !== LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED) {
|
|
4539
|
+
obj[pick("type", "type")] = LastAccessConfiguration_Condition_Type.toJSON(message.type);
|
|
4540
|
+
}
|
|
4541
|
+
if (message.methods?.length) {
|
|
4542
|
+
obj[pick("methods", "methods")] = message.methods.map((e) => LastAccessConfiguration_Condition_Method.toJSON(e));
|
|
4543
|
+
}
|
|
4544
|
+
if (message.userAgents?.length) {
|
|
4545
|
+
obj[pick("userAgents", "user_agents")] = message.userAgents.map((e) => e);
|
|
4546
|
+
}
|
|
4547
|
+
return obj;
|
|
4548
|
+
},
|
|
4549
|
+
create(base) {
|
|
4550
|
+
return LastAccessConfiguration_Condition.fromPartial(base ?? {});
|
|
4551
|
+
},
|
|
4552
|
+
fromPartial(object) {
|
|
4553
|
+
const message = createBaseLastAccessConfiguration_Condition();
|
|
4554
|
+
message.type = (object.type !== undefined && object.type !== null)
|
|
4555
|
+
? LastAccessConfiguration_Condition_Type.fromJSON(object.type.code ?? object.type.name)
|
|
4556
|
+
: LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED;
|
|
4557
|
+
message.methods = object.methods?.map((e) => LastAccessConfiguration_Condition_Method.fromJSON(e.code ?? e.name)) || [];
|
|
4558
|
+
message.userAgents = object.userAgents?.map((e) => e) || [];
|
|
4559
|
+
for (const ext of protoRegistry.listExtensions("nebius.storage.v1.LastAccessConfiguration.Condition"))
|
|
4560
|
+
ext.fromPartial?.(message, object);
|
|
4561
|
+
return message;
|
|
4562
|
+
},
|
|
4563
|
+
};
|
|
4564
|
+
protoRegistry.registerMessage(LastAccessConfiguration_Condition);
|
|
4565
|
+
function LastAccessConfiguration_ConditionCustomInspect() {
|
|
4566
|
+
const parts = [];
|
|
4567
|
+
if (this.type !== undefined)
|
|
4568
|
+
parts.push("type" + "=" + inspect(this.type));
|
|
4569
|
+
if ((this.methods?.length ?? 0) !== 0)
|
|
4570
|
+
parts.push("methods" + "=" + inspect(this.methods));
|
|
4571
|
+
if ((this.userAgents?.length ?? 0) !== 0)
|
|
4572
|
+
parts.push("userAgents" + "=" + inspect(this.userAgents));
|
|
4573
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4574
|
+
}
|
|
4575
|
+
function LastAccessConfiguration_ConditionCustomJson() {
|
|
4576
|
+
const obj = {
|
|
4577
|
+
type: this.$type,
|
|
4578
|
+
};
|
|
4579
|
+
if (this.type !== undefined)
|
|
4580
|
+
obj.type = inspectJson(this.type);
|
|
4581
|
+
if ((this.methods?.length ?? 0) !== 0)
|
|
4582
|
+
obj.methods = inspectJson(this.methods);
|
|
4583
|
+
if ((this.userAgents?.length ?? 0) !== 0)
|
|
4584
|
+
obj.userAgents = inspectJson(this.userAgents);
|
|
4585
|
+
return obj;
|
|
4586
|
+
}
|
|
4587
|
+
function applyLastAccessConfiguration_ConditionCustom(message) {
|
|
4588
|
+
message[custom] = LastAccessConfiguration_ConditionCustomInspect;
|
|
4589
|
+
message[customJson] = LastAccessConfiguration_ConditionCustomJson;
|
|
4590
|
+
return attachMessageDescriptor(message, LastAccessConfiguration_Condition.$descriptor);
|
|
4591
|
+
}
|
|
4592
|
+
function createBaseLastAccessConfiguration_Condition() {
|
|
4593
|
+
const message = {
|
|
4594
|
+
$type: "nebius.storage.v1.LastAccessConfiguration.Condition",
|
|
4595
|
+
type: LastAccessConfiguration_Condition_Type.TYPE_UNSPECIFIED,
|
|
4596
|
+
methods: [],
|
|
4597
|
+
userAgents: [],
|
|
4598
|
+
};
|
|
4599
|
+
return applyLastAccessConfiguration_ConditionCustom(message);
|
|
4600
|
+
}
|
|
4237
4601
|
const CORSConfiguration_MESSAGE_DESCRIPTOR = {
|
|
4238
4602
|
type: "nebius.storage.v1.CORSConfiguration",
|
|
4239
4603
|
create: () => createBaseCORSConfiguration(),
|