UNPKG

@aneoconsultingfr/armonik.api.angular

Version:

gRPC API to interact with ArmoniK built for Angular

1,390 lines 312 kB
/* tslint:disable */ /* eslint-disable */ // @ts-nocheck // // THIS IS A GENERATED FILE // DO NOT MODIFY IT! YOUR CHANGES WILL BE LOST import { uint8ArrayToBase64 } from '@ngx-grpc/common'; import { BinaryReader, BinaryWriter } from 'google-protobuf'; import * as googleProtobuf000 from '@ngx-grpc/well-known-types'; import * as armonikApiGrpcV1Task_status001 from './task-status.pb'; /** * Message implementation for armonik.api.grpc.v1.Empty */ export class Empty { static { this.id = 'armonik.api.grpc.v1.Empty'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new Empty(); Empty.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { default: _reader.skipField(); } } Empty.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of Empty to deeply clone from */ constructor(_value) { _value = _value || {}; Empty.refineValues(this); } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); Empty.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return {}; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return {}; } } /** * Message implementation for armonik.api.grpc.v1.TaskOptions */ export class TaskOptions { static { this.id = 'armonik.api.grpc.v1.TaskOptions'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new TaskOptions(); TaskOptions.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.options = _instance.options || {}; _instance.maxDuration = _instance.maxDuration || undefined; _instance.maxRetries = _instance.maxRetries || 0; _instance.priority = _instance.priority || 0; _instance.partitionId = _instance.partitionId || ''; _instance.applicationName = _instance.applicationName || ''; _instance.applicationVersion = _instance.applicationVersion || ''; _instance.applicationNamespace = _instance.applicationNamespace || ''; _instance.applicationService = _instance.applicationService || ''; _instance.engineType = _instance.engineType || ''; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: const msg_1 = {}; _reader.readMessage(msg_1, TaskOptions.OptionsEntry.deserializeBinaryFromReader); _instance.options = _instance.options || {}; _instance.options[msg_1.key] = msg_1.value; break; case 2: _instance.maxDuration = new googleProtobuf000.Duration(); _reader.readMessage(_instance.maxDuration, googleProtobuf000.Duration.deserializeBinaryFromReader); break; case 3: _instance.maxRetries = _reader.readInt32(); break; case 4: _instance.priority = _reader.readInt32(); break; case 5: _instance.partitionId = _reader.readString(); break; case 6: _instance.applicationName = _reader.readString(); break; case 7: _instance.applicationVersion = _reader.readString(); break; case 8: _instance.applicationNamespace = _reader.readString(); break; case 9: _instance.applicationService = _reader.readString(); break; case 10: _instance.engineType = _reader.readString(); break; default: _reader.skipField(); } } TaskOptions.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (!!_instance.options) { const keys_1 = Object.keys(_instance.options); if (keys_1.length) { const repeated_1 = keys_1 .map(key => ({ key: key, value: _instance.options[key] })) .reduce((r, v) => [...r, v], []); _writer.writeRepeatedMessage(1, repeated_1, TaskOptions.OptionsEntry.serializeBinaryToWriter); } } if (_instance.maxDuration) { _writer.writeMessage(2, _instance.maxDuration, googleProtobuf000.Duration.serializeBinaryToWriter); } if (_instance.maxRetries) { _writer.writeInt32(3, _instance.maxRetries); } if (_instance.priority) { _writer.writeInt32(4, _instance.priority); } if (_instance.partitionId) { _writer.writeString(5, _instance.partitionId); } if (_instance.applicationName) { _writer.writeString(6, _instance.applicationName); } if (_instance.applicationVersion) { _writer.writeString(7, _instance.applicationVersion); } if (_instance.applicationNamespace) { _writer.writeString(8, _instance.applicationNamespace); } if (_instance.applicationService) { _writer.writeString(9, _instance.applicationService); } if (_instance.engineType) { _writer.writeString(10, _instance.engineType); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of TaskOptions to deeply clone from */ constructor(_value) { _value = _value || {}; (this.options = _value.options ? Object.keys(_value.options).reduce((r, k) => ({ ...r, [k]: _value.options[k] }), {}) : {}), (this.maxDuration = _value.maxDuration ? new googleProtobuf000.Duration(_value.maxDuration) : undefined); this.maxRetries = _value.maxRetries; this.priority = _value.priority; this.partitionId = _value.partitionId; this.applicationName = _value.applicationName; this.applicationVersion = _value.applicationVersion; this.applicationNamespace = _value.applicationNamespace; this.applicationService = _value.applicationService; this.engineType = _value.engineType; TaskOptions.refineValues(this); } get options() { return this._options; } set options(value) { this._options = value; } get maxDuration() { return this._maxDuration; } set maxDuration(value) { this._maxDuration = value; } get maxRetries() { return this._maxRetries; } set maxRetries(value) { this._maxRetries = value; } get priority() { return this._priority; } set priority(value) { this._priority = value; } get partitionId() { return this._partitionId; } set partitionId(value) { this._partitionId = value; } get applicationName() { return this._applicationName; } set applicationName(value) { this._applicationName = value; } get applicationVersion() { return this._applicationVersion; } set applicationVersion(value) { this._applicationVersion = value; } get applicationNamespace() { return this._applicationNamespace; } set applicationNamespace(value) { this._applicationNamespace = value; } get applicationService() { return this._applicationService; } set applicationService(value) { this._applicationService = value; } get engineType() { return this._engineType; } set engineType(value) { this._engineType = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); TaskOptions.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { options: this.options ? Object.keys(this.options).reduce((r, k) => ({ ...r, [k]: this.options[k] }), {}) : {}, maxDuration: this.maxDuration ? this.maxDuration.toObject() : undefined, maxRetries: this.maxRetries, priority: this.priority, partitionId: this.partitionId, applicationName: this.applicationName, applicationVersion: this.applicationVersion, applicationNamespace: this.applicationNamespace, applicationService: this.applicationService, engineType: this.engineType }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { options: this.options ? Object.keys(this.options).reduce((r, k) => ({ ...r, [k]: this.options[k] }), {}) : {}, maxDuration: this.maxDuration ? this.maxDuration.toProtobufJSON(options) : null, maxRetries: this.maxRetries, priority: this.priority, partitionId: this.partitionId, applicationName: this.applicationName, applicationVersion: this.applicationVersion, applicationNamespace: this.applicationNamespace, applicationService: this.applicationService, engineType: this.engineType }; } } (function (TaskOptions) { /** * Message implementation for armonik.api.grpc.v1.TaskOptions.OptionsEntry */ class OptionsEntry { static { this.id = 'armonik.api.grpc.v1.TaskOptions.OptionsEntry'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new OptionsEntry(); OptionsEntry.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.key = _instance.key || ''; _instance.value = _instance.value || ''; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.key = _reader.readString(); break; case 2: _instance.value = _reader.readString(); break; default: _reader.skipField(); } } OptionsEntry.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.key) { _writer.writeString(1, _instance.key); } if (_instance.value) { _writer.writeString(2, _instance.value); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of OptionsEntry to deeply clone from */ constructor(_value) { _value = _value || {}; this.key = _value.key; this.value = _value.value; OptionsEntry.refineValues(this); } get key() { return this._key; } set key(value) { this._key = value; } get value() { return this._value; } set value(value) { this._value = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); OptionsEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { key: this.key, value: this.value }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { key: this.key, value: this.value }; } } TaskOptions.OptionsEntry = OptionsEntry; })(TaskOptions || (TaskOptions = {})); /** * Message implementation for armonik.api.grpc.v1.Session */ export class Session { static { this.id = 'armonik.api.grpc.v1.Session'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new Session(); Session.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.id = _instance.id || ''; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.id = _reader.readString(); break; default: _reader.skipField(); } } Session.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.id) { _writer.writeString(1, _instance.id); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of Session to deeply clone from */ constructor(_value) { _value = _value || {}; this.id = _value.id; Session.refineValues(this); } get id() { return this._id; } set id(value) { this._id = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); Session.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { id: this.id }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { id: this.id }; } } /** * Message implementation for armonik.api.grpc.v1.Configuration */ export class Configuration { static { this.id = 'armonik.api.grpc.v1.Configuration'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new Configuration(); Configuration.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.dataChunkMaxSize = _instance.dataChunkMaxSize || 0; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.dataChunkMaxSize = _reader.readInt32(); break; default: _reader.skipField(); } } Configuration.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.dataChunkMaxSize) { _writer.writeInt32(1, _instance.dataChunkMaxSize); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of Configuration to deeply clone from */ constructor(_value) { _value = _value || {}; this.dataChunkMaxSize = _value.dataChunkMaxSize; Configuration.refineValues(this); } get dataChunkMaxSize() { return this._dataChunkMaxSize; } set dataChunkMaxSize(value) { this._dataChunkMaxSize = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); Configuration.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { dataChunkMaxSize: this.dataChunkMaxSize }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { dataChunkMaxSize: this.dataChunkMaxSize }; } } /** * Message implementation for armonik.api.grpc.v1.Output */ export class Output { static { this.id = 'armonik.api.grpc.v1.Output'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new Output(); Output.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 2: _instance.ok = new Empty(); _reader.readMessage(_instance.ok, Empty.deserializeBinaryFromReader); break; case 3: _instance.error = new Output.Error(); _reader.readMessage(_instance.error, Output.Error.deserializeBinaryFromReader); break; default: _reader.skipField(); } } Output.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.ok) { _writer.writeMessage(2, _instance.ok, Empty.serializeBinaryToWriter); } if (_instance.error) { _writer.writeMessage(3, _instance.error, Output.Error.serializeBinaryToWriter); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of Output to deeply clone from */ constructor(_value) { this._type = Output.TypeCase.none; _value = _value || {}; this.ok = _value.ok ? new Empty(_value.ok) : undefined; this.error = _value.error ? new Output.Error(_value.error) : undefined; Output.refineValues(this); } get ok() { return this._ok; } set ok(value) { if (value !== undefined && value !== null) { this._error = undefined; this._type = Output.TypeCase.ok; } this._ok = value; } get error() { return this._error; } set error(value) { if (value !== undefined && value !== null) { this._ok = undefined; this._type = Output.TypeCase.error; } this._error = value; } get type() { return this._type; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); Output.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { ok: this.ok ? this.ok.toObject() : undefined, error: this.error ? this.error.toObject() : undefined }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { ok: this.ok ? this.ok.toProtobufJSON(options) : null, error: this.error ? this.error.toProtobufJSON(options) : null }; } } (function (Output) { let TypeCase; (function (TypeCase) { TypeCase[TypeCase["none"] = 0] = "none"; TypeCase[TypeCase["ok"] = 1] = "ok"; TypeCase[TypeCase["error"] = 2] = "error"; })(TypeCase = Output.TypeCase || (Output.TypeCase = {})); /** * Message implementation for armonik.api.grpc.v1.Output.Error */ class Error { static { this.id = 'armonik.api.grpc.v1.Output.Error'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new Error(); Error.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.details = _instance.details || ''; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.details = _reader.readString(); break; default: _reader.skipField(); } } Error.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.details) { _writer.writeString(1, _instance.details); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of Error to deeply clone from */ constructor(_value) { _value = _value || {}; this.details = _value.details; Error.refineValues(this); } get details() { return this._details; } set details(value) { this._details = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); Error.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { details: this.details }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { details: this.details }; } } Output.Error = Error; })(Output || (Output = {})); /** * Message implementation for armonik.api.grpc.v1.TaskRequest */ export class TaskRequest { static { this.id = 'armonik.api.grpc.v1.TaskRequest'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new TaskRequest(); TaskRequest.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.expectedOutputKeys = _instance.expectedOutputKeys || []; _instance.dataDependencies = _instance.dataDependencies || []; _instance.payload = _instance.payload || new Uint8Array(); _instance.payloadName = _instance.payloadName || ''; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: (_instance.expectedOutputKeys = _instance.expectedOutputKeys || []).push(_reader.readString()); break; case 2: (_instance.dataDependencies = _instance.dataDependencies || []).push(_reader.readString()); break; case 3: _instance.payload = _reader.readBytes(); break; case 4: _instance.payloadName = _reader.readString(); break; default: _reader.skipField(); } } TaskRequest.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.expectedOutputKeys && _instance.expectedOutputKeys.length) { _writer.writeRepeatedString(1, _instance.expectedOutputKeys); } if (_instance.dataDependencies && _instance.dataDependencies.length) { _writer.writeRepeatedString(2, _instance.dataDependencies); } if (_instance.payload && _instance.payload.length) { _writer.writeBytes(3, _instance.payload); } if (_instance.payloadName) { _writer.writeString(4, _instance.payloadName); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of TaskRequest to deeply clone from */ constructor(_value) { _value = _value || {}; this.expectedOutputKeys = (_value.expectedOutputKeys || []).slice(); this.dataDependencies = (_value.dataDependencies || []).slice(); this.payload = _value.payload; this.payloadName = _value.payloadName; TaskRequest.refineValues(this); } get expectedOutputKeys() { return this._expectedOutputKeys; } set expectedOutputKeys(value) { this._expectedOutputKeys = value; } get dataDependencies() { return this._dataDependencies; } set dataDependencies(value) { this._dataDependencies = value; } get payload() { return this._payload; } set payload(value) { this._payload = value; } get payloadName() { return this._payloadName; } set payloadName(value) { this._payloadName = value; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); TaskRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { expectedOutputKeys: (this.expectedOutputKeys || []).slice(), dataDependencies: (this.dataDependencies || []).slice(), payload: this.payload ? this.payload.subarray(0) : new Uint8Array(), payloadName: this.payloadName }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { expectedOutputKeys: (this.expectedOutputKeys || []).slice(), dataDependencies: (this.dataDependencies || []).slice(), payload: this.payload ? uint8ArrayToBase64(this.payload) : '', payloadName: this.payloadName }; } } /** * Message implementation for armonik.api.grpc.v1.InitKeyedDataStream */ export class InitKeyedDataStream { static { this.id = 'armonik.api.grpc.v1.InitKeyedDataStream'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new InitKeyedDataStream(); InitKeyedDataStream.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.key = _reader.readString(); break; case 2: _instance.lastResult = _reader.readBool(); break; default: _reader.skipField(); } } InitKeyedDataStream.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.key || _instance.key === '') { _writer.writeString(1, _instance.key); } if (_instance.lastResult || _instance.lastResult === false) { _writer.writeBool(2, _instance.lastResult); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of InitKeyedDataStream to deeply clone from */ constructor(_value) { this._type = InitKeyedDataStream.TypeCase.none; _value = _value || {}; this.key = _value.key; this.lastResult = _value.lastResult; InitKeyedDataStream.refineValues(this); } get key() { return this._key; } set key(value) { if (value !== undefined && value !== null) { this._lastResult = undefined; this._type = InitKeyedDataStream.TypeCase.key; } this._key = value; } get lastResult() { return this._lastResult; } set lastResult(value) { if (value !== undefined && value !== null) { this._key = undefined; this._type = InitKeyedDataStream.TypeCase.lastResult; } this._lastResult = value; } get type() { return this._type; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); InitKeyedDataStream.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { key: this.key, lastResult: this.lastResult }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { key: this.key === null || this.key === undefined ? null : this.key, lastResult: this.lastResult }; } } (function (InitKeyedDataStream) { let TypeCase; (function (TypeCase) { TypeCase[TypeCase["none"] = 0] = "none"; TypeCase[TypeCase["key"] = 1] = "key"; TypeCase[TypeCase["lastResult"] = 2] = "lastResult"; })(TypeCase = InitKeyedDataStream.TypeCase || (InitKeyedDataStream.TypeCase = {})); })(InitKeyedDataStream || (InitKeyedDataStream = {})); /** * Message implementation for armonik.api.grpc.v1.DataChunk */ export class DataChunk { static { this.id = 'armonik.api.grpc.v1.DataChunk'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new DataChunk(); DataChunk.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: _instance.data = _reader.readBytes(); break; case 2: _instance.dataComplete = _reader.readBool(); break; default: _reader.skipField(); } } DataChunk.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.data && _instance.data.length) { _writer.writeBytes(1, _instance.data); } if (_instance.dataComplete || _instance.dataComplete === false) { _writer.writeBool(2, _instance.dataComplete); } } /** * Message constructor. Initializes the properties and applies default Protobuf values if necessary * @param _value initial values object or instance of DataChunk to deeply clone from */ constructor(_value) { this._type = DataChunk.TypeCase.none; _value = _value || {}; this.data = _value.data; this.dataComplete = _value.dataComplete; DataChunk.refineValues(this); } get data() { return this._data; } set data(value) { if (value !== undefined && value !== null) { this._dataComplete = undefined; this._type = DataChunk.TypeCase.data; } this._data = value; } get dataComplete() { return this._dataComplete; } set dataComplete(value) { if (value !== undefined && value !== null) { this._data = undefined; this._type = DataChunk.TypeCase.dataComplete; } this._dataComplete = value; } get type() { return this._type; } /** * Serialize message to binary data * @param instance message instance */ serializeBinary() { const writer = new BinaryWriter(); DataChunk.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); } /** * Cast message to standard JavaScript object (all non-primitive values are deeply cloned) */ toObject() { return { data: this.data ? this.data.subarray(0) : new Uint8Array(), dataComplete: this.dataComplete }; } /** * Convenience method to support JSON.stringify(message), replicates the structure of toObject() */ toJSON() { return this.toObject(); } /** * Cast message to JSON using protobuf JSON notation: https://developers.google.com/protocol-buffers/docs/proto3#json * Attention: output differs from toObject() e.g. enums are represented as names and not as numbers, Timestamp is an ISO Date string format etc. * If the message itself or some of descendant messages is google.protobuf.Any, you MUST provide a message pool as options. If not, the messagePool is not required */ toProtobufJSON( // @ts-ignore options) { return { data: this.data ? uint8ArrayToBase64(this.data) : '', dataComplete: this.dataComplete }; } } (function (DataChunk) { let TypeCase; (function (TypeCase) { TypeCase[TypeCase["none"] = 0] = "none"; TypeCase[TypeCase["data"] = 1] = "data"; TypeCase[TypeCase["dataComplete"] = 2] = "dataComplete"; })(TypeCase = DataChunk.TypeCase || (DataChunk.TypeCase = {})); })(DataChunk || (DataChunk = {})); /** * Message implementation for armonik.api.grpc.v1.TaskRequestHeader */ export class TaskRequestHeader { static { this.id = 'armonik.api.grpc.v1.TaskRequestHeader'; } /** * Deserialize binary data to message * @param instance message instance */ static deserializeBinary(bytes) { const instance = new TaskRequestHeader(); TaskRequestHeader.deserializeBinaryFromReader(instance, new BinaryReader(bytes)); return instance; } /** * Check all the properties and set default protobuf values if necessary * @param _instance message instance */ static refineValues(_instance) { _instance.expectedOutputKeys = _instance.expectedOutputKeys || []; _instance.dataDependencies = _instance.dataDependencies || []; } /** * Deserializes / reads binary message into message instance using provided binary reader * @param _instance message instance * @param _reader binary reader instance */ static deserializeBinaryFromReader(_instance, _reader) { while (_reader.nextField()) { if (_reader.isEndGroup()) break; switch (_reader.getFieldNumber()) { case 1: (_instance.expectedOutputKeys = _instance.expectedOutputKeys || []).push(_reader.readString()); break; case 2: (_instance.dataDependencies = _instance.dataDependencies || []).push(_reader.readString()); break; default: _reader.skipField(); } } TaskRequestHeader.refineValues(_instance); } /** * Serializes a message to binary format using provided binary reader * @param _instance message instance * @param _writer binary writer instance */ static serializeBinaryToWriter(_instance, _writer) { if (_instance.expectedOutputKeys && _instance.expectedOutputKeys.length) { _writer.writeRepeatedString(1, _instance.expectedOutputKeys); } if (_instance.dataDependencies && _instance.dataDependencies.length) { _writer.writeRepeatedString(2, _instance