@flyteorg/flyteidl
Version:
Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs
1,034 lines (949 loc) • 3.45 MB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
(function(global, factory) { /* global define, require, module */
/* AMD */ if (typeof define === 'function' && define.amd)
define(["protobufjs/minimal"], factory);
/* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
module.exports = factory(require("protobufjs/minimal"));
})(this, function($protobuf) {
"use strict";
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Exported root namespace
var $root = $protobuf.roots.flyteidl || ($protobuf.roots.flyteidl = {});
$root.flyteidl = (function() {
/**
* Namespace flyteidl.
* @exports flyteidl
* @namespace
*/
var flyteidl = {};
flyteidl.core = (function() {
/**
* Namespace core.
* @memberof flyteidl
* @namespace
*/
var core = {};
core.ArtifactKey = (function() {
/**
* Properties of an ArtifactKey.
* @memberof flyteidl.core
* @interface IArtifactKey
* @property {string|null} [project] ArtifactKey project
* @property {string|null} [domain] ArtifactKey domain
* @property {string|null} [name] ArtifactKey name
* @property {string|null} [org] ArtifactKey org
*/
/**
* Constructs a new ArtifactKey.
* @memberof flyteidl.core
* @classdesc Represents an ArtifactKey.
* @implements IArtifactKey
* @constructor
* @param {flyteidl.core.IArtifactKey=} [properties] Properties to set
*/
function ArtifactKey(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ArtifactKey project.
* @member {string} project
* @memberof flyteidl.core.ArtifactKey
* @instance
*/
ArtifactKey.prototype.project = "";
/**
* ArtifactKey domain.
* @member {string} domain
* @memberof flyteidl.core.ArtifactKey
* @instance
*/
ArtifactKey.prototype.domain = "";
/**
* ArtifactKey name.
* @member {string} name
* @memberof flyteidl.core.ArtifactKey
* @instance
*/
ArtifactKey.prototype.name = "";
/**
* ArtifactKey org.
* @member {string} org
* @memberof flyteidl.core.ArtifactKey
* @instance
*/
ArtifactKey.prototype.org = "";
/**
* Creates a new ArtifactKey instance using the specified properties.
* @function create
* @memberof flyteidl.core.ArtifactKey
* @static
* @param {flyteidl.core.IArtifactKey=} [properties] Properties to set
* @returns {flyteidl.core.ArtifactKey} ArtifactKey instance
*/
ArtifactKey.create = function create(properties) {
return new ArtifactKey(properties);
};
/**
* Encodes the specified ArtifactKey message. Does not implicitly {@link flyteidl.core.ArtifactKey.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.ArtifactKey
* @static
* @param {flyteidl.core.IArtifactKey} message ArtifactKey message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ArtifactKey.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.project != null && message.hasOwnProperty("project"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.project);
if (message.domain != null && message.hasOwnProperty("domain"))
writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain);
if (message.name != null && message.hasOwnProperty("name"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
if (message.org != null && message.hasOwnProperty("org"))
writer.uint32(/* id 4, wireType 2 =*/34).string(message.org);
return writer;
};
/**
* Decodes an ArtifactKey message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.ArtifactKey
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.ArtifactKey} ArtifactKey
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ArtifactKey.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.ArtifactKey();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.project = reader.string();
break;
case 2:
message.domain = reader.string();
break;
case 3:
message.name = reader.string();
break;
case 4:
message.org = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies an ArtifactKey message.
* @function verify
* @memberof flyteidl.core.ArtifactKey
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ArtifactKey.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.project != null && message.hasOwnProperty("project"))
if (!$util.isString(message.project))
return "project: string expected";
if (message.domain != null && message.hasOwnProperty("domain"))
if (!$util.isString(message.domain))
return "domain: string expected";
if (message.name != null && message.hasOwnProperty("name"))
if (!$util.isString(message.name))
return "name: string expected";
if (message.org != null && message.hasOwnProperty("org"))
if (!$util.isString(message.org))
return "org: string expected";
return null;
};
return ArtifactKey;
})();
core.ArtifactBindingData = (function() {
/**
* Properties of an ArtifactBindingData.
* @memberof flyteidl.core
* @interface IArtifactBindingData
* @property {string|null} [partitionKey] ArtifactBindingData partitionKey
* @property {boolean|null} [bindToTimePartition] ArtifactBindingData bindToTimePartition
* @property {flyteidl.core.ITimeTransform|null} [timeTransform] ArtifactBindingData timeTransform
*/
/**
* Constructs a new ArtifactBindingData.
* @memberof flyteidl.core
* @classdesc Represents an ArtifactBindingData.
* @implements IArtifactBindingData
* @constructor
* @param {flyteidl.core.IArtifactBindingData=} [properties] Properties to set
*/
function ArtifactBindingData(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* ArtifactBindingData partitionKey.
* @member {string} partitionKey
* @memberof flyteidl.core.ArtifactBindingData
* @instance
*/
ArtifactBindingData.prototype.partitionKey = "";
/**
* ArtifactBindingData bindToTimePartition.
* @member {boolean} bindToTimePartition
* @memberof flyteidl.core.ArtifactBindingData
* @instance
*/
ArtifactBindingData.prototype.bindToTimePartition = false;
/**
* ArtifactBindingData timeTransform.
* @member {flyteidl.core.ITimeTransform|null|undefined} timeTransform
* @memberof flyteidl.core.ArtifactBindingData
* @instance
*/
ArtifactBindingData.prototype.timeTransform = null;
// OneOf field names bound to virtual getters and setters
var $oneOfFields;
/**
* ArtifactBindingData partitionData.
* @member {"partitionKey"|"bindToTimePartition"|undefined} partitionData
* @memberof flyteidl.core.ArtifactBindingData
* @instance
*/
Object.defineProperty(ArtifactBindingData.prototype, "partitionData", {
get: $util.oneOfGetter($oneOfFields = ["partitionKey", "bindToTimePartition"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* Creates a new ArtifactBindingData instance using the specified properties.
* @function create
* @memberof flyteidl.core.ArtifactBindingData
* @static
* @param {flyteidl.core.IArtifactBindingData=} [properties] Properties to set
* @returns {flyteidl.core.ArtifactBindingData} ArtifactBindingData instance
*/
ArtifactBindingData.create = function create(properties) {
return new ArtifactBindingData(properties);
};
/**
* Encodes the specified ArtifactBindingData message. Does not implicitly {@link flyteidl.core.ArtifactBindingData.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.ArtifactBindingData
* @static
* @param {flyteidl.core.IArtifactBindingData} message ArtifactBindingData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ArtifactBindingData.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.partitionKey != null && message.hasOwnProperty("partitionKey"))
writer.uint32(/* id 5, wireType 2 =*/42).string(message.partitionKey);
if (message.bindToTimePartition != null && message.hasOwnProperty("bindToTimePartition"))
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.bindToTimePartition);
if (message.timeTransform != null && message.hasOwnProperty("timeTransform"))
$root.flyteidl.core.TimeTransform.encode(message.timeTransform, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
return writer;
};
/**
* Decodes an ArtifactBindingData message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.ArtifactBindingData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.ArtifactBindingData} ArtifactBindingData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ArtifactBindingData.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.ArtifactBindingData();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 5:
message.partitionKey = reader.string();
break;
case 6:
message.bindToTimePartition = reader.bool();
break;
case 7:
message.timeTransform = $root.flyteidl.core.TimeTransform.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies an ArtifactBindingData message.
* @function verify
* @memberof flyteidl.core.ArtifactBindingData
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ArtifactBindingData.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
var properties = {};
if (message.partitionKey != null && message.hasOwnProperty("partitionKey")) {
properties.partitionData = 1;
if (!$util.isString(message.partitionKey))
return "partitionKey: string expected";
}
if (message.bindToTimePartition != null && message.hasOwnProperty("bindToTimePartition")) {
if (properties.partitionData === 1)
return "partitionData: multiple values";
properties.partitionData = 1;
if (typeof message.bindToTimePartition !== "boolean")
return "bindToTimePartition: boolean expected";
}
if (message.timeTransform != null && message.hasOwnProperty("timeTransform")) {
var error = $root.flyteidl.core.TimeTransform.verify(message.timeTransform);
if (error)
return "timeTransform." + error;
}
return null;
};
return ArtifactBindingData;
})();
/**
* Granularity enum.
* @name flyteidl.core.Granularity
* @enum {string}
* @property {number} UNSET=0 UNSET value
* @property {number} MINUTE=1 MINUTE value
* @property {number} HOUR=2 HOUR value
* @property {number} DAY=3 DAY value
* @property {number} MONTH=4 MONTH value
*/
core.Granularity = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "UNSET"] = 0;
values[valuesById[1] = "MINUTE"] = 1;
values[valuesById[2] = "HOUR"] = 2;
values[valuesById[3] = "DAY"] = 3;
values[valuesById[4] = "MONTH"] = 4;
return values;
})();
/**
* Operator enum.
* @name flyteidl.core.Operator
* @enum {string}
* @property {number} MINUS=0 MINUS value
* @property {number} PLUS=1 PLUS value
*/
core.Operator = (function() {
var valuesById = {}, values = Object.create(valuesById);
values[valuesById[0] = "MINUS"] = 0;
values[valuesById[1] = "PLUS"] = 1;
return values;
})();
core.TimeTransform = (function() {
/**
* Properties of a TimeTransform.
* @memberof flyteidl.core
* @interface ITimeTransform
* @property {string|null} [transform] TimeTransform transform
* @property {flyteidl.core.Operator|null} [op] TimeTransform op
*/
/**
* Constructs a new TimeTransform.
* @memberof flyteidl.core
* @classdesc Represents a TimeTransform.
* @implements ITimeTransform
* @constructor
* @param {flyteidl.core.ITimeTransform=} [properties] Properties to set
*/
function TimeTransform(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* TimeTransform transform.
* @member {string} transform
* @memberof flyteidl.core.TimeTransform
* @instance
*/
TimeTransform.prototype.transform = "";
/**
* TimeTransform op.
* @member {flyteidl.core.Operator} op
* @memberof flyteidl.core.TimeTransform
* @instance
*/
TimeTransform.prototype.op = 0;
/**
* Creates a new TimeTransform instance using the specified properties.
* @function create
* @memberof flyteidl.core.TimeTransform
* @static
* @param {flyteidl.core.ITimeTransform=} [properties] Properties to set
* @returns {flyteidl.core.TimeTransform} TimeTransform instance
*/
TimeTransform.create = function create(properties) {
return new TimeTransform(properties);
};
/**
* Encodes the specified TimeTransform message. Does not implicitly {@link flyteidl.core.TimeTransform.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.TimeTransform
* @static
* @param {flyteidl.core.ITimeTransform} message TimeTransform message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
TimeTransform.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.transform != null && message.hasOwnProperty("transform"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.transform);
if (message.op != null && message.hasOwnProperty("op"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.op);
return writer;
};
/**
* Decodes a TimeTransform message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.TimeTransform
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.TimeTransform} TimeTransform
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
TimeTransform.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.TimeTransform();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.transform = reader.string();
break;
case 2:
message.op = reader.int32();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies a TimeTransform message.
* @function verify
* @memberof flyteidl.core.TimeTransform
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
TimeTransform.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.transform != null && message.hasOwnProperty("transform"))
if (!$util.isString(message.transform))
return "transform: string expected";
if (message.op != null && message.hasOwnProperty("op"))
switch (message.op) {
default:
return "op: enum value expected";
case 0:
case 1:
break;
}
return null;
};
return TimeTransform;
})();
core.InputBindingData = (function() {
/**
* Properties of an InputBindingData.
* @memberof flyteidl.core
* @interface IInputBindingData
* @property {string|null} ["var"] InputBindingData var
*/
/**
* Constructs a new InputBindingData.
* @memberof flyteidl.core
* @classdesc Represents an InputBindingData.
* @implements IInputBindingData
* @constructor
* @param {flyteidl.core.IInputBindingData=} [properties] Properties to set
*/
function InputBindingData(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* InputBindingData var.
* @member {string} var
* @memberof flyteidl.core.InputBindingData
* @instance
*/
InputBindingData.prototype["var"] = "";
/**
* Creates a new InputBindingData instance using the specified properties.
* @function create
* @memberof flyteidl.core.InputBindingData
* @static
* @param {flyteidl.core.IInputBindingData=} [properties] Properties to set
* @returns {flyteidl.core.InputBindingData} InputBindingData instance
*/
InputBindingData.create = function create(properties) {
return new InputBindingData(properties);
};
/**
* Encodes the specified InputBindingData message. Does not implicitly {@link flyteidl.core.InputBindingData.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.InputBindingData
* @static
* @param {flyteidl.core.IInputBindingData} message InputBindingData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
InputBindingData.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message["var"] != null && message.hasOwnProperty("var"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message["var"]);
return writer;
};
/**
* Decodes an InputBindingData message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.InputBindingData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.InputBindingData} InputBindingData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
InputBindingData.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.InputBindingData();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message["var"] = reader.string();
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies an InputBindingData message.
* @function verify
* @memberof flyteidl.core.InputBindingData
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
InputBindingData.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message["var"] != null && message.hasOwnProperty("var"))
if (!$util.isString(message["var"]))
return "var: string expected";
return null;
};
return InputBindingData;
})();
core.RuntimeBinding = (function() {
/**
* Properties of a RuntimeBinding.
* @memberof flyteidl.core
* @interface IRuntimeBinding
*/
/**
* Constructs a new RuntimeBinding.
* @memberof flyteidl.core
* @classdesc Represents a RuntimeBinding.
* @implements IRuntimeBinding
* @constructor
* @param {flyteidl.core.IRuntimeBinding=} [properties] Properties to set
*/
function RuntimeBinding(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Creates a new RuntimeBinding instance using the specified properties.
* @function create
* @memberof flyteidl.core.RuntimeBinding
* @static
* @param {flyteidl.core.IRuntimeBinding=} [properties] Properties to set
* @returns {flyteidl.core.RuntimeBinding} RuntimeBinding instance
*/
RuntimeBinding.create = function create(properties) {
return new RuntimeBinding(properties);
};
/**
* Encodes the specified RuntimeBinding message. Does not implicitly {@link flyteidl.core.RuntimeBinding.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.RuntimeBinding
* @static
* @param {flyteidl.core.IRuntimeBinding} message RuntimeBinding message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
RuntimeBinding.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Decodes a RuntimeBinding message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.RuntimeBinding
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.RuntimeBinding} RuntimeBinding
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
RuntimeBinding.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.RuntimeBinding();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies a RuntimeBinding message.
* @function verify
* @memberof flyteidl.core.RuntimeBinding
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
RuntimeBinding.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
return RuntimeBinding;
})();
core.LabelValue = (function() {
/**
* Properties of a LabelValue.
* @memberof flyteidl.core
* @interface ILabelValue
* @property {string|null} [staticValue] LabelValue staticValue
* @property {google.protobuf.ITimestamp|null} [timeValue] LabelValue timeValue
* @property {flyteidl.core.IArtifactBindingData|null} [triggeredBinding] LabelValue triggeredBinding
* @property {flyteidl.core.IInputBindingData|null} [inputBinding] LabelValue inputBinding
* @property {flyteidl.core.IRuntimeBinding|null} [runtimeBinding] LabelValue runtimeBinding
*/
/**
* Constructs a new LabelValue.
* @memberof flyteidl.core
* @classdesc Represents a LabelValue.
* @implements ILabelValue
* @constructor
* @param {flyteidl.core.ILabelValue=} [properties] Properties to set
*/
function LabelValue(properties) {
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* LabelValue staticValue.
* @member {string} staticValue
* @memberof flyteidl.core.LabelValue
* @instance
*/
LabelValue.prototype.staticValue = "";
/**
* LabelValue timeValue.
* @member {google.protobuf.ITimestamp|null|undefined} timeValue
* @memberof flyteidl.core.LabelValue
* @instance
*/
LabelValue.prototype.timeValue = null;
/**
* LabelValue triggeredBinding.
* @member {flyteidl.core.IArtifactBindingData|null|undefined} triggeredBinding
* @memberof flyteidl.core.LabelValue
* @instance
*/
LabelValue.prototype.triggeredBinding = null;
/**
* LabelValue inputBinding.
* @member {flyteidl.core.IInputBindingData|null|undefined} inputBinding
* @memberof flyteidl.core.LabelValue
* @instance
*/
LabelValue.prototype.inputBinding = null;
/**
* LabelValue runtimeBinding.
* @member {flyteidl.core.IRuntimeBinding|null|undefined} runtimeBinding
* @memberof flyteidl.core.LabelValue
* @instance
*/
LabelValue.prototype.runtimeBinding = null;
// OneOf field names bound to virtual getters and setters
var $oneOfFields;
/**
* LabelValue value.
* @member {"staticValue"|"timeValue"|"triggeredBinding"|"inputBinding"|"runtimeBinding"|undefined} value
* @memberof flyteidl.core.LabelValue
* @instance
*/
Object.defineProperty(LabelValue.prototype, "value", {
get: $util.oneOfGetter($oneOfFields = ["staticValue", "timeValue", "triggeredBinding", "inputBinding", "runtimeBinding"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* Creates a new LabelValue instance using the specified properties.
* @function create
* @memberof flyteidl.core.LabelValue
* @static
* @param {flyteidl.core.ILabelValue=} [properties] Properties to set
* @returns {flyteidl.core.LabelValue} LabelValue instance
*/
LabelValue.create = function create(properties) {
return new LabelValue(properties);
};
/**
* Encodes the specified LabelValue message. Does not implicitly {@link flyteidl.core.LabelValue.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.LabelValue
* @static
* @param {flyteidl.core.ILabelValue} message LabelValue message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
LabelValue.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.staticValue != null && message.hasOwnProperty("staticValue"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.staticValue);
if (message.timeValue != null && message.hasOwnProperty("timeValue"))
$root.google.protobuf.Timestamp.encode(message.timeValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
if (message.triggeredBinding != null && message.hasOwnProperty("triggeredBinding"))
$root.flyteidl.core.ArtifactBindingData.encode(message.triggeredBinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
if (message.inputBinding != null && message.hasOwnProperty("inputBinding"))
$root.flyteidl.core.InputBindingData.encode(message.inputBinding, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
if (message.runtimeBinding != null && message.hasOwnProperty("runtimeBinding"))
$root.flyteidl.core.RuntimeBinding.encode(message.runtimeBinding, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
return writer;
};
/**
* Decodes a LabelValue message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.LabelValue
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.LabelValue} LabelValue
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
LabelValue.decode = function decode(reader, length) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.LabelValue();
while (reader.pos < end) {
var tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.staticValue = reader.string();
break;
case 2:
message.timeValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
break;
case 3:
message.triggeredBinding = $root.flyteidl.core.ArtifactBindingData.decode(reader, reader.uint32());
break;
case 4:
message.inputBinding = $root.flyteidl.core.InputBindingData.decode(reader, reader.uint32());
break;
case 5:
message.runtimeBinding = $root.flyteidl.core.RuntimeBinding.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Verifies a LabelValue message.
* @function verify
* @memberof flyteidl.core.LabelValue
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
LabelValue.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
var properties = {};
if (message.staticValue != null && message.hasOwnProperty("staticValue")) {
properties.value = 1;
if (!$util.isString(message.staticValue))
return "staticValue: string expected";
}
if (message.timeValue != null && message.hasOwnProperty("timeValue")) {
if (properties.value === 1)
return "value: multiple values";
properties.value = 1;
{
var error = $root.google.protobuf.Timestamp.verify(message.timeValue);
if (error)
return "timeValue." + error;
}
}
if (message.triggeredBinding != null && message.hasOwnProperty("triggeredBinding")) {
if (properties.value === 1)
return "value: multiple values";
properties.value = 1;
{
var error = $root.flyteidl.core.ArtifactBindingData.verify(message.triggeredBinding);
if (error)
return "triggeredBinding." + error;
}
}
if (message.inputBinding != null && message.hasOwnProperty("inputBinding")) {
if (properties.value === 1)
return "value: multiple values";
properties.value = 1;
{
var error = $root.flyteidl.core.InputBindingData.verify(message.inputBinding);
if (error)
return "inputBinding." + error;
}
}
if (message.runtimeBinding != null && message.hasOwnProperty("runtimeBinding")) {
if (properties.value === 1)
return "value: multiple values";
properties.value = 1;
{
var error = $root.flyteidl.core.RuntimeBinding.verify(message.runtimeBinding);
if (error)
return "runtimeBinding." + error;
}
}
return null;
};
return LabelValue;
})();
core.Partitions = (function() {
/**
* Properties of a Partitions.
* @memberof flyteidl.core
* @interface IPartitions
* @property {Object.<string,flyteidl.core.ILabelValue>|null} [value] Partitions value
*/
/**
* Constructs a new Partitions.
* @memberof flyteidl.core
* @classdesc Represents a Partitions.
* @implements IPartitions
* @constructor
* @param {flyteidl.core.IPartitions=} [properties] Properties to set
*/
function Partitions(properties) {
this.value = {};
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* Partitions value.
* @member {Object.<string,flyteidl.core.ILabelValue>} value
* @memberof flyteidl.core.Partitions
* @instance
*/
Partitions.prototype.value = $util.emptyObject;
/**
* Creates a new Partitions instance using the specified properties.
* @function create
* @memberof flyteidl.core.Partitions
* @static
* @param {flyteidl.core.IPartitions=} [properties] Properties to set
* @returns {flyteidl.core.Partitions} Partitions instance
*/
Partitions.create = function create(properties) {
return new Partitions(properties);
};
/**
* Encodes the specified Partitions message. Does not implicitly {@link flyteidl.core.Partitions.verify|verify} messages.
* @function encode
* @memberof flyteidl.core.Partitions
* @static
* @param {flyteidl.core.IPartitions} message Partitions message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
Partitions.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.value != null && message.hasOwnProperty("value"))
for (var keys = Object.keys(message.value), i = 0; i < keys.length; ++i) {
writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
$root.flyteidl.core.LabelValue.encode(message.value[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
}
return writer;
};
/**
* Decodes a Partitions message from the specified reader or buffer.
* @function decode
* @memberof flyteidl.core.Partitions
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {flyteidl.core.Partitions} Partitions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
Partitions.decode = function decode(reader, length) {
if (!(read