@nebius/js-sdk 0.2.29 → 0.2.31
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 +24 -0
- package/dist/cjs/api/nebius/common/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/common/v1/index.js +154 -1
- package/dist/cjs/api/nebius/common/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.d.ts +355 -0
- package/dist/cjs/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/compute/v1/index.js +1733 -3
- package/dist/cjs/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts +17 -3
- package/dist/cjs/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/cjs/api/nebius/mk8s/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 +24 -0
- package/dist/esm/api/nebius/common/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/common/v1/index.js +153 -0
- package/dist/esm/api/nebius/common/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.d.ts +355 -0
- package/dist/esm/api/nebius/compute/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/compute/v1/index.js +1728 -0
- package/dist/esm/api/nebius/compute/v1/index.js.map +1 -1
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts +17 -3
- package/dist/esm/api/nebius/mk8s/v1/index.d.ts.map +1 -1
- package/dist/esm/api/nebius/mk8s/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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Generated by Nebius TS generator. DO NOT EDIT! */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
4
|
+
exports.FilesystemStatus = exports.FilesystemSpec = exports.Filesystem = exports.FilesystemStatus_State = exports.FilesystemSpec_FilesystemType = exports.FilesystemService = exports.FilesystemServiceBaseClient = exports.FilesystemServiceServiceDescription = exports.ListFilesystemsResponse = exports.DeleteFilesystemRequest = exports.UpdateFilesystemRequest = exports.CreateFilesystemRequest = exports.ListFilesystemsRequest = exports.GetFilesystemRequest = exports.DiskEncryption = exports.DiskStatus_LockState = exports.DiskStatus = exports.SourceImageFamily = exports.DiskSpec = exports.Disk = exports.DiskEncryption_DiskEncryptionType = exports.DiskStatus_SourceImageCPUArchitecture = exports.DiskStatus_State = exports.DiskSpec_DiskType = exports.DiskSnapshotStatus_LockState = exports.DiskSnapshotStatus = exports.DiskSnapshotSpec = exports.DiskSnapshot = exports.DiskSnapshotStatus_CPUArchitecture = exports.DiskSnapshotStatus_State = exports.DiskSnapshotService = exports.DiskSnapshotServiceBaseClient = exports.DiskSnapshotServiceServiceDescription = exports.DeleteDiskSnapshotRequest = exports.UpdateDiskSnapshotRequest = exports.CreateDiskSnapshotRequest = exports.ListDiskSnapshotsByDiskResponse = exports.ListDiskSnapshotsByDiskRequest = exports.ListDiskSnapshotsResponse = exports.ListDiskSnapshotsRequest = exports.GetDiskSnapshotRequest = exports.DiskService = exports.DiskServiceBaseClient = exports.DiskServiceServiceDescription = exports.ListDisksResponse = exports.DeleteDiskRequest = exports.UpdateDiskRequest = exports.CreateDiskRequest = exports.ListDisksRequest = exports.GetDiskRequest = void 0;
|
|
5
|
+
exports.AttachedFilesystemSpec_AttachMode = exports.AttachedDiskSpec_AttachMode = exports.PreemptibleSpec_PreemptionPolicy = exports.InstanceRecoveryPolicy = exports.InstanceService = exports.InstanceServiceBaseClient = exports.InstanceServiceServiceDescription = exports.BatchGetResponse_BatchGetResult = exports.BatchGetResponse = exports.BatchGetRequest = exports.StopInstanceRequest = exports.StartInstanceRequest = exports.ListInstancesResponse = exports.DeleteInstanceRequest = exports.UpdateInstanceRequest = exports.CreateInstanceRequest = exports.ListInstancesRequest = exports.GetInstanceRequest = exports.ImageStatus_ImageFamilyDeprecationStatus = exports.ImageStatus = exports.ImageSpec_SourceStorage = exports.ImageSpec = exports.Image = exports.ImageStatus_State = exports.ImageSpec_CPUArchitecture = exports.ImageService = exports.ImageServiceBaseClient = exports.ImageServiceServiceDescription = exports.ListPublicRequest = exports.ListImagesResponse = exports.DeleteImageRequest = exports.UpdateImageRequest = exports.CreateImageRequest = exports.ListImagesRequest = exports.GetImageLatestByFamilyRequest = exports.GetImageRequest = exports.GpuClusterStatusInfinibandTopologyPathInstance = exports.GpuClusterStatusInfinibandTopologyPath = exports.GpuClusterStatus = exports.GpuClusterSpec = exports.GpuCluster = exports.GpuClusterService = exports.GpuClusterServiceBaseClient = exports.GpuClusterServiceServiceDescription = exports.ListGpuClustersResponse = exports.DeleteGpuClusterRequest = exports.UpdateGpuClusterRequest = exports.CreateGpuClusterRequest = exports.ListGpuClustersRequest = exports.GetGpuClusterRequest = void 0;
|
|
6
|
+
exports.NVLInstanceGroupServiceBaseClient = exports.NVLInstanceGroupServiceServiceDescription = exports.DeleteNVLInstanceGroupRequest = exports.ListNVLInstanceGroupsResponse = exports.ListNVLInstanceGroupsRequest = exports.GetNVLInstanceGroupRequest = exports.UpdateNVLInstanceGroupRequest = exports.CreateNVLInstanceGroupRequest = exports.NodeService = exports.NodeServiceBaseClient = exports.NodeServiceServiceDescription = exports.NodeSetUnhealthyResponse = exports.NodeSetUnhealthyRequest_HealthCheckInfo = exports.NodeSetUnhealthyRequest = exports.SecurityGroup = exports.IPAliasesStatus = exports.PublicIPAddressStatus = exports.IPAddressStatus = exports.NetworkInterfaceStatus = exports.IPAlias = exports.PublicIPAddress = exports.IPAddress = exports.NetworkInterfaceSpec = exports.MaintenanceService = exports.MaintenanceServiceBaseClient = exports.MaintenanceServiceServiceDescription = exports.ListMaintenanceEventsResponse = exports.ListMaintenanceEventsRequest = exports.GetMaintenanceEventByInstanceRequest = exports.MaintenanceEventStatus = exports.MaintenanceEventSpec = exports.MaintenanceEvent = exports.PassthroughGroupRequest = exports.LocalDisksSpec = exports.ReservationPolicy = exports.InstanceStatusInfinibandTopologyPath = exports.DiskAttachmentStatus = exports.InstanceStatus = exports.AttachedFilesystemSpec = exports.ExistingFilesystem = exports.ManagedDisk = exports.ExistingDisk = exports.AttachedDiskSpec = exports.InstanceGpuClusterSpec = exports.ResourcesSpec = exports.PreemptibleSpec = exports.InstanceSpec = exports.Instance = exports.ReservationPolicy_Policy = exports.InstanceStatus_InstanceState = void 0;
|
|
7
|
+
exports.PlatformStatus = exports.PresetResources = exports.Preset = exports.PlatformSpec = exports.Platform = exports.PlatformService = exports.PlatformServiceBaseClient = exports.PlatformServiceServiceDescription = exports.ListPlatformsResponse = exports.ListPlatformsRequest = exports.ListOperationsByParentRequest = exports.NVLInstanceGroupStatus_InstanceInfo = exports.NVLInstanceGroupStatus = exports.NVLInstanceGroupSpec = exports.NVLInstanceGroup = exports.NVLInstanceGroupSpec_NVLInstanceGroupType = exports.NVLInstanceGroupService = void 0;
|
|
7
8
|
const index_js_1 = require("../../../../runtime/protos/index.js");
|
|
8
9
|
const util_1 = require("util");
|
|
9
10
|
const protobuf_js_1 = require("../../../protobuf.js");
|
|
@@ -911,6 +912,1714 @@ class DiskService {
|
|
|
911
912
|
}
|
|
912
913
|
}
|
|
913
914
|
exports.DiskService = DiskService;
|
|
915
|
+
exports.GetDiskSnapshotRequest = {
|
|
916
|
+
$type: "nebius.compute.v1.GetDiskSnapshotRequest",
|
|
917
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
918
|
+
if (message.id !== "") {
|
|
919
|
+
writer.uint32(10).string(message.id);
|
|
920
|
+
}
|
|
921
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
922
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
923
|
+
}
|
|
924
|
+
return writer;
|
|
925
|
+
},
|
|
926
|
+
decode(input, length) {
|
|
927
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
928
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
929
|
+
const message = createBaseGetDiskSnapshotRequest();
|
|
930
|
+
let writer = undefined;
|
|
931
|
+
while (reader.pos < end) {
|
|
932
|
+
const tag = reader.uint32();
|
|
933
|
+
switch (tag >>> 3) {
|
|
934
|
+
case 1: {
|
|
935
|
+
if (tag !== 10)
|
|
936
|
+
break;
|
|
937
|
+
message.id = reader.string();
|
|
938
|
+
continue;
|
|
939
|
+
}
|
|
940
|
+
default:
|
|
941
|
+
break;
|
|
942
|
+
}
|
|
943
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
{
|
|
947
|
+
if (!writer)
|
|
948
|
+
writer = new index_js_1.BinaryWriter();
|
|
949
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
950
|
+
writer.uint32(tag).raw(skipped);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
if (writer) {
|
|
954
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
955
|
+
}
|
|
956
|
+
return message;
|
|
957
|
+
},
|
|
958
|
+
fromJSON(object) {
|
|
959
|
+
return applyGetDiskSnapshotRequestCustom({
|
|
960
|
+
$type: "nebius.compute.v1.GetDiskSnapshotRequest",
|
|
961
|
+
id: (0, index_js_1.isSet)(object.id ?? object.id)
|
|
962
|
+
? String(object.id ?? object.id)
|
|
963
|
+
: "",
|
|
964
|
+
});
|
|
965
|
+
},
|
|
966
|
+
toJSON(message, use = "json") {
|
|
967
|
+
const obj = {};
|
|
968
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
969
|
+
if (message.id !== "") {
|
|
970
|
+
obj[pick("id", "id")] = message.id;
|
|
971
|
+
}
|
|
972
|
+
return obj;
|
|
973
|
+
},
|
|
974
|
+
create(base) {
|
|
975
|
+
return exports.GetDiskSnapshotRequest.fromPartial(base ?? {});
|
|
976
|
+
},
|
|
977
|
+
fromPartial(object) {
|
|
978
|
+
const message = createBaseGetDiskSnapshotRequest();
|
|
979
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
980
|
+
? object.id
|
|
981
|
+
: "";
|
|
982
|
+
return message;
|
|
983
|
+
},
|
|
984
|
+
};
|
|
985
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.GetDiskSnapshotRequest);
|
|
986
|
+
function GetDiskSnapshotRequestCustomInspect() {
|
|
987
|
+
const parts = [];
|
|
988
|
+
if (this.id !== "")
|
|
989
|
+
parts.push("id" + "=" + (0, util_1.inspect)(this.id));
|
|
990
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
991
|
+
}
|
|
992
|
+
function GetDiskSnapshotRequestCustomJson() {
|
|
993
|
+
const obj = {
|
|
994
|
+
type: this.$type,
|
|
995
|
+
};
|
|
996
|
+
if (this.id !== "")
|
|
997
|
+
obj.id = (0, logging_js_1.inspectJson)(this.id);
|
|
998
|
+
return obj;
|
|
999
|
+
}
|
|
1000
|
+
function applyGetDiskSnapshotRequestCustom(message) {
|
|
1001
|
+
message[logging_js_1.custom] = GetDiskSnapshotRequestCustomInspect;
|
|
1002
|
+
message[logging_js_1.customJson] = GetDiskSnapshotRequestCustomJson;
|
|
1003
|
+
return message;
|
|
1004
|
+
}
|
|
1005
|
+
function createBaseGetDiskSnapshotRequest() {
|
|
1006
|
+
const message = {
|
|
1007
|
+
$type: "nebius.compute.v1.GetDiskSnapshotRequest",
|
|
1008
|
+
id: "",
|
|
1009
|
+
};
|
|
1010
|
+
return applyGetDiskSnapshotRequestCustom(message);
|
|
1011
|
+
}
|
|
1012
|
+
exports.ListDiskSnapshotsRequest = {
|
|
1013
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsRequest",
|
|
1014
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1015
|
+
if (message.parentId !== "") {
|
|
1016
|
+
writer.uint32(10).string(message.parentId);
|
|
1017
|
+
}
|
|
1018
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
1019
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
1020
|
+
}
|
|
1021
|
+
if (message.pageToken !== "") {
|
|
1022
|
+
writer.uint32(26).string(message.pageToken);
|
|
1023
|
+
}
|
|
1024
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1025
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1026
|
+
}
|
|
1027
|
+
return writer;
|
|
1028
|
+
},
|
|
1029
|
+
decode(input, length) {
|
|
1030
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1031
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1032
|
+
const message = createBaseListDiskSnapshotsRequest();
|
|
1033
|
+
let writer = undefined;
|
|
1034
|
+
while (reader.pos < end) {
|
|
1035
|
+
const tag = reader.uint32();
|
|
1036
|
+
switch (tag >>> 3) {
|
|
1037
|
+
case 1: {
|
|
1038
|
+
if (tag !== 10)
|
|
1039
|
+
break;
|
|
1040
|
+
message.parentId = reader.string();
|
|
1041
|
+
continue;
|
|
1042
|
+
}
|
|
1043
|
+
case 2: {
|
|
1044
|
+
if (tag !== 16)
|
|
1045
|
+
break;
|
|
1046
|
+
message.pageSize = index_js_1.Long.fromValue(reader.int64());
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
case 3: {
|
|
1050
|
+
if (tag !== 26)
|
|
1051
|
+
break;
|
|
1052
|
+
message.pageToken = reader.string();
|
|
1053
|
+
continue;
|
|
1054
|
+
}
|
|
1055
|
+
default:
|
|
1056
|
+
break;
|
|
1057
|
+
}
|
|
1058
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1059
|
+
break;
|
|
1060
|
+
}
|
|
1061
|
+
{
|
|
1062
|
+
if (!writer)
|
|
1063
|
+
writer = new index_js_1.BinaryWriter();
|
|
1064
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1065
|
+
writer.uint32(tag).raw(skipped);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
if (writer) {
|
|
1069
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1070
|
+
}
|
|
1071
|
+
return message;
|
|
1072
|
+
},
|
|
1073
|
+
fromJSON(object) {
|
|
1074
|
+
return applyListDiskSnapshotsRequestCustom({
|
|
1075
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsRequest",
|
|
1076
|
+
parentId: (0, index_js_1.isSet)(object.parentId ?? object.parent_id)
|
|
1077
|
+
? String(object.parentId ?? object.parent_id)
|
|
1078
|
+
: "",
|
|
1079
|
+
pageSize: (0, index_js_1.isSet)(object.pageSize ?? object.page_size)
|
|
1080
|
+
? index_js_1.Long.fromValue(object.pageSize ?? object.page_size)
|
|
1081
|
+
: index_js_1.Long.ZERO,
|
|
1082
|
+
pageToken: (0, index_js_1.isSet)(object.pageToken ?? object.page_token)
|
|
1083
|
+
? String(object.pageToken ?? object.page_token)
|
|
1084
|
+
: "",
|
|
1085
|
+
});
|
|
1086
|
+
},
|
|
1087
|
+
toJSON(message, use = "json") {
|
|
1088
|
+
const obj = {};
|
|
1089
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1090
|
+
if (message.parentId !== "") {
|
|
1091
|
+
obj[pick("parentId", "parent_id")] = message.parentId;
|
|
1092
|
+
}
|
|
1093
|
+
if (!message.pageSize?.isZero?.()) {
|
|
1094
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || index_js_1.Long.ZERO).toString();
|
|
1095
|
+
}
|
|
1096
|
+
if (message.pageToken !== "") {
|
|
1097
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
1098
|
+
}
|
|
1099
|
+
return obj;
|
|
1100
|
+
},
|
|
1101
|
+
create(base) {
|
|
1102
|
+
return exports.ListDiskSnapshotsRequest.fromPartial(base ?? {});
|
|
1103
|
+
},
|
|
1104
|
+
fromPartial(object) {
|
|
1105
|
+
const message = createBaseListDiskSnapshotsRequest();
|
|
1106
|
+
message.parentId = (object.parentId !== undefined && object.parentId !== null)
|
|
1107
|
+
? object.parentId
|
|
1108
|
+
: "";
|
|
1109
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
1110
|
+
? index_js_1.Long.fromValue(object.pageSize)
|
|
1111
|
+
: index_js_1.Long.ZERO;
|
|
1112
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
1113
|
+
? object.pageToken
|
|
1114
|
+
: "";
|
|
1115
|
+
return message;
|
|
1116
|
+
},
|
|
1117
|
+
};
|
|
1118
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListDiskSnapshotsRequest);
|
|
1119
|
+
function ListDiskSnapshotsRequestCustomInspect() {
|
|
1120
|
+
const parts = [];
|
|
1121
|
+
if (this.parentId !== "")
|
|
1122
|
+
parts.push("parentId" + "=" + (0, util_1.inspect)(this.parentId));
|
|
1123
|
+
if (!this.pageSize?.isZero?.())
|
|
1124
|
+
parts.push("pageSize" + "=" + (0, util_1.inspect)(this.pageSize));
|
|
1125
|
+
if (this.pageToken !== "")
|
|
1126
|
+
parts.push("pageToken" + "=" + (0, util_1.inspect)(this.pageToken));
|
|
1127
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1128
|
+
}
|
|
1129
|
+
function ListDiskSnapshotsRequestCustomJson() {
|
|
1130
|
+
const obj = {
|
|
1131
|
+
type: this.$type,
|
|
1132
|
+
};
|
|
1133
|
+
if (this.parentId !== "")
|
|
1134
|
+
obj.parentId = (0, logging_js_1.inspectJson)(this.parentId);
|
|
1135
|
+
if (!this.pageSize?.isZero?.())
|
|
1136
|
+
obj.pageSize = (0, logging_js_1.inspectJson)(this.pageSize);
|
|
1137
|
+
if (this.pageToken !== "")
|
|
1138
|
+
obj.pageToken = (0, logging_js_1.inspectJson)(this.pageToken);
|
|
1139
|
+
return obj;
|
|
1140
|
+
}
|
|
1141
|
+
function applyListDiskSnapshotsRequestCustom(message) {
|
|
1142
|
+
message[logging_js_1.custom] = ListDiskSnapshotsRequestCustomInspect;
|
|
1143
|
+
message[logging_js_1.customJson] = ListDiskSnapshotsRequestCustomJson;
|
|
1144
|
+
return message;
|
|
1145
|
+
}
|
|
1146
|
+
function createBaseListDiskSnapshotsRequest() {
|
|
1147
|
+
const message = {
|
|
1148
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsRequest",
|
|
1149
|
+
parentId: "",
|
|
1150
|
+
pageSize: index_js_1.Long.ZERO,
|
|
1151
|
+
pageToken: "",
|
|
1152
|
+
};
|
|
1153
|
+
return applyListDiskSnapshotsRequestCustom(message);
|
|
1154
|
+
}
|
|
1155
|
+
exports.ListDiskSnapshotsResponse = {
|
|
1156
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsResponse",
|
|
1157
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1158
|
+
for (const v of (message.items ?? [])) {
|
|
1159
|
+
const w = writer.uint32(10).fork();
|
|
1160
|
+
exports.DiskSnapshot.encode(v, w);
|
|
1161
|
+
w.join();
|
|
1162
|
+
}
|
|
1163
|
+
if (message.nextPageToken !== "") {
|
|
1164
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
1165
|
+
}
|
|
1166
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1167
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1168
|
+
}
|
|
1169
|
+
return writer;
|
|
1170
|
+
},
|
|
1171
|
+
decode(input, length) {
|
|
1172
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1173
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1174
|
+
const message = createBaseListDiskSnapshotsResponse();
|
|
1175
|
+
let writer = undefined;
|
|
1176
|
+
while (reader.pos < end) {
|
|
1177
|
+
const tag = reader.uint32();
|
|
1178
|
+
switch (tag >>> 3) {
|
|
1179
|
+
case 1: {
|
|
1180
|
+
if (tag !== 10)
|
|
1181
|
+
break;
|
|
1182
|
+
message.items.push(exports.DiskSnapshot.decode(reader, reader.uint32()));
|
|
1183
|
+
continue;
|
|
1184
|
+
}
|
|
1185
|
+
case 2: {
|
|
1186
|
+
if (tag !== 18)
|
|
1187
|
+
break;
|
|
1188
|
+
message.nextPageToken = reader.string();
|
|
1189
|
+
continue;
|
|
1190
|
+
}
|
|
1191
|
+
default:
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
{
|
|
1198
|
+
if (!writer)
|
|
1199
|
+
writer = new index_js_1.BinaryWriter();
|
|
1200
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1201
|
+
writer.uint32(tag).raw(skipped);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
if (writer) {
|
|
1205
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1206
|
+
}
|
|
1207
|
+
return message;
|
|
1208
|
+
},
|
|
1209
|
+
fromJSON(object) {
|
|
1210
|
+
return applyListDiskSnapshotsResponseCustom({
|
|
1211
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsResponse",
|
|
1212
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
1213
|
+
? (object.items ?? object.items).map((e) => exports.DiskSnapshot.fromJSON(e))
|
|
1214
|
+
: [],
|
|
1215
|
+
nextPageToken: (0, index_js_1.isSet)(object.nextPageToken ?? object.next_page_token)
|
|
1216
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
1217
|
+
: "",
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
toJSON(message, use = "json") {
|
|
1221
|
+
const obj = {};
|
|
1222
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1223
|
+
if (message.items?.length) {
|
|
1224
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? exports.DiskSnapshot.toJSON(e, use) : undefined);
|
|
1225
|
+
}
|
|
1226
|
+
if (message.nextPageToken !== "") {
|
|
1227
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
1228
|
+
}
|
|
1229
|
+
return obj;
|
|
1230
|
+
},
|
|
1231
|
+
create(base) {
|
|
1232
|
+
return exports.ListDiskSnapshotsResponse.fromPartial(base ?? {});
|
|
1233
|
+
},
|
|
1234
|
+
fromPartial(object) {
|
|
1235
|
+
const message = createBaseListDiskSnapshotsResponse();
|
|
1236
|
+
message.items = object.items?.map((e) => exports.DiskSnapshot.fromPartial(e)) || [];
|
|
1237
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
1238
|
+
? object.nextPageToken
|
|
1239
|
+
: "";
|
|
1240
|
+
return message;
|
|
1241
|
+
},
|
|
1242
|
+
};
|
|
1243
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListDiskSnapshotsResponse);
|
|
1244
|
+
function ListDiskSnapshotsResponseCustomInspect() {
|
|
1245
|
+
const parts = [];
|
|
1246
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
1247
|
+
parts.push("items" + "=" + (0, util_1.inspect)(this.items));
|
|
1248
|
+
if (this.nextPageToken !== "")
|
|
1249
|
+
parts.push("nextPageToken" + "=" + (0, util_1.inspect)(this.nextPageToken));
|
|
1250
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1251
|
+
}
|
|
1252
|
+
function ListDiskSnapshotsResponseCustomJson() {
|
|
1253
|
+
const obj = {
|
|
1254
|
+
type: this.$type,
|
|
1255
|
+
};
|
|
1256
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
1257
|
+
obj.items = (0, logging_js_1.inspectJson)(this.items);
|
|
1258
|
+
if (this.nextPageToken !== "")
|
|
1259
|
+
obj.nextPageToken = (0, logging_js_1.inspectJson)(this.nextPageToken);
|
|
1260
|
+
return obj;
|
|
1261
|
+
}
|
|
1262
|
+
function applyListDiskSnapshotsResponseCustom(message) {
|
|
1263
|
+
message[logging_js_1.custom] = ListDiskSnapshotsResponseCustomInspect;
|
|
1264
|
+
message[logging_js_1.customJson] = ListDiskSnapshotsResponseCustomJson;
|
|
1265
|
+
return message;
|
|
1266
|
+
}
|
|
1267
|
+
function createBaseListDiskSnapshotsResponse() {
|
|
1268
|
+
const message = {
|
|
1269
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsResponse",
|
|
1270
|
+
items: [],
|
|
1271
|
+
nextPageToken: "",
|
|
1272
|
+
};
|
|
1273
|
+
return applyListDiskSnapshotsResponseCustom(message);
|
|
1274
|
+
}
|
|
1275
|
+
exports.ListDiskSnapshotsByDiskRequest = {
|
|
1276
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskRequest",
|
|
1277
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1278
|
+
if (message.diskId !== "") {
|
|
1279
|
+
writer.uint32(10).string(message.diskId);
|
|
1280
|
+
}
|
|
1281
|
+
if (message.pageSize !== undefined && !message.pageSize.isZero?.()) {
|
|
1282
|
+
writer.uint32(16).int64(message.pageSize.toString());
|
|
1283
|
+
}
|
|
1284
|
+
if (message.pageToken !== "") {
|
|
1285
|
+
writer.uint32(26).string(message.pageToken);
|
|
1286
|
+
}
|
|
1287
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1288
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1289
|
+
}
|
|
1290
|
+
return writer;
|
|
1291
|
+
},
|
|
1292
|
+
decode(input, length) {
|
|
1293
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1294
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1295
|
+
const message = createBaseListDiskSnapshotsByDiskRequest();
|
|
1296
|
+
let writer = undefined;
|
|
1297
|
+
while (reader.pos < end) {
|
|
1298
|
+
const tag = reader.uint32();
|
|
1299
|
+
switch (tag >>> 3) {
|
|
1300
|
+
case 1: {
|
|
1301
|
+
if (tag !== 10)
|
|
1302
|
+
break;
|
|
1303
|
+
message.diskId = reader.string();
|
|
1304
|
+
continue;
|
|
1305
|
+
}
|
|
1306
|
+
case 2: {
|
|
1307
|
+
if (tag !== 16)
|
|
1308
|
+
break;
|
|
1309
|
+
message.pageSize = index_js_1.Long.fromValue(reader.int64());
|
|
1310
|
+
continue;
|
|
1311
|
+
}
|
|
1312
|
+
case 3: {
|
|
1313
|
+
if (tag !== 26)
|
|
1314
|
+
break;
|
|
1315
|
+
message.pageToken = reader.string();
|
|
1316
|
+
continue;
|
|
1317
|
+
}
|
|
1318
|
+
default:
|
|
1319
|
+
break;
|
|
1320
|
+
}
|
|
1321
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1322
|
+
break;
|
|
1323
|
+
}
|
|
1324
|
+
{
|
|
1325
|
+
if (!writer)
|
|
1326
|
+
writer = new index_js_1.BinaryWriter();
|
|
1327
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1328
|
+
writer.uint32(tag).raw(skipped);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
if (writer) {
|
|
1332
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1333
|
+
}
|
|
1334
|
+
return message;
|
|
1335
|
+
},
|
|
1336
|
+
fromJSON(object) {
|
|
1337
|
+
return applyListDiskSnapshotsByDiskRequestCustom({
|
|
1338
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskRequest",
|
|
1339
|
+
diskId: (0, index_js_1.isSet)(object.diskId ?? object.disk_id)
|
|
1340
|
+
? String(object.diskId ?? object.disk_id)
|
|
1341
|
+
: "",
|
|
1342
|
+
pageSize: (0, index_js_1.isSet)(object.pageSize ?? object.page_size)
|
|
1343
|
+
? index_js_1.Long.fromValue(object.pageSize ?? object.page_size)
|
|
1344
|
+
: index_js_1.Long.ZERO,
|
|
1345
|
+
pageToken: (0, index_js_1.isSet)(object.pageToken ?? object.page_token)
|
|
1346
|
+
? String(object.pageToken ?? object.page_token)
|
|
1347
|
+
: "",
|
|
1348
|
+
});
|
|
1349
|
+
},
|
|
1350
|
+
toJSON(message, use = "json") {
|
|
1351
|
+
const obj = {};
|
|
1352
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1353
|
+
if (message.diskId !== "") {
|
|
1354
|
+
obj[pick("diskId", "disk_id")] = message.diskId;
|
|
1355
|
+
}
|
|
1356
|
+
if (!message.pageSize?.isZero?.()) {
|
|
1357
|
+
obj[pick("pageSize", "page_size")] = (message.pageSize || index_js_1.Long.ZERO).toString();
|
|
1358
|
+
}
|
|
1359
|
+
if (message.pageToken !== "") {
|
|
1360
|
+
obj[pick("pageToken", "page_token")] = message.pageToken;
|
|
1361
|
+
}
|
|
1362
|
+
return obj;
|
|
1363
|
+
},
|
|
1364
|
+
create(base) {
|
|
1365
|
+
return exports.ListDiskSnapshotsByDiskRequest.fromPartial(base ?? {});
|
|
1366
|
+
},
|
|
1367
|
+
fromPartial(object) {
|
|
1368
|
+
const message = createBaseListDiskSnapshotsByDiskRequest();
|
|
1369
|
+
message.diskId = (object.diskId !== undefined && object.diskId !== null)
|
|
1370
|
+
? object.diskId
|
|
1371
|
+
: "";
|
|
1372
|
+
message.pageSize = (object.pageSize !== undefined && object.pageSize !== null)
|
|
1373
|
+
? index_js_1.Long.fromValue(object.pageSize)
|
|
1374
|
+
: index_js_1.Long.ZERO;
|
|
1375
|
+
message.pageToken = (object.pageToken !== undefined && object.pageToken !== null)
|
|
1376
|
+
? object.pageToken
|
|
1377
|
+
: "";
|
|
1378
|
+
return message;
|
|
1379
|
+
},
|
|
1380
|
+
};
|
|
1381
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListDiskSnapshotsByDiskRequest);
|
|
1382
|
+
function ListDiskSnapshotsByDiskRequestCustomInspect() {
|
|
1383
|
+
const parts = [];
|
|
1384
|
+
if (this.diskId !== "")
|
|
1385
|
+
parts.push("diskId" + "=" + (0, util_1.inspect)(this.diskId));
|
|
1386
|
+
if (!this.pageSize?.isZero?.())
|
|
1387
|
+
parts.push("pageSize" + "=" + (0, util_1.inspect)(this.pageSize));
|
|
1388
|
+
if (this.pageToken !== "")
|
|
1389
|
+
parts.push("pageToken" + "=" + (0, util_1.inspect)(this.pageToken));
|
|
1390
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1391
|
+
}
|
|
1392
|
+
function ListDiskSnapshotsByDiskRequestCustomJson() {
|
|
1393
|
+
const obj = {
|
|
1394
|
+
type: this.$type,
|
|
1395
|
+
};
|
|
1396
|
+
if (this.diskId !== "")
|
|
1397
|
+
obj.diskId = (0, logging_js_1.inspectJson)(this.diskId);
|
|
1398
|
+
if (!this.pageSize?.isZero?.())
|
|
1399
|
+
obj.pageSize = (0, logging_js_1.inspectJson)(this.pageSize);
|
|
1400
|
+
if (this.pageToken !== "")
|
|
1401
|
+
obj.pageToken = (0, logging_js_1.inspectJson)(this.pageToken);
|
|
1402
|
+
return obj;
|
|
1403
|
+
}
|
|
1404
|
+
function applyListDiskSnapshotsByDiskRequestCustom(message) {
|
|
1405
|
+
message[logging_js_1.custom] = ListDiskSnapshotsByDiskRequestCustomInspect;
|
|
1406
|
+
message[logging_js_1.customJson] = ListDiskSnapshotsByDiskRequestCustomJson;
|
|
1407
|
+
return message;
|
|
1408
|
+
}
|
|
1409
|
+
function createBaseListDiskSnapshotsByDiskRequest() {
|
|
1410
|
+
const message = {
|
|
1411
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskRequest",
|
|
1412
|
+
diskId: "",
|
|
1413
|
+
pageSize: index_js_1.Long.ZERO,
|
|
1414
|
+
pageToken: "",
|
|
1415
|
+
};
|
|
1416
|
+
return applyListDiskSnapshotsByDiskRequestCustom(message);
|
|
1417
|
+
}
|
|
1418
|
+
exports.ListDiskSnapshotsByDiskResponse = {
|
|
1419
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskResponse",
|
|
1420
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1421
|
+
for (const v of (message.items ?? [])) {
|
|
1422
|
+
const w = writer.uint32(10).fork();
|
|
1423
|
+
exports.DiskSnapshot.encode(v, w);
|
|
1424
|
+
w.join();
|
|
1425
|
+
}
|
|
1426
|
+
if (message.nextPageToken !== "") {
|
|
1427
|
+
writer.uint32(18).string(message.nextPageToken);
|
|
1428
|
+
}
|
|
1429
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1430
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1431
|
+
}
|
|
1432
|
+
return writer;
|
|
1433
|
+
},
|
|
1434
|
+
decode(input, length) {
|
|
1435
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1436
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1437
|
+
const message = createBaseListDiskSnapshotsByDiskResponse();
|
|
1438
|
+
let writer = undefined;
|
|
1439
|
+
while (reader.pos < end) {
|
|
1440
|
+
const tag = reader.uint32();
|
|
1441
|
+
switch (tag >>> 3) {
|
|
1442
|
+
case 1: {
|
|
1443
|
+
if (tag !== 10)
|
|
1444
|
+
break;
|
|
1445
|
+
message.items.push(exports.DiskSnapshot.decode(reader, reader.uint32()));
|
|
1446
|
+
continue;
|
|
1447
|
+
}
|
|
1448
|
+
case 2: {
|
|
1449
|
+
if (tag !== 18)
|
|
1450
|
+
break;
|
|
1451
|
+
message.nextPageToken = reader.string();
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
default:
|
|
1455
|
+
break;
|
|
1456
|
+
}
|
|
1457
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1458
|
+
break;
|
|
1459
|
+
}
|
|
1460
|
+
{
|
|
1461
|
+
if (!writer)
|
|
1462
|
+
writer = new index_js_1.BinaryWriter();
|
|
1463
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1464
|
+
writer.uint32(tag).raw(skipped);
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
if (writer) {
|
|
1468
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1469
|
+
}
|
|
1470
|
+
return message;
|
|
1471
|
+
},
|
|
1472
|
+
fromJSON(object) {
|
|
1473
|
+
return applyListDiskSnapshotsByDiskResponseCustom({
|
|
1474
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskResponse",
|
|
1475
|
+
items: globalThis.Array.isArray(object?.items ?? object?.items)
|
|
1476
|
+
? (object.items ?? object.items).map((e) => exports.DiskSnapshot.fromJSON(e))
|
|
1477
|
+
: [],
|
|
1478
|
+
nextPageToken: (0, index_js_1.isSet)(object.nextPageToken ?? object.next_page_token)
|
|
1479
|
+
? String(object.nextPageToken ?? object.next_page_token)
|
|
1480
|
+
: "",
|
|
1481
|
+
});
|
|
1482
|
+
},
|
|
1483
|
+
toJSON(message, use = "json") {
|
|
1484
|
+
const obj = {};
|
|
1485
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1486
|
+
if (message.items?.length) {
|
|
1487
|
+
obj[pick("items", "items")] = message.items.map((e) => e ? exports.DiskSnapshot.toJSON(e, use) : undefined);
|
|
1488
|
+
}
|
|
1489
|
+
if (message.nextPageToken !== "") {
|
|
1490
|
+
obj[pick("nextPageToken", "next_page_token")] = message.nextPageToken;
|
|
1491
|
+
}
|
|
1492
|
+
return obj;
|
|
1493
|
+
},
|
|
1494
|
+
create(base) {
|
|
1495
|
+
return exports.ListDiskSnapshotsByDiskResponse.fromPartial(base ?? {});
|
|
1496
|
+
},
|
|
1497
|
+
fromPartial(object) {
|
|
1498
|
+
const message = createBaseListDiskSnapshotsByDiskResponse();
|
|
1499
|
+
message.items = object.items?.map((e) => exports.DiskSnapshot.fromPartial(e)) || [];
|
|
1500
|
+
message.nextPageToken = (object.nextPageToken !== undefined && object.nextPageToken !== null)
|
|
1501
|
+
? object.nextPageToken
|
|
1502
|
+
: "";
|
|
1503
|
+
return message;
|
|
1504
|
+
},
|
|
1505
|
+
};
|
|
1506
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.ListDiskSnapshotsByDiskResponse);
|
|
1507
|
+
function ListDiskSnapshotsByDiskResponseCustomInspect() {
|
|
1508
|
+
const parts = [];
|
|
1509
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
1510
|
+
parts.push("items" + "=" + (0, util_1.inspect)(this.items));
|
|
1511
|
+
if (this.nextPageToken !== "")
|
|
1512
|
+
parts.push("nextPageToken" + "=" + (0, util_1.inspect)(this.nextPageToken));
|
|
1513
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1514
|
+
}
|
|
1515
|
+
function ListDiskSnapshotsByDiskResponseCustomJson() {
|
|
1516
|
+
const obj = {
|
|
1517
|
+
type: this.$type,
|
|
1518
|
+
};
|
|
1519
|
+
if ((this.items?.length ?? 0) !== 0)
|
|
1520
|
+
obj.items = (0, logging_js_1.inspectJson)(this.items);
|
|
1521
|
+
if (this.nextPageToken !== "")
|
|
1522
|
+
obj.nextPageToken = (0, logging_js_1.inspectJson)(this.nextPageToken);
|
|
1523
|
+
return obj;
|
|
1524
|
+
}
|
|
1525
|
+
function applyListDiskSnapshotsByDiskResponseCustom(message) {
|
|
1526
|
+
message[logging_js_1.custom] = ListDiskSnapshotsByDiskResponseCustomInspect;
|
|
1527
|
+
message[logging_js_1.customJson] = ListDiskSnapshotsByDiskResponseCustomJson;
|
|
1528
|
+
return message;
|
|
1529
|
+
}
|
|
1530
|
+
function createBaseListDiskSnapshotsByDiskResponse() {
|
|
1531
|
+
const message = {
|
|
1532
|
+
$type: "nebius.compute.v1.ListDiskSnapshotsByDiskResponse",
|
|
1533
|
+
items: [],
|
|
1534
|
+
nextPageToken: "",
|
|
1535
|
+
};
|
|
1536
|
+
return applyListDiskSnapshotsByDiskResponseCustom(message);
|
|
1537
|
+
}
|
|
1538
|
+
exports.CreateDiskSnapshotRequest = {
|
|
1539
|
+
$type: "nebius.compute.v1.CreateDiskSnapshotRequest",
|
|
1540
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1541
|
+
if (message.metadata !== undefined) {
|
|
1542
|
+
const w = writer.uint32(10).fork();
|
|
1543
|
+
index_js_3.ResourceMetadata.encode(message.metadata, w);
|
|
1544
|
+
w.join();
|
|
1545
|
+
}
|
|
1546
|
+
if (message.spec !== undefined) {
|
|
1547
|
+
const w = writer.uint32(18).fork();
|
|
1548
|
+
exports.DiskSnapshotSpec.encode(message.spec, w);
|
|
1549
|
+
w.join();
|
|
1550
|
+
}
|
|
1551
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1552
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1553
|
+
}
|
|
1554
|
+
return writer;
|
|
1555
|
+
},
|
|
1556
|
+
decode(input, length) {
|
|
1557
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1558
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1559
|
+
const message = createBaseCreateDiskSnapshotRequest();
|
|
1560
|
+
let writer = undefined;
|
|
1561
|
+
while (reader.pos < end) {
|
|
1562
|
+
const tag = reader.uint32();
|
|
1563
|
+
switch (tag >>> 3) {
|
|
1564
|
+
case 1: {
|
|
1565
|
+
if (tag !== 10)
|
|
1566
|
+
break;
|
|
1567
|
+
message.metadata = index_js_3.ResourceMetadata.decode(reader, reader.uint32());
|
|
1568
|
+
continue;
|
|
1569
|
+
}
|
|
1570
|
+
case 2: {
|
|
1571
|
+
if (tag !== 18)
|
|
1572
|
+
break;
|
|
1573
|
+
message.spec = exports.DiskSnapshotSpec.decode(reader, reader.uint32());
|
|
1574
|
+
continue;
|
|
1575
|
+
}
|
|
1576
|
+
default:
|
|
1577
|
+
break;
|
|
1578
|
+
}
|
|
1579
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
{
|
|
1583
|
+
if (!writer)
|
|
1584
|
+
writer = new index_js_1.BinaryWriter();
|
|
1585
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1586
|
+
writer.uint32(tag).raw(skipped);
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
if (writer) {
|
|
1590
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1591
|
+
}
|
|
1592
|
+
return message;
|
|
1593
|
+
},
|
|
1594
|
+
fromJSON(object) {
|
|
1595
|
+
return applyCreateDiskSnapshotRequestCustom({
|
|
1596
|
+
$type: "nebius.compute.v1.CreateDiskSnapshotRequest",
|
|
1597
|
+
metadata: (0, index_js_1.isSet)(object.metadata ?? object.metadata)
|
|
1598
|
+
? index_js_3.ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
1599
|
+
: undefined,
|
|
1600
|
+
spec: (0, index_js_1.isSet)(object.spec ?? object.spec)
|
|
1601
|
+
? exports.DiskSnapshotSpec.fromJSON(object.spec ?? object.spec)
|
|
1602
|
+
: undefined,
|
|
1603
|
+
});
|
|
1604
|
+
},
|
|
1605
|
+
toJSON(message, use = "json") {
|
|
1606
|
+
const obj = {};
|
|
1607
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1608
|
+
if (message.metadata !== undefined) {
|
|
1609
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
1610
|
+
? index_js_3.ResourceMetadata.toJSON(message.metadata, use)
|
|
1611
|
+
: undefined;
|
|
1612
|
+
}
|
|
1613
|
+
if (message.spec !== undefined) {
|
|
1614
|
+
obj[pick("spec", "spec")] = message.spec
|
|
1615
|
+
? exports.DiskSnapshotSpec.toJSON(message.spec, use)
|
|
1616
|
+
: undefined;
|
|
1617
|
+
}
|
|
1618
|
+
return obj;
|
|
1619
|
+
},
|
|
1620
|
+
create(base) {
|
|
1621
|
+
return exports.CreateDiskSnapshotRequest.fromPartial(base ?? {});
|
|
1622
|
+
},
|
|
1623
|
+
fromPartial(object) {
|
|
1624
|
+
const message = createBaseCreateDiskSnapshotRequest();
|
|
1625
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1626
|
+
? index_js_3.ResourceMetadata.fromPartial(object.metadata)
|
|
1627
|
+
: undefined;
|
|
1628
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
1629
|
+
? exports.DiskSnapshotSpec.fromPartial(object.spec)
|
|
1630
|
+
: undefined;
|
|
1631
|
+
return message;
|
|
1632
|
+
},
|
|
1633
|
+
};
|
|
1634
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.CreateDiskSnapshotRequest);
|
|
1635
|
+
function CreateDiskSnapshotRequestCustomInspect() {
|
|
1636
|
+
const parts = [];
|
|
1637
|
+
if (this.metadata !== undefined)
|
|
1638
|
+
parts.push("metadata" + "=" + (0, util_1.inspect)(this.metadata));
|
|
1639
|
+
if (this.spec !== undefined)
|
|
1640
|
+
parts.push("spec" + "=" + (0, util_1.inspect)(this.spec));
|
|
1641
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1642
|
+
}
|
|
1643
|
+
function CreateDiskSnapshotRequestCustomJson() {
|
|
1644
|
+
const obj = {
|
|
1645
|
+
type: this.$type,
|
|
1646
|
+
};
|
|
1647
|
+
if (this.metadata !== undefined)
|
|
1648
|
+
obj.metadata = (0, logging_js_1.inspectJson)(this.metadata);
|
|
1649
|
+
if (this.spec !== undefined)
|
|
1650
|
+
obj.spec = (0, logging_js_1.inspectJson)(this.spec);
|
|
1651
|
+
return obj;
|
|
1652
|
+
}
|
|
1653
|
+
function applyCreateDiskSnapshotRequestCustom(message) {
|
|
1654
|
+
message[logging_js_1.custom] = CreateDiskSnapshotRequestCustomInspect;
|
|
1655
|
+
message[logging_js_1.customJson] = CreateDiskSnapshotRequestCustomJson;
|
|
1656
|
+
return message;
|
|
1657
|
+
}
|
|
1658
|
+
function createBaseCreateDiskSnapshotRequest() {
|
|
1659
|
+
const message = {
|
|
1660
|
+
$type: "nebius.compute.v1.CreateDiskSnapshotRequest",
|
|
1661
|
+
metadata: undefined,
|
|
1662
|
+
spec: undefined,
|
|
1663
|
+
};
|
|
1664
|
+
return applyCreateDiskSnapshotRequestCustom(message);
|
|
1665
|
+
}
|
|
1666
|
+
exports.UpdateDiskSnapshotRequest = {
|
|
1667
|
+
$type: "nebius.compute.v1.UpdateDiskSnapshotRequest",
|
|
1668
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1669
|
+
if (message.metadata !== undefined) {
|
|
1670
|
+
const w = writer.uint32(10).fork();
|
|
1671
|
+
index_js_3.ResourceMetadata.encode(message.metadata, w);
|
|
1672
|
+
w.join();
|
|
1673
|
+
}
|
|
1674
|
+
if (message.spec !== undefined) {
|
|
1675
|
+
const w = writer.uint32(18).fork();
|
|
1676
|
+
exports.DiskSnapshotSpec.encode(message.spec, w);
|
|
1677
|
+
w.join();
|
|
1678
|
+
}
|
|
1679
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1680
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1681
|
+
}
|
|
1682
|
+
return writer;
|
|
1683
|
+
},
|
|
1684
|
+
decode(input, length) {
|
|
1685
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1686
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1687
|
+
const message = createBaseUpdateDiskSnapshotRequest();
|
|
1688
|
+
let writer = undefined;
|
|
1689
|
+
while (reader.pos < end) {
|
|
1690
|
+
const tag = reader.uint32();
|
|
1691
|
+
switch (tag >>> 3) {
|
|
1692
|
+
case 1: {
|
|
1693
|
+
if (tag !== 10)
|
|
1694
|
+
break;
|
|
1695
|
+
message.metadata = index_js_3.ResourceMetadata.decode(reader, reader.uint32());
|
|
1696
|
+
continue;
|
|
1697
|
+
}
|
|
1698
|
+
case 2: {
|
|
1699
|
+
if (tag !== 18)
|
|
1700
|
+
break;
|
|
1701
|
+
message.spec = exports.DiskSnapshotSpec.decode(reader, reader.uint32());
|
|
1702
|
+
continue;
|
|
1703
|
+
}
|
|
1704
|
+
default:
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1708
|
+
break;
|
|
1709
|
+
}
|
|
1710
|
+
{
|
|
1711
|
+
if (!writer)
|
|
1712
|
+
writer = new index_js_1.BinaryWriter();
|
|
1713
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1714
|
+
writer.uint32(tag).raw(skipped);
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
if (writer) {
|
|
1718
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1719
|
+
}
|
|
1720
|
+
return message;
|
|
1721
|
+
},
|
|
1722
|
+
fromJSON(object) {
|
|
1723
|
+
return applyUpdateDiskSnapshotRequestCustom({
|
|
1724
|
+
$type: "nebius.compute.v1.UpdateDiskSnapshotRequest",
|
|
1725
|
+
metadata: (0, index_js_1.isSet)(object.metadata ?? object.metadata)
|
|
1726
|
+
? index_js_3.ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
1727
|
+
: undefined,
|
|
1728
|
+
spec: (0, index_js_1.isSet)(object.spec ?? object.spec)
|
|
1729
|
+
? exports.DiskSnapshotSpec.fromJSON(object.spec ?? object.spec)
|
|
1730
|
+
: undefined,
|
|
1731
|
+
});
|
|
1732
|
+
},
|
|
1733
|
+
toJSON(message, use = "json") {
|
|
1734
|
+
const obj = {};
|
|
1735
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1736
|
+
if (message.metadata !== undefined) {
|
|
1737
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
1738
|
+
? index_js_3.ResourceMetadata.toJSON(message.metadata, use)
|
|
1739
|
+
: undefined;
|
|
1740
|
+
}
|
|
1741
|
+
if (message.spec !== undefined) {
|
|
1742
|
+
obj[pick("spec", "spec")] = message.spec
|
|
1743
|
+
? exports.DiskSnapshotSpec.toJSON(message.spec, use)
|
|
1744
|
+
: undefined;
|
|
1745
|
+
}
|
|
1746
|
+
return obj;
|
|
1747
|
+
},
|
|
1748
|
+
create(base) {
|
|
1749
|
+
return exports.UpdateDiskSnapshotRequest.fromPartial(base ?? {});
|
|
1750
|
+
},
|
|
1751
|
+
fromPartial(object) {
|
|
1752
|
+
const message = createBaseUpdateDiskSnapshotRequest();
|
|
1753
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
1754
|
+
? index_js_3.ResourceMetadata.fromPartial(object.metadata)
|
|
1755
|
+
: undefined;
|
|
1756
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
1757
|
+
? exports.DiskSnapshotSpec.fromPartial(object.spec)
|
|
1758
|
+
: undefined;
|
|
1759
|
+
return message;
|
|
1760
|
+
},
|
|
1761
|
+
};
|
|
1762
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.UpdateDiskSnapshotRequest);
|
|
1763
|
+
function UpdateDiskSnapshotRequestCustomInspect() {
|
|
1764
|
+
const parts = [];
|
|
1765
|
+
if (this.metadata !== undefined)
|
|
1766
|
+
parts.push("metadata" + "=" + (0, util_1.inspect)(this.metadata));
|
|
1767
|
+
if (this.spec !== undefined)
|
|
1768
|
+
parts.push("spec" + "=" + (0, util_1.inspect)(this.spec));
|
|
1769
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1770
|
+
}
|
|
1771
|
+
function UpdateDiskSnapshotRequestCustomJson() {
|
|
1772
|
+
const obj = {
|
|
1773
|
+
type: this.$type,
|
|
1774
|
+
};
|
|
1775
|
+
if (this.metadata !== undefined)
|
|
1776
|
+
obj.metadata = (0, logging_js_1.inspectJson)(this.metadata);
|
|
1777
|
+
if (this.spec !== undefined)
|
|
1778
|
+
obj.spec = (0, logging_js_1.inspectJson)(this.spec);
|
|
1779
|
+
return obj;
|
|
1780
|
+
}
|
|
1781
|
+
function applyUpdateDiskSnapshotRequestCustom(message) {
|
|
1782
|
+
message[logging_js_1.custom] = UpdateDiskSnapshotRequestCustomInspect;
|
|
1783
|
+
message[logging_js_1.customJson] = UpdateDiskSnapshotRequestCustomJson;
|
|
1784
|
+
return message;
|
|
1785
|
+
}
|
|
1786
|
+
function createBaseUpdateDiskSnapshotRequest() {
|
|
1787
|
+
const message = {
|
|
1788
|
+
$type: "nebius.compute.v1.UpdateDiskSnapshotRequest",
|
|
1789
|
+
metadata: undefined,
|
|
1790
|
+
spec: undefined,
|
|
1791
|
+
};
|
|
1792
|
+
return applyUpdateDiskSnapshotRequestCustom(message);
|
|
1793
|
+
}
|
|
1794
|
+
exports.DeleteDiskSnapshotRequest = {
|
|
1795
|
+
$type: "nebius.compute.v1.DeleteDiskSnapshotRequest",
|
|
1796
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
1797
|
+
if (message.id !== "") {
|
|
1798
|
+
writer.uint32(10).string(message.id);
|
|
1799
|
+
}
|
|
1800
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1801
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1802
|
+
}
|
|
1803
|
+
return writer;
|
|
1804
|
+
},
|
|
1805
|
+
decode(input, length) {
|
|
1806
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
1807
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1808
|
+
const message = createBaseDeleteDiskSnapshotRequest();
|
|
1809
|
+
let writer = undefined;
|
|
1810
|
+
while (reader.pos < end) {
|
|
1811
|
+
const tag = reader.uint32();
|
|
1812
|
+
switch (tag >>> 3) {
|
|
1813
|
+
case 1: {
|
|
1814
|
+
if (tag !== 10)
|
|
1815
|
+
break;
|
|
1816
|
+
message.id = reader.string();
|
|
1817
|
+
continue;
|
|
1818
|
+
}
|
|
1819
|
+
default:
|
|
1820
|
+
break;
|
|
1821
|
+
}
|
|
1822
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1823
|
+
break;
|
|
1824
|
+
}
|
|
1825
|
+
{
|
|
1826
|
+
if (!writer)
|
|
1827
|
+
writer = new index_js_1.BinaryWriter();
|
|
1828
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
1829
|
+
writer.uint32(tag).raw(skipped);
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
if (writer) {
|
|
1833
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
1834
|
+
}
|
|
1835
|
+
return message;
|
|
1836
|
+
},
|
|
1837
|
+
fromJSON(object) {
|
|
1838
|
+
return applyDeleteDiskSnapshotRequestCustom({
|
|
1839
|
+
$type: "nebius.compute.v1.DeleteDiskSnapshotRequest",
|
|
1840
|
+
id: (0, index_js_1.isSet)(object.id ?? object.id)
|
|
1841
|
+
? String(object.id ?? object.id)
|
|
1842
|
+
: "",
|
|
1843
|
+
});
|
|
1844
|
+
},
|
|
1845
|
+
toJSON(message, use = "json") {
|
|
1846
|
+
const obj = {};
|
|
1847
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
1848
|
+
if (message.id !== "") {
|
|
1849
|
+
obj[pick("id", "id")] = message.id;
|
|
1850
|
+
}
|
|
1851
|
+
return obj;
|
|
1852
|
+
},
|
|
1853
|
+
create(base) {
|
|
1854
|
+
return exports.DeleteDiskSnapshotRequest.fromPartial(base ?? {});
|
|
1855
|
+
},
|
|
1856
|
+
fromPartial(object) {
|
|
1857
|
+
const message = createBaseDeleteDiskSnapshotRequest();
|
|
1858
|
+
message.id = (object.id !== undefined && object.id !== null)
|
|
1859
|
+
? object.id
|
|
1860
|
+
: "";
|
|
1861
|
+
return message;
|
|
1862
|
+
},
|
|
1863
|
+
};
|
|
1864
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.DeleteDiskSnapshotRequest);
|
|
1865
|
+
function DeleteDiskSnapshotRequestCustomInspect() {
|
|
1866
|
+
const parts = [];
|
|
1867
|
+
if (this.id !== "")
|
|
1868
|
+
parts.push("id" + "=" + (0, util_1.inspect)(this.id));
|
|
1869
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
1870
|
+
}
|
|
1871
|
+
function DeleteDiskSnapshotRequestCustomJson() {
|
|
1872
|
+
const obj = {
|
|
1873
|
+
type: this.$type,
|
|
1874
|
+
};
|
|
1875
|
+
if (this.id !== "")
|
|
1876
|
+
obj.id = (0, logging_js_1.inspectJson)(this.id);
|
|
1877
|
+
return obj;
|
|
1878
|
+
}
|
|
1879
|
+
function applyDeleteDiskSnapshotRequestCustom(message) {
|
|
1880
|
+
message[logging_js_1.custom] = DeleteDiskSnapshotRequestCustomInspect;
|
|
1881
|
+
message[logging_js_1.customJson] = DeleteDiskSnapshotRequestCustomJson;
|
|
1882
|
+
return message;
|
|
1883
|
+
}
|
|
1884
|
+
function createBaseDeleteDiskSnapshotRequest() {
|
|
1885
|
+
const message = {
|
|
1886
|
+
$type: "nebius.compute.v1.DeleteDiskSnapshotRequest",
|
|
1887
|
+
id: "",
|
|
1888
|
+
};
|
|
1889
|
+
return applyDeleteDiskSnapshotRequestCustom(message);
|
|
1890
|
+
}
|
|
1891
|
+
exports.DiskSnapshotServiceServiceDescription = {
|
|
1892
|
+
get: {
|
|
1893
|
+
path: "/nebius.compute.v1.DiskSnapshotService/Get",
|
|
1894
|
+
requestStream: false,
|
|
1895
|
+
responseStream: false,
|
|
1896
|
+
requestSerialize: (value) => Buffer.from(exports.GetDiskSnapshotRequest.encode(value).finish()),
|
|
1897
|
+
sendResetMask: false,
|
|
1898
|
+
requestDeserialize: (value) => exports.GetDiskSnapshotRequest.decode(value),
|
|
1899
|
+
responseSerialize: (value) => Buffer.from(exports.DiskSnapshot.encode(value).finish()),
|
|
1900
|
+
responseDeserialize: (value) => exports.DiskSnapshot.decode(value),
|
|
1901
|
+
},
|
|
1902
|
+
getByName: {
|
|
1903
|
+
path: "/nebius.compute.v1.DiskSnapshotService/GetByName",
|
|
1904
|
+
requestStream: false,
|
|
1905
|
+
responseStream: false,
|
|
1906
|
+
requestSerialize: (value) => Buffer.from(index_js_3.GetByNameRequest.encode(value).finish()),
|
|
1907
|
+
sendResetMask: false,
|
|
1908
|
+
requestDeserialize: (value) => index_js_3.GetByNameRequest.decode(value),
|
|
1909
|
+
responseSerialize: (value) => Buffer.from(exports.DiskSnapshot.encode(value).finish()),
|
|
1910
|
+
responseDeserialize: (value) => exports.DiskSnapshot.decode(value),
|
|
1911
|
+
},
|
|
1912
|
+
list: {
|
|
1913
|
+
path: "/nebius.compute.v1.DiskSnapshotService/List",
|
|
1914
|
+
requestStream: false,
|
|
1915
|
+
responseStream: false,
|
|
1916
|
+
requestSerialize: (value) => Buffer.from(exports.ListDiskSnapshotsRequest.encode(value).finish()),
|
|
1917
|
+
sendResetMask: false,
|
|
1918
|
+
requestDeserialize: (value) => exports.ListDiskSnapshotsRequest.decode(value),
|
|
1919
|
+
responseSerialize: (value) => Buffer.from(exports.ListDiskSnapshotsResponse.encode(value).finish()),
|
|
1920
|
+
responseDeserialize: (value) => exports.ListDiskSnapshotsResponse.decode(value),
|
|
1921
|
+
},
|
|
1922
|
+
listByDisk: {
|
|
1923
|
+
path: "/nebius.compute.v1.DiskSnapshotService/ListByDisk",
|
|
1924
|
+
requestStream: false,
|
|
1925
|
+
responseStream: false,
|
|
1926
|
+
requestSerialize: (value) => Buffer.from(exports.ListDiskSnapshotsByDiskRequest.encode(value).finish()),
|
|
1927
|
+
sendResetMask: false,
|
|
1928
|
+
requestDeserialize: (value) => exports.ListDiskSnapshotsByDiskRequest.decode(value),
|
|
1929
|
+
responseSerialize: (value) => Buffer.from(exports.ListDiskSnapshotsByDiskResponse.encode(value).finish()),
|
|
1930
|
+
responseDeserialize: (value) => exports.ListDiskSnapshotsByDiskResponse.decode(value),
|
|
1931
|
+
},
|
|
1932
|
+
create: {
|
|
1933
|
+
path: "/nebius.compute.v1.DiskSnapshotService/Create",
|
|
1934
|
+
requestStream: false,
|
|
1935
|
+
responseStream: false,
|
|
1936
|
+
requestSerialize: (value) => Buffer.from(exports.CreateDiskSnapshotRequest.encode(value).finish()),
|
|
1937
|
+
sendResetMask: false,
|
|
1938
|
+
requestDeserialize: (value) => exports.CreateDiskSnapshotRequest.decode(value),
|
|
1939
|
+
responseSerialize: (value) => Buffer.from(index_js_3.Operation.encode(value).finish()),
|
|
1940
|
+
responseDeserialize: (value) => index_js_3.Operation.decode(value),
|
|
1941
|
+
},
|
|
1942
|
+
update: {
|
|
1943
|
+
path: "/nebius.compute.v1.DiskSnapshotService/Update",
|
|
1944
|
+
requestStream: false,
|
|
1945
|
+
responseStream: false,
|
|
1946
|
+
requestSerialize: (value) => Buffer.from(exports.UpdateDiskSnapshotRequest.encode(value).finish()),
|
|
1947
|
+
sendResetMask: true,
|
|
1948
|
+
requestDeserialize: (value) => exports.UpdateDiskSnapshotRequest.decode(value),
|
|
1949
|
+
responseSerialize: (value) => Buffer.from(index_js_3.Operation.encode(value).finish()),
|
|
1950
|
+
responseDeserialize: (value) => index_js_3.Operation.decode(value),
|
|
1951
|
+
},
|
|
1952
|
+
delete: {
|
|
1953
|
+
path: "/nebius.compute.v1.DiskSnapshotService/Delete",
|
|
1954
|
+
requestStream: false,
|
|
1955
|
+
responseStream: false,
|
|
1956
|
+
requestSerialize: (value) => Buffer.from(exports.DeleteDiskSnapshotRequest.encode(value).finish()),
|
|
1957
|
+
sendResetMask: false,
|
|
1958
|
+
requestDeserialize: (value) => exports.DeleteDiskSnapshotRequest.decode(value),
|
|
1959
|
+
responseSerialize: (value) => Buffer.from(index_js_3.Operation.encode(value).finish()),
|
|
1960
|
+
responseDeserialize: (value) => index_js_3.Operation.decode(value),
|
|
1961
|
+
},
|
|
1962
|
+
};
|
|
1963
|
+
exports.DiskSnapshotServiceBaseClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.DiskSnapshotServiceServiceDescription, "nebius.compute.v1.DiskSnapshotService");
|
|
1964
|
+
class DiskSnapshotService {
|
|
1965
|
+
sdk;
|
|
1966
|
+
$type = "nebius.compute.v1.DiskSnapshotService";
|
|
1967
|
+
addr;
|
|
1968
|
+
spec;
|
|
1969
|
+
apiServiceName = "compute";
|
|
1970
|
+
constructor(sdk) {
|
|
1971
|
+
this.sdk = sdk;
|
|
1972
|
+
const addr = sdk.getAddressFromServiceName(this.$type, this.apiServiceName);
|
|
1973
|
+
this.addr = addr;
|
|
1974
|
+
this.spec = exports.DiskSnapshotServiceServiceDescription;
|
|
1975
|
+
}
|
|
1976
|
+
getOperationService() {
|
|
1977
|
+
return new index_js_3.OperationService(this.sdk, this.addr);
|
|
1978
|
+
}
|
|
1979
|
+
get(...args) {
|
|
1980
|
+
const spec = this.spec.get;
|
|
1981
|
+
const request = args[0];
|
|
1982
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1983
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1984
|
+
const deserialize = spec.responseDeserialize;
|
|
1985
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1986
|
+
}
|
|
1987
|
+
getByName(...args) {
|
|
1988
|
+
const spec = this.spec.getByName;
|
|
1989
|
+
const request = args[0];
|
|
1990
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1991
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
1992
|
+
const deserialize = spec.responseDeserialize;
|
|
1993
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
1994
|
+
}
|
|
1995
|
+
list(...args) {
|
|
1996
|
+
const spec = this.spec.list;
|
|
1997
|
+
const request = args[0];
|
|
1998
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
1999
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
2000
|
+
const deserialize = spec.responseDeserialize;
|
|
2001
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
2002
|
+
}
|
|
2003
|
+
listByDisk(...args) {
|
|
2004
|
+
const spec = this.spec.listByDisk;
|
|
2005
|
+
const request = args[0];
|
|
2006
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
2007
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
2008
|
+
const deserialize = spec.responseDeserialize;
|
|
2009
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
2010
|
+
}
|
|
2011
|
+
create(...args) {
|
|
2012
|
+
const spec = this.spec.create;
|
|
2013
|
+
const request = args[0];
|
|
2014
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
2015
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
2016
|
+
const deserialize = (value) => {
|
|
2017
|
+
const resp = spec.responseDeserialize(value);
|
|
2018
|
+
return new operation_js_1.Operation(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
2019
|
+
};
|
|
2020
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
2021
|
+
}
|
|
2022
|
+
update(...args) {
|
|
2023
|
+
const spec = this.spec.update;
|
|
2024
|
+
const request = args[0];
|
|
2025
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
2026
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
2027
|
+
const deserialize = (value) => {
|
|
2028
|
+
const resp = spec.responseDeserialize(value);
|
|
2029
|
+
return new operation_js_1.Operation(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
2030
|
+
};
|
|
2031
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
2032
|
+
}
|
|
2033
|
+
delete(...args) {
|
|
2034
|
+
const spec = this.spec.delete;
|
|
2035
|
+
const request = args[0];
|
|
2036
|
+
const metadata = (args.length > 1 ? args[1] : undefined);
|
|
2037
|
+
const options = (args.length > 2 ? args[2] : undefined);
|
|
2038
|
+
const deserialize = (value) => {
|
|
2039
|
+
const resp = spec.responseDeserialize(value);
|
|
2040
|
+
return new operation_js_1.Operation(resp, this.getOperationService(), this.sdk.logger.child("operation"));
|
|
2041
|
+
};
|
|
2042
|
+
return new request_js_1.Request(this.sdk, spec, this.addr, deserialize, request, metadata, options);
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
exports.DiskSnapshotService = DiskSnapshotService;
|
|
2046
|
+
exports.DiskSnapshotStatus_State = (0, index_js_1.createEnum)("nebius.compute.v1.DiskSnapshotStatus.State", {
|
|
2047
|
+
UNSPECIFIED: 0,
|
|
2048
|
+
CREATING: 1,
|
|
2049
|
+
READY: 2,
|
|
2050
|
+
DELETING: 3,
|
|
2051
|
+
ERROR: 4,
|
|
2052
|
+
});
|
|
2053
|
+
protobuf_js_1.protoRegistry.registerEnum(exports.DiskSnapshotStatus_State);
|
|
2054
|
+
exports.DiskSnapshotStatus_CPUArchitecture = (0, index_js_1.createEnum)("nebius.compute.v1.DiskSnapshotStatus.CPUArchitecture", {
|
|
2055
|
+
UNDEFINED: 0,
|
|
2056
|
+
AMD64: 1,
|
|
2057
|
+
ARM64: 2,
|
|
2058
|
+
});
|
|
2059
|
+
protobuf_js_1.protoRegistry.registerEnum(exports.DiskSnapshotStatus_CPUArchitecture);
|
|
2060
|
+
exports.DiskSnapshot = {
|
|
2061
|
+
$type: "nebius.compute.v1.DiskSnapshot",
|
|
2062
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
2063
|
+
if (message.metadata !== undefined) {
|
|
2064
|
+
const w = writer.uint32(10).fork();
|
|
2065
|
+
index_js_3.ResourceMetadata.encode(message.metadata, w);
|
|
2066
|
+
w.join();
|
|
2067
|
+
}
|
|
2068
|
+
if (message.spec !== undefined) {
|
|
2069
|
+
const w = writer.uint32(18).fork();
|
|
2070
|
+
exports.DiskSnapshotSpec.encode(message.spec, w);
|
|
2071
|
+
w.join();
|
|
2072
|
+
}
|
|
2073
|
+
if (message.status !== undefined) {
|
|
2074
|
+
const w = writer.uint32(26).fork();
|
|
2075
|
+
exports.DiskSnapshotStatus.encode(message.status, w);
|
|
2076
|
+
w.join();
|
|
2077
|
+
}
|
|
2078
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
2079
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2080
|
+
}
|
|
2081
|
+
return writer;
|
|
2082
|
+
},
|
|
2083
|
+
decode(input, length) {
|
|
2084
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
2085
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2086
|
+
const message = createBaseDiskSnapshot();
|
|
2087
|
+
let writer = undefined;
|
|
2088
|
+
while (reader.pos < end) {
|
|
2089
|
+
const tag = reader.uint32();
|
|
2090
|
+
switch (tag >>> 3) {
|
|
2091
|
+
case 1: {
|
|
2092
|
+
if (tag !== 10)
|
|
2093
|
+
break;
|
|
2094
|
+
message.metadata = index_js_3.ResourceMetadata.decode(reader, reader.uint32());
|
|
2095
|
+
continue;
|
|
2096
|
+
}
|
|
2097
|
+
case 2: {
|
|
2098
|
+
if (tag !== 18)
|
|
2099
|
+
break;
|
|
2100
|
+
message.spec = exports.DiskSnapshotSpec.decode(reader, reader.uint32());
|
|
2101
|
+
continue;
|
|
2102
|
+
}
|
|
2103
|
+
case 3: {
|
|
2104
|
+
if (tag !== 26)
|
|
2105
|
+
break;
|
|
2106
|
+
message.status = exports.DiskSnapshotStatus.decode(reader, reader.uint32());
|
|
2107
|
+
continue;
|
|
2108
|
+
}
|
|
2109
|
+
default:
|
|
2110
|
+
break;
|
|
2111
|
+
}
|
|
2112
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2113
|
+
break;
|
|
2114
|
+
}
|
|
2115
|
+
{
|
|
2116
|
+
if (!writer)
|
|
2117
|
+
writer = new index_js_1.BinaryWriter();
|
|
2118
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2119
|
+
writer.uint32(tag).raw(skipped);
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
if (writer) {
|
|
2123
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
2124
|
+
}
|
|
2125
|
+
return message;
|
|
2126
|
+
},
|
|
2127
|
+
fromJSON(object) {
|
|
2128
|
+
return applyDiskSnapshotCustom({
|
|
2129
|
+
$type: "nebius.compute.v1.DiskSnapshot",
|
|
2130
|
+
metadata: (0, index_js_1.isSet)(object.metadata ?? object.metadata)
|
|
2131
|
+
? index_js_3.ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
|
|
2132
|
+
: undefined,
|
|
2133
|
+
spec: (0, index_js_1.isSet)(object.spec ?? object.spec)
|
|
2134
|
+
? exports.DiskSnapshotSpec.fromJSON(object.spec ?? object.spec)
|
|
2135
|
+
: undefined,
|
|
2136
|
+
status: (0, index_js_1.isSet)(object.status ?? object.status)
|
|
2137
|
+
? exports.DiskSnapshotStatus.fromJSON(object.status ?? object.status)
|
|
2138
|
+
: undefined,
|
|
2139
|
+
});
|
|
2140
|
+
},
|
|
2141
|
+
toJSON(message, use = "json") {
|
|
2142
|
+
const obj = {};
|
|
2143
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2144
|
+
if (message.metadata !== undefined) {
|
|
2145
|
+
obj[pick("metadata", "metadata")] = message.metadata
|
|
2146
|
+
? index_js_3.ResourceMetadata.toJSON(message.metadata, use)
|
|
2147
|
+
: undefined;
|
|
2148
|
+
}
|
|
2149
|
+
if (message.spec !== undefined) {
|
|
2150
|
+
obj[pick("spec", "spec")] = message.spec
|
|
2151
|
+
? exports.DiskSnapshotSpec.toJSON(message.spec, use)
|
|
2152
|
+
: undefined;
|
|
2153
|
+
}
|
|
2154
|
+
if (message.status !== undefined) {
|
|
2155
|
+
obj[pick("status", "status")] = message.status
|
|
2156
|
+
? exports.DiskSnapshotStatus.toJSON(message.status, use)
|
|
2157
|
+
: undefined;
|
|
2158
|
+
}
|
|
2159
|
+
return obj;
|
|
2160
|
+
},
|
|
2161
|
+
create(base) {
|
|
2162
|
+
return exports.DiskSnapshot.fromPartial(base ?? {});
|
|
2163
|
+
},
|
|
2164
|
+
fromPartial(object) {
|
|
2165
|
+
const message = createBaseDiskSnapshot();
|
|
2166
|
+
message.metadata = (object.metadata !== undefined && object.metadata !== null)
|
|
2167
|
+
? index_js_3.ResourceMetadata.fromPartial(object.metadata)
|
|
2168
|
+
: undefined;
|
|
2169
|
+
message.spec = (object.spec !== undefined && object.spec !== null)
|
|
2170
|
+
? exports.DiskSnapshotSpec.fromPartial(object.spec)
|
|
2171
|
+
: undefined;
|
|
2172
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2173
|
+
? exports.DiskSnapshotStatus.fromPartial(object.status)
|
|
2174
|
+
: undefined;
|
|
2175
|
+
return message;
|
|
2176
|
+
},
|
|
2177
|
+
};
|
|
2178
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.DiskSnapshot);
|
|
2179
|
+
function DiskSnapshotCustomInspect() {
|
|
2180
|
+
const parts = [];
|
|
2181
|
+
if (this.metadata !== undefined)
|
|
2182
|
+
parts.push("metadata" + "=" + (0, util_1.inspect)(this.metadata));
|
|
2183
|
+
if (this.spec !== undefined)
|
|
2184
|
+
parts.push("spec" + "=" + (0, util_1.inspect)(this.spec));
|
|
2185
|
+
if (this.status !== undefined)
|
|
2186
|
+
parts.push("status" + "=" + (0, util_1.inspect)(this.status));
|
|
2187
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2188
|
+
}
|
|
2189
|
+
function DiskSnapshotCustomJson() {
|
|
2190
|
+
const obj = {
|
|
2191
|
+
type: this.$type,
|
|
2192
|
+
};
|
|
2193
|
+
if (this.metadata !== undefined)
|
|
2194
|
+
obj.metadata = (0, logging_js_1.inspectJson)(this.metadata);
|
|
2195
|
+
if (this.spec !== undefined)
|
|
2196
|
+
obj.spec = (0, logging_js_1.inspectJson)(this.spec);
|
|
2197
|
+
if (this.status !== undefined)
|
|
2198
|
+
obj.status = (0, logging_js_1.inspectJson)(this.status);
|
|
2199
|
+
return obj;
|
|
2200
|
+
}
|
|
2201
|
+
function applyDiskSnapshotCustom(message) {
|
|
2202
|
+
message[logging_js_1.custom] = DiskSnapshotCustomInspect;
|
|
2203
|
+
message[logging_js_1.customJson] = DiskSnapshotCustomJson;
|
|
2204
|
+
return message;
|
|
2205
|
+
}
|
|
2206
|
+
function createBaseDiskSnapshot() {
|
|
2207
|
+
const message = {
|
|
2208
|
+
$type: "nebius.compute.v1.DiskSnapshot",
|
|
2209
|
+
metadata: undefined,
|
|
2210
|
+
spec: undefined,
|
|
2211
|
+
status: undefined,
|
|
2212
|
+
};
|
|
2213
|
+
return applyDiskSnapshotCustom(message);
|
|
2214
|
+
}
|
|
2215
|
+
exports.DiskSnapshotSpec = {
|
|
2216
|
+
$type: "nebius.compute.v1.DiskSnapshotSpec",
|
|
2217
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
2218
|
+
if (message.sourceDiskId !== "") {
|
|
2219
|
+
writer.uint32(10).string(message.sourceDiskId);
|
|
2220
|
+
}
|
|
2221
|
+
if (message.description !== "") {
|
|
2222
|
+
writer.uint32(18).string(message.description);
|
|
2223
|
+
}
|
|
2224
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
2225
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2226
|
+
}
|
|
2227
|
+
return writer;
|
|
2228
|
+
},
|
|
2229
|
+
decode(input, length) {
|
|
2230
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
2231
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2232
|
+
const message = createBaseDiskSnapshotSpec();
|
|
2233
|
+
let writer = undefined;
|
|
2234
|
+
while (reader.pos < end) {
|
|
2235
|
+
const tag = reader.uint32();
|
|
2236
|
+
switch (tag >>> 3) {
|
|
2237
|
+
case 1: {
|
|
2238
|
+
if (tag !== 10)
|
|
2239
|
+
break;
|
|
2240
|
+
message.sourceDiskId = reader.string();
|
|
2241
|
+
continue;
|
|
2242
|
+
}
|
|
2243
|
+
case 2: {
|
|
2244
|
+
if (tag !== 18)
|
|
2245
|
+
break;
|
|
2246
|
+
message.description = reader.string();
|
|
2247
|
+
continue;
|
|
2248
|
+
}
|
|
2249
|
+
default:
|
|
2250
|
+
break;
|
|
2251
|
+
}
|
|
2252
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2253
|
+
break;
|
|
2254
|
+
}
|
|
2255
|
+
{
|
|
2256
|
+
if (!writer)
|
|
2257
|
+
writer = new index_js_1.BinaryWriter();
|
|
2258
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2259
|
+
writer.uint32(tag).raw(skipped);
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
if (writer) {
|
|
2263
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
2264
|
+
}
|
|
2265
|
+
return message;
|
|
2266
|
+
},
|
|
2267
|
+
fromJSON(object) {
|
|
2268
|
+
return applyDiskSnapshotSpecCustom({
|
|
2269
|
+
$type: "nebius.compute.v1.DiskSnapshotSpec",
|
|
2270
|
+
sourceDiskId: (0, index_js_1.isSet)(object.sourceDiskId ?? object.source_disk_id)
|
|
2271
|
+
? String(object.sourceDiskId ?? object.source_disk_id)
|
|
2272
|
+
: "",
|
|
2273
|
+
description: (0, index_js_1.isSet)(object.description ?? object.description)
|
|
2274
|
+
? String(object.description ?? object.description)
|
|
2275
|
+
: "",
|
|
2276
|
+
});
|
|
2277
|
+
},
|
|
2278
|
+
toJSON(message, use = "json") {
|
|
2279
|
+
const obj = {};
|
|
2280
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2281
|
+
if (message.sourceDiskId !== "") {
|
|
2282
|
+
obj[pick("sourceDiskId", "source_disk_id")] = message.sourceDiskId;
|
|
2283
|
+
}
|
|
2284
|
+
if (message.description !== "") {
|
|
2285
|
+
obj[pick("description", "description")] = message.description;
|
|
2286
|
+
}
|
|
2287
|
+
return obj;
|
|
2288
|
+
},
|
|
2289
|
+
create(base) {
|
|
2290
|
+
return exports.DiskSnapshotSpec.fromPartial(base ?? {});
|
|
2291
|
+
},
|
|
2292
|
+
fromPartial(object) {
|
|
2293
|
+
const message = createBaseDiskSnapshotSpec();
|
|
2294
|
+
message.sourceDiskId = (object.sourceDiskId !== undefined && object.sourceDiskId !== null)
|
|
2295
|
+
? object.sourceDiskId
|
|
2296
|
+
: "";
|
|
2297
|
+
message.description = (object.description !== undefined && object.description !== null)
|
|
2298
|
+
? object.description
|
|
2299
|
+
: "";
|
|
2300
|
+
return message;
|
|
2301
|
+
},
|
|
2302
|
+
};
|
|
2303
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.DiskSnapshotSpec);
|
|
2304
|
+
function DiskSnapshotSpecCustomInspect() {
|
|
2305
|
+
const parts = [];
|
|
2306
|
+
if (this.sourceDiskId !== "")
|
|
2307
|
+
parts.push("sourceDiskId" + "=" + (0, util_1.inspect)(this.sourceDiskId));
|
|
2308
|
+
if (this.description !== "")
|
|
2309
|
+
parts.push("description" + "=" + (0, util_1.inspect)(this.description));
|
|
2310
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2311
|
+
}
|
|
2312
|
+
function DiskSnapshotSpecCustomJson() {
|
|
2313
|
+
const obj = {
|
|
2314
|
+
type: this.$type,
|
|
2315
|
+
};
|
|
2316
|
+
if (this.sourceDiskId !== "")
|
|
2317
|
+
obj.sourceDiskId = (0, logging_js_1.inspectJson)(this.sourceDiskId);
|
|
2318
|
+
if (this.description !== "")
|
|
2319
|
+
obj.description = (0, logging_js_1.inspectJson)(this.description);
|
|
2320
|
+
return obj;
|
|
2321
|
+
}
|
|
2322
|
+
function applyDiskSnapshotSpecCustom(message) {
|
|
2323
|
+
message[logging_js_1.custom] = DiskSnapshotSpecCustomInspect;
|
|
2324
|
+
message[logging_js_1.customJson] = DiskSnapshotSpecCustomJson;
|
|
2325
|
+
return message;
|
|
2326
|
+
}
|
|
2327
|
+
function createBaseDiskSnapshotSpec() {
|
|
2328
|
+
const message = {
|
|
2329
|
+
$type: "nebius.compute.v1.DiskSnapshotSpec",
|
|
2330
|
+
sourceDiskId: "",
|
|
2331
|
+
description: "",
|
|
2332
|
+
};
|
|
2333
|
+
return applyDiskSnapshotSpecCustom(message);
|
|
2334
|
+
}
|
|
2335
|
+
exports.DiskSnapshotStatus = {
|
|
2336
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus",
|
|
2337
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
2338
|
+
if ((message.state ?? exports.DiskSnapshotStatus_State.UNSPECIFIED) !== exports.DiskSnapshotStatus_State.UNSPECIFIED) {
|
|
2339
|
+
exports.DiskSnapshotStatus_State.encodeField(writer, 1, message.state);
|
|
2340
|
+
}
|
|
2341
|
+
if (message.contentSizeBytes !== undefined && !message.contentSizeBytes.isZero?.()) {
|
|
2342
|
+
writer.uint32(16).int64(message.contentSizeBytes.toString());
|
|
2343
|
+
}
|
|
2344
|
+
if (message.storageSizeBytes !== undefined && !message.storageSizeBytes.isZero?.()) {
|
|
2345
|
+
writer.uint32(24).int64(message.storageSizeBytes.toString());
|
|
2346
|
+
}
|
|
2347
|
+
if (message.lockState !== undefined) {
|
|
2348
|
+
const w = writer.uint32(34).fork();
|
|
2349
|
+
exports.DiskSnapshotStatus_LockState.encode(message.lockState, w);
|
|
2350
|
+
w.join();
|
|
2351
|
+
}
|
|
2352
|
+
if ((message.sourceCpuArchitecture ?? exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED) !== exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED) {
|
|
2353
|
+
exports.DiskSnapshotStatus_CPUArchitecture.encodeField(writer, 5, message.sourceCpuArchitecture);
|
|
2354
|
+
}
|
|
2355
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
2356
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2357
|
+
}
|
|
2358
|
+
return writer;
|
|
2359
|
+
},
|
|
2360
|
+
decode(input, length) {
|
|
2361
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
2362
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2363
|
+
const message = createBaseDiskSnapshotStatus();
|
|
2364
|
+
let writer = undefined;
|
|
2365
|
+
while (reader.pos < end) {
|
|
2366
|
+
const tag = reader.uint32();
|
|
2367
|
+
switch (tag >>> 3) {
|
|
2368
|
+
case 1: {
|
|
2369
|
+
if (tag !== 8)
|
|
2370
|
+
break;
|
|
2371
|
+
message.state = exports.DiskSnapshotStatus_State.fromNumber(reader.int32());
|
|
2372
|
+
continue;
|
|
2373
|
+
}
|
|
2374
|
+
case 2: {
|
|
2375
|
+
if (tag !== 16)
|
|
2376
|
+
break;
|
|
2377
|
+
message.contentSizeBytes = index_js_1.Long.fromValue(reader.int64());
|
|
2378
|
+
continue;
|
|
2379
|
+
}
|
|
2380
|
+
case 3: {
|
|
2381
|
+
if (tag !== 24)
|
|
2382
|
+
break;
|
|
2383
|
+
message.storageSizeBytes = index_js_1.Long.fromValue(reader.int64());
|
|
2384
|
+
continue;
|
|
2385
|
+
}
|
|
2386
|
+
case 4: {
|
|
2387
|
+
if (tag !== 34)
|
|
2388
|
+
break;
|
|
2389
|
+
message.lockState = exports.DiskSnapshotStatus_LockState.decode(reader, reader.uint32());
|
|
2390
|
+
continue;
|
|
2391
|
+
}
|
|
2392
|
+
case 5: {
|
|
2393
|
+
if (tag !== 40)
|
|
2394
|
+
break;
|
|
2395
|
+
message.sourceCpuArchitecture = exports.DiskSnapshotStatus_CPUArchitecture.fromNumber(reader.int32());
|
|
2396
|
+
continue;
|
|
2397
|
+
}
|
|
2398
|
+
default:
|
|
2399
|
+
break;
|
|
2400
|
+
}
|
|
2401
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2402
|
+
break;
|
|
2403
|
+
}
|
|
2404
|
+
{
|
|
2405
|
+
if (!writer)
|
|
2406
|
+
writer = new index_js_1.BinaryWriter();
|
|
2407
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2408
|
+
writer.uint32(tag).raw(skipped);
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
if (writer) {
|
|
2412
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
2413
|
+
}
|
|
2414
|
+
return message;
|
|
2415
|
+
},
|
|
2416
|
+
fromJSON(object) {
|
|
2417
|
+
return applyDiskSnapshotStatusCustom({
|
|
2418
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus",
|
|
2419
|
+
state: (0, index_js_1.isSet)(object.state ?? object.state)
|
|
2420
|
+
? exports.DiskSnapshotStatus_State.fromJSON(object.state ?? object.state)
|
|
2421
|
+
: exports.DiskSnapshotStatus_State.UNSPECIFIED,
|
|
2422
|
+
contentSizeBytes: (0, index_js_1.isSet)(object.contentSizeBytes ?? object.content_size_bytes)
|
|
2423
|
+
? index_js_1.Long.fromValue(object.contentSizeBytes ?? object.content_size_bytes)
|
|
2424
|
+
: index_js_1.Long.ZERO,
|
|
2425
|
+
storageSizeBytes: (0, index_js_1.isSet)(object.storageSizeBytes ?? object.storage_size_bytes)
|
|
2426
|
+
? index_js_1.Long.fromValue(object.storageSizeBytes ?? object.storage_size_bytes)
|
|
2427
|
+
: index_js_1.Long.ZERO,
|
|
2428
|
+
lockState: (0, index_js_1.isSet)(object.lockState ?? object.lock_state)
|
|
2429
|
+
? exports.DiskSnapshotStatus_LockState.fromJSON(object.lockState ?? object.lock_state)
|
|
2430
|
+
: undefined,
|
|
2431
|
+
sourceCpuArchitecture: (0, index_js_1.isSet)(object.sourceCpuArchitecture ?? object.source_cpu_architecture)
|
|
2432
|
+
? exports.DiskSnapshotStatus_CPUArchitecture.fromJSON(object.sourceCpuArchitecture ?? object.source_cpu_architecture)
|
|
2433
|
+
: exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED,
|
|
2434
|
+
});
|
|
2435
|
+
},
|
|
2436
|
+
toJSON(message, use = "json") {
|
|
2437
|
+
const obj = {};
|
|
2438
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2439
|
+
if ((message.state ?? exports.DiskSnapshotStatus_State.UNSPECIFIED) !== exports.DiskSnapshotStatus_State.UNSPECIFIED) {
|
|
2440
|
+
obj[pick("state", "state")] = exports.DiskSnapshotStatus_State.toJSON(message.state);
|
|
2441
|
+
}
|
|
2442
|
+
if (!message.contentSizeBytes?.isZero?.()) {
|
|
2443
|
+
obj[pick("contentSizeBytes", "content_size_bytes")] = (message.contentSizeBytes || index_js_1.Long.ZERO).toString();
|
|
2444
|
+
}
|
|
2445
|
+
if (!message.storageSizeBytes?.isZero?.()) {
|
|
2446
|
+
obj[pick("storageSizeBytes", "storage_size_bytes")] = (message.storageSizeBytes || index_js_1.Long.ZERO).toString();
|
|
2447
|
+
}
|
|
2448
|
+
if (message.lockState !== undefined) {
|
|
2449
|
+
obj[pick("lockState", "lock_state")] = message.lockState
|
|
2450
|
+
? exports.DiskSnapshotStatus_LockState.toJSON(message.lockState, use)
|
|
2451
|
+
: undefined;
|
|
2452
|
+
}
|
|
2453
|
+
if ((message.sourceCpuArchitecture ?? exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED) !== exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED) {
|
|
2454
|
+
obj[pick("sourceCpuArchitecture", "source_cpu_architecture")] = exports.DiskSnapshotStatus_CPUArchitecture.toJSON(message.sourceCpuArchitecture);
|
|
2455
|
+
}
|
|
2456
|
+
return obj;
|
|
2457
|
+
},
|
|
2458
|
+
create(base) {
|
|
2459
|
+
return exports.DiskSnapshotStatus.fromPartial(base ?? {});
|
|
2460
|
+
},
|
|
2461
|
+
fromPartial(object) {
|
|
2462
|
+
const message = createBaseDiskSnapshotStatus();
|
|
2463
|
+
message.state = (object.state !== undefined && object.state !== null)
|
|
2464
|
+
? exports.DiskSnapshotStatus_State.fromJSON(object.state.name)
|
|
2465
|
+
: exports.DiskSnapshotStatus_State.UNSPECIFIED;
|
|
2466
|
+
message.contentSizeBytes = (object.contentSizeBytes !== undefined && object.contentSizeBytes !== null)
|
|
2467
|
+
? index_js_1.Long.fromValue(object.contentSizeBytes)
|
|
2468
|
+
: index_js_1.Long.ZERO;
|
|
2469
|
+
message.storageSizeBytes = (object.storageSizeBytes !== undefined && object.storageSizeBytes !== null)
|
|
2470
|
+
? index_js_1.Long.fromValue(object.storageSizeBytes)
|
|
2471
|
+
: index_js_1.Long.ZERO;
|
|
2472
|
+
message.lockState = (object.lockState !== undefined && object.lockState !== null)
|
|
2473
|
+
? exports.DiskSnapshotStatus_LockState.fromPartial(object.lockState)
|
|
2474
|
+
: undefined;
|
|
2475
|
+
message.sourceCpuArchitecture = (object.sourceCpuArchitecture !== undefined && object.sourceCpuArchitecture !== null)
|
|
2476
|
+
? exports.DiskSnapshotStatus_CPUArchitecture.fromJSON(object.sourceCpuArchitecture.name)
|
|
2477
|
+
: exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED;
|
|
2478
|
+
return message;
|
|
2479
|
+
},
|
|
2480
|
+
};
|
|
2481
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.DiskSnapshotStatus);
|
|
2482
|
+
function DiskSnapshotStatusCustomInspect() {
|
|
2483
|
+
const parts = [];
|
|
2484
|
+
if (this.state !== undefined)
|
|
2485
|
+
parts.push("state" + "=" + (0, util_1.inspect)(this.state));
|
|
2486
|
+
if (!this.contentSizeBytes?.isZero?.())
|
|
2487
|
+
parts.push("contentSizeBytes" + "=" + (0, util_1.inspect)(this.contentSizeBytes));
|
|
2488
|
+
if (!this.storageSizeBytes?.isZero?.())
|
|
2489
|
+
parts.push("storageSizeBytes" + "=" + (0, util_1.inspect)(this.storageSizeBytes));
|
|
2490
|
+
if (this.lockState !== undefined)
|
|
2491
|
+
parts.push("lockState" + "=" + (0, util_1.inspect)(this.lockState));
|
|
2492
|
+
if (this.sourceCpuArchitecture !== undefined)
|
|
2493
|
+
parts.push("sourceCpuArchitecture" + "=" + (0, util_1.inspect)(this.sourceCpuArchitecture));
|
|
2494
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2495
|
+
}
|
|
2496
|
+
function DiskSnapshotStatusCustomJson() {
|
|
2497
|
+
const obj = {
|
|
2498
|
+
type: this.$type,
|
|
2499
|
+
};
|
|
2500
|
+
if (this.state !== undefined)
|
|
2501
|
+
obj.state = (0, logging_js_1.inspectJson)(this.state);
|
|
2502
|
+
if (!this.contentSizeBytes?.isZero?.())
|
|
2503
|
+
obj.contentSizeBytes = (0, logging_js_1.inspectJson)(this.contentSizeBytes);
|
|
2504
|
+
if (!this.storageSizeBytes?.isZero?.())
|
|
2505
|
+
obj.storageSizeBytes = (0, logging_js_1.inspectJson)(this.storageSizeBytes);
|
|
2506
|
+
if (this.lockState !== undefined)
|
|
2507
|
+
obj.lockState = (0, logging_js_1.inspectJson)(this.lockState);
|
|
2508
|
+
if (this.sourceCpuArchitecture !== undefined)
|
|
2509
|
+
obj.sourceCpuArchitecture = (0, logging_js_1.inspectJson)(this.sourceCpuArchitecture);
|
|
2510
|
+
return obj;
|
|
2511
|
+
}
|
|
2512
|
+
function applyDiskSnapshotStatusCustom(message) {
|
|
2513
|
+
message[logging_js_1.custom] = DiskSnapshotStatusCustomInspect;
|
|
2514
|
+
message[logging_js_1.customJson] = DiskSnapshotStatusCustomJson;
|
|
2515
|
+
return message;
|
|
2516
|
+
}
|
|
2517
|
+
function createBaseDiskSnapshotStatus() {
|
|
2518
|
+
const message = {
|
|
2519
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus",
|
|
2520
|
+
state: exports.DiskSnapshotStatus_State.UNSPECIFIED,
|
|
2521
|
+
contentSizeBytes: index_js_1.Long.ZERO,
|
|
2522
|
+
storageSizeBytes: index_js_1.Long.ZERO,
|
|
2523
|
+
lockState: undefined,
|
|
2524
|
+
sourceCpuArchitecture: exports.DiskSnapshotStatus_CPUArchitecture.UNDEFINED,
|
|
2525
|
+
};
|
|
2526
|
+
return applyDiskSnapshotStatusCustom(message);
|
|
2527
|
+
}
|
|
2528
|
+
exports.DiskSnapshotStatus_LockState = {
|
|
2529
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus.LockState",
|
|
2530
|
+
encode(message, writer = new index_js_1.BinaryWriter()) {
|
|
2531
|
+
for (const v of (message.disks ?? [])) {
|
|
2532
|
+
writer.uint32(10).string(v);
|
|
2533
|
+
}
|
|
2534
|
+
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
2535
|
+
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
2536
|
+
}
|
|
2537
|
+
return writer;
|
|
2538
|
+
},
|
|
2539
|
+
decode(input, length) {
|
|
2540
|
+
const reader = input instanceof index_js_1.BinaryReader ? input : new index_js_1.BinaryReader(input);
|
|
2541
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2542
|
+
const message = createBaseDiskSnapshotStatus_LockState();
|
|
2543
|
+
let writer = undefined;
|
|
2544
|
+
while (reader.pos < end) {
|
|
2545
|
+
const tag = reader.uint32();
|
|
2546
|
+
switch (tag >>> 3) {
|
|
2547
|
+
case 1: {
|
|
2548
|
+
if (tag !== 10)
|
|
2549
|
+
break;
|
|
2550
|
+
message.disks.push(reader.string());
|
|
2551
|
+
continue;
|
|
2552
|
+
}
|
|
2553
|
+
default:
|
|
2554
|
+
break;
|
|
2555
|
+
}
|
|
2556
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2557
|
+
break;
|
|
2558
|
+
}
|
|
2559
|
+
{
|
|
2560
|
+
if (!writer)
|
|
2561
|
+
writer = new index_js_1.BinaryWriter();
|
|
2562
|
+
const skipped = reader.skip(tag & 7, tag >>> 3);
|
|
2563
|
+
writer.uint32(tag).raw(skipped);
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
if (writer) {
|
|
2567
|
+
message[index_js_1.unknownFieldsSymbol] = writer.finish();
|
|
2568
|
+
}
|
|
2569
|
+
return message;
|
|
2570
|
+
},
|
|
2571
|
+
fromJSON(object) {
|
|
2572
|
+
return applyDiskSnapshotStatus_LockStateCustom({
|
|
2573
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus.LockState",
|
|
2574
|
+
disks: globalThis.Array.isArray(object?.disks ?? object?.disks)
|
|
2575
|
+
? (object.disks ?? object.disks).map((e) => String(e))
|
|
2576
|
+
: [],
|
|
2577
|
+
});
|
|
2578
|
+
},
|
|
2579
|
+
toJSON(message, use = "json") {
|
|
2580
|
+
const obj = {};
|
|
2581
|
+
const pick = (json, pb) => (use === "json" ? json : pb);
|
|
2582
|
+
if (message.disks?.length) {
|
|
2583
|
+
obj[pick("disks", "disks")] = message.disks.map((e) => e);
|
|
2584
|
+
}
|
|
2585
|
+
return obj;
|
|
2586
|
+
},
|
|
2587
|
+
create(base) {
|
|
2588
|
+
return exports.DiskSnapshotStatus_LockState.fromPartial(base ?? {});
|
|
2589
|
+
},
|
|
2590
|
+
fromPartial(object) {
|
|
2591
|
+
const message = createBaseDiskSnapshotStatus_LockState();
|
|
2592
|
+
message.disks = object.disks?.map((e) => e) || [];
|
|
2593
|
+
return message;
|
|
2594
|
+
},
|
|
2595
|
+
};
|
|
2596
|
+
protobuf_js_1.protoRegistry.registerMessage(exports.DiskSnapshotStatus_LockState);
|
|
2597
|
+
function DiskSnapshotStatus_LockStateCustomInspect() {
|
|
2598
|
+
const parts = [];
|
|
2599
|
+
if ((this.disks?.length ?? 0) !== 0)
|
|
2600
|
+
parts.push("disks" + "=" + (0, util_1.inspect)(this.disks));
|
|
2601
|
+
return `${this.$type}(${parts.join(", ")})`;
|
|
2602
|
+
}
|
|
2603
|
+
function DiskSnapshotStatus_LockStateCustomJson() {
|
|
2604
|
+
const obj = {
|
|
2605
|
+
type: this.$type,
|
|
2606
|
+
};
|
|
2607
|
+
if ((this.disks?.length ?? 0) !== 0)
|
|
2608
|
+
obj.disks = (0, logging_js_1.inspectJson)(this.disks);
|
|
2609
|
+
return obj;
|
|
2610
|
+
}
|
|
2611
|
+
function applyDiskSnapshotStatus_LockStateCustom(message) {
|
|
2612
|
+
message[logging_js_1.custom] = DiskSnapshotStatus_LockStateCustomInspect;
|
|
2613
|
+
message[logging_js_1.customJson] = DiskSnapshotStatus_LockStateCustomJson;
|
|
2614
|
+
return message;
|
|
2615
|
+
}
|
|
2616
|
+
function createBaseDiskSnapshotStatus_LockState() {
|
|
2617
|
+
const message = {
|
|
2618
|
+
$type: "nebius.compute.v1.DiskSnapshotStatus.LockState",
|
|
2619
|
+
disks: [],
|
|
2620
|
+
};
|
|
2621
|
+
return applyDiskSnapshotStatus_LockStateCustom(message);
|
|
2622
|
+
}
|
|
914
2623
|
exports.DiskSpec_DiskType = (0, index_js_1.createEnum)("nebius.compute.v1.DiskSpec.DiskType", {
|
|
915
2624
|
UNSPECIFIED: 0,
|
|
916
2625
|
NETWORK_SSD: 1,
|
|
@@ -1955,6 +3664,9 @@ exports.DiskStatus_LockState = {
|
|
|
1955
3664
|
for (const v of (message.images ?? [])) {
|
|
1956
3665
|
writer.uint32(10).string(v);
|
|
1957
3666
|
}
|
|
3667
|
+
for (const v of (message.snapshots ?? [])) {
|
|
3668
|
+
writer.uint32(18).string(v);
|
|
3669
|
+
}
|
|
1958
3670
|
if (message[index_js_1.unknownFieldsSymbol]) {
|
|
1959
3671
|
writer.raw(message[index_js_1.unknownFieldsSymbol]);
|
|
1960
3672
|
}
|
|
@@ -1974,6 +3686,12 @@ exports.DiskStatus_LockState = {
|
|
|
1974
3686
|
message.images.push(reader.string());
|
|
1975
3687
|
continue;
|
|
1976
3688
|
}
|
|
3689
|
+
case 2: {
|
|
3690
|
+
if (tag !== 18)
|
|
3691
|
+
break;
|
|
3692
|
+
message.snapshots.push(reader.string());
|
|
3693
|
+
continue;
|
|
3694
|
+
}
|
|
1977
3695
|
default:
|
|
1978
3696
|
break;
|
|
1979
3697
|
}
|
|
@@ -1998,6 +3716,9 @@ exports.DiskStatus_LockState = {
|
|
|
1998
3716
|
images: globalThis.Array.isArray(object?.images ?? object?.images)
|
|
1999
3717
|
? (object.images ?? object.images).map((e) => String(e))
|
|
2000
3718
|
: [],
|
|
3719
|
+
snapshots: globalThis.Array.isArray(object?.snapshots ?? object?.snapshots)
|
|
3720
|
+
? (object.snapshots ?? object.snapshots).map((e) => String(e))
|
|
3721
|
+
: [],
|
|
2001
3722
|
});
|
|
2002
3723
|
},
|
|
2003
3724
|
toJSON(message, use = "json") {
|
|
@@ -2006,6 +3727,9 @@ exports.DiskStatus_LockState = {
|
|
|
2006
3727
|
if (message.images?.length) {
|
|
2007
3728
|
obj[pick("images", "images")] = message.images.map((e) => e);
|
|
2008
3729
|
}
|
|
3730
|
+
if (message.snapshots?.length) {
|
|
3731
|
+
obj[pick("snapshots", "snapshots")] = message.snapshots.map((e) => e);
|
|
3732
|
+
}
|
|
2009
3733
|
return obj;
|
|
2010
3734
|
},
|
|
2011
3735
|
create(base) {
|
|
@@ -2014,6 +3738,7 @@ exports.DiskStatus_LockState = {
|
|
|
2014
3738
|
fromPartial(object) {
|
|
2015
3739
|
const message = createBaseDiskStatus_LockState();
|
|
2016
3740
|
message.images = object.images?.map((e) => e) || [];
|
|
3741
|
+
message.snapshots = object.snapshots?.map((e) => e) || [];
|
|
2017
3742
|
return message;
|
|
2018
3743
|
},
|
|
2019
3744
|
};
|
|
@@ -2022,6 +3747,8 @@ function DiskStatus_LockStateCustomInspect() {
|
|
|
2022
3747
|
const parts = [];
|
|
2023
3748
|
if ((this.images?.length ?? 0) !== 0)
|
|
2024
3749
|
parts.push("images" + "=" + (0, util_1.inspect)(this.images));
|
|
3750
|
+
if ((this.snapshots?.length ?? 0) !== 0)
|
|
3751
|
+
parts.push("snapshots" + "=" + (0, util_1.inspect)(this.snapshots));
|
|
2025
3752
|
return `${this.$type}(${parts.join(", ")})`;
|
|
2026
3753
|
}
|
|
2027
3754
|
function DiskStatus_LockStateCustomJson() {
|
|
@@ -2030,6 +3757,8 @@ function DiskStatus_LockStateCustomJson() {
|
|
|
2030
3757
|
};
|
|
2031
3758
|
if ((this.images?.length ?? 0) !== 0)
|
|
2032
3759
|
obj.images = (0, logging_js_1.inspectJson)(this.images);
|
|
3760
|
+
if ((this.snapshots?.length ?? 0) !== 0)
|
|
3761
|
+
obj.snapshots = (0, logging_js_1.inspectJson)(this.snapshots);
|
|
2033
3762
|
return obj;
|
|
2034
3763
|
}
|
|
2035
3764
|
function applyDiskStatus_LockStateCustom(message) {
|
|
@@ -2041,6 +3770,7 @@ function createBaseDiskStatus_LockState() {
|
|
|
2041
3770
|
const message = {
|
|
2042
3771
|
$type: "nebius.compute.v1.DiskStatus.LockState",
|
|
2043
3772
|
images: [],
|
|
3773
|
+
snapshots: [],
|
|
2044
3774
|
};
|
|
2045
3775
|
return applyDiskStatus_LockStateCustom(message);
|
|
2046
3776
|
}
|