// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v1.176.0
//   protoc               v3.19.1
// source: v1/file_replication.proto
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal.js";
export const protobufPackage = "weaviate.v1";
export var CompressionType;
(function (CompressionType) {
    /** COMPRESSION_TYPE_UNSPECIFIED - No compression */
    CompressionType[CompressionType["COMPRESSION_TYPE_UNSPECIFIED"] = 0] = "COMPRESSION_TYPE_UNSPECIFIED";
    /** COMPRESSION_TYPE_GZIP - gzip (compress/gzip) */
    CompressionType[CompressionType["COMPRESSION_TYPE_GZIP"] = 1] = "COMPRESSION_TYPE_GZIP";
    /** COMPRESSION_TYPE_ZLIB - zlib (compress/zlib) */
    CompressionType[CompressionType["COMPRESSION_TYPE_ZLIB"] = 2] = "COMPRESSION_TYPE_ZLIB";
    /** COMPRESSION_TYPE_DEFLATE - raw DEFLATE (compress/flate) */
    CompressionType[CompressionType["COMPRESSION_TYPE_DEFLATE"] = 3] = "COMPRESSION_TYPE_DEFLATE";
    CompressionType[CompressionType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(CompressionType || (CompressionType = {}));
export function compressionTypeFromJSON(object) {
    switch (object) {
        case 0:
        case "COMPRESSION_TYPE_UNSPECIFIED":
            return CompressionType.COMPRESSION_TYPE_UNSPECIFIED;
        case 1:
        case "COMPRESSION_TYPE_GZIP":
            return CompressionType.COMPRESSION_TYPE_GZIP;
        case 2:
        case "COMPRESSION_TYPE_ZLIB":
            return CompressionType.COMPRESSION_TYPE_ZLIB;
        case 3:
        case "COMPRESSION_TYPE_DEFLATE":
            return CompressionType.COMPRESSION_TYPE_DEFLATE;
        case -1:
        case "UNRECOGNIZED":
        default:
            return CompressionType.UNRECOGNIZED;
    }
}
export function compressionTypeToJSON(object) {
    switch (object) {
        case CompressionType.COMPRESSION_TYPE_UNSPECIFIED:
            return "COMPRESSION_TYPE_UNSPECIFIED";
        case CompressionType.COMPRESSION_TYPE_GZIP:
            return "COMPRESSION_TYPE_GZIP";
        case CompressionType.COMPRESSION_TYPE_ZLIB:
            return "COMPRESSION_TYPE_ZLIB";
        case CompressionType.COMPRESSION_TYPE_DEFLATE:
            return "COMPRESSION_TYPE_DEFLATE";
        case CompressionType.UNRECOGNIZED:
        default:
            return "UNRECOGNIZED";
    }
}
function createBasePauseFileActivityRequest() {
    return { indexName: "", shardName: "", schemaVersion: 0 };
}
export const PauseFileActivityRequest = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        if (message.schemaVersion !== 0) {
            writer.uint32(24).uint64(message.schemaVersion);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePauseFileActivityRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
                case 3:
                    if (tag !== 24) {
                        break;
                    }
                    message.schemaVersion = longToNumber(reader.uint64());
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
            schemaVersion: isSet(object.schemaVersion) ? globalThis.Number(object.schemaVersion) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        if (message.schemaVersion !== 0) {
            obj.schemaVersion = Math.round(message.schemaVersion);
        }
        return obj;
    },
    create(base) {
        return PauseFileActivityRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePauseFileActivityRequest();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        message.schemaVersion = object.schemaVersion ?? 0;
        return message;
    },
};
function createBasePauseFileActivityResponse() {
    return { indexName: "", shardName: "" };
}
export const PauseFileActivityResponse = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBasePauseFileActivityResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        return obj;
    },
    create(base) {
        return PauseFileActivityResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBasePauseFileActivityResponse();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        return message;
    },
};
function createBaseResumeFileActivityRequest() {
    return { indexName: "", shardName: "" };
}
export const ResumeFileActivityRequest = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResumeFileActivityRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        return obj;
    },
    create(base) {
        return ResumeFileActivityRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResumeFileActivityRequest();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        return message;
    },
};
function createBaseResumeFileActivityResponse() {
    return { indexName: "", shardName: "" };
}
export const ResumeFileActivityResponse = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseResumeFileActivityResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        return obj;
    },
    create(base) {
        return ResumeFileActivityResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseResumeFileActivityResponse();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        return message;
    },
};
function createBaseListFilesRequest() {
    return { indexName: "", shardName: "" };
}
export const ListFilesRequest = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseListFilesRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        return obj;
    },
    create(base) {
        return ListFilesRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListFilesRequest();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        return message;
    },
};
function createBaseListFilesResponse() {
    return { indexName: "", shardName: "", fileNames: [] };
}
export const ListFilesResponse = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        for (const v of message.fileNames) {
            writer.uint32(26).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseListFilesResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
                case 3:
                    if (tag !== 26) {
                        break;
                    }
                    message.fileNames.push(reader.string());
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
            fileNames: globalThis.Array.isArray(object?.fileNames)
                ? object.fileNames.map((e) => globalThis.String(e))
                : [],
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        if (message.fileNames?.length) {
            obj.fileNames = message.fileNames;
        }
        return obj;
    },
    create(base) {
        return ListFilesResponse.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseListFilesResponse();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        message.fileNames = object.fileNames?.map((e) => e) || [];
        return message;
    },
};
function createBaseGetFileMetadataRequest() {
    return { indexName: "", shardName: "", fileName: "" };
}
export const GetFileMetadataRequest = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        if (message.fileName !== "") {
            writer.uint32(26).string(message.fileName);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetFileMetadataRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
                case 3:
                    if (tag !== 26) {
                        break;
                    }
                    message.fileName = reader.string();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
            fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "",
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        if (message.fileName !== "") {
            obj.fileName = message.fileName;
        }
        return obj;
    },
    create(base) {
        return GetFileMetadataRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetFileMetadataRequest();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        message.fileName = object.fileName ?? "";
        return message;
    },
};
function createBaseFileMetadata() {
    return { indexName: "", shardName: "", fileName: "", size: 0, crc32: 0 };
}
export const FileMetadata = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        if (message.fileName !== "") {
            writer.uint32(26).string(message.fileName);
        }
        if (message.size !== 0) {
            writer.uint32(32).int64(message.size);
        }
        if (message.crc32 !== 0) {
            writer.uint32(40).uint32(message.crc32);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFileMetadata();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
                case 3:
                    if (tag !== 26) {
                        break;
                    }
                    message.fileName = reader.string();
                    continue;
                case 4:
                    if (tag !== 32) {
                        break;
                    }
                    message.size = longToNumber(reader.int64());
                    continue;
                case 5:
                    if (tag !== 40) {
                        break;
                    }
                    message.crc32 = reader.uint32();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
            fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "",
            size: isSet(object.size) ? globalThis.Number(object.size) : 0,
            crc32: isSet(object.crc32) ? globalThis.Number(object.crc32) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        if (message.fileName !== "") {
            obj.fileName = message.fileName;
        }
        if (message.size !== 0) {
            obj.size = Math.round(message.size);
        }
        if (message.crc32 !== 0) {
            obj.crc32 = Math.round(message.crc32);
        }
        return obj;
    },
    create(base) {
        return FileMetadata.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFileMetadata();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        message.fileName = object.fileName ?? "";
        message.size = object.size ?? 0;
        message.crc32 = object.crc32 ?? 0;
        return message;
    },
};
function createBaseGetFileRequest() {
    return { indexName: "", shardName: "", fileName: "", compression: 0 };
}
export const GetFileRequest = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.indexName !== "") {
            writer.uint32(10).string(message.indexName);
        }
        if (message.shardName !== "") {
            writer.uint32(18).string(message.shardName);
        }
        if (message.fileName !== "") {
            writer.uint32(26).string(message.fileName);
        }
        if (message.compression !== 0) {
            writer.uint32(32).int32(message.compression);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseGetFileRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 10) {
                        break;
                    }
                    message.indexName = reader.string();
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.shardName = reader.string();
                    continue;
                case 3:
                    if (tag !== 26) {
                        break;
                    }
                    message.fileName = reader.string();
                    continue;
                case 4:
                    if (tag !== 32) {
                        break;
                    }
                    message.compression = reader.int32();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            indexName: isSet(object.indexName) ? globalThis.String(object.indexName) : "",
            shardName: isSet(object.shardName) ? globalThis.String(object.shardName) : "",
            fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "",
            compression: isSet(object.compression) ? compressionTypeFromJSON(object.compression) : 0,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.indexName !== "") {
            obj.indexName = message.indexName;
        }
        if (message.shardName !== "") {
            obj.shardName = message.shardName;
        }
        if (message.fileName !== "") {
            obj.fileName = message.fileName;
        }
        if (message.compression !== 0) {
            obj.compression = compressionTypeToJSON(message.compression);
        }
        return obj;
    },
    create(base) {
        return GetFileRequest.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseGetFileRequest();
        message.indexName = object.indexName ?? "";
        message.shardName = object.shardName ?? "";
        message.fileName = object.fileName ?? "";
        message.compression = object.compression ?? 0;
        return message;
    },
};
function createBaseFileChunk() {
    return { offset: 0, data: new Uint8Array(0), eof: false };
}
export const FileChunk = {
    encode(message, writer = _m0.Writer.create()) {
        if (message.offset !== 0) {
            writer.uint32(8).int64(message.offset);
        }
        if (message.data.length !== 0) {
            writer.uint32(18).bytes(message.data);
        }
        if (message.eof !== false) {
            writer.uint32(24).bool(message.eof);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseFileChunk();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    if (tag !== 8) {
                        break;
                    }
                    message.offset = longToNumber(reader.int64());
                    continue;
                case 2:
                    if (tag !== 18) {
                        break;
                    }
                    message.data = reader.bytes();
                    continue;
                case 3:
                    if (tag !== 24) {
                        break;
                    }
                    message.eof = reader.bool();
                    continue;
            }
            if ((tag & 7) === 4 || tag === 0) {
                break;
            }
            reader.skipType(tag & 7);
        }
        return message;
    },
    fromJSON(object) {
        return {
            offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
            data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
            eof: isSet(object.eof) ? globalThis.Boolean(object.eof) : false,
        };
    },
    toJSON(message) {
        const obj = {};
        if (message.offset !== 0) {
            obj.offset = Math.round(message.offset);
        }
        if (message.data.length !== 0) {
            obj.data = base64FromBytes(message.data);
        }
        if (message.eof !== false) {
            obj.eof = message.eof;
        }
        return obj;
    },
    create(base) {
        return FileChunk.fromPartial(base ?? {});
    },
    fromPartial(object) {
        const message = createBaseFileChunk();
        message.offset = object.offset ?? 0;
        message.data = object.data ?? new Uint8Array(0);
        message.eof = object.eof ?? false;
        return message;
    },
};
export const FileReplicationServiceDefinition = {
    name: "FileReplicationService",
    fullName: "weaviate.v1.FileReplicationService",
    methods: {
        pauseFileActivity: {
            name: "PauseFileActivity",
            requestType: PauseFileActivityRequest,
            requestStream: false,
            responseType: PauseFileActivityResponse,
            responseStream: false,
            options: {},
        },
        resumeFileActivity: {
            name: "ResumeFileActivity",
            requestType: ResumeFileActivityRequest,
            requestStream: false,
            responseType: ResumeFileActivityResponse,
            responseStream: false,
            options: {},
        },
        listFiles: {
            name: "ListFiles",
            requestType: ListFilesRequest,
            requestStream: false,
            responseType: ListFilesResponse,
            responseStream: false,
            options: {},
        },
        getFileMetadata: {
            name: "GetFileMetadata",
            requestType: GetFileMetadataRequest,
            requestStream: true,
            responseType: FileMetadata,
            responseStream: true,
            options: {},
        },
        getFile: {
            name: "GetFile",
            requestType: GetFileRequest,
            requestStream: true,
            responseType: FileChunk,
            responseStream: true,
            options: {},
        },
    },
};
function bytesFromBase64(b64) {
    if (globalThis.Buffer) {
        return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
    }
    else {
        const bin = globalThis.atob(b64);
        const arr = new Uint8Array(bin.length);
        for (let i = 0; i < bin.length; ++i) {
            arr[i] = bin.charCodeAt(i);
        }
        return arr;
    }
}
function base64FromBytes(arr) {
    if (globalThis.Buffer) {
        return globalThis.Buffer.from(arr).toString("base64");
    }
    else {
        const bin = [];
        arr.forEach((byte) => {
            bin.push(globalThis.String.fromCharCode(byte));
        });
        return globalThis.btoa(bin.join(""));
    }
}
function longToNumber(long) {
    if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
        throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
    }
    return long.toNumber();
}
if (_m0.util.Long !== Long) {
    _m0.util.Long = Long;
    _m0.configure();
}
function isSet(value) {
    return value !== null && value !== undefined;
}
