@nebius/js-sdk 0.2.51 → 0.2.53
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/common/v1/index.d.ts +177 -0
- package/dist/cjs/api/nebius/common/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/common/v1/index.js +566 -1
- package/dist/cjs/api/nebius/common/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.d.ts +4 -1
- package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/registry/v1/index.d.ts +52 -1
- package/dist/cjs/api/nebius/registry/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/registry/v1/index.js +23 -0
- package/dist/cjs/api/nebius/registry/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/storage/v1/index.d.ts +578 -0
- package/dist/cjs/api/nebius/storage/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/storage/v1/index.js +1549 -2
- package/dist/cjs/api/nebius/storage/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/tunnel/v1/index.d.ts +35 -0
- package/dist/cjs/api/nebius/tunnel/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/tunnel/v1/index.js +153 -1
- package/dist/cjs/api/nebius/tunnel/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/common/v1/index.d.ts +177 -0
- package/dist/esm/api/nebius/common/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/common/v1/index.js +565 -0
- package/dist/esm/api/nebius/common/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.d.ts +4 -1
- package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/registry/v1/index.d.ts +52 -1
- package/dist/esm/api/nebius/registry/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/registry/v1/index.js +24 -1
- package/dist/esm/api/nebius/registry/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/storage/v1/index.d.ts +578 -0
- package/dist/esm/api/nebius/storage/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/storage/v1/index.js +1546 -0
- package/dist/esm/api/nebius/storage/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/tunnel/v1/index.d.ts +35 -0
- package/dist/esm/api/nebius/tunnel/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/tunnel/v1/index.js +152 -0
- package/dist/esm/api/nebius/tunnel/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
|
@@ -3746,6 +3746,1552 @@ function createBaseInsecureEndpoint() {
|
|
|
3746
3746
|
};
|
|
3747
3747
|
return applyInsecureEndpointCustom(message);
|
|
3748
3748
|
}
|
|
3749
|
+
const GetInventoryRequest_MESSAGE_DESCRIPTOR = {
|
|
3750
|
+
fields: {
|
|
3751
|
+
"id": { pbName: "id", scalarType: 9 },
|
|
3752
|
+
},
|
|
3753
|
+
};
|
|
3754
|
+
/** Encodes, decodes, converts, and creates {@link GetInventoryRequest} messages. */
|
|
3755
|
+
export const GetInventoryRequest = {
|
|
3756
|
+
$type: "nebius.storage.v1.GetInventoryRequest",
|
|
3757
|
+
$descriptor: GetInventoryRequest_MESSAGE_DESCRIPTOR,
|
|
3758
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3759
|
+
if (message.id !== "") {
|
|
3760
|
+
writer.uint32(10).string(message.id);
|
|
3761
|
+
}
|
|
3762
|
+
if (message[unknownFieldsSymbol]) {
|
|
3763
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3764
|
+
}
|
|
3765
|
+
return writer;
|
|
3766
|
+
},
|
|
3767
|
+
decode(input, length) {
|
|
3768
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3769
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3770
|
+
const message = createBaseGetInventoryRequest();
|
|
3771
|
+
let writer = undefined;
|
|
3772
|
+
while (reader.pos < end) {
|
|
3773
|
+
const tag = reader.uint32();
|
|
3774
|
+
switch (tag >>> 3) {
|
|
3775
|
+
case 1: {
|
|
3776
|
+
if (tag !== 10)
|
|
3777
|
+
break;
|
|
3778
|
+
message.id = reader.string();
|
|
3779
|
+
continue;
|
|
3780
|
+
}
|
|
3781
|
+
default:
|
|
3782
|
+
break;
|
|
3783
|
+
}
|
|
3784
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3785
|
+
break;
|
|
3786
|
+
}
|
|
3787
|
+
{
|
|
3788
|
+
if (!writer)
|
|
3789
|
+
writer = new BinaryWriter();
|
|
3790
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3791
|
+
writer.uint32(tag).raw(skipped);
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3794
|
+
if (writer) {
|
|
3795
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3796
|
+
}
|
|
3797
|
+
return message;
|
|
3798
|
+
},
|
|
3799
|
+
fromJSON(object) {
|
|
3800
|
+
return applyGetInventoryRequestCustom({
|
|
3801
|
+
$type: "nebius.storage.v1.GetInventoryRequest",
|
|
3802
|
+
id: isSet(object.id ?? object.id)
|
|
3803
|
+
? String(object.id ?? object.id)
|
|
3804
|
+
: "",
|
|
3805
|
+
});
|
|
3806
|
+
},
|
|
3807
|
+
toJSON(message, use = "json") {
|
|
3808
|
+
const obj = {};
|
|
3809
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3810
|
+
if (message.id !== "") {
|
|
3811
|
+
obj[pick("id", "id")] = message.id;
|
|
3812
|
+
}
|
|
3813
|
+
return obj;
|
|
3814
|
+
},
|
|
3815
|
+
create(base) {
|
|
3816
|
+
return GetInventoryRequest.fromPartial(base ?? {});
|
|
3817
|
+
},
|
|
3818
|
+
fromPartial(object) {
|
|
3819
|
+
const message = createBaseGetInventoryRequest();
|
|
3820
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
3821
|
+
? object.id
|
|
3822
|
+
: "";
|
|
3823
|
+
return message;
|
|
3824
|
+
},
|
|
3825
|
+
};
|
|
3826
|
+
protoRegistry.registerMessage(GetInventoryRequest);
|
|
3827
|
+
function GetInventoryRequestCustomInspect() {
|
|
3828
|
+
const parts = [];
|
|
3829
|
+
if (this.id !== "")
|
|
3830
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
3831
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3832
|
+
}
|
|
3833
|
+
function GetInventoryRequestCustomJson() {
|
|
3834
|
+
const obj = {
|
|
3835
|
+
type: this.$type,
|
|
3836
|
+
};
|
|
3837
|
+
if (this.id !== "")
|
|
3838
|
+
obj.id = inspectJson(this.id);
|
|
3839
|
+
return obj;
|
|
3840
|
+
}
|
|
3841
|
+
function applyGetInventoryRequestCustom(message) {
|
|
3842
|
+
message[custom] = GetInventoryRequestCustomInspect;
|
|
3843
|
+
message[customJson] = GetInventoryRequestCustomJson;
|
|
3844
|
+
return attachMessageDescriptor(message, GetInventoryRequest.$descriptor);
|
|
3845
|
+
}
|
|
3846
|
+
function createBaseGetInventoryRequest() {
|
|
3847
|
+
const message = {
|
|
3848
|
+
$type: "nebius.storage.v1.GetInventoryRequest",
|
|
3849
|
+
id: "",
|
|
3850
|
+
};
|
|
3851
|
+
return applyGetInventoryRequestCustom(message);
|
|
3852
|
+
}
|
|
3853
|
+
const ListInventoriesRequest_MESSAGE_DESCRIPTOR = {
|
|
3854
|
+
fields: {
|
|
3855
|
+
"parentId": { pbName: "parent_id", scalarType: 9 },
|
|
3856
|
+
"pageSize": { pbName: "page_size", scalarType: 3 },
|
|
3857
|
+
"pageToken": { pbName: "page_token", scalarType: 9 },
|
|
3858
|
+
},
|
|
3859
|
+
};
|
|
3860
|
+
/** Encodes, decodes, converts, and creates {@link ListInventoriesRequest} messages. */
|
|
3861
|
+
export const ListInventoriesRequest = {
|
|
3862
|
+
$type: "nebius.storage.v1.ListInventoriesRequest",
|
|
3863
|
+
$descriptor: ListInventoriesRequest_MESSAGE_DESCRIPTOR,
|
|
3864
|
+
encode(message, writer = new BinaryWriter()) {
|
|
3865
|
+
if (message.parentId !== "") {
|
|
3866
|
+
writer.uint32(10).string(message.parentId);
|
|
3867
|
+
}
|
|
3868
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
3869
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
3870
|
+
}
|
|
3871
|
+
if (message.pageToken !== "") {
|
|
3872
|
+
writer.uint32(26).string(message.pageToken);
|
|
3873
|
+
}
|
|
3874
|
+
if (message[unknownFieldsSymbol]) {
|
|
3875
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
3876
|
+
}
|
|
3877
|
+
return writer;
|
|
3878
|
+
},
|
|
3879
|
+
decode(input, length) {
|
|
3880
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3881
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3882
|
+
const message = createBaseListInventoriesRequest();
|
|
3883
|
+
let writer = undefined;
|
|
3884
|
+
while (reader.pos < end) {
|
|
3885
|
+
const tag = reader.uint32();
|
|
3886
|
+
switch (tag >>> 3) {
|
|
3887
|
+
case 1: {
|
|
3888
|
+
if (tag !== 10)
|
|
3889
|
+
break;
|
|
3890
|
+
message.parentId = reader.string();
|
|
3891
|
+
continue;
|
|
3892
|
+
}
|
|
3893
|
+
case 2: {
|
|
3894
|
+
if (tag !== 16)
|
|
3895
|
+
break;
|
|
3896
|
+
message.pageSize = Long.fromValue(reader.int64());
|
|
3897
|
+
continue;
|
|
3898
|
+
}
|
|
3899
|
+
case 3: {
|
|
3900
|
+
if (tag !== 26)
|
|
3901
|
+
break;
|
|
3902
|
+
message.pageToken = reader.string();
|
|
3903
|
+
continue;
|
|
3904
|
+
}
|
|
3905
|
+
default:
|
|
3906
|
+
break;
|
|
3907
|
+
}
|
|
3908
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3909
|
+
break;
|
|
3910
|
+
}
|
|
3911
|
+
{
|
|
3912
|
+
if (!writer)
|
|
3913
|
+
writer = new BinaryWriter();
|
|
3914
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
3915
|
+
writer.uint32(tag).raw(skipped);
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
if (writer) {
|
|
3919
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
3920
|
+
}
|
|
3921
|
+
return message;
|
|
3922
|
+
},
|
|
3923
|
+
fromJSON(object) {
|
|
3924
|
+
return applyListInventoriesRequestCustom({
|
|
3925
|
+
$type: "nebius.storage.v1.ListInventoriesRequest",
|
|
3926
|
+
parentId: isSet(object.parentId ?? object.parent_id)
|
|
3927
|
+
? String(object.parentId ?? object.parent_id)
|
|
3928
|
+
: "",
|
|
3929
|
+
pageSize: isSet(object.pageSize ?? object.page_size)
|
|
3930
|
+
? Long.fromValue(object.pageSize ?? object.page_size)
|
|
3931
|
+
: Long.ZERO,
|
|
3932
|
+
pageToken: isSet(object.pageToken ?? object.page_token)
|
|
3933
|
+
? String(object.pageToken ?? object.page_token)
|
|
3934
|
+
: "",
|
|
3935
|
+
});
|
|
3936
|
+
},
|
|
3937
|
+
toJSON(message, use = "json") {
|
|
3938
|
+
const obj = {};
|
|
3939
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
3940
|
+
if (message.parentId !== "") {
|
|
3941
|
+
obj[pick("parentId", "parent_id")] = message.parentId;
|
|
3942
|
+
}
|
|
3943
|
+
if (!message.pageSize?.isZero?.()) {
|
|
3944
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || Long.ZERO).toString();
|
|
3945
|
+
}
|
|
3946
|
+
if (message.pageToken !== "") {
|
|
3947
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
3948
|
+
}
|
|
3949
|
+
return obj;
|
|
3950
|
+
},
|
|
3951
|
+
create(base) {
|
|
3952
|
+
return ListInventoriesRequest.fromPartial(base ?? {});
|
|
3953
|
+
},
|
|
3954
|
+
fromPartial(object) {
|
|
3955
|
+
const message = createBaseListInventoriesRequest();
|
|
3956
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
3957
|
+
? object.parentId
|
|
3958
|
+
: "";
|
|
3959
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
3960
|
+
? Long.fromValue(object.pageSize)
|
|
3961
|
+
: Long.ZERO;
|
|
3962
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
3963
|
+
? object.pageToken
|
|
3964
|
+
: "";
|
|
3965
|
+
return message;
|
|
3966
|
+
},
|
|
3967
|
+
};
|
|
3968
|
+
protoRegistry.registerMessage(ListInventoriesRequest);
|
|
3969
|
+
function ListInventoriesRequestCustomInspect() {
|
|
3970
|
+
const parts = [];
|
|
3971
|
+
if (this.parentId !== "")
|
|
3972
|
+
parts.push("parentId" + "=" + inspect(this.parentId));
|
|
3973
|
+
if (!this.pageSize?.isZero?.())
|
|
3974
|
+
parts.push("pageSize" + "=" + inspect(this.pageSize));
|
|
3975
|
+
if (this.pageToken !== "")
|
|
3976
|
+
parts.push("pageToken" + "=" + inspect(this.pageToken));
|
|
3977
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
3978
|
+
}
|
|
3979
|
+
function ListInventoriesRequestCustomJson() {
|
|
3980
|
+
const obj = {
|
|
3981
|
+
type: this.$type,
|
|
3982
|
+
};
|
|
3983
|
+
if (this.parentId !== "")
|
|
3984
|
+
obj.parentId = inspectJson(this.parentId);
|
|
3985
|
+
if (!this.pageSize?.isZero?.())
|
|
3986
|
+
obj.pageSize = inspectJson(this.pageSize);
|
|
3987
|
+
if (this.pageToken !== "")
|
|
3988
|
+
obj.pageToken = inspectJson(this.pageToken);
|
|
3989
|
+
return obj;
|
|
3990
|
+
}
|
|
3991
|
+
function applyListInventoriesRequestCustom(message) {
|
|
3992
|
+
message[custom] = ListInventoriesRequestCustomInspect;
|
|
3993
|
+
message[customJson] = ListInventoriesRequestCustomJson;
|
|
3994
|
+
return attachMessageDescriptor(message, ListInventoriesRequest.$descriptor);
|
|
3995
|
+
}
|
|
3996
|
+
function createBaseListInventoriesRequest() {
|
|
3997
|
+
const message = {
|
|
3998
|
+
$type: "nebius.storage.v1.ListInventoriesRequest",
|
|
3999
|
+
parentId: "",
|
|
4000
|
+
pageSize: Long.ZERO,
|
|
4001
|
+
pageToken: "",
|
|
4002
|
+
};
|
|
4003
|
+
return applyListInventoriesRequestCustom(message);
|
|
4004
|
+
}
|
|
4005
|
+
const ListInventoriesResponse_MESSAGE_DESCRIPTOR = {
|
|
4006
|
+
fields: {
|
|
4007
|
+
"items": { pbName: "items", repeated: true, message: () => Inventory.$descriptor },
|
|
4008
|
+
"nextPageToken": { pbName: "next_page_token", scalarType: 9 },
|
|
4009
|
+
},
|
|
4010
|
+
};
|
|
4011
|
+
/** Encodes, decodes, converts, and creates {@link ListInventoriesResponse} messages. */
|
|
4012
|
+
export const ListInventoriesResponse = {
|
|
4013
|
+
$type: "nebius.storage.v1.ListInventoriesResponse",
|
|
4014
|
+
$descriptor: ListInventoriesResponse_MESSAGE_DESCRIPTOR,
|
|
4015
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4016
|
+
for (const v of (message.items ?? [])) {
|
|
4017
|
+
const w = writer.uint32(10).fork();
|
|
4018
|
+
Inventory.encode(v, w);
|
|
4019
|
+
w.join();
|
|
4020
|
+
}
|
|
4021
|
+
if (message.nextPageToken !== "") {
|
|
4022
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
4023
|
+
}
|
|
4024
|
+
if (message[unknownFieldsSymbol]) {
|
|
4025
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4026
|
+
}
|
|
4027
|
+
return writer;
|
|
4028
|
+
},
|
|
4029
|
+
decode(input, length) {
|
|
4030
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4031
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4032
|
+
const message = createBaseListInventoriesResponse();
|
|
4033
|
+
let writer = undefined;
|
|
4034
|
+
while (reader.pos < end) {
|
|
4035
|
+
const tag = reader.uint32();
|
|
4036
|
+
switch (tag >>> 3) {
|
|
4037
|
+
case 1: {
|
|
4038
|
+
if (tag !== 10)
|
|
4039
|
+
break;
|
|
4040
|
+
message.items.push(Inventory.decode(reader, reader.uint32()));
|
|
4041
|
+
continue;
|
|
4042
|
+
}
|
|
4043
|
+
case 2: {
|
|
4044
|
+
if (tag !== 18)
|
|
4045
|
+
break;
|
|
4046
|
+
message.nextPageToken = reader.string();
|
|
4047
|
+
continue;
|
|
4048
|
+
}
|
|
4049
|
+
default:
|
|
4050
|
+
break;
|
|
4051
|
+
}
|
|
4052
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4053
|
+
break;
|
|
4054
|
+
}
|
|
4055
|
+
{
|
|
4056
|
+
if (!writer)
|
|
4057
|
+
writer = new BinaryWriter();
|
|
4058
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4059
|
+
writer.uint32(tag).raw(skipped);
|
|
4060
|
+
}
|
|
4061
|
+
}
|
|
4062
|
+
if (writer) {
|
|
4063
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4064
|
+
}
|
|
4065
|
+
return message;
|
|
4066
|
+
},
|
|
4067
|
+
fromJSON(object) {
|
|
4068
|
+
return applyListInventoriesResponseCustom({
|
|
4069
|
+
$type: "nebius.storage.v1.ListInventoriesResponse",
|
|
4070
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
4071
|
+
? (object.items ?? object.items).map((e) => Inventory.fromJSON(e))
|
|
4072
|
+
: [],
|
|
4073
|
+
nextPageToken: isSet(object.nextPageToken ?? object.next_page_token)
|
|
4074
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
4075
|
+
: "",
|
|
4076
|
+
});
|
|
4077
|
+
},
|
|
4078
|
+
toJSON(message, use = "json") {
|
|
4079
|
+
const obj = {};
|
|
4080
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4081
|
+
if (message.items?.length) {
|
|
4082
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? Inventory.toJSON(e, use) : undefined);
|
|
4083
|
+
}
|
|
4084
|
+
if (message.nextPageToken !== "") {
|
|
4085
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
4086
|
+
}
|
|
4087
|
+
return obj;
|
|
4088
|
+
},
|
|
4089
|
+
create(base) {
|
|
4090
|
+
return ListInventoriesResponse.fromPartial(base ?? {});
|
|
4091
|
+
},
|
|
4092
|
+
fromPartial(object) {
|
|
4093
|
+
const message = createBaseListInventoriesResponse();
|
|
4094
|
+
message.items = object.items?.map((e) => Inventory.fromPartial(e)) || [];
|
|
4095
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
4096
|
+
? object.nextPageToken
|
|
4097
|
+
: "";
|
|
4098
|
+
return message;
|
|
4099
|
+
},
|
|
4100
|
+
};
|
|
4101
|
+
protoRegistry.registerMessage(ListInventoriesResponse);
|
|
4102
|
+
function ListInventoriesResponseCustomInspect() {
|
|
4103
|
+
const parts = [];
|
|
4104
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
4105
|
+
parts.push("items" + "=" + inspect(this.items));
|
|
4106
|
+
if (this.nextPageToken !== "")
|
|
4107
|
+
parts.push("nextPageToken" + "=" + inspect(this.nextPageToken));
|
|
4108
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4109
|
+
}
|
|
4110
|
+
function ListInventoriesResponseCustomJson() {
|
|
4111
|
+
const obj = {
|
|
4112
|
+
type: this.$type,
|
|
4113
|
+
};
|
|
4114
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
4115
|
+
obj.items = inspectJson(this.items);
|
|
4116
|
+
if (this.nextPageToken !== "")
|
|
4117
|
+
obj.nextPageToken = inspectJson(this.nextPageToken);
|
|
4118
|
+
return obj;
|
|
4119
|
+
}
|
|
4120
|
+
function applyListInventoriesResponseCustom(message) {
|
|
4121
|
+
message[custom] = ListInventoriesResponseCustomInspect;
|
|
4122
|
+
message[customJson] = ListInventoriesResponseCustomJson;
|
|
4123
|
+
return attachMessageDescriptor(message, ListInventoriesResponse.$descriptor);
|
|
4124
|
+
}
|
|
4125
|
+
function createBaseListInventoriesResponse() {
|
|
4126
|
+
const message = {
|
|
4127
|
+
$type: "nebius.storage.v1.ListInventoriesResponse",
|
|
4128
|
+
items: [],
|
|
4129
|
+
nextPageToken: "",
|
|
4130
|
+
};
|
|
4131
|
+
return applyListInventoriesResponseCustom(message);
|
|
4132
|
+
}
|
|
4133
|
+
const CreateInventoryRequest_MESSAGE_DESCRIPTOR = {
|
|
4134
|
+
fields: {
|
|
4135
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
4136
|
+
"spec": { pbName: "spec", message: () => InventorySpec.$descriptor },
|
|
4137
|
+
},
|
|
4138
|
+
};
|
|
4139
|
+
/** Encodes, decodes, converts, and creates {@link CreateInventoryRequest} messages. */
|
|
4140
|
+
export const CreateInventoryRequest = {
|
|
4141
|
+
$type: "nebius.storage.v1.CreateInventoryRequest",
|
|
4142
|
+
$descriptor: CreateInventoryRequest_MESSAGE_DESCRIPTOR,
|
|
4143
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4144
|
+
if (message.metadata !== undefined) {
|
|
4145
|
+
const w = writer.uint32(10).fork();
|
|
4146
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
4147
|
+
w.join();
|
|
4148
|
+
}
|
|
4149
|
+
if (message.spec !== undefined) {
|
|
4150
|
+
const w = writer.uint32(18).fork();
|
|
4151
|
+
InventorySpec.encode(message.spec, w);
|
|
4152
|
+
w.join();
|
|
4153
|
+
}
|
|
4154
|
+
if (message[unknownFieldsSymbol]) {
|
|
4155
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4156
|
+
}
|
|
4157
|
+
return writer;
|
|
4158
|
+
},
|
|
4159
|
+
decode(input, length) {
|
|
4160
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4161
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4162
|
+
const message = createBaseCreateInventoryRequest();
|
|
4163
|
+
let writer = undefined;
|
|
4164
|
+
while (reader.pos < end) {
|
|
4165
|
+
const tag = reader.uint32();
|
|
4166
|
+
switch (tag >>> 3) {
|
|
4167
|
+
case 1: {
|
|
4168
|
+
if (tag !== 10)
|
|
4169
|
+
break;
|
|
4170
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
4171
|
+
continue;
|
|
4172
|
+
}
|
|
4173
|
+
case 2: {
|
|
4174
|
+
if (tag !== 18)
|
|
4175
|
+
break;
|
|
4176
|
+
message.spec = InventorySpec.decode(reader, reader.uint32());
|
|
4177
|
+
continue;
|
|
4178
|
+
}
|
|
4179
|
+
default:
|
|
4180
|
+
break;
|
|
4181
|
+
}
|
|
4182
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4183
|
+
break;
|
|
4184
|
+
}
|
|
4185
|
+
{
|
|
4186
|
+
if (!writer)
|
|
4187
|
+
writer = new BinaryWriter();
|
|
4188
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4189
|
+
writer.uint32(tag).raw(skipped);
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
if (writer) {
|
|
4193
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4194
|
+
}
|
|
4195
|
+
return message;
|
|
4196
|
+
},
|
|
4197
|
+
fromJSON(object) {
|
|
4198
|
+
return applyCreateInventoryRequestCustom({
|
|
4199
|
+
$type: "nebius.storage.v1.CreateInventoryRequest",
|
|
4200
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
4201
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
4202
|
+
: undefined,
|
|
4203
|
+
spec: isSet(object.spec ?? object.spec)
|
|
4204
|
+
? InventorySpec.fromJSON(object.spec ?? object.spec)
|
|
4205
|
+
: undefined,
|
|
4206
|
+
});
|
|
4207
|
+
},
|
|
4208
|
+
toJSON(message, use = "json") {
|
|
4209
|
+
const obj = {};
|
|
4210
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4211
|
+
if (message.metadata !== undefined) {
|
|
4212
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
4213
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
4214
|
+
: undefined;
|
|
4215
|
+
}
|
|
4216
|
+
if (message.spec !== undefined) {
|
|
4217
|
+
obj[pick("spec", "spec")] = message.spec
|
|
4218
|
+
? InventorySpec.toJSON(message.spec, use)
|
|
4219
|
+
: undefined;
|
|
4220
|
+
}
|
|
4221
|
+
return obj;
|
|
4222
|
+
},
|
|
4223
|
+
create(base) {
|
|
4224
|
+
return CreateInventoryRequest.fromPartial(base ?? {});
|
|
4225
|
+
},
|
|
4226
|
+
fromPartial(object) {
|
|
4227
|
+
const message = createBaseCreateInventoryRequest();
|
|
4228
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
4229
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
4230
|
+
: undefined;
|
|
4231
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
4232
|
+
? InventorySpec.fromPartial(object.spec)
|
|
4233
|
+
: undefined;
|
|
4234
|
+
return message;
|
|
4235
|
+
},
|
|
4236
|
+
};
|
|
4237
|
+
protoRegistry.registerMessage(CreateInventoryRequest);
|
|
4238
|
+
function CreateInventoryRequestCustomInspect() {
|
|
4239
|
+
const parts = [];
|
|
4240
|
+
if (this.metadata !== undefined)
|
|
4241
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
4242
|
+
if (this.spec !== undefined)
|
|
4243
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
4244
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4245
|
+
}
|
|
4246
|
+
function CreateInventoryRequestCustomJson() {
|
|
4247
|
+
const obj = {
|
|
4248
|
+
type: this.$type,
|
|
4249
|
+
};
|
|
4250
|
+
if (this.metadata !== undefined)
|
|
4251
|
+
obj.metadata = inspectJson(this.metadata);
|
|
4252
|
+
if (this.spec !== undefined)
|
|
4253
|
+
obj.spec = inspectJson(this.spec);
|
|
4254
|
+
return obj;
|
|
4255
|
+
}
|
|
4256
|
+
function applyCreateInventoryRequestCustom(message) {
|
|
4257
|
+
message[custom] = CreateInventoryRequestCustomInspect;
|
|
4258
|
+
message[customJson] = CreateInventoryRequestCustomJson;
|
|
4259
|
+
return attachMessageDescriptor(message, CreateInventoryRequest.$descriptor);
|
|
4260
|
+
}
|
|
4261
|
+
function createBaseCreateInventoryRequest() {
|
|
4262
|
+
const message = {
|
|
4263
|
+
$type: "nebius.storage.v1.CreateInventoryRequest",
|
|
4264
|
+
metadata: undefined,
|
|
4265
|
+
spec: undefined,
|
|
4266
|
+
};
|
|
4267
|
+
return applyCreateInventoryRequestCustom(message);
|
|
4268
|
+
}
|
|
4269
|
+
const UpdateInventoryRequest_MESSAGE_DESCRIPTOR = {
|
|
4270
|
+
fields: {
|
|
4271
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
4272
|
+
"spec": { pbName: "spec", message: () => InventorySpec.$descriptor },
|
|
4273
|
+
},
|
|
4274
|
+
};
|
|
4275
|
+
/** Encodes, decodes, converts, and creates {@link UpdateInventoryRequest} messages. */
|
|
4276
|
+
export const UpdateInventoryRequest = {
|
|
4277
|
+
$type: "nebius.storage.v1.UpdateInventoryRequest",
|
|
4278
|
+
$descriptor: UpdateInventoryRequest_MESSAGE_DESCRIPTOR,
|
|
4279
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4280
|
+
if (message.metadata !== undefined) {
|
|
4281
|
+
const w = writer.uint32(10).fork();
|
|
4282
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
4283
|
+
w.join();
|
|
4284
|
+
}
|
|
4285
|
+
if (message.spec !== undefined) {
|
|
4286
|
+
const w = writer.uint32(18).fork();
|
|
4287
|
+
InventorySpec.encode(message.spec, w);
|
|
4288
|
+
w.join();
|
|
4289
|
+
}
|
|
4290
|
+
if (message[unknownFieldsSymbol]) {
|
|
4291
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4292
|
+
}
|
|
4293
|
+
return writer;
|
|
4294
|
+
},
|
|
4295
|
+
decode(input, length) {
|
|
4296
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4297
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4298
|
+
const message = createBaseUpdateInventoryRequest();
|
|
4299
|
+
let writer = undefined;
|
|
4300
|
+
while (reader.pos < end) {
|
|
4301
|
+
const tag = reader.uint32();
|
|
4302
|
+
switch (tag >>> 3) {
|
|
4303
|
+
case 1: {
|
|
4304
|
+
if (tag !== 10)
|
|
4305
|
+
break;
|
|
4306
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
4307
|
+
continue;
|
|
4308
|
+
}
|
|
4309
|
+
case 2: {
|
|
4310
|
+
if (tag !== 18)
|
|
4311
|
+
break;
|
|
4312
|
+
message.spec = InventorySpec.decode(reader, reader.uint32());
|
|
4313
|
+
continue;
|
|
4314
|
+
}
|
|
4315
|
+
default:
|
|
4316
|
+
break;
|
|
4317
|
+
}
|
|
4318
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4319
|
+
break;
|
|
4320
|
+
}
|
|
4321
|
+
{
|
|
4322
|
+
if (!writer)
|
|
4323
|
+
writer = new BinaryWriter();
|
|
4324
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4325
|
+
writer.uint32(tag).raw(skipped);
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
if (writer) {
|
|
4329
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4330
|
+
}
|
|
4331
|
+
return message;
|
|
4332
|
+
},
|
|
4333
|
+
fromJSON(object) {
|
|
4334
|
+
return applyUpdateInventoryRequestCustom({
|
|
4335
|
+
$type: "nebius.storage.v1.UpdateInventoryRequest",
|
|
4336
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
4337
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
4338
|
+
: undefined,
|
|
4339
|
+
spec: isSet(object.spec ?? object.spec)
|
|
4340
|
+
? InventorySpec.fromJSON(object.spec ?? object.spec)
|
|
4341
|
+
: undefined,
|
|
4342
|
+
});
|
|
4343
|
+
},
|
|
4344
|
+
toJSON(message, use = "json") {
|
|
4345
|
+
const obj = {};
|
|
4346
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4347
|
+
if (message.metadata !== undefined) {
|
|
4348
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
4349
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
4350
|
+
: undefined;
|
|
4351
|
+
}
|
|
4352
|
+
if (message.spec !== undefined) {
|
|
4353
|
+
obj[pick("spec", "spec")] = message.spec
|
|
4354
|
+
? InventorySpec.toJSON(message.spec, use)
|
|
4355
|
+
: undefined;
|
|
4356
|
+
}
|
|
4357
|
+
return obj;
|
|
4358
|
+
},
|
|
4359
|
+
create(base) {
|
|
4360
|
+
return UpdateInventoryRequest.fromPartial(base ?? {});
|
|
4361
|
+
},
|
|
4362
|
+
fromPartial(object) {
|
|
4363
|
+
const message = createBaseUpdateInventoryRequest();
|
|
4364
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
4365
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
4366
|
+
: undefined;
|
|
4367
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
4368
|
+
? InventorySpec.fromPartial(object.spec)
|
|
4369
|
+
: undefined;
|
|
4370
|
+
return message;
|
|
4371
|
+
},
|
|
4372
|
+
};
|
|
4373
|
+
protoRegistry.registerMessage(UpdateInventoryRequest);
|
|
4374
|
+
function UpdateInventoryRequestCustomInspect() {
|
|
4375
|
+
const parts = [];
|
|
4376
|
+
if (this.metadata !== undefined)
|
|
4377
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
4378
|
+
if (this.spec !== undefined)
|
|
4379
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
4380
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4381
|
+
}
|
|
4382
|
+
function UpdateInventoryRequestCustomJson() {
|
|
4383
|
+
const obj = {
|
|
4384
|
+
type: this.$type,
|
|
4385
|
+
};
|
|
4386
|
+
if (this.metadata !== undefined)
|
|
4387
|
+
obj.metadata = inspectJson(this.metadata);
|
|
4388
|
+
if (this.spec !== undefined)
|
|
4389
|
+
obj.spec = inspectJson(this.spec);
|
|
4390
|
+
return obj;
|
|
4391
|
+
}
|
|
4392
|
+
function applyUpdateInventoryRequestCustom(message) {
|
|
4393
|
+
message[custom] = UpdateInventoryRequestCustomInspect;
|
|
4394
|
+
message[customJson] = UpdateInventoryRequestCustomJson;
|
|
4395
|
+
return attachMessageDescriptor(message, UpdateInventoryRequest.$descriptor);
|
|
4396
|
+
}
|
|
4397
|
+
function createBaseUpdateInventoryRequest() {
|
|
4398
|
+
const message = {
|
|
4399
|
+
$type: "nebius.storage.v1.UpdateInventoryRequest",
|
|
4400
|
+
metadata: undefined,
|
|
4401
|
+
spec: undefined,
|
|
4402
|
+
};
|
|
4403
|
+
return applyUpdateInventoryRequestCustom(message);
|
|
4404
|
+
}
|
|
4405
|
+
const DeleteInventoryRequest_MESSAGE_DESCRIPTOR = {
|
|
4406
|
+
fields: {
|
|
4407
|
+
"id": { pbName: "id", scalarType: 9 },
|
|
4408
|
+
},
|
|
4409
|
+
};
|
|
4410
|
+
/** Encodes, decodes, converts, and creates {@link DeleteInventoryRequest} messages. */
|
|
4411
|
+
export const DeleteInventoryRequest = {
|
|
4412
|
+
$type: "nebius.storage.v1.DeleteInventoryRequest",
|
|
4413
|
+
$descriptor: DeleteInventoryRequest_MESSAGE_DESCRIPTOR,
|
|
4414
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4415
|
+
if (message.id !== "") {
|
|
4416
|
+
writer.uint32(10).string(message.id);
|
|
4417
|
+
}
|
|
4418
|
+
if (message[unknownFieldsSymbol]) {
|
|
4419
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4420
|
+
}
|
|
4421
|
+
return writer;
|
|
4422
|
+
},
|
|
4423
|
+
decode(input, length) {
|
|
4424
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4425
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4426
|
+
const message = createBaseDeleteInventoryRequest();
|
|
4427
|
+
let writer = undefined;
|
|
4428
|
+
while (reader.pos < end) {
|
|
4429
|
+
const tag = reader.uint32();
|
|
4430
|
+
switch (tag >>> 3) {
|
|
4431
|
+
case 1: {
|
|
4432
|
+
if (tag !== 10)
|
|
4433
|
+
break;
|
|
4434
|
+
message.id = reader.string();
|
|
4435
|
+
continue;
|
|
4436
|
+
}
|
|
4437
|
+
default:
|
|
4438
|
+
break;
|
|
4439
|
+
}
|
|
4440
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4441
|
+
break;
|
|
4442
|
+
}
|
|
4443
|
+
{
|
|
4444
|
+
if (!writer)
|
|
4445
|
+
writer = new BinaryWriter();
|
|
4446
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4447
|
+
writer.uint32(tag).raw(skipped);
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4450
|
+
if (writer) {
|
|
4451
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4452
|
+
}
|
|
4453
|
+
return message;
|
|
4454
|
+
},
|
|
4455
|
+
fromJSON(object) {
|
|
4456
|
+
return applyDeleteInventoryRequestCustom({
|
|
4457
|
+
$type: "nebius.storage.v1.DeleteInventoryRequest",
|
|
4458
|
+
id: isSet(object.id ?? object.id)
|
|
4459
|
+
? String(object.id ?? object.id)
|
|
4460
|
+
: "",
|
|
4461
|
+
});
|
|
4462
|
+
},
|
|
4463
|
+
toJSON(message, use = "json") {
|
|
4464
|
+
const obj = {};
|
|
4465
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4466
|
+
if (message.id !== "") {
|
|
4467
|
+
obj[pick("id", "id")] = message.id;
|
|
4468
|
+
}
|
|
4469
|
+
return obj;
|
|
4470
|
+
},
|
|
4471
|
+
create(base) {
|
|
4472
|
+
return DeleteInventoryRequest.fromPartial(base ?? {});
|
|
4473
|
+
},
|
|
4474
|
+
fromPartial(object) {
|
|
4475
|
+
const message = createBaseDeleteInventoryRequest();
|
|
4476
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
4477
|
+
? object.id
|
|
4478
|
+
: "";
|
|
4479
|
+
return message;
|
|
4480
|
+
},
|
|
4481
|
+
};
|
|
4482
|
+
protoRegistry.registerMessage(DeleteInventoryRequest);
|
|
4483
|
+
function DeleteInventoryRequestCustomInspect() {
|
|
4484
|
+
const parts = [];
|
|
4485
|
+
if (this.id !== "")
|
|
4486
|
+
parts.push("id" + "=" + inspect(this.id));
|
|
4487
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4488
|
+
}
|
|
4489
|
+
function DeleteInventoryRequestCustomJson() {
|
|
4490
|
+
const obj = {
|
|
4491
|
+
type: this.$type,
|
|
4492
|
+
};
|
|
4493
|
+
if (this.id !== "")
|
|
4494
|
+
obj.id = inspectJson(this.id);
|
|
4495
|
+
return obj;
|
|
4496
|
+
}
|
|
4497
|
+
function applyDeleteInventoryRequestCustom(message) {
|
|
4498
|
+
message[custom] = DeleteInventoryRequestCustomInspect;
|
|
4499
|
+
message[customJson] = DeleteInventoryRequestCustomJson;
|
|
4500
|
+
return attachMessageDescriptor(message, DeleteInventoryRequest.$descriptor);
|
|
4501
|
+
}
|
|
4502
|
+
function createBaseDeleteInventoryRequest() {
|
|
4503
|
+
const message = {
|
|
4504
|
+
$type: "nebius.storage.v1.DeleteInventoryRequest",
|
|
4505
|
+
id: "",
|
|
4506
|
+
};
|
|
4507
|
+
return applyDeleteInventoryRequestCustom(message);
|
|
4508
|
+
}
|
|
4509
|
+
/**
|
|
4510
|
+
* Describes the gRPC methods for the `nebius.storage.v1.InventoryService` service.
|
|
4511
|
+
*/
|
|
4512
|
+
export const InventoryServiceServiceDescription = {
|
|
4513
|
+
get: {
|
|
4514
|
+
path: "/nebius.storage.v1.InventoryService/Get",
|
|
4515
|
+
requestStream: false,
|
|
4516
|
+
responseStream: false,
|
|
4517
|
+
requestSerialize: (value) => Buffer.from(GetInventoryRequest.encode(value).finish()),
|
|
4518
|
+
requestDescriptor: () => GetInventoryRequest.$descriptor,
|
|
4519
|
+
sendResetMask: false,
|
|
4520
|
+
requestDeserialize: (value) => GetInventoryRequest.decode(value),
|
|
4521
|
+
responseSerialize: (value) => Buffer.from(Inventory.encode(value).finish()),
|
|
4522
|
+
responseDeserialize: (value) => Inventory.decode(value),
|
|
4523
|
+
},
|
|
4524
|
+
getByName: {
|
|
4525
|
+
path: "/nebius.storage.v1.InventoryService/GetByName",
|
|
4526
|
+
requestStream: false,
|
|
4527
|
+
responseStream: false,
|
|
4528
|
+
requestSerialize: (value) => Buffer.from(GetByNameRequest.encode(value).finish()),
|
|
4529
|
+
requestDescriptor: () => GetByNameRequest.$descriptor,
|
|
4530
|
+
sendResetMask: false,
|
|
4531
|
+
requestDeserialize: (value) => GetByNameRequest.decode(value),
|
|
4532
|
+
responseSerialize: (value) => Buffer.from(Inventory.encode(value).finish()),
|
|
4533
|
+
responseDeserialize: (value) => Inventory.decode(value),
|
|
4534
|
+
},
|
|
4535
|
+
list: {
|
|
4536
|
+
path: "/nebius.storage.v1.InventoryService/List",
|
|
4537
|
+
requestStream: false,
|
|
4538
|
+
responseStream: false,
|
|
4539
|
+
requestSerialize: (value) => Buffer.from(ListInventoriesRequest.encode(value).finish()),
|
|
4540
|
+
requestDescriptor: () => ListInventoriesRequest.$descriptor,
|
|
4541
|
+
sendResetMask: false,
|
|
4542
|
+
requestDeserialize: (value) => ListInventoriesRequest.decode(value),
|
|
4543
|
+
responseSerialize: (value) => Buffer.from(ListInventoriesResponse.encode(value).finish()),
|
|
4544
|
+
responseDeserialize: (value) => ListInventoriesResponse.decode(value),
|
|
4545
|
+
},
|
|
4546
|
+
create: {
|
|
4547
|
+
path: "/nebius.storage.v1.InventoryService/Create",
|
|
4548
|
+
requestStream: false,
|
|
4549
|
+
responseStream: false,
|
|
4550
|
+
requestSerialize: (value) => Buffer.from(CreateInventoryRequest.encode(value).finish()),
|
|
4551
|
+
requestDescriptor: () => CreateInventoryRequest.$descriptor,
|
|
4552
|
+
sendResetMask: false,
|
|
4553
|
+
requestDeserialize: (value) => CreateInventoryRequest.decode(value),
|
|
4554
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
4555
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
4556
|
+
},
|
|
4557
|
+
update: {
|
|
4558
|
+
path: "/nebius.storage.v1.InventoryService/Update",
|
|
4559
|
+
requestStream: false,
|
|
4560
|
+
responseStream: false,
|
|
4561
|
+
requestSerialize: (value) => Buffer.from(UpdateInventoryRequest.encode(value).finish()),
|
|
4562
|
+
requestDescriptor: () => UpdateInventoryRequest.$descriptor,
|
|
4563
|
+
sendResetMask: true,
|
|
4564
|
+
requestDeserialize: (value) => UpdateInventoryRequest.decode(value),
|
|
4565
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
4566
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
4567
|
+
},
|
|
4568
|
+
delete: {
|
|
4569
|
+
path: "/nebius.storage.v1.InventoryService/Delete",
|
|
4570
|
+
requestStream: false,
|
|
4571
|
+
responseStream: false,
|
|
4572
|
+
requestSerialize: (value) => Buffer.from(DeleteInventoryRequest.encode(value).finish()),
|
|
4573
|
+
requestDescriptor: () => DeleteInventoryRequest.$descriptor,
|
|
4574
|
+
sendResetMask: false,
|
|
4575
|
+
requestDeserialize: (value) => DeleteInventoryRequest.decode(value),
|
|
4576
|
+
responseSerialize: (value) => Buffer.from(Operation.encode(value).finish()),
|
|
4577
|
+
responseDeserialize: (value) => Operation.decode(value),
|
|
4578
|
+
},
|
|
4579
|
+
};
|
|
4580
|
+
/**
|
|
4581
|
+
* Creates low-level gRPC clients for the `nebius.storage.v1.InventoryService` service.
|
|
4582
|
+
*/
|
|
4583
|
+
export const InventoryServiceBaseClient = makeGenericClientConstructor(InventoryServiceServiceDescription, "nebius.storage.v1.InventoryService");
|
|
4584
|
+
/**
|
|
4585
|
+
* Calls the `nebius.storage.v1.InventoryService` service through the Nebius SDK.
|
|
4586
|
+
*/
|
|
4587
|
+
export class InventoryService {
|
|
4588
|
+
sdk;
|
|
4589
|
+
$type = "nebius.storage.v1.InventoryService";
|
|
4590
|
+
addr;
|
|
4591
|
+
spec;
|
|
4592
|
+
apiServiceName = "cpl.storage";
|
|
4593
|
+
/** Creates a client that uses the SDK service address. */
|
|
4594
|
+
constructor(sdk) {
|
|
4595
|
+
this.sdk = sdk;
|
|
4596
|
+
const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
|
|
4597
|
+
this.addr = addr;
|
|
4598
|
+
this.spec = InventoryServiceServiceDescription;
|
|
4599
|
+
}
|
|
4600
|
+
/** Returns the operation service for this service address. */
|
|
4601
|
+
getOperationService() {
|
|
4602
|
+
return new OperationService(this.sdk, this.addr);
|
|
4603
|
+
}
|
|
4604
|
+
/**
|
|
4605
|
+
* Calls the `Get` RPC.
|
|
4606
|
+
*/
|
|
4607
|
+
get(...args) {
|
|
4608
|
+
const spec = this.spec.get;
|
|
4609
|
+
const request = args[0];
|
|
4610
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4611
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4612
|
+
const deserialize = spec.responseDeserialize;
|
|
4613
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4614
|
+
}
|
|
4615
|
+
/**
|
|
4616
|
+
* Calls the `GetByName` RPC.
|
|
4617
|
+
*/
|
|
4618
|
+
getByName(...args) {
|
|
4619
|
+
const spec = this.spec.getByName;
|
|
4620
|
+
const request = args[0];
|
|
4621
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4622
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4623
|
+
const deserialize = spec.responseDeserialize;
|
|
4624
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4625
|
+
}
|
|
4626
|
+
/**
|
|
4627
|
+
* Calls the `List` RPC.
|
|
4628
|
+
*/
|
|
4629
|
+
list(...args) {
|
|
4630
|
+
const spec = this.spec.list;
|
|
4631
|
+
const request = args[0];
|
|
4632
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4633
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4634
|
+
const deserialize = spec.responseDeserialize;
|
|
4635
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4636
|
+
}
|
|
4637
|
+
/**
|
|
4638
|
+
* Calls the `Create` RPC.
|
|
4639
|
+
*/
|
|
4640
|
+
create(...args) {
|
|
4641
|
+
const spec = this.spec.create;
|
|
4642
|
+
const request = args[0];
|
|
4643
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4644
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4645
|
+
const deserialize = (value) => {
|
|
4646
|
+
const resp = spec.responseDeserialize(value);
|
|
4647
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
4648
|
+
};
|
|
4649
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4650
|
+
}
|
|
4651
|
+
/**
|
|
4652
|
+
* Calls the `Update` RPC.
|
|
4653
|
+
*/
|
|
4654
|
+
update(...args) {
|
|
4655
|
+
const spec = this.spec.update;
|
|
4656
|
+
const request = args[0];
|
|
4657
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4658
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4659
|
+
const deserialize = (value) => {
|
|
4660
|
+
const resp = spec.responseDeserialize(value);
|
|
4661
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
4662
|
+
};
|
|
4663
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4664
|
+
}
|
|
4665
|
+
/**
|
|
4666
|
+
* Calls the `Delete` RPC.
|
|
4667
|
+
*/
|
|
4668
|
+
delete(...args) {
|
|
4669
|
+
const spec = this.spec.delete;
|
|
4670
|
+
const request = args[0];
|
|
4671
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
4672
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
4673
|
+
const deserialize = (value) => {
|
|
4674
|
+
const resp = spec.responseDeserialize(value);
|
|
4675
|
+
return new OperationWrapper(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
4676
|
+
};
|
|
4677
|
+
return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
const InventorySpec_OutputFormat_VALUE_COMMENTS = {
|
|
4681
|
+
CSV_GZIP: " CSV compressed with GZIP.\n",
|
|
4682
|
+
PARQUET_SNAPPY: " Parquet compressed with Snappy.\n",
|
|
4683
|
+
};
|
|
4684
|
+
/** Converts and creates {@link InventorySpec_OutputFormat} values. */
|
|
4685
|
+
export const InventorySpec_OutputFormat = createEnum("nebius.storage.v1.InventorySpec.OutputFormat", {
|
|
4686
|
+
/**
|
|
4687
|
+
* Represents the `OUTPUT_FORMAT_UNSPECIFIED` protobuf enum value.
|
|
4688
|
+
*/
|
|
4689
|
+
OUTPUT_FORMAT_UNSPECIFIED: 0,
|
|
4690
|
+
/**
|
|
4691
|
+
* CSV compressed with GZIP.
|
|
4692
|
+
*
|
|
4693
|
+
*/
|
|
4694
|
+
CSV_GZIP: 1,
|
|
4695
|
+
/**
|
|
4696
|
+
* Parquet compressed with Snappy.
|
|
4697
|
+
*
|
|
4698
|
+
*/
|
|
4699
|
+
PARQUET_SNAPPY: 2,
|
|
4700
|
+
}, InventorySpec_OutputFormat_VALUE_COMMENTS);
|
|
4701
|
+
protoRegistry.registerEnum(InventorySpec_OutputFormat);
|
|
4702
|
+
const InventorySpec_OptionalField_VALUE_COMMENTS = {
|
|
4703
|
+
LAST_ACCESS: " Timestamp of the last access.\n",
|
|
4704
|
+
CHECKSUM_ALGORITHMS: " Checksum algorithms used.\n",
|
|
4705
|
+
INTELLIGENT_TIER: " Current intelligent tier (for Intelligent Storage Class).\n",
|
|
4706
|
+
IS_MULTIPART_UPLOAD: " True for multipart uploads, false for simple objects.\n",
|
|
4707
|
+
LIFECYCLE_EXPIRATION: " Timestamp of lifecycle expiration.\n",
|
|
4708
|
+
TAGS: " Object tags.\n",
|
|
4709
|
+
};
|
|
4710
|
+
/** Converts and creates {@link InventorySpec_OptionalField} values. */
|
|
4711
|
+
export const InventorySpec_OptionalField = createEnum("nebius.storage.v1.InventorySpec.OptionalField", {
|
|
4712
|
+
/**
|
|
4713
|
+
* Represents the `OPTIONAL_FIELD_UNSPECIFIED` protobuf enum value.
|
|
4714
|
+
*/
|
|
4715
|
+
OPTIONAL_FIELD_UNSPECIFIED: 0,
|
|
4716
|
+
/**
|
|
4717
|
+
* Timestamp of the last access.
|
|
4718
|
+
*
|
|
4719
|
+
*/
|
|
4720
|
+
LAST_ACCESS: 1,
|
|
4721
|
+
/**
|
|
4722
|
+
* Checksum algorithms used.
|
|
4723
|
+
*
|
|
4724
|
+
*/
|
|
4725
|
+
CHECKSUM_ALGORITHMS: 2,
|
|
4726
|
+
/**
|
|
4727
|
+
* Current intelligent tier (for Intelligent Storage Class).
|
|
4728
|
+
*
|
|
4729
|
+
*/
|
|
4730
|
+
INTELLIGENT_TIER: 3,
|
|
4731
|
+
/**
|
|
4732
|
+
* True for multipart uploads, false for simple objects.
|
|
4733
|
+
*
|
|
4734
|
+
*/
|
|
4735
|
+
IS_MULTIPART_UPLOAD: 4,
|
|
4736
|
+
/**
|
|
4737
|
+
* Timestamp of lifecycle expiration.
|
|
4738
|
+
*
|
|
4739
|
+
*/
|
|
4740
|
+
LIFECYCLE_EXPIRATION: 5,
|
|
4741
|
+
/**
|
|
4742
|
+
* Object tags.
|
|
4743
|
+
*
|
|
4744
|
+
*/
|
|
4745
|
+
TAGS: 6,
|
|
4746
|
+
}, InventorySpec_OptionalField_VALUE_COMMENTS);
|
|
4747
|
+
protoRegistry.registerEnum(InventorySpec_OptionalField);
|
|
4748
|
+
const InventorySpec_Schedule_VALUE_COMMENTS = {
|
|
4749
|
+
DAILY: " Run once a day.\n",
|
|
4750
|
+
WEEKLY: " Run once a week.\n",
|
|
4751
|
+
};
|
|
4752
|
+
/** Converts and creates {@link InventorySpec_Schedule} values. */
|
|
4753
|
+
export const InventorySpec_Schedule = createEnum("nebius.storage.v1.InventorySpec.Schedule", {
|
|
4754
|
+
/**
|
|
4755
|
+
* Represents the `SCHEDULE_UNSPECIFIED` protobuf enum value.
|
|
4756
|
+
*/
|
|
4757
|
+
SCHEDULE_UNSPECIFIED: 0,
|
|
4758
|
+
/**
|
|
4759
|
+
* Run once a day.
|
|
4760
|
+
*
|
|
4761
|
+
*/
|
|
4762
|
+
DAILY: 1,
|
|
4763
|
+
/**
|
|
4764
|
+
* Run once a week.
|
|
4765
|
+
*
|
|
4766
|
+
*/
|
|
4767
|
+
WEEKLY: 2,
|
|
4768
|
+
}, InventorySpec_Schedule_VALUE_COMMENTS);
|
|
4769
|
+
protoRegistry.registerEnum(InventorySpec_Schedule);
|
|
4770
|
+
const Inventory_MESSAGE_DESCRIPTOR = {
|
|
4771
|
+
fields: {
|
|
4772
|
+
"metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
|
|
4773
|
+
"spec": { pbName: "spec", message: () => InventorySpec.$descriptor },
|
|
4774
|
+
"status": { pbName: "status", message: () => InventoryStatus.$descriptor },
|
|
4775
|
+
},
|
|
4776
|
+
};
|
|
4777
|
+
/** Encodes, decodes, converts, and creates {@link Inventory} messages. */
|
|
4778
|
+
export const Inventory = {
|
|
4779
|
+
$type: "nebius.storage.v1.Inventory",
|
|
4780
|
+
$descriptor: Inventory_MESSAGE_DESCRIPTOR,
|
|
4781
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4782
|
+
if (message.metadata !== undefined) {
|
|
4783
|
+
const w = writer.uint32(10).fork();
|
|
4784
|
+
ResourceMetadata.encode(message.metadata, w);
|
|
4785
|
+
w.join();
|
|
4786
|
+
}
|
|
4787
|
+
if (message.spec !== undefined) {
|
|
4788
|
+
const w = writer.uint32(18).fork();
|
|
4789
|
+
InventorySpec.encode(message.spec, w);
|
|
4790
|
+
w.join();
|
|
4791
|
+
}
|
|
4792
|
+
if (message.status !== undefined) {
|
|
4793
|
+
const w = writer.uint32(26).fork();
|
|
4794
|
+
InventoryStatus.encode(message.status, w);
|
|
4795
|
+
w.join();
|
|
4796
|
+
}
|
|
4797
|
+
if (message[unknownFieldsSymbol]) {
|
|
4798
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4799
|
+
}
|
|
4800
|
+
return writer;
|
|
4801
|
+
},
|
|
4802
|
+
decode(input, length) {
|
|
4803
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4804
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4805
|
+
const message = createBaseInventory();
|
|
4806
|
+
let writer = undefined;
|
|
4807
|
+
while (reader.pos < end) {
|
|
4808
|
+
const tag = reader.uint32();
|
|
4809
|
+
switch (tag >>> 3) {
|
|
4810
|
+
case 1: {
|
|
4811
|
+
if (tag !== 10)
|
|
4812
|
+
break;
|
|
4813
|
+
message.metadata = ResourceMetadata.decode(reader, reader.uint32());
|
|
4814
|
+
continue;
|
|
4815
|
+
}
|
|
4816
|
+
case 2: {
|
|
4817
|
+
if (tag !== 18)
|
|
4818
|
+
break;
|
|
4819
|
+
message.spec = InventorySpec.decode(reader, reader.uint32());
|
|
4820
|
+
continue;
|
|
4821
|
+
}
|
|
4822
|
+
case 3: {
|
|
4823
|
+
if (tag !== 26)
|
|
4824
|
+
break;
|
|
4825
|
+
message.status = InventoryStatus.decode(reader, reader.uint32());
|
|
4826
|
+
continue;
|
|
4827
|
+
}
|
|
4828
|
+
default:
|
|
4829
|
+
break;
|
|
4830
|
+
}
|
|
4831
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4832
|
+
break;
|
|
4833
|
+
}
|
|
4834
|
+
{
|
|
4835
|
+
if (!writer)
|
|
4836
|
+
writer = new BinaryWriter();
|
|
4837
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
4838
|
+
writer.uint32(tag).raw(skipped);
|
|
4839
|
+
}
|
|
4840
|
+
}
|
|
4841
|
+
if (writer) {
|
|
4842
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
4843
|
+
}
|
|
4844
|
+
return message;
|
|
4845
|
+
},
|
|
4846
|
+
fromJSON(object) {
|
|
4847
|
+
return applyInventoryCustom({
|
|
4848
|
+
$type: "nebius.storage.v1.Inventory",
|
|
4849
|
+
metadata: isSet(object.metadata ?? object.metadata)
|
|
4850
|
+
? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
4851
|
+
: undefined,
|
|
4852
|
+
spec: isSet(object.spec ?? object.spec)
|
|
4853
|
+
? InventorySpec.fromJSON(object.spec ?? object.spec)
|
|
4854
|
+
: undefined,
|
|
4855
|
+
status: isSet(object.status ?? object.status)
|
|
4856
|
+
? InventoryStatus.fromJSON(object.status ?? object.status)
|
|
4857
|
+
: undefined,
|
|
4858
|
+
});
|
|
4859
|
+
},
|
|
4860
|
+
toJSON(message, use = "json") {
|
|
4861
|
+
const obj = {};
|
|
4862
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
4863
|
+
if (message.metadata !== undefined) {
|
|
4864
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
4865
|
+
? ResourceMetadata.toJSON(message.metadata, use)
|
|
4866
|
+
: undefined;
|
|
4867
|
+
}
|
|
4868
|
+
if (message.spec !== undefined) {
|
|
4869
|
+
obj[pick("spec", "spec")] = message.spec
|
|
4870
|
+
? InventorySpec.toJSON(message.spec, use)
|
|
4871
|
+
: undefined;
|
|
4872
|
+
}
|
|
4873
|
+
if (message.status !== undefined) {
|
|
4874
|
+
obj[pick("status", "status")] = message.status
|
|
4875
|
+
? InventoryStatus.toJSON(message.status, use)
|
|
4876
|
+
: undefined;
|
|
4877
|
+
}
|
|
4878
|
+
return obj;
|
|
4879
|
+
},
|
|
4880
|
+
create(base) {
|
|
4881
|
+
return Inventory.fromPartial(base ?? {});
|
|
4882
|
+
},
|
|
4883
|
+
fromPartial(object) {
|
|
4884
|
+
const message = createBaseInventory();
|
|
4885
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
4886
|
+
? ResourceMetadata.fromPartial(object.metadata)
|
|
4887
|
+
: undefined;
|
|
4888
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
4889
|
+
? InventorySpec.fromPartial(object.spec)
|
|
4890
|
+
: undefined;
|
|
4891
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
4892
|
+
? InventoryStatus.fromPartial(object.status)
|
|
4893
|
+
: undefined;
|
|
4894
|
+
return message;
|
|
4895
|
+
},
|
|
4896
|
+
};
|
|
4897
|
+
protoRegistry.registerMessage(Inventory);
|
|
4898
|
+
function InventoryCustomInspect() {
|
|
4899
|
+
const parts = [];
|
|
4900
|
+
if (this.metadata !== undefined)
|
|
4901
|
+
parts.push("metadata" + "=" + inspect(this.metadata));
|
|
4902
|
+
if (this.spec !== undefined)
|
|
4903
|
+
parts.push("spec" + "=" + inspect(this.spec));
|
|
4904
|
+
if (this.status !== undefined)
|
|
4905
|
+
parts.push("status" + "=" + inspect(this.status));
|
|
4906
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
4907
|
+
}
|
|
4908
|
+
function InventoryCustomJson() {
|
|
4909
|
+
const obj = {
|
|
4910
|
+
type: this.$type,
|
|
4911
|
+
};
|
|
4912
|
+
if (this.metadata !== undefined)
|
|
4913
|
+
obj.metadata = inspectJson(this.metadata);
|
|
4914
|
+
if (this.spec !== undefined)
|
|
4915
|
+
obj.spec = inspectJson(this.spec);
|
|
4916
|
+
if (this.status !== undefined)
|
|
4917
|
+
obj.status = inspectJson(this.status);
|
|
4918
|
+
return obj;
|
|
4919
|
+
}
|
|
4920
|
+
function applyInventoryCustom(message) {
|
|
4921
|
+
message[custom] = InventoryCustomInspect;
|
|
4922
|
+
message[customJson] = InventoryCustomJson;
|
|
4923
|
+
return attachMessageDescriptor(message, Inventory.$descriptor);
|
|
4924
|
+
}
|
|
4925
|
+
function createBaseInventory() {
|
|
4926
|
+
const message = {
|
|
4927
|
+
$type: "nebius.storage.v1.Inventory",
|
|
4928
|
+
metadata: undefined,
|
|
4929
|
+
spec: undefined,
|
|
4930
|
+
status: undefined,
|
|
4931
|
+
};
|
|
4932
|
+
return applyInventoryCustom(message);
|
|
4933
|
+
}
|
|
4934
|
+
const InventorySpec_MESSAGE_DESCRIPTOR = {
|
|
4935
|
+
fields: {
|
|
4936
|
+
"enabled": { pbName: "enabled", scalarType: 8 },
|
|
4937
|
+
"sourcePrefix": { pbName: "source_prefix", scalarType: 9 },
|
|
4938
|
+
"destinationBucketId": { pbName: "destination_bucket_id", scalarType: 9 },
|
|
4939
|
+
"destinationPrefix": { pbName: "destination_prefix", scalarType: 9 },
|
|
4940
|
+
"outputFormat": { pbName: "output_format", scalarType: 14 },
|
|
4941
|
+
"noncurrentVersions": { pbName: "noncurrent_versions", scalarType: 8 },
|
|
4942
|
+
"optionalFields": { pbName: "optional_fields", scalarType: 14, repeated: true },
|
|
4943
|
+
"schedule": { pbName: "schedule", scalarType: 14 },
|
|
4944
|
+
},
|
|
4945
|
+
};
|
|
4946
|
+
/** Encodes, decodes, converts, and creates {@link InventorySpec} messages. */
|
|
4947
|
+
export const InventorySpec = {
|
|
4948
|
+
$type: "nebius.storage.v1.InventorySpec",
|
|
4949
|
+
$descriptor: InventorySpec_MESSAGE_DESCRIPTOR,
|
|
4950
|
+
encode(message, writer = new BinaryWriter()) {
|
|
4951
|
+
if (message.enabled === true) {
|
|
4952
|
+
writer.uint32(8).bool(message.enabled);
|
|
4953
|
+
}
|
|
4954
|
+
if (message.sourcePrefix !== "") {
|
|
4955
|
+
writer.uint32(18).string(message.sourcePrefix);
|
|
4956
|
+
}
|
|
4957
|
+
if (message.destinationBucketId !== "") {
|
|
4958
|
+
writer.uint32(26).string(message.destinationBucketId);
|
|
4959
|
+
}
|
|
4960
|
+
if (message.destinationPrefix !== "") {
|
|
4961
|
+
writer.uint32(34).string(message.destinationPrefix);
|
|
4962
|
+
}
|
|
4963
|
+
if ((message.outputFormat ?? InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED) !== InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED) {
|
|
4964
|
+
InventorySpec_OutputFormat.encodeField(writer, 5, message.outputFormat);
|
|
4965
|
+
}
|
|
4966
|
+
if (message.noncurrentVersions === true) {
|
|
4967
|
+
writer.uint32(48).bool(message.noncurrentVersions);
|
|
4968
|
+
}
|
|
4969
|
+
if (message.optionalFields?.length) {
|
|
4970
|
+
const w = writer.uint32(58).fork();
|
|
4971
|
+
for (const v of message.optionalFields)
|
|
4972
|
+
w.int32(v?.code | 0);
|
|
4973
|
+
w.join();
|
|
4974
|
+
}
|
|
4975
|
+
if ((message.schedule ?? InventorySpec_Schedule.SCHEDULE_UNSPECIFIED) !== InventorySpec_Schedule.SCHEDULE_UNSPECIFIED) {
|
|
4976
|
+
InventorySpec_Schedule.encodeField(writer, 8, message.schedule);
|
|
4977
|
+
}
|
|
4978
|
+
if (message[unknownFieldsSymbol]) {
|
|
4979
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
4980
|
+
}
|
|
4981
|
+
return writer;
|
|
4982
|
+
},
|
|
4983
|
+
decode(input, length) {
|
|
4984
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
4985
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
4986
|
+
const message = createBaseInventorySpec();
|
|
4987
|
+
let writer = undefined;
|
|
4988
|
+
while (reader.pos < end) {
|
|
4989
|
+
const tag = reader.uint32();
|
|
4990
|
+
switch (tag >>> 3) {
|
|
4991
|
+
case 1: {
|
|
4992
|
+
if (tag !== 8)
|
|
4993
|
+
break;
|
|
4994
|
+
message.enabled = reader.bool();
|
|
4995
|
+
continue;
|
|
4996
|
+
}
|
|
4997
|
+
case 2: {
|
|
4998
|
+
if (tag !== 18)
|
|
4999
|
+
break;
|
|
5000
|
+
message.sourcePrefix = reader.string();
|
|
5001
|
+
continue;
|
|
5002
|
+
}
|
|
5003
|
+
case 3: {
|
|
5004
|
+
if (tag !== 26)
|
|
5005
|
+
break;
|
|
5006
|
+
message.destinationBucketId = reader.string();
|
|
5007
|
+
continue;
|
|
5008
|
+
}
|
|
5009
|
+
case 4: {
|
|
5010
|
+
if (tag !== 34)
|
|
5011
|
+
break;
|
|
5012
|
+
message.destinationPrefix = reader.string();
|
|
5013
|
+
continue;
|
|
5014
|
+
}
|
|
5015
|
+
case 5: {
|
|
5016
|
+
if (tag !== 40)
|
|
5017
|
+
break;
|
|
5018
|
+
message.outputFormat = InventorySpec_OutputFormat.fromNumber(reader.int32());
|
|
5019
|
+
continue;
|
|
5020
|
+
}
|
|
5021
|
+
case 6: {
|
|
5022
|
+
if (tag !== 48)
|
|
5023
|
+
break;
|
|
5024
|
+
message.noncurrentVersions = reader.bool();
|
|
5025
|
+
continue;
|
|
5026
|
+
}
|
|
5027
|
+
case 7: {
|
|
5028
|
+
// packed or unpacked repeated enum
|
|
5029
|
+
if ((tag & 7) === 2) {
|
|
5030
|
+
const end2 = reader.uint32() + reader.pos;
|
|
5031
|
+
while (reader.pos < end2) {
|
|
5032
|
+
message.optionalFields.push(InventorySpec_OptionalField.fromNumber(reader.int32()));
|
|
5033
|
+
}
|
|
5034
|
+
continue;
|
|
5035
|
+
}
|
|
5036
|
+
else if ((tag & 7) === 0) {
|
|
5037
|
+
message.optionalFields.push(InventorySpec_OptionalField.fromNumber(reader.int32()));
|
|
5038
|
+
continue;
|
|
5039
|
+
}
|
|
5040
|
+
break; // wrong wire type
|
|
5041
|
+
}
|
|
5042
|
+
case 8: {
|
|
5043
|
+
if (tag !== 64)
|
|
5044
|
+
break;
|
|
5045
|
+
message.schedule = InventorySpec_Schedule.fromNumber(reader.int32());
|
|
5046
|
+
continue;
|
|
5047
|
+
}
|
|
5048
|
+
default:
|
|
5049
|
+
break;
|
|
5050
|
+
}
|
|
5051
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5052
|
+
break;
|
|
5053
|
+
}
|
|
5054
|
+
{
|
|
5055
|
+
if (!writer)
|
|
5056
|
+
writer = new BinaryWriter();
|
|
5057
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
5058
|
+
writer.uint32(tag).raw(skipped);
|
|
5059
|
+
}
|
|
5060
|
+
}
|
|
5061
|
+
if (writer) {
|
|
5062
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
5063
|
+
}
|
|
5064
|
+
return message;
|
|
5065
|
+
},
|
|
5066
|
+
fromJSON(object) {
|
|
5067
|
+
return applyInventorySpecCustom({
|
|
5068
|
+
$type: "nebius.storage.v1.InventorySpec",
|
|
5069
|
+
enabled: isSet(object.enabled ?? object.enabled)
|
|
5070
|
+
? Boolean(object.enabled ?? object.enabled)
|
|
5071
|
+
: false,
|
|
5072
|
+
sourcePrefix: isSet(object.sourcePrefix ?? object.source_prefix)
|
|
5073
|
+
? String(object.sourcePrefix ?? object.source_prefix)
|
|
5074
|
+
: "",
|
|
5075
|
+
destinationBucketId: isSet(object.destinationBucketId ?? object.destination_bucket_id)
|
|
5076
|
+
? String(object.destinationBucketId ?? object.destination_bucket_id)
|
|
5077
|
+
: "",
|
|
5078
|
+
destinationPrefix: isSet(object.destinationPrefix ?? object.destination_prefix)
|
|
5079
|
+
? String(object.destinationPrefix ?? object.destination_prefix)
|
|
5080
|
+
: "",
|
|
5081
|
+
outputFormat: isSet(object.outputFormat ?? object.output_format)
|
|
5082
|
+
? InventorySpec_OutputFormat.fromJSON(object.outputFormat ?? object.output_format)
|
|
5083
|
+
: InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED,
|
|
5084
|
+
noncurrentVersions: isSet(object.noncurrentVersions ?? object.noncurrent_versions)
|
|
5085
|
+
? Boolean(object.noncurrentVersions ?? object.noncurrent_versions)
|
|
5086
|
+
: false,
|
|
5087
|
+
optionalFields: globalThis.Array.isArray(object?.optionalFields ?? object?.optional_fields)
|
|
5088
|
+
? (object.optionalFields ?? object.optional_fields).map((e) => InventorySpec_OptionalField.fromJSON(e))
|
|
5089
|
+
: [],
|
|
5090
|
+
schedule: isSet(object.schedule ?? object.schedule)
|
|
5091
|
+
? InventorySpec_Schedule.fromJSON(object.schedule ?? object.schedule)
|
|
5092
|
+
: InventorySpec_Schedule.SCHEDULE_UNSPECIFIED,
|
|
5093
|
+
});
|
|
5094
|
+
},
|
|
5095
|
+
toJSON(message, use = "json") {
|
|
5096
|
+
const obj = {};
|
|
5097
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
5098
|
+
if (message.enabled === true) {
|
|
5099
|
+
obj[pick("enabled", "enabled")] = message.enabled;
|
|
5100
|
+
}
|
|
5101
|
+
if (message.sourcePrefix !== "") {
|
|
5102
|
+
obj[pick("sourcePrefix", "source_prefix")] = message.sourcePrefix;
|
|
5103
|
+
}
|
|
5104
|
+
if (message.destinationBucketId !== "") {
|
|
5105
|
+
obj[pick("destinationBucketId", "destination_bucket_id")] = message.destinationBucketId;
|
|
5106
|
+
}
|
|
5107
|
+
if (message.destinationPrefix !== "") {
|
|
5108
|
+
obj[pick("destinationPrefix", "destination_prefix")] = message.destinationPrefix;
|
|
5109
|
+
}
|
|
5110
|
+
if ((message.outputFormat ?? InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED) !== InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED) {
|
|
5111
|
+
obj[pick("outputFormat", "output_format")] = InventorySpec_OutputFormat.toJSON(message.outputFormat);
|
|
5112
|
+
}
|
|
5113
|
+
if (message.noncurrentVersions === true) {
|
|
5114
|
+
obj[pick("noncurrentVersions", "noncurrent_versions")] = message.noncurrentVersions;
|
|
5115
|
+
}
|
|
5116
|
+
if (message.optionalFields?.length) {
|
|
5117
|
+
obj[pick("optionalFields", "optional_fields")] = message.optionalFields.map((e) => InventorySpec_OptionalField.toJSON(e));
|
|
5118
|
+
}
|
|
5119
|
+
if ((message.schedule ?? InventorySpec_Schedule.SCHEDULE_UNSPECIFIED) !== InventorySpec_Schedule.SCHEDULE_UNSPECIFIED) {
|
|
5120
|
+
obj[pick("schedule", "schedule")] = InventorySpec_Schedule.toJSON(message.schedule);
|
|
5121
|
+
}
|
|
5122
|
+
return obj;
|
|
5123
|
+
},
|
|
5124
|
+
create(base) {
|
|
5125
|
+
return InventorySpec.fromPartial(base ?? {});
|
|
5126
|
+
},
|
|
5127
|
+
fromPartial(object) {
|
|
5128
|
+
const message = createBaseInventorySpec();
|
|
5129
|
+
message.enabled = (object.enabled !== undefined && object.enabled !== null)
|
|
5130
|
+
? object.enabled
|
|
5131
|
+
: false;
|
|
5132
|
+
message.sourcePrefix = (object.sourcePrefix !== undefined && object.sourcePrefix !== null)
|
|
5133
|
+
? object.sourcePrefix
|
|
5134
|
+
: "";
|
|
5135
|
+
message.destinationBucketId = (object.destinationBucketId !== undefined && object.destinationBucketId !== null)
|
|
5136
|
+
? object.destinationBucketId
|
|
5137
|
+
: "";
|
|
5138
|
+
message.destinationPrefix = (object.destinationPrefix !== undefined && object.destinationPrefix !== null)
|
|
5139
|
+
? object.destinationPrefix
|
|
5140
|
+
: "";
|
|
5141
|
+
message.outputFormat = (object.outputFormat !== undefined && object.outputFormat !== null)
|
|
5142
|
+
? InventorySpec_OutputFormat.fromJSON(object.outputFormat.name)
|
|
5143
|
+
: InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED;
|
|
5144
|
+
message.noncurrentVersions = (object.noncurrentVersions !== undefined && object.noncurrentVersions !== null)
|
|
5145
|
+
? object.noncurrentVersions
|
|
5146
|
+
: false;
|
|
5147
|
+
message.optionalFields = object.optionalFields?.map((e) => InventorySpec_OptionalField.fromJSON(e.name)) || [];
|
|
5148
|
+
message.schedule = (object.schedule !== undefined && object.schedule !== null)
|
|
5149
|
+
? InventorySpec_Schedule.fromJSON(object.schedule.name)
|
|
5150
|
+
: InventorySpec_Schedule.SCHEDULE_UNSPECIFIED;
|
|
5151
|
+
return message;
|
|
5152
|
+
},
|
|
5153
|
+
};
|
|
5154
|
+
protoRegistry.registerMessage(InventorySpec);
|
|
5155
|
+
function InventorySpecCustomInspect() {
|
|
5156
|
+
const parts = [];
|
|
5157
|
+
if (this.enabled === true)
|
|
5158
|
+
parts.push("enabled" + "=" + inspect(this.enabled));
|
|
5159
|
+
if (this.sourcePrefix !== "")
|
|
5160
|
+
parts.push("sourcePrefix" + "=" + inspect(this.sourcePrefix));
|
|
5161
|
+
if (this.destinationBucketId !== "")
|
|
5162
|
+
parts.push("destinationBucketId" + "=" + inspect(this.destinationBucketId));
|
|
5163
|
+
if (this.destinationPrefix !== "")
|
|
5164
|
+
parts.push("destinationPrefix" + "=" + inspect(this.destinationPrefix));
|
|
5165
|
+
if (this.outputFormat !== undefined)
|
|
5166
|
+
parts.push("outputFormat" + "=" + inspect(this.outputFormat));
|
|
5167
|
+
if (this.noncurrentVersions === true)
|
|
5168
|
+
parts.push("noncurrentVersions" + "=" + inspect(this.noncurrentVersions));
|
|
5169
|
+
if ((this.optionalFields?.length ?? 0) !== 0)
|
|
5170
|
+
parts.push("optionalFields" + "=" + inspect(this.optionalFields));
|
|
5171
|
+
if (this.schedule !== undefined)
|
|
5172
|
+
parts.push("schedule" + "=" + inspect(this.schedule));
|
|
5173
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
5174
|
+
}
|
|
5175
|
+
function InventorySpecCustomJson() {
|
|
5176
|
+
const obj = {
|
|
5177
|
+
type: this.$type,
|
|
5178
|
+
};
|
|
5179
|
+
if (this.enabled === true)
|
|
5180
|
+
obj.enabled = inspectJson(this.enabled);
|
|
5181
|
+
if (this.sourcePrefix !== "")
|
|
5182
|
+
obj.sourcePrefix = inspectJson(this.sourcePrefix);
|
|
5183
|
+
if (this.destinationBucketId !== "")
|
|
5184
|
+
obj.destinationBucketId = inspectJson(this.destinationBucketId);
|
|
5185
|
+
if (this.destinationPrefix !== "")
|
|
5186
|
+
obj.destinationPrefix = inspectJson(this.destinationPrefix);
|
|
5187
|
+
if (this.outputFormat !== undefined)
|
|
5188
|
+
obj.outputFormat = inspectJson(this.outputFormat);
|
|
5189
|
+
if (this.noncurrentVersions === true)
|
|
5190
|
+
obj.noncurrentVersions = inspectJson(this.noncurrentVersions);
|
|
5191
|
+
if ((this.optionalFields?.length ?? 0) !== 0)
|
|
5192
|
+
obj.optionalFields = inspectJson(this.optionalFields);
|
|
5193
|
+
if (this.schedule !== undefined)
|
|
5194
|
+
obj.schedule = inspectJson(this.schedule);
|
|
5195
|
+
return obj;
|
|
5196
|
+
}
|
|
5197
|
+
function applyInventorySpecCustom(message) {
|
|
5198
|
+
message[custom] = InventorySpecCustomInspect;
|
|
5199
|
+
message[customJson] = InventorySpecCustomJson;
|
|
5200
|
+
return attachMessageDescriptor(message, InventorySpec.$descriptor);
|
|
5201
|
+
}
|
|
5202
|
+
function createBaseInventorySpec() {
|
|
5203
|
+
const message = {
|
|
5204
|
+
$type: "nebius.storage.v1.InventorySpec",
|
|
5205
|
+
enabled: false,
|
|
5206
|
+
sourcePrefix: "",
|
|
5207
|
+
destinationBucketId: "",
|
|
5208
|
+
destinationPrefix: "",
|
|
5209
|
+
outputFormat: InventorySpec_OutputFormat.OUTPUT_FORMAT_UNSPECIFIED,
|
|
5210
|
+
noncurrentVersions: false,
|
|
5211
|
+
optionalFields: [],
|
|
5212
|
+
schedule: InventorySpec_Schedule.SCHEDULE_UNSPECIFIED,
|
|
5213
|
+
};
|
|
5214
|
+
return applyInventorySpecCustom(message);
|
|
5215
|
+
}
|
|
5216
|
+
const InventoryStatus_MESSAGE_DESCRIPTOR = {
|
|
5217
|
+
fields: {},
|
|
5218
|
+
};
|
|
5219
|
+
/** Encodes, decodes, converts, and creates {@link InventoryStatus} messages. */
|
|
5220
|
+
export const InventoryStatus = {
|
|
5221
|
+
$type: "nebius.storage.v1.InventoryStatus",
|
|
5222
|
+
$descriptor: InventoryStatus_MESSAGE_DESCRIPTOR,
|
|
5223
|
+
encode(message, writer = new BinaryWriter()) {
|
|
5224
|
+
if (message[unknownFieldsSymbol]) {
|
|
5225
|
+
writer.raw(message[unknownFieldsSymbol]);
|
|
5226
|
+
}
|
|
5227
|
+
return writer;
|
|
5228
|
+
},
|
|
5229
|
+
decode(input, length) {
|
|
5230
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
5231
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
5232
|
+
const message = createBaseInventoryStatus();
|
|
5233
|
+
let writer = undefined;
|
|
5234
|
+
while (reader.pos < end) {
|
|
5235
|
+
const tag = reader.uint32();
|
|
5236
|
+
switch (tag >>> 3) {
|
|
5237
|
+
default:
|
|
5238
|
+
break;
|
|
5239
|
+
}
|
|
5240
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5241
|
+
break;
|
|
5242
|
+
}
|
|
5243
|
+
{
|
|
5244
|
+
if (!writer)
|
|
5245
|
+
writer = new BinaryWriter();
|
|
5246
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
5247
|
+
writer.uint32(tag).raw(skipped);
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
5250
|
+
if (writer) {
|
|
5251
|
+
message[unknownFieldsSymbol] = writer.finish();
|
|
5252
|
+
}
|
|
5253
|
+
return message;
|
|
5254
|
+
},
|
|
5255
|
+
fromJSON(object) {
|
|
5256
|
+
return applyInventoryStatusCustom({
|
|
5257
|
+
$type: "nebius.storage.v1.InventoryStatus",
|
|
5258
|
+
});
|
|
5259
|
+
},
|
|
5260
|
+
toJSON(message, use = "json") {
|
|
5261
|
+
const obj = {};
|
|
5262
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
5263
|
+
return obj;
|
|
5264
|
+
},
|
|
5265
|
+
create(base) {
|
|
5266
|
+
return InventoryStatus.fromPartial(base ?? {});
|
|
5267
|
+
},
|
|
5268
|
+
fromPartial(object) {
|
|
5269
|
+
const message = createBaseInventoryStatus();
|
|
5270
|
+
return message;
|
|
5271
|
+
},
|
|
5272
|
+
};
|
|
5273
|
+
protoRegistry.registerMessage(InventoryStatus);
|
|
5274
|
+
function InventoryStatusCustomInspect() {
|
|
5275
|
+
const parts = [];
|
|
5276
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
5277
|
+
}
|
|
5278
|
+
function InventoryStatusCustomJson() {
|
|
5279
|
+
const obj = {
|
|
5280
|
+
type: this.$type,
|
|
5281
|
+
};
|
|
5282
|
+
return obj;
|
|
5283
|
+
}
|
|
5284
|
+
function applyInventoryStatusCustom(message) {
|
|
5285
|
+
message[custom] = InventoryStatusCustomInspect;
|
|
5286
|
+
message[customJson] = InventoryStatusCustomJson;
|
|
5287
|
+
return attachMessageDescriptor(message, InventoryStatus.$descriptor);
|
|
5288
|
+
}
|
|
5289
|
+
function createBaseInventoryStatus() {
|
|
5290
|
+
const message = {
|
|
5291
|
+
$type: "nebius.storage.v1.InventoryStatus",
|
|
5292
|
+
};
|
|
5293
|
+
return applyInventoryStatusCustom(message);
|
|
5294
|
+
}
|
|
3749
5295
|
/** Converts and creates {@link LifecycleRule_Status} values. */
|
|
3750
5296
|
export const LifecycleRule_Status = createEnum("nebius.storage.v1.LifecycleRule.Status", {
|
|
3751
5297
|
/**
|