@flyteorg/flyteidl 1.5.18 → 1.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4094,6 +4094,9 @@ export namespace flyteidl {
4094
4094
 
4095
4095
  /** OutputReference var */
4096
4096
  "var"?: (string|null);
4097
+
4098
+ /** OutputReference attrPath */
4099
+ attrPath?: (flyteidl.core.IPromiseAttribute[]|null);
4097
4100
  }
4098
4101
 
4099
4102
  /** Represents an OutputReference. */
@@ -4111,6 +4114,9 @@ export namespace flyteidl {
4111
4114
  /** OutputReference var. */
4112
4115
  public var: string;
4113
4116
 
4117
+ /** OutputReference attrPath. */
4118
+ public attrPath: flyteidl.core.IPromiseAttribute[];
4119
+
4114
4120
  /**
4115
4121
  * Creates a new OutputReference instance using the specified properties.
4116
4122
  * @param [properties] Properties to set
@@ -4144,6 +4150,67 @@ export namespace flyteidl {
4144
4150
  public static verify(message: { [k: string]: any }): (string|null);
4145
4151
  }
4146
4152
 
4153
+ /** Properties of a PromiseAttribute. */
4154
+ interface IPromiseAttribute {
4155
+
4156
+ /** PromiseAttribute stringValue */
4157
+ stringValue?: (string|null);
4158
+
4159
+ /** PromiseAttribute intValue */
4160
+ intValue?: (number|null);
4161
+ }
4162
+
4163
+ /** Represents a PromiseAttribute. */
4164
+ class PromiseAttribute implements IPromiseAttribute {
4165
+
4166
+ /**
4167
+ * Constructs a new PromiseAttribute.
4168
+ * @param [properties] Properties to set
4169
+ */
4170
+ constructor(properties?: flyteidl.core.IPromiseAttribute);
4171
+
4172
+ /** PromiseAttribute stringValue. */
4173
+ public stringValue: string;
4174
+
4175
+ /** PromiseAttribute intValue. */
4176
+ public intValue: number;
4177
+
4178
+ /** PromiseAttribute value. */
4179
+ public value?: ("stringValue"|"intValue");
4180
+
4181
+ /**
4182
+ * Creates a new PromiseAttribute instance using the specified properties.
4183
+ * @param [properties] Properties to set
4184
+ * @returns PromiseAttribute instance
4185
+ */
4186
+ public static create(properties?: flyteidl.core.IPromiseAttribute): flyteidl.core.PromiseAttribute;
4187
+
4188
+ /**
4189
+ * Encodes the specified PromiseAttribute message. Does not implicitly {@link flyteidl.core.PromiseAttribute.verify|verify} messages.
4190
+ * @param message PromiseAttribute message or plain object to encode
4191
+ * @param [writer] Writer to encode to
4192
+ * @returns Writer
4193
+ */
4194
+ public static encode(message: flyteidl.core.IPromiseAttribute, writer?: $protobuf.Writer): $protobuf.Writer;
4195
+
4196
+ /**
4197
+ * Decodes a PromiseAttribute message from the specified reader or buffer.
4198
+ * @param reader Reader or buffer to decode from
4199
+ * @param [length] Message length if known beforehand
4200
+ * @returns PromiseAttribute
4201
+ * @throws {Error} If the payload is not a reader or valid buffer
4202
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4203
+ */
4204
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.PromiseAttribute;
4205
+
4206
+ /**
4207
+ * Verifies a PromiseAttribute message.
4208
+ * @param message Plain object to verify
4209
+ * @returns `null` if valid, otherwise the reason why it is not
4210
+ */
4211
+ public static verify(message: { [k: string]: any }): (string|null);
4212
+ }
4213
+
4147
4214
  /** Properties of an Error. */
4148
4215
  interface IError {
4149
4216
 
@@ -9864,6 +9864,7 @@
9864
9864
  * @interface IOutputReference
9865
9865
  * @property {string|null} [nodeId] OutputReference nodeId
9866
9866
  * @property {string|null} ["var"] OutputReference var
9867
+ * @property {Array.<flyteidl.core.IPromiseAttribute>|null} [attrPath] OutputReference attrPath
9867
9868
  */
9868
9869
 
9869
9870
  /**
@@ -9875,6 +9876,7 @@
9875
9876
  * @param {flyteidl.core.IOutputReference=} [properties] Properties to set
9876
9877
  */
9877
9878
  function OutputReference(properties) {
9879
+ this.attrPath = [];
9878
9880
  if (properties)
9879
9881
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9880
9882
  if (properties[keys[i]] != null)
@@ -9897,6 +9899,14 @@
9897
9899
  */
9898
9900
  OutputReference.prototype["var"] = "";
9899
9901
 
9902
+ /**
9903
+ * OutputReference attrPath.
9904
+ * @member {Array.<flyteidl.core.IPromiseAttribute>} attrPath
9905
+ * @memberof flyteidl.core.OutputReference
9906
+ * @instance
9907
+ */
9908
+ OutputReference.prototype.attrPath = $util.emptyArray;
9909
+
9900
9910
  /**
9901
9911
  * Creates a new OutputReference instance using the specified properties.
9902
9912
  * @function create
@@ -9925,6 +9935,9 @@
9925
9935
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.nodeId);
9926
9936
  if (message["var"] != null && message.hasOwnProperty("var"))
9927
9937
  writer.uint32(/* id 2, wireType 2 =*/18).string(message["var"]);
9938
+ if (message.attrPath != null && message.attrPath.length)
9939
+ for (var i = 0; i < message.attrPath.length; ++i)
9940
+ $root.flyteidl.core.PromiseAttribute.encode(message.attrPath[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
9928
9941
  return writer;
9929
9942
  };
9930
9943
 
@@ -9952,6 +9965,11 @@
9952
9965
  case 2:
9953
9966
  message["var"] = reader.string();
9954
9967
  break;
9968
+ case 3:
9969
+ if (!(message.attrPath && message.attrPath.length))
9970
+ message.attrPath = [];
9971
+ message.attrPath.push($root.flyteidl.core.PromiseAttribute.decode(reader, reader.uint32()));
9972
+ break;
9955
9973
  default:
9956
9974
  reader.skipType(tag & 7);
9957
9975
  break;
@@ -9977,12 +9995,169 @@
9977
9995
  if (message["var"] != null && message.hasOwnProperty("var"))
9978
9996
  if (!$util.isString(message["var"]))
9979
9997
  return "var: string expected";
9998
+ if (message.attrPath != null && message.hasOwnProperty("attrPath")) {
9999
+ if (!Array.isArray(message.attrPath))
10000
+ return "attrPath: array expected";
10001
+ for (var i = 0; i < message.attrPath.length; ++i) {
10002
+ var error = $root.flyteidl.core.PromiseAttribute.verify(message.attrPath[i]);
10003
+ if (error)
10004
+ return "attrPath." + error;
10005
+ }
10006
+ }
9980
10007
  return null;
9981
10008
  };
9982
10009
 
9983
10010
  return OutputReference;
9984
10011
  })();
9985
10012
 
10013
+ core.PromiseAttribute = (function() {
10014
+
10015
+ /**
10016
+ * Properties of a PromiseAttribute.
10017
+ * @memberof flyteidl.core
10018
+ * @interface IPromiseAttribute
10019
+ * @property {string|null} [stringValue] PromiseAttribute stringValue
10020
+ * @property {number|null} [intValue] PromiseAttribute intValue
10021
+ */
10022
+
10023
+ /**
10024
+ * Constructs a new PromiseAttribute.
10025
+ * @memberof flyteidl.core
10026
+ * @classdesc Represents a PromiseAttribute.
10027
+ * @implements IPromiseAttribute
10028
+ * @constructor
10029
+ * @param {flyteidl.core.IPromiseAttribute=} [properties] Properties to set
10030
+ */
10031
+ function PromiseAttribute(properties) {
10032
+ if (properties)
10033
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
10034
+ if (properties[keys[i]] != null)
10035
+ this[keys[i]] = properties[keys[i]];
10036
+ }
10037
+
10038
+ /**
10039
+ * PromiseAttribute stringValue.
10040
+ * @member {string} stringValue
10041
+ * @memberof flyteidl.core.PromiseAttribute
10042
+ * @instance
10043
+ */
10044
+ PromiseAttribute.prototype.stringValue = "";
10045
+
10046
+ /**
10047
+ * PromiseAttribute intValue.
10048
+ * @member {number} intValue
10049
+ * @memberof flyteidl.core.PromiseAttribute
10050
+ * @instance
10051
+ */
10052
+ PromiseAttribute.prototype.intValue = 0;
10053
+
10054
+ // OneOf field names bound to virtual getters and setters
10055
+ var $oneOfFields;
10056
+
10057
+ /**
10058
+ * PromiseAttribute value.
10059
+ * @member {"stringValue"|"intValue"|undefined} value
10060
+ * @memberof flyteidl.core.PromiseAttribute
10061
+ * @instance
10062
+ */
10063
+ Object.defineProperty(PromiseAttribute.prototype, "value", {
10064
+ get: $util.oneOfGetter($oneOfFields = ["stringValue", "intValue"]),
10065
+ set: $util.oneOfSetter($oneOfFields)
10066
+ });
10067
+
10068
+ /**
10069
+ * Creates a new PromiseAttribute instance using the specified properties.
10070
+ * @function create
10071
+ * @memberof flyteidl.core.PromiseAttribute
10072
+ * @static
10073
+ * @param {flyteidl.core.IPromiseAttribute=} [properties] Properties to set
10074
+ * @returns {flyteidl.core.PromiseAttribute} PromiseAttribute instance
10075
+ */
10076
+ PromiseAttribute.create = function create(properties) {
10077
+ return new PromiseAttribute(properties);
10078
+ };
10079
+
10080
+ /**
10081
+ * Encodes the specified PromiseAttribute message. Does not implicitly {@link flyteidl.core.PromiseAttribute.verify|verify} messages.
10082
+ * @function encode
10083
+ * @memberof flyteidl.core.PromiseAttribute
10084
+ * @static
10085
+ * @param {flyteidl.core.IPromiseAttribute} message PromiseAttribute message or plain object to encode
10086
+ * @param {$protobuf.Writer} [writer] Writer to encode to
10087
+ * @returns {$protobuf.Writer} Writer
10088
+ */
10089
+ PromiseAttribute.encode = function encode(message, writer) {
10090
+ if (!writer)
10091
+ writer = $Writer.create();
10092
+ if (message.stringValue != null && message.hasOwnProperty("stringValue"))
10093
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.stringValue);
10094
+ if (message.intValue != null && message.hasOwnProperty("intValue"))
10095
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.intValue);
10096
+ return writer;
10097
+ };
10098
+
10099
+ /**
10100
+ * Decodes a PromiseAttribute message from the specified reader or buffer.
10101
+ * @function decode
10102
+ * @memberof flyteidl.core.PromiseAttribute
10103
+ * @static
10104
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
10105
+ * @param {number} [length] Message length if known beforehand
10106
+ * @returns {flyteidl.core.PromiseAttribute} PromiseAttribute
10107
+ * @throws {Error} If the payload is not a reader or valid buffer
10108
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10109
+ */
10110
+ PromiseAttribute.decode = function decode(reader, length) {
10111
+ if (!(reader instanceof $Reader))
10112
+ reader = $Reader.create(reader);
10113
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.PromiseAttribute();
10114
+ while (reader.pos < end) {
10115
+ var tag = reader.uint32();
10116
+ switch (tag >>> 3) {
10117
+ case 1:
10118
+ message.stringValue = reader.string();
10119
+ break;
10120
+ case 2:
10121
+ message.intValue = reader.int32();
10122
+ break;
10123
+ default:
10124
+ reader.skipType(tag & 7);
10125
+ break;
10126
+ }
10127
+ }
10128
+ return message;
10129
+ };
10130
+
10131
+ /**
10132
+ * Verifies a PromiseAttribute message.
10133
+ * @function verify
10134
+ * @memberof flyteidl.core.PromiseAttribute
10135
+ * @static
10136
+ * @param {Object.<string,*>} message Plain object to verify
10137
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10138
+ */
10139
+ PromiseAttribute.verify = function verify(message) {
10140
+ if (typeof message !== "object" || message === null)
10141
+ return "object expected";
10142
+ var properties = {};
10143
+ if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
10144
+ properties.value = 1;
10145
+ if (!$util.isString(message.stringValue))
10146
+ return "stringValue: string expected";
10147
+ }
10148
+ if (message.intValue != null && message.hasOwnProperty("intValue")) {
10149
+ if (properties.value === 1)
10150
+ return "value: multiple values";
10151
+ properties.value = 1;
10152
+ if (!$util.isInteger(message.intValue))
10153
+ return "intValue: integer expected";
10154
+ }
10155
+ return null;
10156
+ };
10157
+
10158
+ return PromiseAttribute;
10159
+ })();
10160
+
9986
10161
  core.Error = (function() {
9987
10162
 
9988
10163
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyteorg/flyteidl",
3
- "version": "1.5.18",
3
+ "version": "1.5.19",
4
4
  "description": "Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -170,6 +170,26 @@ message OutputReference {
170
170
 
171
171
  // Variable name must refer to an output variable for the node.
172
172
  string var = 2;
173
+
174
+ repeated PromiseAttribute attr_path = 3;
175
+ }
176
+
177
+ // PromiseAttribute stores the attribute path of a promise, which will be resolved at runtime.
178
+ // The attribute path is a list of strings and integers.
179
+ // In the following example,
180
+ // ```
181
+ // @workflow
182
+ // def wf():
183
+ // o = t1()
184
+ // t2(o.a["b"][0])
185
+ // ```
186
+ // the output reference t2 binds to has a list of PromiseAttribute ["a", "b", 0]
187
+
188
+ message PromiseAttribute {
189
+ oneof value {
190
+ string string_value = 1;
191
+ int32 int_value = 2;
192
+ }
173
193
  }
174
194
 
175
195
  // Represents an error thrown from a node.