@flyteorg/flyteidl 0.23.1 → 0.24.0

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.
@@ -2177,6 +2177,64 @@ export namespace flyteidl {
2177
2177
  public static verify(message: { [k: string]: any }): (string|null);
2178
2178
  }
2179
2179
 
2180
+ /** Properties of an Union. */
2181
+ interface IUnion {
2182
+
2183
+ /** Union value */
2184
+ value?: (flyteidl.core.ILiteral|null);
2185
+
2186
+ /** Union type */
2187
+ type?: (flyteidl.core.ILiteralType|null);
2188
+ }
2189
+
2190
+ /** Represents an Union. */
2191
+ class Union implements IUnion {
2192
+
2193
+ /**
2194
+ * Constructs a new Union.
2195
+ * @param [properties] Properties to set
2196
+ */
2197
+ constructor(properties?: flyteidl.core.IUnion);
2198
+
2199
+ /** Union value. */
2200
+ public value?: (flyteidl.core.ILiteral|null);
2201
+
2202
+ /** Union type. */
2203
+ public type?: (flyteidl.core.ILiteralType|null);
2204
+
2205
+ /**
2206
+ * Creates a new Union instance using the specified properties.
2207
+ * @param [properties] Properties to set
2208
+ * @returns Union instance
2209
+ */
2210
+ public static create(properties?: flyteidl.core.IUnion): flyteidl.core.Union;
2211
+
2212
+ /**
2213
+ * Encodes the specified Union message. Does not implicitly {@link flyteidl.core.Union.verify|verify} messages.
2214
+ * @param message Union message or plain object to encode
2215
+ * @param [writer] Writer to encode to
2216
+ * @returns Writer
2217
+ */
2218
+ public static encode(message: flyteidl.core.IUnion, writer?: $protobuf.Writer): $protobuf.Writer;
2219
+
2220
+ /**
2221
+ * Decodes an Union message from the specified reader or buffer.
2222
+ * @param reader Reader or buffer to decode from
2223
+ * @param [length] Message length if known beforehand
2224
+ * @returns Union
2225
+ * @throws {Error} If the payload is not a reader or valid buffer
2226
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2227
+ */
2228
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.Union;
2229
+
2230
+ /**
2231
+ * Verifies an Union message.
2232
+ * @param message Plain object to verify
2233
+ * @returns `null` if valid, otherwise the reason why it is not
2234
+ */
2235
+ public static verify(message: { [k: string]: any }): (string|null);
2236
+ }
2237
+
2180
2238
  /** Properties of a StructuredDatasetMetadata. */
2181
2239
  interface IStructuredDatasetMetadata {
2182
2240
 
@@ -2313,6 +2371,9 @@ export namespace flyteidl {
2313
2371
 
2314
2372
  /** Scalar structuredDataset */
2315
2373
  structuredDataset?: (flyteidl.core.IStructuredDataset|null);
2374
+
2375
+ /** Scalar union */
2376
+ union?: (flyteidl.core.IUnion|null);
2316
2377
  }
2317
2378
 
2318
2379
  /** Represents a Scalar. */
@@ -2348,8 +2409,11 @@ export namespace flyteidl {
2348
2409
  /** Scalar structuredDataset. */
2349
2410
  public structuredDataset?: (flyteidl.core.IStructuredDataset|null);
2350
2411
 
2412
+ /** Scalar union. */
2413
+ public union?: (flyteidl.core.IUnion|null);
2414
+
2351
2415
  /** Scalar value. */
2352
- public value?: ("primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset");
2416
+ public value?: ("primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union");
2353
2417
 
2354
2418
  /**
2355
2419
  * Creates a new Scalar instance using the specified properties.
@@ -2665,6 +2729,58 @@ export namespace flyteidl {
2665
2729
  public static verify(message: { [k: string]: any }): (string|null);
2666
2730
  }
2667
2731
 
2732
+ /** Properties of an UnionInfo. */
2733
+ interface IUnionInfo {
2734
+
2735
+ /** UnionInfo targetType */
2736
+ targetType?: (flyteidl.core.ILiteralType|null);
2737
+ }
2738
+
2739
+ /** Represents an UnionInfo. */
2740
+ class UnionInfo implements IUnionInfo {
2741
+
2742
+ /**
2743
+ * Constructs a new UnionInfo.
2744
+ * @param [properties] Properties to set
2745
+ */
2746
+ constructor(properties?: flyteidl.core.IUnionInfo);
2747
+
2748
+ /** UnionInfo targetType. */
2749
+ public targetType?: (flyteidl.core.ILiteralType|null);
2750
+
2751
+ /**
2752
+ * Creates a new UnionInfo instance using the specified properties.
2753
+ * @param [properties] Properties to set
2754
+ * @returns UnionInfo instance
2755
+ */
2756
+ public static create(properties?: flyteidl.core.IUnionInfo): flyteidl.core.UnionInfo;
2757
+
2758
+ /**
2759
+ * Encodes the specified UnionInfo message. Does not implicitly {@link flyteidl.core.UnionInfo.verify|verify} messages.
2760
+ * @param message UnionInfo message or plain object to encode
2761
+ * @param [writer] Writer to encode to
2762
+ * @returns Writer
2763
+ */
2764
+ public static encode(message: flyteidl.core.IUnionInfo, writer?: $protobuf.Writer): $protobuf.Writer;
2765
+
2766
+ /**
2767
+ * Decodes an UnionInfo message from the specified reader or buffer.
2768
+ * @param reader Reader or buffer to decode from
2769
+ * @param [length] Message length if known beforehand
2770
+ * @returns UnionInfo
2771
+ * @throws {Error} If the payload is not a reader or valid buffer
2772
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2773
+ */
2774
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.UnionInfo;
2775
+
2776
+ /**
2777
+ * Verifies an UnionInfo message.
2778
+ * @param message Plain object to verify
2779
+ * @returns `null` if valid, otherwise the reason why it is not
2780
+ */
2781
+ public static verify(message: { [k: string]: any }): (string|null);
2782
+ }
2783
+
2668
2784
  /** Properties of a BindingData. */
2669
2785
  interface IBindingData {
2670
2786
 
@@ -2679,6 +2795,9 @@ export namespace flyteidl {
2679
2795
 
2680
2796
  /** BindingData map */
2681
2797
  map?: (flyteidl.core.IBindingDataMap|null);
2798
+
2799
+ /** BindingData union */
2800
+ union?: (flyteidl.core.IUnionInfo|null);
2682
2801
  }
2683
2802
 
2684
2803
  /** Represents a BindingData. */
@@ -2702,6 +2821,9 @@ export namespace flyteidl {
2702
2821
  /** BindingData map. */
2703
2822
  public map?: (flyteidl.core.IBindingDataMap|null);
2704
2823
 
2824
+ /** BindingData union. */
2825
+ public union?: (flyteidl.core.IUnionInfo|null);
2826
+
2705
2827
  /** BindingData value. */
2706
2828
  public value?: ("scalar"|"collection"|"promise"|"map");
2707
2829
 
@@ -3296,6 +3418,110 @@ export namespace flyteidl {
3296
3418
  public static verify(message: { [k: string]: any }): (string|null);
3297
3419
  }
3298
3420
 
3421
+ /** Properties of an UnionType. */
3422
+ interface IUnionType {
3423
+
3424
+ /** UnionType variants */
3425
+ variants?: (flyteidl.core.ILiteralType[]|null);
3426
+ }
3427
+
3428
+ /** Represents an UnionType. */
3429
+ class UnionType implements IUnionType {
3430
+
3431
+ /**
3432
+ * Constructs a new UnionType.
3433
+ * @param [properties] Properties to set
3434
+ */
3435
+ constructor(properties?: flyteidl.core.IUnionType);
3436
+
3437
+ /** UnionType variants. */
3438
+ public variants: flyteidl.core.ILiteralType[];
3439
+
3440
+ /**
3441
+ * Creates a new UnionType instance using the specified properties.
3442
+ * @param [properties] Properties to set
3443
+ * @returns UnionType instance
3444
+ */
3445
+ public static create(properties?: flyteidl.core.IUnionType): flyteidl.core.UnionType;
3446
+
3447
+ /**
3448
+ * Encodes the specified UnionType message. Does not implicitly {@link flyteidl.core.UnionType.verify|verify} messages.
3449
+ * @param message UnionType message or plain object to encode
3450
+ * @param [writer] Writer to encode to
3451
+ * @returns Writer
3452
+ */
3453
+ public static encode(message: flyteidl.core.IUnionType, writer?: $protobuf.Writer): $protobuf.Writer;
3454
+
3455
+ /**
3456
+ * Decodes an UnionType message from the specified reader or buffer.
3457
+ * @param reader Reader or buffer to decode from
3458
+ * @param [length] Message length if known beforehand
3459
+ * @returns UnionType
3460
+ * @throws {Error} If the payload is not a reader or valid buffer
3461
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3462
+ */
3463
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.UnionType;
3464
+
3465
+ /**
3466
+ * Verifies an UnionType message.
3467
+ * @param message Plain object to verify
3468
+ * @returns `null` if valid, otherwise the reason why it is not
3469
+ */
3470
+ public static verify(message: { [k: string]: any }): (string|null);
3471
+ }
3472
+
3473
+ /** Properties of a TypeStructure. */
3474
+ interface ITypeStructure {
3475
+
3476
+ /** TypeStructure tag */
3477
+ tag?: (string|null);
3478
+ }
3479
+
3480
+ /** Represents a TypeStructure. */
3481
+ class TypeStructure implements ITypeStructure {
3482
+
3483
+ /**
3484
+ * Constructs a new TypeStructure.
3485
+ * @param [properties] Properties to set
3486
+ */
3487
+ constructor(properties?: flyteidl.core.ITypeStructure);
3488
+
3489
+ /** TypeStructure tag. */
3490
+ public tag: string;
3491
+
3492
+ /**
3493
+ * Creates a new TypeStructure instance using the specified properties.
3494
+ * @param [properties] Properties to set
3495
+ * @returns TypeStructure instance
3496
+ */
3497
+ public static create(properties?: flyteidl.core.ITypeStructure): flyteidl.core.TypeStructure;
3498
+
3499
+ /**
3500
+ * Encodes the specified TypeStructure message. Does not implicitly {@link flyteidl.core.TypeStructure.verify|verify} messages.
3501
+ * @param message TypeStructure message or plain object to encode
3502
+ * @param [writer] Writer to encode to
3503
+ * @returns Writer
3504
+ */
3505
+ public static encode(message: flyteidl.core.ITypeStructure, writer?: $protobuf.Writer): $protobuf.Writer;
3506
+
3507
+ /**
3508
+ * Decodes a TypeStructure message from the specified reader or buffer.
3509
+ * @param reader Reader or buffer to decode from
3510
+ * @param [length] Message length if known beforehand
3511
+ * @returns TypeStructure
3512
+ * @throws {Error} If the payload is not a reader or valid buffer
3513
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3514
+ */
3515
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.TypeStructure;
3516
+
3517
+ /**
3518
+ * Verifies a TypeStructure message.
3519
+ * @param message Plain object to verify
3520
+ * @returns `null` if valid, otherwise the reason why it is not
3521
+ */
3522
+ public static verify(message: { [k: string]: any }): (string|null);
3523
+ }
3524
+
3299
3525
  /** Properties of a TypeAnnotation. */
3300
3526
  interface ITypeAnnotation {
3301
3527
 
@@ -3372,11 +3598,17 @@ export namespace flyteidl {
3372
3598
  /** LiteralType structuredDatasetType */
3373
3599
  structuredDatasetType?: (flyteidl.core.IStructuredDatasetType|null);
3374
3600
 
3601
+ /** LiteralType unionType */
3602
+ unionType?: (flyteidl.core.IUnionType|null);
3603
+
3375
3604
  /** LiteralType metadata */
3376
3605
  metadata?: (google.protobuf.IStruct|null);
3377
3606
 
3378
3607
  /** LiteralType annotation */
3379
3608
  annotation?: (flyteidl.core.ITypeAnnotation|null);
3609
+
3610
+ /** LiteralType structure */
3611
+ structure?: (flyteidl.core.ITypeStructure|null);
3380
3612
  }
3381
3613
 
3382
3614
  /** Represents a LiteralType. */
@@ -3409,14 +3641,20 @@ export namespace flyteidl {
3409
3641
  /** LiteralType structuredDatasetType. */
3410
3642
  public structuredDatasetType?: (flyteidl.core.IStructuredDatasetType|null);
3411
3643
 
3644
+ /** LiteralType unionType. */
3645
+ public unionType?: (flyteidl.core.IUnionType|null);
3646
+
3412
3647
  /** LiteralType metadata. */
3413
3648
  public metadata?: (google.protobuf.IStruct|null);
3414
3649
 
3415
3650
  /** LiteralType annotation. */
3416
3651
  public annotation?: (flyteidl.core.ITypeAnnotation|null);
3417
3652
 
3653
+ /** LiteralType structure. */
3654
+ public structure?: (flyteidl.core.ITypeStructure|null);
3655
+
3418
3656
  /** LiteralType type. */
3419
- public type?: ("simple"|"schema"|"collectionType"|"mapValueType"|"blob"|"enumType"|"structuredDatasetType");
3657
+ public type?: ("simple"|"schema"|"collectionType"|"mapValueType"|"blob"|"enumType"|"structuredDatasetType"|"unionType");
3420
3658
 
3421
3659
  /**
3422
3660
  * Creates a new LiteralType instance using the specified properties.
@@ -5207,6 +5207,137 @@ export const flyteidl = $root.flyteidl = (() => {
5207
5207
  return Schema;
5208
5208
  })();
5209
5209
 
5210
+ core.Union = (function() {
5211
+
5212
+ /**
5213
+ * Properties of an Union.
5214
+ * @memberof flyteidl.core
5215
+ * @interface IUnion
5216
+ * @property {flyteidl.core.ILiteral|null} [value] Union value
5217
+ * @property {flyteidl.core.ILiteralType|null} [type] Union type
5218
+ */
5219
+
5220
+ /**
5221
+ * Constructs a new Union.
5222
+ * @memberof flyteidl.core
5223
+ * @classdesc Represents an Union.
5224
+ * @implements IUnion
5225
+ * @constructor
5226
+ * @param {flyteidl.core.IUnion=} [properties] Properties to set
5227
+ */
5228
+ function Union(properties) {
5229
+ if (properties)
5230
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
5231
+ if (properties[keys[i]] != null)
5232
+ this[keys[i]] = properties[keys[i]];
5233
+ }
5234
+
5235
+ /**
5236
+ * Union value.
5237
+ * @member {flyteidl.core.ILiteral|null|undefined} value
5238
+ * @memberof flyteidl.core.Union
5239
+ * @instance
5240
+ */
5241
+ Union.prototype.value = null;
5242
+
5243
+ /**
5244
+ * Union type.
5245
+ * @member {flyteidl.core.ILiteralType|null|undefined} type
5246
+ * @memberof flyteidl.core.Union
5247
+ * @instance
5248
+ */
5249
+ Union.prototype.type = null;
5250
+
5251
+ /**
5252
+ * Creates a new Union instance using the specified properties.
5253
+ * @function create
5254
+ * @memberof flyteidl.core.Union
5255
+ * @static
5256
+ * @param {flyteidl.core.IUnion=} [properties] Properties to set
5257
+ * @returns {flyteidl.core.Union} Union instance
5258
+ */
5259
+ Union.create = function create(properties) {
5260
+ return new Union(properties);
5261
+ };
5262
+
5263
+ /**
5264
+ * Encodes the specified Union message. Does not implicitly {@link flyteidl.core.Union.verify|verify} messages.
5265
+ * @function encode
5266
+ * @memberof flyteidl.core.Union
5267
+ * @static
5268
+ * @param {flyteidl.core.IUnion} message Union message or plain object to encode
5269
+ * @param {$protobuf.Writer} [writer] Writer to encode to
5270
+ * @returns {$protobuf.Writer} Writer
5271
+ */
5272
+ Union.encode = function encode(message, writer) {
5273
+ if (!writer)
5274
+ writer = $Writer.create();
5275
+ if (message.value != null && message.hasOwnProperty("value"))
5276
+ $root.flyteidl.core.Literal.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
5277
+ if (message.type != null && message.hasOwnProperty("type"))
5278
+ $root.flyteidl.core.LiteralType.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
5279
+ return writer;
5280
+ };
5281
+
5282
+ /**
5283
+ * Decodes an Union message from the specified reader or buffer.
5284
+ * @function decode
5285
+ * @memberof flyteidl.core.Union
5286
+ * @static
5287
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5288
+ * @param {number} [length] Message length if known beforehand
5289
+ * @returns {flyteidl.core.Union} Union
5290
+ * @throws {Error} If the payload is not a reader or valid buffer
5291
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5292
+ */
5293
+ Union.decode = function decode(reader, length) {
5294
+ if (!(reader instanceof $Reader))
5295
+ reader = $Reader.create(reader);
5296
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.Union();
5297
+ while (reader.pos < end) {
5298
+ let tag = reader.uint32();
5299
+ switch (tag >>> 3) {
5300
+ case 1:
5301
+ message.value = $root.flyteidl.core.Literal.decode(reader, reader.uint32());
5302
+ break;
5303
+ case 2:
5304
+ message.type = $root.flyteidl.core.LiteralType.decode(reader, reader.uint32());
5305
+ break;
5306
+ default:
5307
+ reader.skipType(tag & 7);
5308
+ break;
5309
+ }
5310
+ }
5311
+ return message;
5312
+ };
5313
+
5314
+ /**
5315
+ * Verifies an Union message.
5316
+ * @function verify
5317
+ * @memberof flyteidl.core.Union
5318
+ * @static
5319
+ * @param {Object.<string,*>} message Plain object to verify
5320
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
5321
+ */
5322
+ Union.verify = function verify(message) {
5323
+ if (typeof message !== "object" || message === null)
5324
+ return "object expected";
5325
+ if (message.value != null && message.hasOwnProperty("value")) {
5326
+ let error = $root.flyteidl.core.Literal.verify(message.value);
5327
+ if (error)
5328
+ return "value." + error;
5329
+ }
5330
+ if (message.type != null && message.hasOwnProperty("type")) {
5331
+ let error = $root.flyteidl.core.LiteralType.verify(message.type);
5332
+ if (error)
5333
+ return "type." + error;
5334
+ }
5335
+ return null;
5336
+ };
5337
+
5338
+ return Union;
5339
+ })();
5340
+
5210
5341
  core.StructuredDatasetMetadata = (function() {
5211
5342
 
5212
5343
  /**
@@ -5462,6 +5593,7 @@ export const flyteidl = $root.flyteidl = (() => {
5462
5593
  * @property {flyteidl.core.IError|null} [error] Scalar error
5463
5594
  * @property {google.protobuf.IStruct|null} [generic] Scalar generic
5464
5595
  * @property {flyteidl.core.IStructuredDataset|null} [structuredDataset] Scalar structuredDataset
5596
+ * @property {flyteidl.core.IUnion|null} [union] Scalar union
5465
5597
  */
5466
5598
 
5467
5599
  /**
@@ -5543,17 +5675,25 @@ export const flyteidl = $root.flyteidl = (() => {
5543
5675
  */
5544
5676
  Scalar.prototype.structuredDataset = null;
5545
5677
 
5678
+ /**
5679
+ * Scalar union.
5680
+ * @member {flyteidl.core.IUnion|null|undefined} union
5681
+ * @memberof flyteidl.core.Scalar
5682
+ * @instance
5683
+ */
5684
+ Scalar.prototype.union = null;
5685
+
5546
5686
  // OneOf field names bound to virtual getters and setters
5547
5687
  let $oneOfFields;
5548
5688
 
5549
5689
  /**
5550
5690
  * Scalar value.
5551
- * @member {"primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|undefined} value
5691
+ * @member {"primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union"|undefined} value
5552
5692
  * @memberof flyteidl.core.Scalar
5553
5693
  * @instance
5554
5694
  */
5555
5695
  Object.defineProperty(Scalar.prototype, "value", {
5556
- get: $util.oneOfGetter($oneOfFields = ["primitive", "blob", "binary", "schema", "noneType", "error", "generic", "structuredDataset"]),
5696
+ get: $util.oneOfGetter($oneOfFields = ["primitive", "blob", "binary", "schema", "noneType", "error", "generic", "structuredDataset", "union"]),
5557
5697
  set: $util.oneOfSetter($oneOfFields)
5558
5698
  });
5559
5699
 
@@ -5597,6 +5737,8 @@ export const flyteidl = $root.flyteidl = (() => {
5597
5737
  $root.google.protobuf.Struct.encode(message.generic, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
5598
5738
  if (message.structuredDataset != null && message.hasOwnProperty("structuredDataset"))
5599
5739
  $root.flyteidl.core.StructuredDataset.encode(message.structuredDataset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
5740
+ if (message.union != null && message.hasOwnProperty("union"))
5741
+ $root.flyteidl.core.Union.encode(message.union, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
5600
5742
  return writer;
5601
5743
  };
5602
5744
 
@@ -5642,6 +5784,9 @@ export const flyteidl = $root.flyteidl = (() => {
5642
5784
  case 8:
5643
5785
  message.structuredDataset = $root.flyteidl.core.StructuredDataset.decode(reader, reader.uint32());
5644
5786
  break;
5787
+ case 9:
5788
+ message.union = $root.flyteidl.core.Union.decode(reader, reader.uint32());
5789
+ break;
5645
5790
  default:
5646
5791
  reader.skipType(tag & 7);
5647
5792
  break;
@@ -5740,6 +5885,16 @@ export const flyteidl = $root.flyteidl = (() => {
5740
5885
  return "structuredDataset." + error;
5741
5886
  }
5742
5887
  }
5888
+ if (message.union != null && message.hasOwnProperty("union")) {
5889
+ if (properties.value === 1)
5890
+ return "value: multiple values";
5891
+ properties.value = 1;
5892
+ {
5893
+ let error = $root.flyteidl.core.Union.verify(message.union);
5894
+ if (error)
5895
+ return "union." + error;
5896
+ }
5897
+ }
5743
5898
  return null;
5744
5899
  };
5745
5900
 
@@ -6433,6 +6588,118 @@ export const flyteidl = $root.flyteidl = (() => {
6433
6588
  return BindingDataMap;
6434
6589
  })();
6435
6590
 
6591
+ core.UnionInfo = (function() {
6592
+
6593
+ /**
6594
+ * Properties of an UnionInfo.
6595
+ * @memberof flyteidl.core
6596
+ * @interface IUnionInfo
6597
+ * @property {flyteidl.core.ILiteralType|null} [targetType] UnionInfo targetType
6598
+ */
6599
+
6600
+ /**
6601
+ * Constructs a new UnionInfo.
6602
+ * @memberof flyteidl.core
6603
+ * @classdesc Represents an UnionInfo.
6604
+ * @implements IUnionInfo
6605
+ * @constructor
6606
+ * @param {flyteidl.core.IUnionInfo=} [properties] Properties to set
6607
+ */
6608
+ function UnionInfo(properties) {
6609
+ if (properties)
6610
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
6611
+ if (properties[keys[i]] != null)
6612
+ this[keys[i]] = properties[keys[i]];
6613
+ }
6614
+
6615
+ /**
6616
+ * UnionInfo targetType.
6617
+ * @member {flyteidl.core.ILiteralType|null|undefined} targetType
6618
+ * @memberof flyteidl.core.UnionInfo
6619
+ * @instance
6620
+ */
6621
+ UnionInfo.prototype.targetType = null;
6622
+
6623
+ /**
6624
+ * Creates a new UnionInfo instance using the specified properties.
6625
+ * @function create
6626
+ * @memberof flyteidl.core.UnionInfo
6627
+ * @static
6628
+ * @param {flyteidl.core.IUnionInfo=} [properties] Properties to set
6629
+ * @returns {flyteidl.core.UnionInfo} UnionInfo instance
6630
+ */
6631
+ UnionInfo.create = function create(properties) {
6632
+ return new UnionInfo(properties);
6633
+ };
6634
+
6635
+ /**
6636
+ * Encodes the specified UnionInfo message. Does not implicitly {@link flyteidl.core.UnionInfo.verify|verify} messages.
6637
+ * @function encode
6638
+ * @memberof flyteidl.core.UnionInfo
6639
+ * @static
6640
+ * @param {flyteidl.core.IUnionInfo} message UnionInfo message or plain object to encode
6641
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6642
+ * @returns {$protobuf.Writer} Writer
6643
+ */
6644
+ UnionInfo.encode = function encode(message, writer) {
6645
+ if (!writer)
6646
+ writer = $Writer.create();
6647
+ if (message.targetType != null && message.hasOwnProperty("targetType"))
6648
+ $root.flyteidl.core.LiteralType.encode(message.targetType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
6649
+ return writer;
6650
+ };
6651
+
6652
+ /**
6653
+ * Decodes an UnionInfo message from the specified reader or buffer.
6654
+ * @function decode
6655
+ * @memberof flyteidl.core.UnionInfo
6656
+ * @static
6657
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6658
+ * @param {number} [length] Message length if known beforehand
6659
+ * @returns {flyteidl.core.UnionInfo} UnionInfo
6660
+ * @throws {Error} If the payload is not a reader or valid buffer
6661
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6662
+ */
6663
+ UnionInfo.decode = function decode(reader, length) {
6664
+ if (!(reader instanceof $Reader))
6665
+ reader = $Reader.create(reader);
6666
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.UnionInfo();
6667
+ while (reader.pos < end) {
6668
+ let tag = reader.uint32();
6669
+ switch (tag >>> 3) {
6670
+ case 1:
6671
+ message.targetType = $root.flyteidl.core.LiteralType.decode(reader, reader.uint32());
6672
+ break;
6673
+ default:
6674
+ reader.skipType(tag & 7);
6675
+ break;
6676
+ }
6677
+ }
6678
+ return message;
6679
+ };
6680
+
6681
+ /**
6682
+ * Verifies an UnionInfo message.
6683
+ * @function verify
6684
+ * @memberof flyteidl.core.UnionInfo
6685
+ * @static
6686
+ * @param {Object.<string,*>} message Plain object to verify
6687
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
6688
+ */
6689
+ UnionInfo.verify = function verify(message) {
6690
+ if (typeof message !== "object" || message === null)
6691
+ return "object expected";
6692
+ if (message.targetType != null && message.hasOwnProperty("targetType")) {
6693
+ let error = $root.flyteidl.core.LiteralType.verify(message.targetType);
6694
+ if (error)
6695
+ return "targetType." + error;
6696
+ }
6697
+ return null;
6698
+ };
6699
+
6700
+ return UnionInfo;
6701
+ })();
6702
+
6436
6703
  core.BindingData = (function() {
6437
6704
 
6438
6705
  /**
@@ -6443,6 +6710,7 @@ export const flyteidl = $root.flyteidl = (() => {
6443
6710
  * @property {flyteidl.core.IBindingDataCollection|null} [collection] BindingData collection
6444
6711
  * @property {flyteidl.core.IOutputReference|null} [promise] BindingData promise
6445
6712
  * @property {flyteidl.core.IBindingDataMap|null} [map] BindingData map
6713
+ * @property {flyteidl.core.IUnionInfo|null} [union] BindingData union
6446
6714
  */
6447
6715
 
6448
6716
  /**
@@ -6492,6 +6760,14 @@ export const flyteidl = $root.flyteidl = (() => {
6492
6760
  */
6493
6761
  BindingData.prototype.map = null;
6494
6762
 
6763
+ /**
6764
+ * BindingData union.
6765
+ * @member {flyteidl.core.IUnionInfo|null|undefined} union
6766
+ * @memberof flyteidl.core.BindingData
6767
+ * @instance
6768
+ */
6769
+ BindingData.prototype.union = null;
6770
+
6495
6771
  // OneOf field names bound to virtual getters and setters
6496
6772
  let $oneOfFields;
6497
6773
 
@@ -6538,6 +6814,8 @@ export const flyteidl = $root.flyteidl = (() => {
6538
6814
  $root.flyteidl.core.OutputReference.encode(message.promise, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
6539
6815
  if (message.map != null && message.hasOwnProperty("map"))
6540
6816
  $root.flyteidl.core.BindingDataMap.encode(message.map, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
6817
+ if (message.union != null && message.hasOwnProperty("union"))
6818
+ $root.flyteidl.core.UnionInfo.encode(message.union, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
6541
6819
  return writer;
6542
6820
  };
6543
6821
 
@@ -6571,6 +6849,9 @@ export const flyteidl = $root.flyteidl = (() => {
6571
6849
  case 4:
6572
6850
  message.map = $root.flyteidl.core.BindingDataMap.decode(reader, reader.uint32());
6573
6851
  break;
6852
+ case 5:
6853
+ message.union = $root.flyteidl.core.UnionInfo.decode(reader, reader.uint32());
6854
+ break;
6574
6855
  default:
6575
6856
  reader.skipType(tag & 7);
6576
6857
  break;
@@ -6629,6 +6910,11 @@ export const flyteidl = $root.flyteidl = (() => {
6629
6910
  return "map." + error;
6630
6911
  }
6631
6912
  }
6913
+ if (message.union != null && message.hasOwnProperty("union")) {
6914
+ let error = $root.flyteidl.core.UnionInfo.verify(message.union);
6915
+ if (error)
6916
+ return "union." + error;
6917
+ }
6632
6918
  return null;
6633
6919
  };
6634
6920
 
@@ -7873,6 +8159,236 @@ export const flyteidl = $root.flyteidl = (() => {
7873
8159
  return EnumType;
7874
8160
  })();
7875
8161
 
8162
+ core.UnionType = (function() {
8163
+
8164
+ /**
8165
+ * Properties of an UnionType.
8166
+ * @memberof flyteidl.core
8167
+ * @interface IUnionType
8168
+ * @property {Array.<flyteidl.core.ILiteralType>|null} [variants] UnionType variants
8169
+ */
8170
+
8171
+ /**
8172
+ * Constructs a new UnionType.
8173
+ * @memberof flyteidl.core
8174
+ * @classdesc Represents an UnionType.
8175
+ * @implements IUnionType
8176
+ * @constructor
8177
+ * @param {flyteidl.core.IUnionType=} [properties] Properties to set
8178
+ */
8179
+ function UnionType(properties) {
8180
+ this.variants = [];
8181
+ if (properties)
8182
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8183
+ if (properties[keys[i]] != null)
8184
+ this[keys[i]] = properties[keys[i]];
8185
+ }
8186
+
8187
+ /**
8188
+ * UnionType variants.
8189
+ * @member {Array.<flyteidl.core.ILiteralType>} variants
8190
+ * @memberof flyteidl.core.UnionType
8191
+ * @instance
8192
+ */
8193
+ UnionType.prototype.variants = $util.emptyArray;
8194
+
8195
+ /**
8196
+ * Creates a new UnionType instance using the specified properties.
8197
+ * @function create
8198
+ * @memberof flyteidl.core.UnionType
8199
+ * @static
8200
+ * @param {flyteidl.core.IUnionType=} [properties] Properties to set
8201
+ * @returns {flyteidl.core.UnionType} UnionType instance
8202
+ */
8203
+ UnionType.create = function create(properties) {
8204
+ return new UnionType(properties);
8205
+ };
8206
+
8207
+ /**
8208
+ * Encodes the specified UnionType message. Does not implicitly {@link flyteidl.core.UnionType.verify|verify} messages.
8209
+ * @function encode
8210
+ * @memberof flyteidl.core.UnionType
8211
+ * @static
8212
+ * @param {flyteidl.core.IUnionType} message UnionType message or plain object to encode
8213
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8214
+ * @returns {$protobuf.Writer} Writer
8215
+ */
8216
+ UnionType.encode = function encode(message, writer) {
8217
+ if (!writer)
8218
+ writer = $Writer.create();
8219
+ if (message.variants != null && message.variants.length)
8220
+ for (let i = 0; i < message.variants.length; ++i)
8221
+ $root.flyteidl.core.LiteralType.encode(message.variants[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8222
+ return writer;
8223
+ };
8224
+
8225
+ /**
8226
+ * Decodes an UnionType message from the specified reader or buffer.
8227
+ * @function decode
8228
+ * @memberof flyteidl.core.UnionType
8229
+ * @static
8230
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8231
+ * @param {number} [length] Message length if known beforehand
8232
+ * @returns {flyteidl.core.UnionType} UnionType
8233
+ * @throws {Error} If the payload is not a reader or valid buffer
8234
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8235
+ */
8236
+ UnionType.decode = function decode(reader, length) {
8237
+ if (!(reader instanceof $Reader))
8238
+ reader = $Reader.create(reader);
8239
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.UnionType();
8240
+ while (reader.pos < end) {
8241
+ let tag = reader.uint32();
8242
+ switch (tag >>> 3) {
8243
+ case 1:
8244
+ if (!(message.variants && message.variants.length))
8245
+ message.variants = [];
8246
+ message.variants.push($root.flyteidl.core.LiteralType.decode(reader, reader.uint32()));
8247
+ break;
8248
+ default:
8249
+ reader.skipType(tag & 7);
8250
+ break;
8251
+ }
8252
+ }
8253
+ return message;
8254
+ };
8255
+
8256
+ /**
8257
+ * Verifies an UnionType message.
8258
+ * @function verify
8259
+ * @memberof flyteidl.core.UnionType
8260
+ * @static
8261
+ * @param {Object.<string,*>} message Plain object to verify
8262
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8263
+ */
8264
+ UnionType.verify = function verify(message) {
8265
+ if (typeof message !== "object" || message === null)
8266
+ return "object expected";
8267
+ if (message.variants != null && message.hasOwnProperty("variants")) {
8268
+ if (!Array.isArray(message.variants))
8269
+ return "variants: array expected";
8270
+ for (let i = 0; i < message.variants.length; ++i) {
8271
+ let error = $root.flyteidl.core.LiteralType.verify(message.variants[i]);
8272
+ if (error)
8273
+ return "variants." + error;
8274
+ }
8275
+ }
8276
+ return null;
8277
+ };
8278
+
8279
+ return UnionType;
8280
+ })();
8281
+
8282
+ core.TypeStructure = (function() {
8283
+
8284
+ /**
8285
+ * Properties of a TypeStructure.
8286
+ * @memberof flyteidl.core
8287
+ * @interface ITypeStructure
8288
+ * @property {string|null} [tag] TypeStructure tag
8289
+ */
8290
+
8291
+ /**
8292
+ * Constructs a new TypeStructure.
8293
+ * @memberof flyteidl.core
8294
+ * @classdesc Represents a TypeStructure.
8295
+ * @implements ITypeStructure
8296
+ * @constructor
8297
+ * @param {flyteidl.core.ITypeStructure=} [properties] Properties to set
8298
+ */
8299
+ function TypeStructure(properties) {
8300
+ if (properties)
8301
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
8302
+ if (properties[keys[i]] != null)
8303
+ this[keys[i]] = properties[keys[i]];
8304
+ }
8305
+
8306
+ /**
8307
+ * TypeStructure tag.
8308
+ * @member {string} tag
8309
+ * @memberof flyteidl.core.TypeStructure
8310
+ * @instance
8311
+ */
8312
+ TypeStructure.prototype.tag = "";
8313
+
8314
+ /**
8315
+ * Creates a new TypeStructure instance using the specified properties.
8316
+ * @function create
8317
+ * @memberof flyteidl.core.TypeStructure
8318
+ * @static
8319
+ * @param {flyteidl.core.ITypeStructure=} [properties] Properties to set
8320
+ * @returns {flyteidl.core.TypeStructure} TypeStructure instance
8321
+ */
8322
+ TypeStructure.create = function create(properties) {
8323
+ return new TypeStructure(properties);
8324
+ };
8325
+
8326
+ /**
8327
+ * Encodes the specified TypeStructure message. Does not implicitly {@link flyteidl.core.TypeStructure.verify|verify} messages.
8328
+ * @function encode
8329
+ * @memberof flyteidl.core.TypeStructure
8330
+ * @static
8331
+ * @param {flyteidl.core.ITypeStructure} message TypeStructure message or plain object to encode
8332
+ * @param {$protobuf.Writer} [writer] Writer to encode to
8333
+ * @returns {$protobuf.Writer} Writer
8334
+ */
8335
+ TypeStructure.encode = function encode(message, writer) {
8336
+ if (!writer)
8337
+ writer = $Writer.create();
8338
+ if (message.tag != null && message.hasOwnProperty("tag"))
8339
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.tag);
8340
+ return writer;
8341
+ };
8342
+
8343
+ /**
8344
+ * Decodes a TypeStructure message from the specified reader or buffer.
8345
+ * @function decode
8346
+ * @memberof flyteidl.core.TypeStructure
8347
+ * @static
8348
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
8349
+ * @param {number} [length] Message length if known beforehand
8350
+ * @returns {flyteidl.core.TypeStructure} TypeStructure
8351
+ * @throws {Error} If the payload is not a reader or valid buffer
8352
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
8353
+ */
8354
+ TypeStructure.decode = function decode(reader, length) {
8355
+ if (!(reader instanceof $Reader))
8356
+ reader = $Reader.create(reader);
8357
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.TypeStructure();
8358
+ while (reader.pos < end) {
8359
+ let tag = reader.uint32();
8360
+ switch (tag >>> 3) {
8361
+ case 1:
8362
+ message.tag = reader.string();
8363
+ break;
8364
+ default:
8365
+ reader.skipType(tag & 7);
8366
+ break;
8367
+ }
8368
+ }
8369
+ return message;
8370
+ };
8371
+
8372
+ /**
8373
+ * Verifies a TypeStructure message.
8374
+ * @function verify
8375
+ * @memberof flyteidl.core.TypeStructure
8376
+ * @static
8377
+ * @param {Object.<string,*>} message Plain object to verify
8378
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
8379
+ */
8380
+ TypeStructure.verify = function verify(message) {
8381
+ if (typeof message !== "object" || message === null)
8382
+ return "object expected";
8383
+ if (message.tag != null && message.hasOwnProperty("tag"))
8384
+ if (!$util.isString(message.tag))
8385
+ return "tag: string expected";
8386
+ return null;
8387
+ };
8388
+
8389
+ return TypeStructure;
8390
+ })();
8391
+
7876
8392
  core.TypeAnnotation = (function() {
7877
8393
 
7878
8394
  /**
@@ -7998,8 +8514,10 @@ export const flyteidl = $root.flyteidl = (() => {
7998
8514
  * @property {flyteidl.core.IBlobType|null} [blob] LiteralType blob
7999
8515
  * @property {flyteidl.core.IEnumType|null} [enumType] LiteralType enumType
8000
8516
  * @property {flyteidl.core.IStructuredDatasetType|null} [structuredDatasetType] LiteralType structuredDatasetType
8517
+ * @property {flyteidl.core.IUnionType|null} [unionType] LiteralType unionType
8001
8518
  * @property {google.protobuf.IStruct|null} [metadata] LiteralType metadata
8002
8519
  * @property {flyteidl.core.ITypeAnnotation|null} [annotation] LiteralType annotation
8520
+ * @property {flyteidl.core.ITypeStructure|null} [structure] LiteralType structure
8003
8521
  */
8004
8522
 
8005
8523
  /**
@@ -8073,6 +8591,14 @@ export const flyteidl = $root.flyteidl = (() => {
8073
8591
  */
8074
8592
  LiteralType.prototype.structuredDatasetType = null;
8075
8593
 
8594
+ /**
8595
+ * LiteralType unionType.
8596
+ * @member {flyteidl.core.IUnionType|null|undefined} unionType
8597
+ * @memberof flyteidl.core.LiteralType
8598
+ * @instance
8599
+ */
8600
+ LiteralType.prototype.unionType = null;
8601
+
8076
8602
  /**
8077
8603
  * LiteralType metadata.
8078
8604
  * @member {google.protobuf.IStruct|null|undefined} metadata
@@ -8089,17 +8615,25 @@ export const flyteidl = $root.flyteidl = (() => {
8089
8615
  */
8090
8616
  LiteralType.prototype.annotation = null;
8091
8617
 
8618
+ /**
8619
+ * LiteralType structure.
8620
+ * @member {flyteidl.core.ITypeStructure|null|undefined} structure
8621
+ * @memberof flyteidl.core.LiteralType
8622
+ * @instance
8623
+ */
8624
+ LiteralType.prototype.structure = null;
8625
+
8092
8626
  // OneOf field names bound to virtual getters and setters
8093
8627
  let $oneOfFields;
8094
8628
 
8095
8629
  /**
8096
8630
  * LiteralType type.
8097
- * @member {"simple"|"schema"|"collectionType"|"mapValueType"|"blob"|"enumType"|"structuredDatasetType"|undefined} type
8631
+ * @member {"simple"|"schema"|"collectionType"|"mapValueType"|"blob"|"enumType"|"structuredDatasetType"|"unionType"|undefined} type
8098
8632
  * @memberof flyteidl.core.LiteralType
8099
8633
  * @instance
8100
8634
  */
8101
8635
  Object.defineProperty(LiteralType.prototype, "type", {
8102
- get: $util.oneOfGetter($oneOfFields = ["simple", "schema", "collectionType", "mapValueType", "blob", "enumType", "structuredDatasetType"]),
8636
+ get: $util.oneOfGetter($oneOfFields = ["simple", "schema", "collectionType", "mapValueType", "blob", "enumType", "structuredDatasetType", "unionType"]),
8103
8637
  set: $util.oneOfSetter($oneOfFields)
8104
8638
  });
8105
8639
 
@@ -8145,6 +8679,10 @@ export const flyteidl = $root.flyteidl = (() => {
8145
8679
  $root.flyteidl.core.StructuredDatasetType.encode(message.structuredDatasetType, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
8146
8680
  if (message.annotation != null && message.hasOwnProperty("annotation"))
8147
8681
  $root.flyteidl.core.TypeAnnotation.encode(message.annotation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
8682
+ if (message.unionType != null && message.hasOwnProperty("unionType"))
8683
+ $root.flyteidl.core.UnionType.encode(message.unionType, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
8684
+ if (message.structure != null && message.hasOwnProperty("structure"))
8685
+ $root.flyteidl.core.TypeStructure.encode(message.structure, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
8148
8686
  return writer;
8149
8687
  };
8150
8688
 
@@ -8187,12 +8725,18 @@ export const flyteidl = $root.flyteidl = (() => {
8187
8725
  case 8:
8188
8726
  message.structuredDatasetType = $root.flyteidl.core.StructuredDatasetType.decode(reader, reader.uint32());
8189
8727
  break;
8728
+ case 10:
8729
+ message.unionType = $root.flyteidl.core.UnionType.decode(reader, reader.uint32());
8730
+ break;
8190
8731
  case 6:
8191
8732
  message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32());
8192
8733
  break;
8193
8734
  case 9:
8194
8735
  message.annotation = $root.flyteidl.core.TypeAnnotation.decode(reader, reader.uint32());
8195
8736
  break;
8737
+ case 11:
8738
+ message.structure = $root.flyteidl.core.TypeStructure.decode(reader, reader.uint32());
8739
+ break;
8196
8740
  default:
8197
8741
  reader.skipType(tag & 7);
8198
8742
  break;
@@ -8291,6 +8835,16 @@ export const flyteidl = $root.flyteidl = (() => {
8291
8835
  return "structuredDatasetType." + error;
8292
8836
  }
8293
8837
  }
8838
+ if (message.unionType != null && message.hasOwnProperty("unionType")) {
8839
+ if (properties.type === 1)
8840
+ return "type: multiple values";
8841
+ properties.type = 1;
8842
+ {
8843
+ let error = $root.flyteidl.core.UnionType.verify(message.unionType);
8844
+ if (error)
8845
+ return "unionType." + error;
8846
+ }
8847
+ }
8294
8848
  if (message.metadata != null && message.hasOwnProperty("metadata")) {
8295
8849
  let error = $root.google.protobuf.Struct.verify(message.metadata);
8296
8850
  if (error)
@@ -8301,6 +8855,11 @@ export const flyteidl = $root.flyteidl = (() => {
8301
8855
  if (error)
8302
8856
  return "annotation." + error;
8303
8857
  }
8858
+ if (message.structure != null && message.hasOwnProperty("structure")) {
8859
+ let error = $root.flyteidl.core.TypeStructure.verify(message.structure);
8860
+ if (error)
8861
+ return "structure." + error;
8862
+ }
8304
8863
  return null;
8305
8864
  };
8306
8865
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flyteorg/flyteidl",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "description": "Compiled protocol buffers and gRPC service clients/servers for Flyte IDLs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1053,6 +1053,7 @@ of an execution as it progresses across phase changes.
1053
1053
  "auth_role", ":ref:`ref_flyteidl.admin.AuthRole`", "", "**Deprecated.** Optional: auth override to apply this execution."
1054
1054
  "quality_of_service", ":ref:`ref_flyteidl.core.QualityOfService`", "", "Indicates the runtime priority of the execution."
1055
1055
  "max_parallelism", ":ref:`ref_int32`", "", "Controls the maximum number of task nodes that can be run in parallel for the entire workflow. This is useful to achieve fairness. Note: MapTasks are regarded as one unit, and parallelism/concurrency of MapTasks is independent from this."
1056
+ "raw_output_data_config", ":ref:`ref_flyteidl.admin.RawOutputDataConfig`", "", "User setting to configure where to store offloaded data (i.e. Blobs, structured datasets, query data, etc.). This should be a prefix like s3://my-bucket/my-data"
1056
1057
 
1057
1058
 
1058
1059
 
@@ -1216,6 +1216,7 @@ Specifies either a simple value or a reference to another output.
1216
1216
  "collection", ":ref:`ref_flyteidl.core.BindingDataCollection`", "", "A collection of binding data. This allows nesting of binding data to any number of levels."
1217
1217
  "promise", ":ref:`ref_flyteidl.core.OutputReference`", "", "References an output promised by another node."
1218
1218
  "map", ":ref:`ref_flyteidl.core.BindingDataMap`", "", "A map of bindings. The key is always a string."
1219
+ "union", ":ref:`ref_flyteidl.core.UnionInfo`", "", ""
1219
1220
 
1220
1221
 
1221
1222
 
@@ -1509,6 +1510,7 @@ Scalar
1509
1510
  "error", ":ref:`ref_flyteidl.core.Error`", "", ""
1510
1511
  "generic", ":ref:`ref_google.protobuf.Struct`", "", ""
1511
1512
  "structured_dataset", ":ref:`ref_flyteidl.core.StructuredDataset`", "", ""
1513
+ "union", ":ref:`ref_flyteidl.core.Union`", "", ""
1512
1514
 
1513
1515
 
1514
1516
 
@@ -1581,6 +1583,49 @@ StructuredDatasetMetadata
1581
1583
 
1582
1584
 
1583
1585
 
1586
+ .. _ref_flyteidl.core.Union:
1587
+
1588
+ Union
1589
+ ------------------------------------------------------------------
1590
+
1591
+ The runtime representation of a tagged union value. See `UnionType` for more details.
1592
+
1593
+
1594
+
1595
+ .. csv-table:: Union type fields
1596
+ :header: "Field", "Type", "Label", "Description"
1597
+ :widths: auto
1598
+
1599
+ "value", ":ref:`ref_flyteidl.core.Literal`", "", ""
1600
+ "type", ":ref:`ref_flyteidl.core.LiteralType`", "", ""
1601
+
1602
+
1603
+
1604
+
1605
+
1606
+
1607
+
1608
+ .. _ref_flyteidl.core.UnionInfo:
1609
+
1610
+ UnionInfo
1611
+ ------------------------------------------------------------------
1612
+
1613
+
1614
+
1615
+
1616
+
1617
+ .. csv-table:: UnionInfo type fields
1618
+ :header: "Field", "Type", "Label", "Description"
1619
+ :widths: auto
1620
+
1621
+ "targetType", ":ref:`ref_flyteidl.core.LiteralType`", "", ""
1622
+
1623
+
1624
+
1625
+
1626
+
1627
+
1628
+
1584
1629
  .. _ref_flyteidl.core.Void:
1585
1630
 
1586
1631
  Void
@@ -2383,8 +2428,10 @@ Defines a strong type to allow type checking between interfaces.
2383
2428
  "blob", ":ref:`ref_flyteidl.core.BlobType`", "", "A blob might have specialized implementation details depending on associated metadata."
2384
2429
  "enum_type", ":ref:`ref_flyteidl.core.EnumType`", "", "Defines an enum with pre-defined string values."
2385
2430
  "structured_dataset_type", ":ref:`ref_flyteidl.core.StructuredDatasetType`", "", "Generalized schema support"
2431
+ "union_type", ":ref:`ref_flyteidl.core.UnionType`", "", "Defines an union type with pre-defined LiteralTypes."
2386
2432
  "metadata", ":ref:`ref_google.protobuf.Struct`", "", "This field contains type metadata that is descriptive of the type, but is NOT considered in type-checking. This might be used by consumers to identify special behavior or display extended information for the type."
2387
2433
  "annotation", ":ref:`ref_flyteidl.core.TypeAnnotation`", "", "This field contains arbitrary data that might have special semantic meaning for the client but does not effect internal flyte behavior."
2434
+ "structure", ":ref:`ref_flyteidl.core.TypeStructure`", "", "Hints to improve type matching."
2388
2435
 
2389
2436
 
2390
2437
 
@@ -2523,6 +2570,62 @@ TypeAnnotation encapsulates registration time information about a type. This can
2523
2570
 
2524
2571
 
2525
2572
 
2573
+
2574
+
2575
+ .. _ref_flyteidl.core.TypeStructure:
2576
+
2577
+ TypeStructure
2578
+ ------------------------------------------------------------------
2579
+
2580
+ Hints to improve type matching
2581
+ e.g. allows distinguishing output from custom type transformers
2582
+ even if the underlying IDL serialization matches.
2583
+
2584
+
2585
+
2586
+ .. csv-table:: TypeStructure type fields
2587
+ :header: "Field", "Type", "Label", "Description"
2588
+ :widths: auto
2589
+
2590
+ "tag", ":ref:`ref_string`", "", "Must exactly match for types to be castable"
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+ .. _ref_flyteidl.core.UnionType:
2599
+
2600
+ UnionType
2601
+ ------------------------------------------------------------------
2602
+
2603
+ Defines a tagged union type, also known as a variant (and formally as the sum type).
2604
+
2605
+ A sum type S is defined by a sequence of types (A, B, C, ...), each tagged by a string tag
2606
+ A value of type S is constructed from a value of any of the variant types. The specific choice of type is recorded by
2607
+ storing the varaint&#39;s tag with the literal value and can be examined in runtime.
2608
+
2609
+ Type S is typically written as
2610
+ S := Apple A | Banana B | Cantaloupe C | ...
2611
+
2612
+ Notably, a nullable (optional) type is a sum type between some type X and the singleton type representing a null-value:
2613
+ Optional X := X | Null
2614
+
2615
+ See also: https://en.wikipedia.org/wiki/Tagged_union
2616
+
2617
+
2618
+
2619
+ .. csv-table:: UnionType type fields
2620
+ :header: "Field", "Type", "Label", "Description"
2621
+ :widths: auto
2622
+
2623
+ "variants", ":ref:`ref_flyteidl.core.LiteralType`", "repeated", "Predefined set of variants in union."
2624
+
2625
+
2626
+
2627
+
2628
+
2526
2629
 
2527
2630
 
2528
2631
 
@@ -52,6 +52,12 @@ message Schema {
52
52
  SchemaType type = 3;
53
53
  }
54
54
 
55
+ // The runtime representation of a tagged union value. See `UnionType` for more details.
56
+ message Union {
57
+ Literal value = 1;
58
+ LiteralType type = 2;
59
+ }
60
+
55
61
  message StructuredDatasetMetadata {
56
62
  // Bundle the type information along with the literal.
57
63
  // This is here because StructuredDatasets can often be more defined at run time than at compile time.
@@ -81,6 +87,7 @@ message Scalar {
81
87
  Error error = 6;
82
88
  google.protobuf.Struct generic = 7;
83
89
  StructuredDataset structured_dataset = 8;
90
+ Union union = 9;
84
91
  }
85
92
  }
86
93
 
@@ -123,6 +130,10 @@ message BindingDataMap {
123
130
  map<string, BindingData> bindings = 1;
124
131
  }
125
132
 
133
+ message UnionInfo {
134
+ LiteralType targetType = 1;
135
+ }
136
+
126
137
  // Specifies either a simple value or a reference to another output.
127
138
  message BindingData {
128
139
  oneof value {
@@ -139,6 +150,8 @@ message BindingData {
139
150
  // A map of bindings. The key is always a string.
140
151
  BindingDataMap map = 4;
141
152
  }
153
+
154
+ UnionInfo union = 5;
142
155
  }
143
156
 
144
157
  // An input/output binding of a variable to either static value or a node output.
@@ -90,6 +90,32 @@ message EnumType {
90
90
  repeated string values = 1;
91
91
  }
92
92
 
93
+ // Defines a tagged union type, also known as a variant (and formally as the sum type).
94
+ //
95
+ // A sum type S is defined by a sequence of types (A, B, C, ...), each tagged by a string tag
96
+ // A value of type S is constructed from a value of any of the variant types. The specific choice of type is recorded by
97
+ // storing the varaint's tag with the literal value and can be examined in runtime.
98
+ //
99
+ // Type S is typically written as
100
+ // S := Apple A | Banana B | Cantaloupe C | ...
101
+ //
102
+ // Notably, a nullable (optional) type is a sum type between some type X and the singleton type representing a null-value:
103
+ // Optional X := X | Null
104
+ //
105
+ // See also: https://en.wikipedia.org/wiki/Tagged_union
106
+ message UnionType {
107
+ // Predefined set of variants in union.
108
+ repeated LiteralType variants = 1;
109
+ }
110
+
111
+ // Hints to improve type matching
112
+ // e.g. allows distinguishing output from custom type transformers
113
+ // even if the underlying IDL serialization matches.
114
+ message TypeStructure {
115
+ // Must exactly match for types to be castable
116
+ string tag = 1;
117
+ }
118
+
93
119
  // TypeAnnotation encapsulates registration time information about a type. This can be used for various control-plane operations. TypeAnnotation will not be available at runtime when a task runs.
94
120
  message TypeAnnotation {
95
121
  // A arbitrary JSON payload to describe a type.
@@ -119,6 +145,9 @@ message LiteralType {
119
145
 
120
146
  // Generalized schema support
121
147
  StructuredDatasetType structured_dataset_type = 8;
148
+
149
+ // Defines an union type with pre-defined LiteralTypes.
150
+ UnionType union_type = 10;
122
151
  }
123
152
 
124
153
  // This field contains type metadata that is descriptive of the type, but is NOT considered in type-checking. This might be used by
@@ -128,6 +157,9 @@ message LiteralType {
128
157
  // This field contains arbitrary data that might have special semantic
129
158
  // meaning for the client but does not effect internal flyte behavior.
130
159
  TypeAnnotation annotation = 9;
160
+
161
+ // Hints to improve type matching.
162
+ TypeStructure structure = 11;
131
163
  }
132
164
 
133
165
  // A reference to an output produced by a node. The type can be retrieved -and validated- from