@aneoconsultingfr/armonik.api.angular
Version:
gRPC API to interact with ArmoniK built for Angular
1,240 lines • 449 kB
JavaScript
import { BinaryReader, BinaryWriter } from 'google-protobuf';
import * as googleProtobuf000 from '@ngx-grpc/well-known-types';
import * as armonikApiGrpcV1Task_status001 from './task-status.pb';
import * as armonikApiGrpcV1Tasks003 from './tasks-fields.pb';
import * as googleProtobuf004 from '@ngx-grpc/well-known-types';
import * as armonikApiGrpcV1005 from './objects.pb';
import * as armonikApiGrpcV1Sort_direction006 from './sort-direction.pb';
import * as armonikApiGrpcV1Tasks007 from './tasks-filters.pb';
/**
* Message implementation for armonik.api.grpc.v1.tasks.TaskDetailed
*/
export class TaskDetailed {
static { this.id = 'armonik.api.grpc.v1.tasks.TaskDetailed'; }
/**
* Deserialize binary data to message
* @param instance message instance
*/
static deserializeBinary(bytes) {
const instance = new TaskDetailed();
TaskDetailed.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 || '';
_instance.sessionId = _instance.sessionId || '';
_instance.ownerPodId = _instance.ownerPodId || '';
_instance.initialTaskId = _instance.initialTaskId || '';
_instance.parentTaskIds = _instance.parentTaskIds || [];
_instance.dataDependencies = _instance.dataDependencies || [];
_instance.expectedOutputIds = _instance.expectedOutputIds || [];
_instance.retryOfIds = _instance.retryOfIds || [];
_instance.status = _instance.status || 0;
_instance.statusMessage = _instance.statusMessage || '';
_instance.options = _instance.options || undefined;
_instance.createdAt = _instance.createdAt || undefined;
_instance.submittedAt = _instance.submittedAt || undefined;
_instance.receivedAt = _instance.receivedAt || undefined;
_instance.acquiredAt = _instance.acquiredAt || undefined;
_instance.fetchedAt = _instance.fetchedAt || undefined;
_instance.startedAt = _instance.startedAt || undefined;
_instance.processedAt = _instance.processedAt || undefined;
_instance.endedAt = _instance.endedAt || undefined;
_instance.podTtl = _instance.podTtl || undefined;
_instance.creationToEndDuration =
_instance.creationToEndDuration || undefined;
_instance.processingToEndDuration =
_instance.processingToEndDuration || undefined;
_instance.receivedToEndDuration =
_instance.receivedToEndDuration || undefined;
_instance.payloadId = _instance.payloadId || '';
_instance.createdBy = _instance.createdBy || '';
_instance.output = _instance.output || undefined;
_instance.podHostname = _instance.podHostname || '';
}
/**
* 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;
case 2:
_instance.sessionId = _reader.readString();
break;
case 3:
_instance.ownerPodId = _reader.readString();
break;
case 22:
_instance.initialTaskId = _reader.readString();
break;
case 4:
(_instance.parentTaskIds = _instance.parentTaskIds || []).push(_reader.readString());
break;
case 5:
(_instance.dataDependencies = _instance.dataDependencies || []).push(_reader.readString());
break;
case 6:
(_instance.expectedOutputIds =
_instance.expectedOutputIds || []).push(_reader.readString());
break;
case 7:
(_instance.retryOfIds = _instance.retryOfIds || []).push(_reader.readString());
break;
case 8:
_instance.status = _reader.readEnum();
break;
case 9:
_instance.statusMessage = _reader.readString();
break;
case 10:
_instance.options = new armonikApiGrpcV1005.TaskOptions();
_reader.readMessage(_instance.options, armonikApiGrpcV1005.TaskOptions.deserializeBinaryFromReader);
break;
case 11:
_instance.createdAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.createdAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 12:
_instance.submittedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.submittedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 18:
_instance.receivedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.receivedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 19:
_instance.acquiredAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.acquiredAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 25:
_instance.fetchedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.fetchedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 13:
_instance.startedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.startedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 24:
_instance.processedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.processedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 14:
_instance.endedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.endedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 15:
_instance.podTtl = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.podTtl, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 20:
_instance.creationToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.creationToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 21:
_instance.processingToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.processingToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 23:
_instance.receivedToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.receivedToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 26:
_instance.payloadId = _reader.readString();
break;
case 27:
_instance.createdBy = _reader.readString();
break;
case 16:
_instance.output = new TaskDetailed.Output();
_reader.readMessage(_instance.output, TaskDetailed.Output.deserializeBinaryFromReader);
break;
case 17:
_instance.podHostname = _reader.readString();
break;
default:
_reader.skipField();
}
}
TaskDetailed.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);
}
if (_instance.sessionId) {
_writer.writeString(2, _instance.sessionId);
}
if (_instance.ownerPodId) {
_writer.writeString(3, _instance.ownerPodId);
}
if (_instance.initialTaskId) {
_writer.writeString(22, _instance.initialTaskId);
}
if (_instance.parentTaskIds && _instance.parentTaskIds.length) {
_writer.writeRepeatedString(4, _instance.parentTaskIds);
}
if (_instance.dataDependencies && _instance.dataDependencies.length) {
_writer.writeRepeatedString(5, _instance.dataDependencies);
}
if (_instance.expectedOutputIds && _instance.expectedOutputIds.length) {
_writer.writeRepeatedString(6, _instance.expectedOutputIds);
}
if (_instance.retryOfIds && _instance.retryOfIds.length) {
_writer.writeRepeatedString(7, _instance.retryOfIds);
}
if (_instance.status) {
_writer.writeEnum(8, _instance.status);
}
if (_instance.statusMessage) {
_writer.writeString(9, _instance.statusMessage);
}
if (_instance.options) {
_writer.writeMessage(10, _instance.options, armonikApiGrpcV1005.TaskOptions.serializeBinaryToWriter);
}
if (_instance.createdAt) {
_writer.writeMessage(11, _instance.createdAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.submittedAt) {
_writer.writeMessage(12, _instance.submittedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.receivedAt) {
_writer.writeMessage(18, _instance.receivedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.acquiredAt) {
_writer.writeMessage(19, _instance.acquiredAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.fetchedAt) {
_writer.writeMessage(25, _instance.fetchedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.startedAt) {
_writer.writeMessage(13, _instance.startedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.processedAt) {
_writer.writeMessage(24, _instance.processedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.endedAt) {
_writer.writeMessage(14, _instance.endedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.podTtl) {
_writer.writeMessage(15, _instance.podTtl, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.creationToEndDuration) {
_writer.writeMessage(20, _instance.creationToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.processingToEndDuration) {
_writer.writeMessage(21, _instance.processingToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.receivedToEndDuration) {
_writer.writeMessage(23, _instance.receivedToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.payloadId) {
_writer.writeString(26, _instance.payloadId);
}
if (_instance.createdBy) {
_writer.writeString(27, _instance.createdBy);
}
if (_instance.output) {
_writer.writeMessage(16, _instance.output, TaskDetailed.Output.serializeBinaryToWriter);
}
if (_instance.podHostname) {
_writer.writeString(17, _instance.podHostname);
}
}
/**
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
* @param _value initial values object or instance of TaskDetailed to deeply clone from
*/
constructor(_value) {
_value = _value || {};
this.id = _value.id;
this.sessionId = _value.sessionId;
this.ownerPodId = _value.ownerPodId;
this.initialTaskId = _value.initialTaskId;
this.parentTaskIds = (_value.parentTaskIds || []).slice();
this.dataDependencies = (_value.dataDependencies || []).slice();
this.expectedOutputIds = (_value.expectedOutputIds || []).slice();
this.retryOfIds = (_value.retryOfIds || []).slice();
this.status = _value.status;
this.statusMessage = _value.statusMessage;
this.options = _value.options
? new armonikApiGrpcV1005.TaskOptions(_value.options)
: undefined;
this.createdAt = _value.createdAt
? new googleProtobuf004.Timestamp(_value.createdAt)
: undefined;
this.submittedAt = _value.submittedAt
? new googleProtobuf004.Timestamp(_value.submittedAt)
: undefined;
this.receivedAt = _value.receivedAt
? new googleProtobuf004.Timestamp(_value.receivedAt)
: undefined;
this.acquiredAt = _value.acquiredAt
? new googleProtobuf004.Timestamp(_value.acquiredAt)
: undefined;
this.fetchedAt = _value.fetchedAt
? new googleProtobuf004.Timestamp(_value.fetchedAt)
: undefined;
this.startedAt = _value.startedAt
? new googleProtobuf004.Timestamp(_value.startedAt)
: undefined;
this.processedAt = _value.processedAt
? new googleProtobuf004.Timestamp(_value.processedAt)
: undefined;
this.endedAt = _value.endedAt
? new googleProtobuf004.Timestamp(_value.endedAt)
: undefined;
this.podTtl = _value.podTtl
? new googleProtobuf004.Timestamp(_value.podTtl)
: undefined;
this.creationToEndDuration = _value.creationToEndDuration
? new googleProtobuf000.Duration(_value.creationToEndDuration)
: undefined;
this.processingToEndDuration = _value.processingToEndDuration
? new googleProtobuf000.Duration(_value.processingToEndDuration)
: undefined;
this.receivedToEndDuration = _value.receivedToEndDuration
? new googleProtobuf000.Duration(_value.receivedToEndDuration)
: undefined;
this.payloadId = _value.payloadId;
this.createdBy = _value.createdBy;
this.output = _value.output
? new TaskDetailed.Output(_value.output)
: undefined;
this.podHostname = _value.podHostname;
TaskDetailed.refineValues(this);
}
get id() {
return this._id;
}
set id(value) {
this._id = value;
}
get sessionId() {
return this._sessionId;
}
set sessionId(value) {
this._sessionId = value;
}
get ownerPodId() {
return this._ownerPodId;
}
set ownerPodId(value) {
this._ownerPodId = value;
}
get initialTaskId() {
return this._initialTaskId;
}
set initialTaskId(value) {
this._initialTaskId = value;
}
get parentTaskIds() {
return this._parentTaskIds;
}
set parentTaskIds(value) {
this._parentTaskIds = value;
}
get dataDependencies() {
return this._dataDependencies;
}
set dataDependencies(value) {
this._dataDependencies = value;
}
get expectedOutputIds() {
return this._expectedOutputIds;
}
set expectedOutputIds(value) {
this._expectedOutputIds = value;
}
get retryOfIds() {
return this._retryOfIds;
}
set retryOfIds(value) {
this._retryOfIds = value;
}
get status() {
return this._status;
}
set status(value) {
this._status = value;
}
get statusMessage() {
return this._statusMessage;
}
set statusMessage(value) {
this._statusMessage = value;
}
get options() {
return this._options;
}
set options(value) {
this._options = value;
}
get createdAt() {
return this._createdAt;
}
set createdAt(value) {
this._createdAt = value;
}
get submittedAt() {
return this._submittedAt;
}
set submittedAt(value) {
this._submittedAt = value;
}
get receivedAt() {
return this._receivedAt;
}
set receivedAt(value) {
this._receivedAt = value;
}
get acquiredAt() {
return this._acquiredAt;
}
set acquiredAt(value) {
this._acquiredAt = value;
}
get fetchedAt() {
return this._fetchedAt;
}
set fetchedAt(value) {
this._fetchedAt = value;
}
get startedAt() {
return this._startedAt;
}
set startedAt(value) {
this._startedAt = value;
}
get processedAt() {
return this._processedAt;
}
set processedAt(value) {
this._processedAt = value;
}
get endedAt() {
return this._endedAt;
}
set endedAt(value) {
this._endedAt = value;
}
get podTtl() {
return this._podTtl;
}
set podTtl(value) {
this._podTtl = value;
}
get creationToEndDuration() {
return this._creationToEndDuration;
}
set creationToEndDuration(value) {
this._creationToEndDuration = value;
}
get processingToEndDuration() {
return this._processingToEndDuration;
}
set processingToEndDuration(value) {
this._processingToEndDuration = value;
}
get receivedToEndDuration() {
return this._receivedToEndDuration;
}
set receivedToEndDuration(value) {
this._receivedToEndDuration = value;
}
get payloadId() {
return this._payloadId;
}
set payloadId(value) {
this._payloadId = value;
}
get createdBy() {
return this._createdBy;
}
set createdBy(value) {
this._createdBy = value;
}
get output() {
return this._output;
}
set output(value) {
this._output = value;
}
get podHostname() {
return this._podHostname;
}
set podHostname(value) {
this._podHostname = value;
}
/**
* Serialize message to binary data
* @param instance message instance
*/
serializeBinary() {
const writer = new BinaryWriter();
TaskDetailed.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
}
/**
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
*/
toObject() {
return {
id: this.id,
sessionId: this.sessionId,
ownerPodId: this.ownerPodId,
initialTaskId: this.initialTaskId,
parentTaskIds: (this.parentTaskIds || []).slice(),
dataDependencies: (this.dataDependencies || []).slice(),
expectedOutputIds: (this.expectedOutputIds || []).slice(),
retryOfIds: (this.retryOfIds || []).slice(),
status: this.status,
statusMessage: this.statusMessage,
options: this.options ? this.options.toObject() : undefined,
createdAt: this.createdAt ? this.createdAt.toObject() : undefined,
submittedAt: this.submittedAt ? this.submittedAt.toObject() : undefined,
receivedAt: this.receivedAt ? this.receivedAt.toObject() : undefined,
acquiredAt: this.acquiredAt ? this.acquiredAt.toObject() : undefined,
fetchedAt: this.fetchedAt ? this.fetchedAt.toObject() : undefined,
startedAt: this.startedAt ? this.startedAt.toObject() : undefined,
processedAt: this.processedAt ? this.processedAt.toObject() : undefined,
endedAt: this.endedAt ? this.endedAt.toObject() : undefined,
podTtl: this.podTtl ? this.podTtl.toObject() : undefined,
creationToEndDuration: this.creationToEndDuration
? this.creationToEndDuration.toObject()
: undefined,
processingToEndDuration: this.processingToEndDuration
? this.processingToEndDuration.toObject()
: undefined,
receivedToEndDuration: this.receivedToEndDuration
? this.receivedToEndDuration.toObject()
: undefined,
payloadId: this.payloadId,
createdBy: this.createdBy,
output: this.output ? this.output.toObject() : undefined,
podHostname: this.podHostname
};
}
/**
* 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,
sessionId: this.sessionId,
ownerPodId: this.ownerPodId,
initialTaskId: this.initialTaskId,
parentTaskIds: (this.parentTaskIds || []).slice(),
dataDependencies: (this.dataDependencies || []).slice(),
expectedOutputIds: (this.expectedOutputIds || []).slice(),
retryOfIds: (this.retryOfIds || []).slice(),
status: armonikApiGrpcV1Task_status001.TaskStatus[this.status === null || this.status === undefined ? 0 : this.status],
statusMessage: this.statusMessage,
options: this.options ? this.options.toProtobufJSON(options) : null,
createdAt: this.createdAt ? this.createdAt.toProtobufJSON(options) : null,
submittedAt: this.submittedAt
? this.submittedAt.toProtobufJSON(options)
: null,
receivedAt: this.receivedAt
? this.receivedAt.toProtobufJSON(options)
: null,
acquiredAt: this.acquiredAt
? this.acquiredAt.toProtobufJSON(options)
: null,
fetchedAt: this.fetchedAt ? this.fetchedAt.toProtobufJSON(options) : null,
startedAt: this.startedAt ? this.startedAt.toProtobufJSON(options) : null,
processedAt: this.processedAt
? this.processedAt.toProtobufJSON(options)
: null,
endedAt: this.endedAt ? this.endedAt.toProtobufJSON(options) : null,
podTtl: this.podTtl ? this.podTtl.toProtobufJSON(options) : null,
creationToEndDuration: this.creationToEndDuration
? this.creationToEndDuration.toProtobufJSON(options)
: null,
processingToEndDuration: this.processingToEndDuration
? this.processingToEndDuration.toProtobufJSON(options)
: null,
receivedToEndDuration: this.receivedToEndDuration
? this.receivedToEndDuration.toProtobufJSON(options)
: null,
payloadId: this.payloadId,
createdBy: this.createdBy,
output: this.output ? this.output.toProtobufJSON(options) : null,
podHostname: this.podHostname
};
}
}
(function (TaskDetailed) {
/**
* Message implementation for armonik.api.grpc.v1.tasks.TaskDetailed.Output
*/
class Output {
static { this.id = 'armonik.api.grpc.v1.tasks.TaskDetailed.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) {
_instance.success = _instance.success || false;
_instance.error = _instance.error || '';
}
/**
* 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.success = _reader.readBool();
break;
case 2:
_instance.error = _reader.readString();
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.success) {
_writer.writeBool(1, _instance.success);
}
if (_instance.error) {
_writer.writeString(2, _instance.error);
}
}
/**
* 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) {
_value = _value || {};
this.success = _value.success;
this.error = _value.error;
Output.refineValues(this);
}
get success() {
return this._success;
}
set success(value) {
this._success = value;
}
get error() {
return this._error;
}
set error(value) {
this._error = value;
}
/**
* 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 {
success: this.success,
error: this.error
};
}
/**
* 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 {
success: this.success,
error: this.error
};
}
}
TaskDetailed.Output = Output;
})(TaskDetailed || (TaskDetailed = {}));
/**
* Message implementation for armonik.api.grpc.v1.tasks.TaskSummary
*/
export class TaskSummary {
static { this.id = 'armonik.api.grpc.v1.tasks.TaskSummary'; }
/**
* Deserialize binary data to message
* @param instance message instance
*/
static deserializeBinary(bytes) {
const instance = new TaskSummary();
TaskSummary.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 || '';
_instance.sessionId = _instance.sessionId || '';
_instance.ownerPodId = _instance.ownerPodId || '';
_instance.initialTaskId = _instance.initialTaskId || '';
_instance.countParentTaskIds = _instance.countParentTaskIds || '0';
_instance.countDataDependencies = _instance.countDataDependencies || '0';
_instance.countExpectedOutputIds = _instance.countExpectedOutputIds || '0';
_instance.countRetryOfIds = _instance.countRetryOfIds || '0';
_instance.status = _instance.status || 0;
_instance.statusMessage = _instance.statusMessage || '';
_instance.options = _instance.options || undefined;
_instance.createdAt = _instance.createdAt || undefined;
_instance.submittedAt = _instance.submittedAt || undefined;
_instance.receivedAt = _instance.receivedAt || undefined;
_instance.acquiredAt = _instance.acquiredAt || undefined;
_instance.fetchedAt = _instance.fetchedAt || undefined;
_instance.startedAt = _instance.startedAt || undefined;
_instance.processedAt = _instance.processedAt || undefined;
_instance.endedAt = _instance.endedAt || undefined;
_instance.podTtl = _instance.podTtl || undefined;
_instance.creationToEndDuration =
_instance.creationToEndDuration || undefined;
_instance.processingToEndDuration =
_instance.processingToEndDuration || undefined;
_instance.receivedToEndDuration =
_instance.receivedToEndDuration || undefined;
_instance.payloadId = _instance.payloadId || '';
_instance.createdBy = _instance.createdBy || '';
_instance.error = _instance.error || '';
_instance.podHostname = _instance.podHostname || '';
}
/**
* 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;
case 2:
_instance.sessionId = _reader.readString();
break;
case 10:
_instance.ownerPodId = _reader.readString();
break;
case 22:
_instance.initialTaskId = _reader.readString();
break;
case 21:
_instance.countParentTaskIds = _reader.readInt64String();
break;
case 11:
_instance.countDataDependencies = _reader.readInt64String();
break;
case 13:
_instance.countExpectedOutputIds = _reader.readInt64String();
break;
case 14:
_instance.countRetryOfIds = _reader.readInt64String();
break;
case 4:
_instance.status = _reader.readEnum();
break;
case 9:
_instance.statusMessage = _reader.readString();
break;
case 3:
_instance.options = new armonikApiGrpcV1005.TaskOptions();
_reader.readMessage(_instance.options, armonikApiGrpcV1005.TaskOptions.deserializeBinaryFromReader);
break;
case 5:
_instance.createdAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.createdAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 12:
_instance.submittedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.submittedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 18:
_instance.receivedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.receivedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 19:
_instance.acquiredAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.acquiredAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 25:
_instance.fetchedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.fetchedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 6:
_instance.startedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.startedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 23:
_instance.processedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.processedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 7:
_instance.endedAt = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.endedAt, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 20:
_instance.podTtl = new googleProtobuf004.Timestamp();
_reader.readMessage(_instance.podTtl, googleProtobuf004.Timestamp.deserializeBinaryFromReader);
break;
case 15:
_instance.creationToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.creationToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 16:
_instance.processingToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.processingToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 24:
_instance.receivedToEndDuration = new googleProtobuf000.Duration();
_reader.readMessage(_instance.receivedToEndDuration, googleProtobuf000.Duration.deserializeBinaryFromReader);
break;
case 26:
_instance.payloadId = _reader.readString();
break;
case 27:
_instance.createdBy = _reader.readString();
break;
case 8:
_instance.error = _reader.readString();
break;
case 17:
_instance.podHostname = _reader.readString();
break;
default:
_reader.skipField();
}
}
TaskSummary.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);
}
if (_instance.sessionId) {
_writer.writeString(2, _instance.sessionId);
}
if (_instance.ownerPodId) {
_writer.writeString(10, _instance.ownerPodId);
}
if (_instance.initialTaskId) {
_writer.writeString(22, _instance.initialTaskId);
}
if (_instance.countParentTaskIds) {
_writer.writeInt64String(21, _instance.countParentTaskIds);
}
if (_instance.countDataDependencies) {
_writer.writeInt64String(11, _instance.countDataDependencies);
}
if (_instance.countExpectedOutputIds) {
_writer.writeInt64String(13, _instance.countExpectedOutputIds);
}
if (_instance.countRetryOfIds) {
_writer.writeInt64String(14, _instance.countRetryOfIds);
}
if (_instance.status) {
_writer.writeEnum(4, _instance.status);
}
if (_instance.statusMessage) {
_writer.writeString(9, _instance.statusMessage);
}
if (_instance.options) {
_writer.writeMessage(3, _instance.options, armonikApiGrpcV1005.TaskOptions.serializeBinaryToWriter);
}
if (_instance.createdAt) {
_writer.writeMessage(5, _instance.createdAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.submittedAt) {
_writer.writeMessage(12, _instance.submittedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.receivedAt) {
_writer.writeMessage(18, _instance.receivedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.acquiredAt) {
_writer.writeMessage(19, _instance.acquiredAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.fetchedAt) {
_writer.writeMessage(25, _instance.fetchedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.startedAt) {
_writer.writeMessage(6, _instance.startedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.processedAt) {
_writer.writeMessage(23, _instance.processedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.endedAt) {
_writer.writeMessage(7, _instance.endedAt, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.podTtl) {
_writer.writeMessage(20, _instance.podTtl, googleProtobuf004.Timestamp.serializeBinaryToWriter);
}
if (_instance.creationToEndDuration) {
_writer.writeMessage(15, _instance.creationToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.processingToEndDuration) {
_writer.writeMessage(16, _instance.processingToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.receivedToEndDuration) {
_writer.writeMessage(24, _instance.receivedToEndDuration, googleProtobuf000.Duration.serializeBinaryToWriter);
}
if (_instance.payloadId) {
_writer.writeString(26, _instance.payloadId);
}
if (_instance.createdBy) {
_writer.writeString(27, _instance.createdBy);
}
if (_instance.error) {
_writer.writeString(8, _instance.error);
}
if (_instance.podHostname) {
_writer.writeString(17, _instance.podHostname);
}
}
/**
* Message constructor. Initializes the properties and applies default Protobuf values if necessary
* @param _value initial values object or instance of TaskSummary to deeply clone from
*/
constructor(_value) {
_value = _value || {};
this.id = _value.id;
this.sessionId = _value.sessionId;
this.ownerPodId = _value.ownerPodId;
this.initialTaskId = _value.initialTaskId;
this.countParentTaskIds = _value.countParentTaskIds;
this.countDataDependencies = _value.countDataDependencies;
this.countExpectedOutputIds = _value.countExpectedOutputIds;
this.countRetryOfIds = _value.countRetryOfIds;
this.status = _value.status;
this.statusMessage = _value.statusMessage;
this.options = _value.options
? new armonikApiGrpcV1005.TaskOptions(_value.options)
: undefined;
this.createdAt = _value.createdAt
? new googleProtobuf004.Timestamp(_value.createdAt)
: undefined;
this.submittedAt = _value.submittedAt
? new googleProtobuf004.Timestamp(_value.submittedAt)
: undefined;
this.receivedAt = _value.receivedAt
? new googleProtobuf004.Timestamp(_value.receivedAt)
: undefined;
this.acquiredAt = _value.acquiredAt
? new googleProtobuf004.Timestamp(_value.acquiredAt)
: undefined;
this.fetchedAt = _value.fetchedAt
? new googleProtobuf004.Timestamp(_value.fetchedAt)
: undefined;
this.startedAt = _value.startedAt
? new googleProtobuf004.Timestamp(_value.startedAt)
: undefined;
this.processedAt = _value.processedAt
? new googleProtobuf004.Timestamp(_value.processedAt)
: undefined;
this.endedAt = _value.endedAt
? new googleProtobuf004.Timestamp(_value.endedAt)
: undefined;
this.podTtl = _value.podTtl
? new googleProtobuf004.Timestamp(_value.podTtl)
: undefined;
this.creationToEndDuration = _value.creationToEndDuration
? new googleProtobuf000.Duration(_value.creationToEndDuration)
: undefined;
this.processingToEndDuration = _value.processingToEndDuration
? new googleProtobuf000.Duration(_value.processingToEndDuration)
: undefined;
this.receivedToEndDuration = _value.receivedToEndDuration
? new googleProtobuf000.Duration(_value.receivedToEndDuration)
: undefined;
this.payloadId = _value.payloadId;
this.createdBy = _value.createdBy;
this.error = _value.error;
this.podHostname = _value.podHostname;
TaskSummary.refineValues(this);
}
get id() {
return this._id;
}
set id(value) {
this._id = value;
}
get sessionId() {
return this._sessionId;
}
set sessionId(value) {
this._sessionId = value;
}
get ownerPodId() {
return this._ownerPodId;
}
set ownerPodId(value) {
this._ownerPodId = value;
}
get initialTaskId() {
return this._initialTaskId;
}
set initialTaskId(value) {
this._initialTaskId = value;
}
get countParentTaskIds() {
return this._countParentTaskIds;
}
set countParentTaskIds(value) {
this._countParentTaskIds = value;
}
get countDataDependencies() {
return this._countDataDependencies;
}
set countDataDependencies(value) {
this._countDataDependencies = value;
}
get countExpectedOutputIds() {
return this._countExpectedOutputIds;
}
set countExpectedOutputIds(value) {
this._countExpectedOutputIds = value;
}
get countRetryOfIds() {
return this._countRetryOfIds;
}
set countRetryOfIds(value) {
this._countRetryOfIds = value;
}
get status() {
return this._status;
}
set status(value) {
this._status = value;
}
get statusMessage() {
return this._statusMessage;
}
set statusMessage(value) {
this._statusMessage = value;
}
get options() {
return this._options;
}
set options(value) {
this._options = value;
}
get createdAt() {
return this._createdAt;
}
set createdAt(value) {
this._createdAt = value;
}
get submittedAt() {
return this._submittedAt;
}
set submittedAt(value) {
this._submittedAt = value;
}
get receivedAt() {
return this._receivedAt;
}
set receivedAt(value) {
this._receivedAt = value;
}
get acquiredAt() {
return this._acquiredAt;
}
set acquiredAt(value) {
this._acquiredAt = value;
}
get fetchedAt() {
return this._fetchedAt;
}
set fetchedAt(value) {
this._fetchedAt = value;
}
get startedAt() {
return this._startedAt;
}
set startedAt(value) {
this._startedAt = value;
}
get processedAt() {
return this._processedAt;
}
set processedAt(value) {
this._processedAt = value;
}
get endedAt() {
return this._endedAt;
}
set endedAt(value) {
this._endedAt = value;
}
get podTtl() {
return this._podTtl;
}
set podTtl(value) {
this._podTtl = value;
}
get creationToEndDuration() {
return this._creationToEndDuration;
}
set creationToEndDuration(value) {
this._creationToEndDuration = value;
}
get processingToEndDuration() {
return this._processingToEndDuration;
}
set processingToEndDuration(value) {
this._processingToEndDuration = value;
}
get receivedToEndDuration() {
return this._receivedToEndDuration;
}
set receivedToEndDuration(value) {
this._receivedToEndDuration = value;
}
get payloadId() {
return this._payloadId;
}
set payloadId(value) {
this._payloadId = value;
}
get createdBy() {
return this._createdBy;
}
set createdBy(value) {
this._createdBy = value;
}
get error() {
return this._error;
}
set error(value) {
this._error = value;
}
get podHostname() {
return this._podHostname;
}
set podHostname(value) {
this._podHostname = value;
}
/**
* Serialize message to binary data
* @param instance message instance
*/
serializeBinary() {
const writer = new BinaryWriter();
TaskSummary.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
}
/**
* Cast message to standard JavaScript object (all non-primitive values are deeply cloned)
*/
toObject() {
return {
id: this.id,
sessionId: this.sessionId,
ownerPodId: this.ownerPodId,
initialTaskId: this.initialTaskId,
countParentTaskIds: this.countParentTaskIds,
countDataDependencies: this.countDataDependencies,
countExpectedOutputIds: this.countExpectedOutputIds,
countRetryOfIds: this.countRetryOfIds,
status: this.status,
statusMessage: this.statusMessage,
options: this.options ? this.options.toObject() : undefined,
createdAt: this.createdAt ? this.createdAt.toObject() : undefined,
submittedAt: this.submittedAt ? this.submittedAt.toObject() : undefined,
receivedAt: this.receivedAt ? this.receivedAt.toObject() : undefined,
acquiredAt: this.acquiredAt ? this.acquiredAt.toObject() : undefined,
fetchedAt: this.fetchedAt ? this.fetchedAt.toObject() : undefined,
startedAt: this.startedAt ? this.startedAt.toObject() : undefined,
processedAt: this.processedAt ? this.processedAt.toObject() : undefined,
endedAt: this.endedAt ? this.endedAt.toObject() : undefined,
podTtl: this.podTtl ? this.podTtl.toObject() : undefined,
creationToEndDuration: this.creationToEndDuration
? this.creationToEndDuration.toObject()
: undefined,
processingToEndDuration: this.processingToEndDuration
? this.processingToEndDuration.toObject()
: undefined,
receivedToEndDuration: this.receivedToEndDuration
? this.receivedToEndDuration.toObject()
: undefined,
payloadId: this.payloadId,
createdBy: this.createdBy,
error: this.error,
podHostname: this.podHostname
};
}
/**
* 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 nam