diff --git a/flyteadmin/go.mod b/flyteadmin/go.mod index ac74384250..b7d4364542 100644 --- a/flyteadmin/go.mod +++ b/flyteadmin/go.mod @@ -175,6 +175,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect diff --git a/flyteadmin/go.sum b/flyteadmin/go.sum index dba9da2e86..1e8e7cc367 100644 --- a/flyteadmin/go.sum +++ b/flyteadmin/go.sum @@ -1295,6 +1295,10 @@ github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IA github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wI2L/jsondiff v0.5.0 h1:RRMTi/mH+R2aXcPe1VYyvGINJqQfC3R+KSEakuU1Ikw= github.com/wI2L/jsondiff v0.5.0/go.mod h1:qqG6hnK0Lsrz2BpIVCxWiK9ItsBCpIZQiv0izJjOZ9s= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= diff --git a/flytecopilot/go.mod b/flytecopilot/go.mod index e1dbdc7683..2f148da127 100644 --- a/flytecopilot/go.mod +++ b/flytecopilot/go.mod @@ -89,6 +89,8 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/viper v1.11.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect diff --git a/flytecopilot/go.sum b/flytecopilot/go.sum index 9fb93ec715..6cf6fa668e 100644 --- a/flytecopilot/go.sum +++ b/flytecopilot/go.sum @@ -344,6 +344,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/flytectl/go.mod b/flytectl/go.mod index 9e4baeea63..f0bba9f2f8 100644 --- a/flytectl/go.mod +++ b/flytectl/go.mod @@ -150,6 +150,8 @@ require ( github.com/spf13/viper v1.11.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.2.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect diff --git a/flytectl/go.sum b/flytectl/go.sum index 1e3b5d7ef8..5b76bf5814 100644 --- a/flytectl/go.sum +++ b/flytectl/go.sum @@ -457,6 +457,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/flyteidl/clients/go/assets/admin.swagger.json b/flyteidl/clients/go/assets/admin.swagger.json index 6ebfd70f8d..51d88c88fd 100644 --- a/flyteidl/clients/go/assets/admin.swagger.json +++ b/flyteidl/clients/go/assets/admin.swagger.json @@ -7324,6 +7324,21 @@ } } }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreK8sObjectMetadata": { "type": "object", "properties": { @@ -7418,6 +7433,10 @@ "$ref": "#/definitions/coreLiteralMap", "description": "A map of strings to literals." }, + "offloaded_metadata": { + "$ref": "#/definitions/coreLiteralOffloadedMetadata", + "description": "Offloaded literal metadata\nWhen you deserialize the offloaded metadata, it would be of Literal and its type would be defined by LiteralType stored in offloaded_metadata." + }, "hash": { "type": "string", "title": "A hash representing this literal.\nThis is used for caching purposes. For more details refer to RFC 1893\n(https://github.com/flyteorg/flyte/blob/master/rfc/system/1893-caching-of-offloaded-objects.md)" @@ -7428,15 +7447,6 @@ "type": "string" }, "description": "Additional metadata for literals." - }, - "uri": { - "type": "string", - "description": "If this literal is offloaded, this field will contain metadata including the offload location." - }, - "size_bytes": { - "type": "string", - "format": "uint64", - "description": "Includes information about the size of the literal." } }, "description": "A simple value. This supports any level of nesting (e.g. array of array of array of Blobs) as well as simple primitives." @@ -7466,6 +7476,25 @@ }, "description": "A map of literals. This is a workaround since oneofs in proto messages cannot contain a repeated field." }, + "coreLiteralOffloadedMetadata": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The location of the offloaded core.Literal." + }, + "size_bytes": { + "type": "string", + "format": "uint64", + "description": "The size of the offloaded data." + }, + "inferred_type": { + "$ref": "#/definitions/coreLiteralType", + "description": "The inferred literal type of the offloaded data." + } + }, + "description": "A message that contains the metadata of the offloaded data." + }, "coreLiteralType": { "type": "object", "properties": { @@ -7924,6 +7953,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -8019,7 +8051,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/clients/go/coreutils/extract_literal.go b/flyteidl/clients/go/coreutils/extract_literal.go index 5801296dc3..9ef554f04c 100644 --- a/flyteidl/clients/go/coreutils/extract_literal.go +++ b/flyteidl/clients/go/coreutils/extract_literal.go @@ -62,6 +62,8 @@ func ExtractFromLiteral(literal *core.Literal) (interface{}, error) { return scalarValue.Generic, nil case *core.Scalar_StructuredDataset: return scalarValue.StructuredDataset.Uri, nil + case *core.Scalar_Json: + return scalarValue.Json.GetValue(), nil case *core.Scalar_Union: // extract the value of the union but not the actual union object extractedVal, err := ExtractFromLiteral(scalarValue.Union.Value) diff --git a/flyteidl/clients/go/coreutils/literals.go b/flyteidl/clients/go/coreutils/literals.go index 3527ac246b..815cd720c9 100644 --- a/flyteidl/clients/go/coreutils/literals.go +++ b/flyteidl/clients/go/coreutils/literals.go @@ -10,13 +10,13 @@ import ( "strings" "time" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flytestdlib/storage" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/ptypes" structpb "github.com/golang/protobuf/ptypes/struct" "github.com/pkg/errors" - - "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" - "github.com/flyteorg/flyte/flytestdlib/storage" + "github.com/vmihailenco/msgpack/v5" ) func MakePrimitive(v interface{}) (*core.Primitive, error) { @@ -250,6 +250,19 @@ func MakeDefaultLiteralForType(typ *core.LiteralType) (*core.Literal, error) { }, }, }, nil + case core.SimpleType_JSON: + return &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: []byte(""), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, nil } return nil, errors.Errorf("Not yet implemented. Default creation is not yet implemented for [%s] ", t.Simple.String()) case *core.LiteralType_Blob: @@ -385,6 +398,13 @@ func MakeLiteralForSimpleType(t core.SimpleType, s string) (*core.Literal, error scalar.Value = &core.Scalar_Generic{ Generic: st, } + case core.SimpleType_JSON: + scalar.Value = &core.Scalar_Json{ + Json: &core.Json{ + Value: []byte(s), + SerializationFormat: "msgpack", + }, + } case core.SimpleType_BINARY: scalar.Value = &core.Scalar_Binary{ Binary: &core.Binary{ @@ -567,10 +587,31 @@ func MakeLiteralForType(t *core.LiteralType, v interface{}) (*core.Literal, erro strValue = string(byteValue) } } + if newT.Simple == core.SimpleType_JSON { + // Return literal value here because this is the most efficient way to serialize json type + if _, isValueStringType := v.(string); !isValueStringType { + msgpackBytes, err := msgpack.Marshal(v) + if err != nil { + return nil, fmt.Errorf("unable to marshal to msgpack bytes for value %v: %w", v, err) + } + l.Value = &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: msgpackBytes, + SerializationFormat: "msgpack", + }, + }, + }, + } + return l, nil + } + } lv, err := MakeLiteralForSimpleType(newT.Simple, strValue) if err != nil { return nil, err } + return lv, nil case *core.LiteralType_Blob: diff --git a/flyteidl/clients/go/coreutils/literals_test.go b/flyteidl/clients/go/coreutils/literals_test.go index 24a0af4865..880a4818e3 100644 --- a/flyteidl/clients/go/coreutils/literals_test.go +++ b/flyteidl/clients/go/coreutils/literals_test.go @@ -10,6 +10,8 @@ import ( "testing" "time" + "github.com/vmihailenco/msgpack/v5" + "github.com/go-test/deep" "github.com/golang/protobuf/ptypes" structpb "github.com/golang/protobuf/ptypes/struct" @@ -250,6 +252,16 @@ func TestMakeDefaultLiteralForType(t *testing.T) { assert.NotNil(t, l.GetScalar().GetGeneric()) }) + t.Run("json", func(t *testing.T) { + l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_JSON, + }}) + assert.NoError(t, err) + assert.NotNil(t, l.GetScalar().GetJson()) + assert.NotNil(t, l.GetScalar().GetJson().GetValue()) + assert.NotNil(t, l.GetScalar().GetJson().GetSerializationFormat()) + }) + t.Run("enum", func(t *testing.T) { l, err := MakeDefaultLiteralForType(&core.LiteralType{Type: &core.LiteralType_EnumType{ EnumType: &core.EnumType{Values: []string{"x", "y", "z"}}, @@ -444,6 +456,65 @@ func TestMakeLiteralForType(t *testing.T) { assert.Equal(t, expectedVal, actualVal) }) + t.Run("SimpleJson", func(t *testing.T) { + // We compare the deserialized values instead of the raw msgpack bytes because Go does not guarantee the order + // of map keys during serialization. This means that while the serialized bytes may differ, the deserialized + // values should be logically equivalent. + + var literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_JSON}} + v := map[string]interface{}{ + "a": int64(1), + "b": 3.14, + "c": "example_string", + "d": map[string]interface{}{ + "1": int64(100), + "2": int64(200), + }, + "e": map[string]interface{}{ + "a": int64(1), + "b": 3.14, + }, + "f": []string{"a", "b", "c"}, + } + + val, err := MakeLiteralForType(literalType, v) + assert.NoError(t, err) + + msgpackBytes, err := msgpack.Marshal(v) + assert.NoError(t, err) + + literalVal := &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: msgpackBytes, + SerializationFormat: "msgpack", + }, + }, + }, + }, + } + + expectedLiteralVal, err := ExtractFromLiteral(literalVal) + assert.NoError(t, err) + actualLiteralVal, err := ExtractFromLiteral(val) + assert.NoError(t, err) + + expectedBytes, ok := expectedLiteralVal.([]byte) + assert.True(t, ok, "expectedLiteralVal is not of type []byte") + actualBytes, ok := actualLiteralVal.([]byte) + assert.True(t, ok, "actualLiteralVal is not of type []byte") + + var expectedVal, actualVal map[string]interface{} + err = msgpack.Unmarshal(expectedBytes, &expectedVal) + assert.NoError(t, err) + err = msgpack.Unmarshal(actualBytes, &actualVal) + assert.NoError(t, err) + + assert.Equal(t, expectedVal, actualVal) + }) + t.Run("ArrayStrings", func(t *testing.T) { var literalType = &core.LiteralType{Type: &core.LiteralType_CollectionType{ CollectionType: &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRING}}}} diff --git a/flyteidl/gen/pb-es/flyteidl/core/literals_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/literals_pb.ts index 95ebbd9de9..fbaa8023c5 100644 --- a/flyteidl/gen/pb-es/flyteidl/core/literals_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/core/literals_pb.ts @@ -253,6 +253,63 @@ export class Binary extends Message { } } +/** + * Represents a JSON object encoded as a byte array. + * This field is used to store JSON-serialized data, which can include + * dataclasses, dictionaries, Pydantic models, or other structures that + * can be represented as JSON objects. When utilized, the data should be + * deserialized into its corresponding structure. + * This design ensures that the data is stored in a format that can be + * fully reconstructed without loss of information. + * + * @generated from message flyteidl.core.Json + */ +export class Json extends Message { + /** + * The JSON object serialized as a byte array. + * + * @generated from field: bytes value = 1; + */ + value = new Uint8Array(0); + + /** + * The format used to serialize the byte array. + * This field identifies the specific format of the serialized JSON data, + * allowing future flexibility in supporting different JSON variants. + * + * @generated from field: string serialization_format = 2; + */ + serializationFormat = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.core.Json"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 2, name: "serialization_format", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Json { + return new Json().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Json { + return new Json().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Json { + return new Json().fromJsonString(jsonString, options); + } + + static equals(a: Json | PlainMessage | undefined, b: Json | PlainMessage | undefined): boolean { + return proto3.util.equals(Json, a, b); + } +} + /** * A strongly typed schema that defines the interface of data retrieved from the underlying storage medium. * @@ -495,6 +552,12 @@ export class Scalar extends Message { */ value: Union; case: "union"; + } | { + /** + * @generated from field: flyteidl.core.Json json = 10; + */ + value: Json; + case: "json"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -514,6 +577,7 @@ export class Scalar extends Message { { no: 7, name: "generic", kind: "message", T: Struct, oneof: "value" }, { no: 8, name: "structured_dataset", kind: "message", T: StructuredDataset, oneof: "value" }, { no: 9, name: "union", kind: "message", T: Union, oneof: "value" }, + { no: 10, name: "json", kind: "message", T: Json, oneof: "value" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Scalar { diff --git a/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts index f311fa0692..35b4312dab 100644 --- a/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/core/types_pb.ts @@ -61,6 +61,11 @@ export enum SimpleType { * @generated from enum value: STRUCT = 9; */ STRUCT = 9, + + /** + * @generated from enum value: JSON = 10; + */ + JSON = 10, } // Retrieve enum metadata with: proto3.getEnumType(SimpleType) proto3.util.setEnumType(SimpleType, "flyteidl.core.SimpleType", [ @@ -74,6 +79,7 @@ proto3.util.setEnumType(SimpleType, "flyteidl.core.SimpleType", [ { no: 7, name: "BINARY" }, { no: 8, name: "ERROR" }, { no: 9, name: "STRUCT" }, + { no: 10, name: "JSON" }, ]); /** diff --git a/flyteidl/gen/pb-go/flyteidl/core/literals.pb.go b/flyteidl/gen/pb-go/flyteidl/core/literals.pb.go index 3f6e223749..83096ec121 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/literals.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/literals.pb.go @@ -365,6 +365,72 @@ func (x *Binary) GetTag() string { return "" } +// Represents a JSON object encoded as a byte array. +// This field is used to store JSON-serialized data, which can include +// dataclasses, dictionaries, Pydantic models, or other structures that +// can be represented as JSON objects. When utilized, the data should be +// deserialized into its corresponding structure. +// This design ensures that the data is stored in a format that can be +// fully reconstructed without loss of information. +type Json struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The JSON object serialized as a byte array. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // The format used to serialize the byte array. + // This field identifies the specific format of the serialized JSON data, + // allowing future flexibility in supporting different JSON variants. + SerializationFormat string `protobuf:"bytes,2,opt,name=serialization_format,json=serializationFormat,proto3" json:"serialization_format,omitempty"` +} + +func (x *Json) Reset() { + *x = Json{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_core_literals_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Json) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Json) ProtoMessage() {} + +func (x *Json) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_core_literals_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Json.ProtoReflect.Descriptor instead. +func (*Json) Descriptor() ([]byte, []int) { + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{5} +} + +func (x *Json) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Json) GetSerializationFormat() string { + if x != nil { + return x.SerializationFormat + } + return "" +} + // A strongly typed schema that defines the interface of data retrieved from the underlying storage medium. type Schema struct { state protoimpl.MessageState @@ -378,7 +444,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[5] + mi := &file_flyteidl_core_literals_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -391,7 +457,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[5] + mi := &file_flyteidl_core_literals_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -404,7 +470,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{5} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{6} } func (x *Schema) GetUri() string { @@ -434,7 +500,7 @@ type Union struct { func (x *Union) Reset() { *x = Union{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[6] + mi := &file_flyteidl_core_literals_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -447,7 +513,7 @@ func (x *Union) String() string { func (*Union) ProtoMessage() {} func (x *Union) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[6] + mi := &file_flyteidl_core_literals_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -460,7 +526,7 @@ func (x *Union) ProtoReflect() protoreflect.Message { // Deprecated: Use Union.ProtoReflect.Descriptor instead. func (*Union) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{6} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{7} } func (x *Union) GetValue() *Literal { @@ -495,7 +561,7 @@ type StructuredDatasetMetadata struct { func (x *StructuredDatasetMetadata) Reset() { *x = StructuredDatasetMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[7] + mi := &file_flyteidl_core_literals_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -508,7 +574,7 @@ func (x *StructuredDatasetMetadata) String() string { func (*StructuredDatasetMetadata) ProtoMessage() {} func (x *StructuredDatasetMetadata) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[7] + mi := &file_flyteidl_core_literals_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -521,7 +587,7 @@ func (x *StructuredDatasetMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use StructuredDatasetMetadata.ProtoReflect.Descriptor instead. func (*StructuredDatasetMetadata) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{7} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{8} } func (x *StructuredDatasetMetadata) GetStructuredDatasetType() *StructuredDatasetType { @@ -545,7 +611,7 @@ type StructuredDataset struct { func (x *StructuredDataset) Reset() { *x = StructuredDataset{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[8] + mi := &file_flyteidl_core_literals_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -558,7 +624,7 @@ func (x *StructuredDataset) String() string { func (*StructuredDataset) ProtoMessage() {} func (x *StructuredDataset) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[8] + mi := &file_flyteidl_core_literals_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -571,7 +637,7 @@ func (x *StructuredDataset) ProtoReflect() protoreflect.Message { // Deprecated: Use StructuredDataset.ProtoReflect.Descriptor instead. func (*StructuredDataset) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{8} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{9} } func (x *StructuredDataset) GetUri() string { @@ -604,13 +670,14 @@ type Scalar struct { // *Scalar_Generic // *Scalar_StructuredDataset // *Scalar_Union + // *Scalar_Json Value isScalar_Value `protobuf_oneof:"value"` } func (x *Scalar) Reset() { *x = Scalar{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[9] + mi := &file_flyteidl_core_literals_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -623,7 +690,7 @@ func (x *Scalar) String() string { func (*Scalar) ProtoMessage() {} func (x *Scalar) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[9] + mi := &file_flyteidl_core_literals_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -636,7 +703,7 @@ func (x *Scalar) ProtoReflect() protoreflect.Message { // Deprecated: Use Scalar.ProtoReflect.Descriptor instead. func (*Scalar) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{9} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{10} } func (m *Scalar) GetValue() isScalar_Value { @@ -709,6 +776,13 @@ func (x *Scalar) GetUnion() *Union { return nil } +func (x *Scalar) GetJson() *Json { + if x, ok := x.GetValue().(*Scalar_Json); ok { + return x.Json + } + return nil +} + type isScalar_Value interface { isScalar_Value() } @@ -749,6 +823,10 @@ type Scalar_Union struct { Union *Union `protobuf:"bytes,9,opt,name=union,proto3,oneof"` } +type Scalar_Json struct { + Json *Json `protobuf:"bytes,10,opt,name=json,proto3,oneof"` +} + func (*Scalar_Primitive) isScalar_Value() {} func (*Scalar_Blob) isScalar_Value() {} @@ -767,6 +845,8 @@ func (*Scalar_StructuredDataset) isScalar_Value() {} func (*Scalar_Union) isScalar_Value() {} +func (*Scalar_Json) isScalar_Value() {} + // A simple value. This supports any level of nesting (e.g. array of array of array of Blobs) as well as simple primitives. type Literal struct { state protoimpl.MessageState @@ -791,7 +871,7 @@ type Literal struct { func (x *Literal) Reset() { *x = Literal{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[10] + mi := &file_flyteidl_core_literals_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -804,7 +884,7 @@ func (x *Literal) String() string { func (*Literal) ProtoMessage() {} func (x *Literal) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[10] + mi := &file_flyteidl_core_literals_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -817,7 +897,7 @@ func (x *Literal) ProtoReflect() protoreflect.Message { // Deprecated: Use Literal.ProtoReflect.Descriptor instead. func (*Literal) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{10} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{11} } func (m *Literal) GetValue() isLiteral_Value { @@ -919,7 +999,7 @@ type LiteralOffloadedMetadata struct { func (x *LiteralOffloadedMetadata) Reset() { *x = LiteralOffloadedMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[11] + mi := &file_flyteidl_core_literals_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -932,7 +1012,7 @@ func (x *LiteralOffloadedMetadata) String() string { func (*LiteralOffloadedMetadata) ProtoMessage() {} func (x *LiteralOffloadedMetadata) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[11] + mi := &file_flyteidl_core_literals_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -945,7 +1025,7 @@ func (x *LiteralOffloadedMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use LiteralOffloadedMetadata.ProtoReflect.Descriptor instead. func (*LiteralOffloadedMetadata) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{11} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{12} } func (x *LiteralOffloadedMetadata) GetUri() string { @@ -981,7 +1061,7 @@ type LiteralCollection struct { func (x *LiteralCollection) Reset() { *x = LiteralCollection{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[12] + mi := &file_flyteidl_core_literals_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -994,7 +1074,7 @@ func (x *LiteralCollection) String() string { func (*LiteralCollection) ProtoMessage() {} func (x *LiteralCollection) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[12] + mi := &file_flyteidl_core_literals_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1007,7 +1087,7 @@ func (x *LiteralCollection) ProtoReflect() protoreflect.Message { // Deprecated: Use LiteralCollection.ProtoReflect.Descriptor instead. func (*LiteralCollection) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{12} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{13} } func (x *LiteralCollection) GetLiterals() []*Literal { @@ -1029,7 +1109,7 @@ type LiteralMap struct { func (x *LiteralMap) Reset() { *x = LiteralMap{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[13] + mi := &file_flyteidl_core_literals_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +1122,7 @@ func (x *LiteralMap) String() string { func (*LiteralMap) ProtoMessage() {} func (x *LiteralMap) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[13] + mi := &file_flyteidl_core_literals_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +1135,7 @@ func (x *LiteralMap) ProtoReflect() protoreflect.Message { // Deprecated: Use LiteralMap.ProtoReflect.Descriptor instead. func (*LiteralMap) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{13} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{14} } func (x *LiteralMap) GetLiterals() map[string]*Literal { @@ -1077,7 +1157,7 @@ type BindingDataCollection struct { func (x *BindingDataCollection) Reset() { *x = BindingDataCollection{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[14] + mi := &file_flyteidl_core_literals_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1090,7 +1170,7 @@ func (x *BindingDataCollection) String() string { func (*BindingDataCollection) ProtoMessage() {} func (x *BindingDataCollection) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[14] + mi := &file_flyteidl_core_literals_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1103,7 +1183,7 @@ func (x *BindingDataCollection) ProtoReflect() protoreflect.Message { // Deprecated: Use BindingDataCollection.ProtoReflect.Descriptor instead. func (*BindingDataCollection) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{14} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{15} } func (x *BindingDataCollection) GetBindings() []*BindingData { @@ -1125,7 +1205,7 @@ type BindingDataMap struct { func (x *BindingDataMap) Reset() { *x = BindingDataMap{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[15] + mi := &file_flyteidl_core_literals_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1138,7 +1218,7 @@ func (x *BindingDataMap) String() string { func (*BindingDataMap) ProtoMessage() {} func (x *BindingDataMap) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[15] + mi := &file_flyteidl_core_literals_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1151,7 +1231,7 @@ func (x *BindingDataMap) ProtoReflect() protoreflect.Message { // Deprecated: Use BindingDataMap.ProtoReflect.Descriptor instead. func (*BindingDataMap) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{15} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{16} } func (x *BindingDataMap) GetBindings() map[string]*BindingData { @@ -1172,7 +1252,7 @@ type UnionInfo struct { func (x *UnionInfo) Reset() { *x = UnionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[16] + mi := &file_flyteidl_core_literals_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1185,7 +1265,7 @@ func (x *UnionInfo) String() string { func (*UnionInfo) ProtoMessage() {} func (x *UnionInfo) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[16] + mi := &file_flyteidl_core_literals_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1198,7 +1278,7 @@ func (x *UnionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use UnionInfo.ProtoReflect.Descriptor instead. func (*UnionInfo) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{16} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{17} } func (x *UnionInfo) GetTargetType() *LiteralType { @@ -1227,7 +1307,7 @@ type BindingData struct { func (x *BindingData) Reset() { *x = BindingData{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[17] + mi := &file_flyteidl_core_literals_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1240,7 +1320,7 @@ func (x *BindingData) String() string { func (*BindingData) ProtoMessage() {} func (x *BindingData) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[17] + mi := &file_flyteidl_core_literals_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1253,7 +1333,7 @@ func (x *BindingData) ProtoReflect() protoreflect.Message { // Deprecated: Use BindingData.ProtoReflect.Descriptor instead. func (*BindingData) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{17} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{18} } func (m *BindingData) GetValue() isBindingData_Value { @@ -1346,7 +1426,7 @@ type Binding struct { func (x *Binding) Reset() { *x = Binding{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[18] + mi := &file_flyteidl_core_literals_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1359,7 +1439,7 @@ func (x *Binding) String() string { func (*Binding) ProtoMessage() {} func (x *Binding) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[18] + mi := &file_flyteidl_core_literals_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1372,7 +1452,7 @@ func (x *Binding) ProtoReflect() protoreflect.Message { // Deprecated: Use Binding.ProtoReflect.Descriptor instead. func (*Binding) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{18} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{19} } func (x *Binding) GetVar() string { @@ -1404,7 +1484,7 @@ type KeyValuePair struct { func (x *KeyValuePair) Reset() { *x = KeyValuePair{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[19] + mi := &file_flyteidl_core_literals_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1417,7 +1497,7 @@ func (x *KeyValuePair) String() string { func (*KeyValuePair) ProtoMessage() {} func (x *KeyValuePair) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[19] + mi := &file_flyteidl_core_literals_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1430,7 +1510,7 @@ func (x *KeyValuePair) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyValuePair.ProtoReflect.Descriptor instead. func (*KeyValuePair) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{19} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{20} } func (x *KeyValuePair) GetKey() string { @@ -1461,7 +1541,7 @@ type RetryStrategy struct { func (x *RetryStrategy) Reset() { *x = RetryStrategy{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_core_literals_proto_msgTypes[20] + mi := &file_flyteidl_core_literals_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1474,7 +1554,7 @@ func (x *RetryStrategy) String() string { func (*RetryStrategy) ProtoMessage() {} func (x *RetryStrategy) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_core_literals_proto_msgTypes[20] + mi := &file_flyteidl_core_literals_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1487,7 +1567,7 @@ func (x *RetryStrategy) ProtoReflect() protoreflect.Message { // Deprecated: Use RetryStrategy.ProtoReflect.Descriptor instead. func (*RetryStrategy) Descriptor() ([]byte, []int) { - return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{20} + return file_flyteidl_core_literals_proto_rawDescGZIP(), []int{21} } func (x *RetryStrategy) GetRetries() uint32 { @@ -1539,178 +1619,186 @@ var file_flyteidl_core_literals_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x49, 0x0a, 0x06, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x65, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x12, - 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, - 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, - 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x79, 0x0a, - 0x19, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, - 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5c, 0x0a, 0x17, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x15, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, - 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf0, 0x03, 0x0a, 0x06, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, - 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, 0x52, - 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6c, - 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x00, 0x52, - 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x2f, 0x0a, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x06, - 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x32, 0x0a, 0x09, 0x6e, 0x6f, 0x6e, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x48, - 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x51, - 0x0a, 0x12, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x11, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, - 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x42, - 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x03, 0x0a, 0x07, 0x4c, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, - 0x63, 0x61, 0x6c, 0x61, 0x72, 0x12, 0x42, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x61, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x4f, 0x0a, 0x04, 0x4a, + 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x73, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x49, 0x0a, 0x06, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, - 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x58, 0x0a, 0x12, 0x6f, 0x66, 0x66, 0x6c, - 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4f, 0x66, 0x66, 0x6c, - 0x6f, 0x61, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, - 0x11, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x04, - 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x4c, - 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, - 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, - 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x65, - 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x66, - 0x65, 0x72, 0x72, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x47, 0x0a, 0x11, 0x4c, 0x69, 0x74, - 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, - 0x0a, 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, - 0x70, 0x12, 0x43, 0x0a, 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x2e, 0x4c, - 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, - 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x15, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xb2, 0x01, 0x0a, - 0x0e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, 0x12, - 0x47, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2b, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, - 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, - 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x57, 0x0a, 0x0d, 0x42, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x47, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, - 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x65, 0x0a, 0x05, 0x55, 0x6e, 0x69, 0x6f, 0x6e, + 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x79, + 0x0a, 0x19, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5c, 0x0a, 0x17, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x15, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6b, 0x0a, 0x11, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, + 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9b, 0x04, 0x0a, 0x06, 0x53, 0x63, 0x61, 0x6c, 0x61, + 0x72, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x00, + 0x52, 0x09, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x62, + 0x6c, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x48, 0x00, + 0x52, 0x04, 0x62, 0x6c, 0x6f, 0x62, 0x12, 0x2f, 0x0a, 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, + 0x06, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x32, 0x0a, 0x09, 0x6e, 0x6f, 0x6e, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x6f, 0x69, 0x64, + 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, + 0x51, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, + 0x11, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, + 0x12, 0x29, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4a, + 0x73, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0xaf, 0x03, 0x0a, 0x07, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x72, 0x12, 0x42, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, + 0x03, 0x6d, 0x61, 0x70, 0x12, 0x58, 0x0a, 0x12, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x65, + 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11, 0x6f, 0x66, 0x66, + 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, + 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0x8c, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, + 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x72, 0x65, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x47, 0x0a, 0x11, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x6c, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x52, 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x22, 0xa6, + 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x12, 0x43, 0x0a, + 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4d, 0x61, 0x70, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, + 0x6c, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x15, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x36, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x0b, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, - 0x61, 0x6c, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, - 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x63, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x12, - 0x31, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, - 0x61, 0x70, 0x12, 0x2e, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x6e, 0x69, - 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x07, 0x42, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x76, 0x61, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x36, - 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x42, 0xb3, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, - 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, - 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x0e, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, 0x12, 0x47, 0x0a, 0x08, 0x62, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, 0x2e, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x57, 0x0a, 0x0d, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, + 0x09, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x0b, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x48, 0x00, 0x52, + 0x06, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x03, 0x6d, + 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x2e, + 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x6e, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x42, 0x07, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x76, 0x61, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x36, 0x0a, 0x0c, 0x4b, 0x65, + 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x42, 0xb3, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x42, 0x0d, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, + 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, + 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1725,85 +1813,87 @@ func file_flyteidl_core_literals_proto_rawDescGZIP() []byte { return file_flyteidl_core_literals_proto_rawDescData } -var file_flyteidl_core_literals_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_flyteidl_core_literals_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_flyteidl_core_literals_proto_goTypes = []interface{}{ (*Primitive)(nil), // 0: flyteidl.core.Primitive (*Void)(nil), // 1: flyteidl.core.Void (*Blob)(nil), // 2: flyteidl.core.Blob (*BlobMetadata)(nil), // 3: flyteidl.core.BlobMetadata (*Binary)(nil), // 4: flyteidl.core.Binary - (*Schema)(nil), // 5: flyteidl.core.Schema - (*Union)(nil), // 6: flyteidl.core.Union - (*StructuredDatasetMetadata)(nil), // 7: flyteidl.core.StructuredDatasetMetadata - (*StructuredDataset)(nil), // 8: flyteidl.core.StructuredDataset - (*Scalar)(nil), // 9: flyteidl.core.Scalar - (*Literal)(nil), // 10: flyteidl.core.Literal - (*LiteralOffloadedMetadata)(nil), // 11: flyteidl.core.LiteralOffloadedMetadata - (*LiteralCollection)(nil), // 12: flyteidl.core.LiteralCollection - (*LiteralMap)(nil), // 13: flyteidl.core.LiteralMap - (*BindingDataCollection)(nil), // 14: flyteidl.core.BindingDataCollection - (*BindingDataMap)(nil), // 15: flyteidl.core.BindingDataMap - (*UnionInfo)(nil), // 16: flyteidl.core.UnionInfo - (*BindingData)(nil), // 17: flyteidl.core.BindingData - (*Binding)(nil), // 18: flyteidl.core.Binding - (*KeyValuePair)(nil), // 19: flyteidl.core.KeyValuePair - (*RetryStrategy)(nil), // 20: flyteidl.core.RetryStrategy - nil, // 21: flyteidl.core.Literal.MetadataEntry - nil, // 22: flyteidl.core.LiteralMap.LiteralsEntry - nil, // 23: flyteidl.core.BindingDataMap.BindingsEntry - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (*BlobType)(nil), // 26: flyteidl.core.BlobType - (*SchemaType)(nil), // 27: flyteidl.core.SchemaType - (*LiteralType)(nil), // 28: flyteidl.core.LiteralType - (*StructuredDatasetType)(nil), // 29: flyteidl.core.StructuredDatasetType - (*Error)(nil), // 30: flyteidl.core.Error - (*structpb.Struct)(nil), // 31: google.protobuf.Struct - (*OutputReference)(nil), // 32: flyteidl.core.OutputReference + (*Json)(nil), // 5: flyteidl.core.Json + (*Schema)(nil), // 6: flyteidl.core.Schema + (*Union)(nil), // 7: flyteidl.core.Union + (*StructuredDatasetMetadata)(nil), // 8: flyteidl.core.StructuredDatasetMetadata + (*StructuredDataset)(nil), // 9: flyteidl.core.StructuredDataset + (*Scalar)(nil), // 10: flyteidl.core.Scalar + (*Literal)(nil), // 11: flyteidl.core.Literal + (*LiteralOffloadedMetadata)(nil), // 12: flyteidl.core.LiteralOffloadedMetadata + (*LiteralCollection)(nil), // 13: flyteidl.core.LiteralCollection + (*LiteralMap)(nil), // 14: flyteidl.core.LiteralMap + (*BindingDataCollection)(nil), // 15: flyteidl.core.BindingDataCollection + (*BindingDataMap)(nil), // 16: flyteidl.core.BindingDataMap + (*UnionInfo)(nil), // 17: flyteidl.core.UnionInfo + (*BindingData)(nil), // 18: flyteidl.core.BindingData + (*Binding)(nil), // 19: flyteidl.core.Binding + (*KeyValuePair)(nil), // 20: flyteidl.core.KeyValuePair + (*RetryStrategy)(nil), // 21: flyteidl.core.RetryStrategy + nil, // 22: flyteidl.core.Literal.MetadataEntry + nil, // 23: flyteidl.core.LiteralMap.LiteralsEntry + nil, // 24: flyteidl.core.BindingDataMap.BindingsEntry + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 26: google.protobuf.Duration + (*BlobType)(nil), // 27: flyteidl.core.BlobType + (*SchemaType)(nil), // 28: flyteidl.core.SchemaType + (*LiteralType)(nil), // 29: flyteidl.core.LiteralType + (*StructuredDatasetType)(nil), // 30: flyteidl.core.StructuredDatasetType + (*Error)(nil), // 31: flyteidl.core.Error + (*structpb.Struct)(nil), // 32: google.protobuf.Struct + (*OutputReference)(nil), // 33: flyteidl.core.OutputReference } var file_flyteidl_core_literals_proto_depIdxs = []int32{ - 24, // 0: flyteidl.core.Primitive.datetime:type_name -> google.protobuf.Timestamp - 25, // 1: flyteidl.core.Primitive.duration:type_name -> google.protobuf.Duration + 25, // 0: flyteidl.core.Primitive.datetime:type_name -> google.protobuf.Timestamp + 26, // 1: flyteidl.core.Primitive.duration:type_name -> google.protobuf.Duration 3, // 2: flyteidl.core.Blob.metadata:type_name -> flyteidl.core.BlobMetadata - 26, // 3: flyteidl.core.BlobMetadata.type:type_name -> flyteidl.core.BlobType - 27, // 4: flyteidl.core.Schema.type:type_name -> flyteidl.core.SchemaType - 10, // 5: flyteidl.core.Union.value:type_name -> flyteidl.core.Literal - 28, // 6: flyteidl.core.Union.type:type_name -> flyteidl.core.LiteralType - 29, // 7: flyteidl.core.StructuredDatasetMetadata.structured_dataset_type:type_name -> flyteidl.core.StructuredDatasetType - 7, // 8: flyteidl.core.StructuredDataset.metadata:type_name -> flyteidl.core.StructuredDatasetMetadata + 27, // 3: flyteidl.core.BlobMetadata.type:type_name -> flyteidl.core.BlobType + 28, // 4: flyteidl.core.Schema.type:type_name -> flyteidl.core.SchemaType + 11, // 5: flyteidl.core.Union.value:type_name -> flyteidl.core.Literal + 29, // 6: flyteidl.core.Union.type:type_name -> flyteidl.core.LiteralType + 30, // 7: flyteidl.core.StructuredDatasetMetadata.structured_dataset_type:type_name -> flyteidl.core.StructuredDatasetType + 8, // 8: flyteidl.core.StructuredDataset.metadata:type_name -> flyteidl.core.StructuredDatasetMetadata 0, // 9: flyteidl.core.Scalar.primitive:type_name -> flyteidl.core.Primitive 2, // 10: flyteidl.core.Scalar.blob:type_name -> flyteidl.core.Blob 4, // 11: flyteidl.core.Scalar.binary:type_name -> flyteidl.core.Binary - 5, // 12: flyteidl.core.Scalar.schema:type_name -> flyteidl.core.Schema + 6, // 12: flyteidl.core.Scalar.schema:type_name -> flyteidl.core.Schema 1, // 13: flyteidl.core.Scalar.none_type:type_name -> flyteidl.core.Void - 30, // 14: flyteidl.core.Scalar.error:type_name -> flyteidl.core.Error - 31, // 15: flyteidl.core.Scalar.generic:type_name -> google.protobuf.Struct - 8, // 16: flyteidl.core.Scalar.structured_dataset:type_name -> flyteidl.core.StructuredDataset - 6, // 17: flyteidl.core.Scalar.union:type_name -> flyteidl.core.Union - 9, // 18: flyteidl.core.Literal.scalar:type_name -> flyteidl.core.Scalar - 12, // 19: flyteidl.core.Literal.collection:type_name -> flyteidl.core.LiteralCollection - 13, // 20: flyteidl.core.Literal.map:type_name -> flyteidl.core.LiteralMap - 11, // 21: flyteidl.core.Literal.offloaded_metadata:type_name -> flyteidl.core.LiteralOffloadedMetadata - 21, // 22: flyteidl.core.Literal.metadata:type_name -> flyteidl.core.Literal.MetadataEntry - 28, // 23: flyteidl.core.LiteralOffloadedMetadata.inferred_type:type_name -> flyteidl.core.LiteralType - 10, // 24: flyteidl.core.LiteralCollection.literals:type_name -> flyteidl.core.Literal - 22, // 25: flyteidl.core.LiteralMap.literals:type_name -> flyteidl.core.LiteralMap.LiteralsEntry - 17, // 26: flyteidl.core.BindingDataCollection.bindings:type_name -> flyteidl.core.BindingData - 23, // 27: flyteidl.core.BindingDataMap.bindings:type_name -> flyteidl.core.BindingDataMap.BindingsEntry - 28, // 28: flyteidl.core.UnionInfo.targetType:type_name -> flyteidl.core.LiteralType - 9, // 29: flyteidl.core.BindingData.scalar:type_name -> flyteidl.core.Scalar - 14, // 30: flyteidl.core.BindingData.collection:type_name -> flyteidl.core.BindingDataCollection - 32, // 31: flyteidl.core.BindingData.promise:type_name -> flyteidl.core.OutputReference - 15, // 32: flyteidl.core.BindingData.map:type_name -> flyteidl.core.BindingDataMap - 16, // 33: flyteidl.core.BindingData.union:type_name -> flyteidl.core.UnionInfo - 17, // 34: flyteidl.core.Binding.binding:type_name -> flyteidl.core.BindingData - 10, // 35: flyteidl.core.LiteralMap.LiteralsEntry.value:type_name -> flyteidl.core.Literal - 17, // 36: flyteidl.core.BindingDataMap.BindingsEntry.value:type_name -> flyteidl.core.BindingData - 37, // [37:37] is the sub-list for method output_type - 37, // [37:37] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 31, // 14: flyteidl.core.Scalar.error:type_name -> flyteidl.core.Error + 32, // 15: flyteidl.core.Scalar.generic:type_name -> google.protobuf.Struct + 9, // 16: flyteidl.core.Scalar.structured_dataset:type_name -> flyteidl.core.StructuredDataset + 7, // 17: flyteidl.core.Scalar.union:type_name -> flyteidl.core.Union + 5, // 18: flyteidl.core.Scalar.json:type_name -> flyteidl.core.Json + 10, // 19: flyteidl.core.Literal.scalar:type_name -> flyteidl.core.Scalar + 13, // 20: flyteidl.core.Literal.collection:type_name -> flyteidl.core.LiteralCollection + 14, // 21: flyteidl.core.Literal.map:type_name -> flyteidl.core.LiteralMap + 12, // 22: flyteidl.core.Literal.offloaded_metadata:type_name -> flyteidl.core.LiteralOffloadedMetadata + 22, // 23: flyteidl.core.Literal.metadata:type_name -> flyteidl.core.Literal.MetadataEntry + 29, // 24: flyteidl.core.LiteralOffloadedMetadata.inferred_type:type_name -> flyteidl.core.LiteralType + 11, // 25: flyteidl.core.LiteralCollection.literals:type_name -> flyteidl.core.Literal + 23, // 26: flyteidl.core.LiteralMap.literals:type_name -> flyteidl.core.LiteralMap.LiteralsEntry + 18, // 27: flyteidl.core.BindingDataCollection.bindings:type_name -> flyteidl.core.BindingData + 24, // 28: flyteidl.core.BindingDataMap.bindings:type_name -> flyteidl.core.BindingDataMap.BindingsEntry + 29, // 29: flyteidl.core.UnionInfo.targetType:type_name -> flyteidl.core.LiteralType + 10, // 30: flyteidl.core.BindingData.scalar:type_name -> flyteidl.core.Scalar + 15, // 31: flyteidl.core.BindingData.collection:type_name -> flyteidl.core.BindingDataCollection + 33, // 32: flyteidl.core.BindingData.promise:type_name -> flyteidl.core.OutputReference + 16, // 33: flyteidl.core.BindingData.map:type_name -> flyteidl.core.BindingDataMap + 17, // 34: flyteidl.core.BindingData.union:type_name -> flyteidl.core.UnionInfo + 18, // 35: flyteidl.core.Binding.binding:type_name -> flyteidl.core.BindingData + 11, // 36: flyteidl.core.LiteralMap.LiteralsEntry.value:type_name -> flyteidl.core.Literal + 18, // 37: flyteidl.core.BindingDataMap.BindingsEntry.value:type_name -> flyteidl.core.BindingData + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name } func init() { file_flyteidl_core_literals_proto_init() } @@ -1874,7 +1964,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { + switch v := v.(*Json); i { case 0: return &v.state case 1: @@ -1886,7 +1976,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Union); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -1898,7 +1988,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructuredDatasetMetadata); i { + switch v := v.(*Union); i { case 0: return &v.state case 1: @@ -1910,7 +2000,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StructuredDataset); i { + switch v := v.(*StructuredDatasetMetadata); i { case 0: return &v.state case 1: @@ -1922,7 +2012,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Scalar); i { + switch v := v.(*StructuredDataset); i { case 0: return &v.state case 1: @@ -1934,7 +2024,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Literal); i { + switch v := v.(*Scalar); i { case 0: return &v.state case 1: @@ -1946,7 +2036,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiteralOffloadedMetadata); i { + switch v := v.(*Literal); i { case 0: return &v.state case 1: @@ -1958,7 +2048,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiteralCollection); i { + switch v := v.(*LiteralOffloadedMetadata); i { case 0: return &v.state case 1: @@ -1970,7 +2060,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiteralMap); i { + switch v := v.(*LiteralCollection); i { case 0: return &v.state case 1: @@ -1982,7 +2072,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BindingDataCollection); i { + switch v := v.(*LiteralMap); i { case 0: return &v.state case 1: @@ -1994,7 +2084,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BindingDataMap); i { + switch v := v.(*BindingDataCollection); i { case 0: return &v.state case 1: @@ -2006,7 +2096,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnionInfo); i { + switch v := v.(*BindingDataMap); i { case 0: return &v.state case 1: @@ -2018,7 +2108,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BindingData); i { + switch v := v.(*UnionInfo); i { case 0: return &v.state case 1: @@ -2030,7 +2120,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Binding); i { + switch v := v.(*BindingData); i { case 0: return &v.state case 1: @@ -2042,7 +2132,7 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValuePair); i { + switch v := v.(*Binding); i { case 0: return &v.state case 1: @@ -2054,6 +2144,18 @@ func file_flyteidl_core_literals_proto_init() { } } file_flyteidl_core_literals_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_core_literals_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RetryStrategy); i { case 0: return &v.state @@ -2074,7 +2176,7 @@ func file_flyteidl_core_literals_proto_init() { (*Primitive_Datetime)(nil), (*Primitive_Duration)(nil), } - file_flyteidl_core_literals_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_flyteidl_core_literals_proto_msgTypes[10].OneofWrappers = []interface{}{ (*Scalar_Primitive)(nil), (*Scalar_Blob)(nil), (*Scalar_Binary)(nil), @@ -2084,14 +2186,15 @@ func file_flyteidl_core_literals_proto_init() { (*Scalar_Generic)(nil), (*Scalar_StructuredDataset)(nil), (*Scalar_Union)(nil), + (*Scalar_Json)(nil), } - file_flyteidl_core_literals_proto_msgTypes[10].OneofWrappers = []interface{}{ + file_flyteidl_core_literals_proto_msgTypes[11].OneofWrappers = []interface{}{ (*Literal_Scalar)(nil), (*Literal_Collection)(nil), (*Literal_Map)(nil), (*Literal_OffloadedMetadata)(nil), } - file_flyteidl_core_literals_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_flyteidl_core_literals_proto_msgTypes[18].OneofWrappers = []interface{}{ (*BindingData_Scalar)(nil), (*BindingData_Collection)(nil), (*BindingData_Promise)(nil), @@ -2103,7 +2206,7 @@ func file_flyteidl_core_literals_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_core_literals_proto_rawDesc, NumEnums: 0, - NumMessages: 24, + NumMessages: 25, NumExtensions: 0, NumServices: 0, }, diff --git a/flyteidl/gen/pb-go/flyteidl/core/types.pb.go b/flyteidl/gen/pb-go/flyteidl/core/types.pb.go index b844e951c9..341eb063c9 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/types.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/types.pb.go @@ -35,21 +35,23 @@ const ( SimpleType_BINARY SimpleType = 7 SimpleType_ERROR SimpleType = 8 SimpleType_STRUCT SimpleType = 9 + SimpleType_JSON SimpleType = 10 ) // Enum value maps for SimpleType. var ( SimpleType_name = map[int32]string{ - 0: "NONE", - 1: "INTEGER", - 2: "FLOAT", - 3: "STRING", - 4: "BOOLEAN", - 5: "DATETIME", - 6: "DURATION", - 7: "BINARY", - 8: "ERROR", - 9: "STRUCT", + 0: "NONE", + 1: "INTEGER", + 2: "FLOAT", + 3: "STRING", + 4: "BOOLEAN", + 5: "DATETIME", + 6: "DURATION", + 7: "BINARY", + 8: "ERROR", + 9: "STRUCT", + 10: "JSON", } SimpleType_value = map[string]int32{ "NONE": 0, @@ -62,6 +64,7 @@ var ( "BINARY": 7, "ERROR": 8, "STRUCT": 9, + "JSON": 10, } ) @@ -1274,7 +1277,7 @@ var file_flyteidl_core_types_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x86, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x90, 0x01, 0x0a, 0x0a, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, @@ -1282,19 +1285,20 @@ var file_flyteidl_core_types_proto_rawDesc = []byte{ 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x09, 0x42, 0xb0, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, - 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, - 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, - 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, - 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, - 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, - 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x10, 0x09, 0x12, 0x08, + 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x0a, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0a, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, + 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, + 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, 0x02, + 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, 0x02, + 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, 0x02, + 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, 0x79, + 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json index c30c350754..5e0be2e493 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/cacheservice/cacheservice.swagger.json @@ -202,6 +202,21 @@ }, "description": "Encapsulation of fields that uniquely identifies a Flyte resource." }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreLiteral": { "type": "object", "properties": { @@ -397,6 +412,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -426,7 +444,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json index dbfcc5b85e..bcaaa4aa67 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json @@ -146,6 +146,21 @@ }, "description": "Represents an error thrown from a node." }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreLiteral": { "type": "object", "properties": { @@ -329,6 +344,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -358,7 +376,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json index ef81380d1e..51d88c88fd 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/admin.swagger.json @@ -7324,6 +7324,21 @@ } } }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreK8sObjectMetadata": { "type": "object", "properties": { @@ -7938,6 +7953,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -8033,7 +8051,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json index 373b9c4c3d..c00f60bd8b 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/agent.swagger.json @@ -1179,6 +1179,21 @@ } } }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreK8sObjectMetadata": { "type": "object", "properties": { @@ -1560,6 +1575,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -1637,7 +1655,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json index bff6ca737a..bee405eae7 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/dataproxy.swagger.json @@ -262,6 +262,21 @@ }, "description": "Represents an error thrown from a node." }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreLiteral": { "type": "object", "properties": { @@ -457,6 +472,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -486,7 +504,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json index 029c42ffd3..a9edaba459 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/external_plugin_service.swagger.json @@ -495,6 +495,21 @@ } } }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreK8sObjectMetadata": { "type": "object", "properties": { @@ -864,6 +879,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -941,7 +959,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json index d325ed4764..3acf09f274 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/signal.swagger.json @@ -338,6 +338,21 @@ }, "description": "Represents an error thrown from a node." }, + "coreJson": { + "type": "object", + "properties": { + "value": { + "type": "string", + "format": "byte", + "description": "The JSON object serialized as a byte array." + }, + "serialization_format": { + "type": "string", + "description": "The format used to serialize the byte array.\nThis field identifies the specific format of the serialized JSON data,\nallowing future flexibility in supporting different JSON variants." + } + }, + "description": "Represents a JSON object encoded as a byte array.\nThis field is used to store JSON-serialized data, which can include\ndataclasses, dictionaries, Pydantic models, or other structures that\ncan be represented as JSON objects. When utilized, the data should be\ndeserialized into its corresponding structure.\nThis design ensures that the data is stored in a format that can be\nfully reconstructed without loss of information." + }, "coreLiteral": { "type": "object", "properties": { @@ -521,6 +536,9 @@ }, "union": { "$ref": "#/definitions/coreUnion" + }, + "json": { + "$ref": "#/definitions/coreJson" } } }, @@ -564,7 +582,8 @@ "DURATION", "BINARY", "ERROR", - "STRUCT" + "STRUCT", + "JSON" ], "default": "NONE", "description": "Define a set of simple types." diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 0ff2422577..10c47fa415 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -1906,7 +1906,8 @@ export namespace flyteidl { DURATION = 6, BINARY = 7, ERROR = 8, - STRUCT = 9 + STRUCT = 9, + JSON = 10 } /** Properties of a SchemaType. */ @@ -3044,6 +3045,64 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a Json. */ + interface IJson { + + /** Json value */ + value?: (Uint8Array|null); + + /** Json serializationFormat */ + serializationFormat?: (string|null); + } + + /** Represents a Json. */ + class Json implements IJson { + + /** + * Constructs a new Json. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.core.IJson); + + /** Json value. */ + public value: Uint8Array; + + /** Json serializationFormat. */ + public serializationFormat: string; + + /** + * Creates a new Json instance using the specified properties. + * @param [properties] Properties to set + * @returns Json instance + */ + public static create(properties?: flyteidl.core.IJson): flyteidl.core.Json; + + /** + * Encodes the specified Json message. Does not implicitly {@link flyteidl.core.Json.verify|verify} messages. + * @param message Json message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.core.IJson, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Json message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Json + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.Json; + + /** + * Verifies a Json message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a Schema. */ interface ISchema { @@ -3299,6 +3358,9 @@ export namespace flyteidl { /** Scalar union */ union?: (flyteidl.core.IUnion|null); + + /** Scalar json */ + json?: (flyteidl.core.IJson|null); } /** Represents a Scalar. */ @@ -3337,8 +3399,11 @@ export namespace flyteidl { /** Scalar union. */ public union?: (flyteidl.core.IUnion|null); + /** Scalar json. */ + public json?: (flyteidl.core.IJson|null); + /** Scalar value. */ - public value?: ("primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union"); + public value?: ("primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union"|"json"); /** * Creates a new Scalar instance using the specified properties. diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index 042343eecf..36509e32dd 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -4545,6 +4545,7 @@ * @property {number} BINARY=7 BINARY value * @property {number} ERROR=8 ERROR value * @property {number} STRUCT=9 STRUCT value + * @property {number} JSON=10 JSON value */ core.SimpleType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4558,6 +4559,7 @@ values[valuesById[7] = "BINARY"] = 7; values[valuesById[8] = "ERROR"] = 8; values[valuesById[9] = "STRUCT"] = 9; + values[valuesById[10] = "JSON"] = 10; return values; })(); @@ -6049,6 +6051,7 @@ case 7: case 8: case 9: + case 10: break; } } @@ -7271,6 +7274,133 @@ return Binary; })(); + core.Json = (function() { + + /** + * Properties of a Json. + * @memberof flyteidl.core + * @interface IJson + * @property {Uint8Array|null} [value] Json value + * @property {string|null} [serializationFormat] Json serializationFormat + */ + + /** + * Constructs a new Json. + * @memberof flyteidl.core + * @classdesc Represents a Json. + * @implements IJson + * @constructor + * @param {flyteidl.core.IJson=} [properties] Properties to set + */ + function Json(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]]; + } + + /** + * Json value. + * @member {Uint8Array} value + * @memberof flyteidl.core.Json + * @instance + */ + Json.prototype.value = $util.newBuffer([]); + + /** + * Json serializationFormat. + * @member {string} serializationFormat + * @memberof flyteidl.core.Json + * @instance + */ + Json.prototype.serializationFormat = ""; + + /** + * Creates a new Json instance using the specified properties. + * @function create + * @memberof flyteidl.core.Json + * @static + * @param {flyteidl.core.IJson=} [properties] Properties to set + * @returns {flyteidl.core.Json} Json instance + */ + Json.create = function create(properties) { + return new Json(properties); + }; + + /** + * Encodes the specified Json message. Does not implicitly {@link flyteidl.core.Json.verify|verify} messages. + * @function encode + * @memberof flyteidl.core.Json + * @static + * @param {flyteidl.core.IJson} message Json message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Json.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + if (message.serializationFormat != null && message.hasOwnProperty("serializationFormat")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serializationFormat); + return writer; + }; + + /** + * Decodes a Json message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.core.Json + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.core.Json} Json + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Json.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.Json(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + case 2: + message.serializationFormat = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a Json message. + * @function verify + * @memberof flyteidl.core.Json + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Json.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.serializationFormat != null && message.hasOwnProperty("serializationFormat")) + if (!$util.isString(message.serializationFormat)) + return "serializationFormat: string expected"; + return null; + }; + + return Json; + })(); + core.Schema = (function() { /** @@ -7787,6 +7917,7 @@ * @property {google.protobuf.IStruct|null} [generic] Scalar generic * @property {flyteidl.core.IStructuredDataset|null} [structuredDataset] Scalar structuredDataset * @property {flyteidl.core.IUnion|null} [union] Scalar union + * @property {flyteidl.core.IJson|null} [json] Scalar json */ /** @@ -7876,17 +8007,25 @@ */ Scalar.prototype.union = null; + /** + * Scalar json. + * @member {flyteidl.core.IJson|null|undefined} json + * @memberof flyteidl.core.Scalar + * @instance + */ + Scalar.prototype.json = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Scalar value. - * @member {"primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union"|undefined} value + * @member {"primitive"|"blob"|"binary"|"schema"|"noneType"|"error"|"generic"|"structuredDataset"|"union"|"json"|undefined} value * @memberof flyteidl.core.Scalar * @instance */ Object.defineProperty(Scalar.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["primitive", "blob", "binary", "schema", "noneType", "error", "generic", "structuredDataset", "union"]), + get: $util.oneOfGetter($oneOfFields = ["primitive", "blob", "binary", "schema", "noneType", "error", "generic", "structuredDataset", "union", "json"]), set: $util.oneOfSetter($oneOfFields) }); @@ -7932,6 +8071,8 @@ $root.flyteidl.core.StructuredDataset.encode(message.structuredDataset, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.union != null && message.hasOwnProperty("union")) $root.flyteidl.core.Union.encode(message.union, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.json != null && message.hasOwnProperty("json")) + $root.flyteidl.core.Json.encode(message.json, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -7980,6 +8121,9 @@ case 9: message.union = $root.flyteidl.core.Union.decode(reader, reader.uint32()); break; + case 10: + message.json = $root.flyteidl.core.Json.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -8088,6 +8232,16 @@ return "union." + error; } } + if (message.json != null && message.hasOwnProperty("json")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.flyteidl.core.Json.verify(message.json); + if (error) + return "json." + error; + } + } return null; }; diff --git a/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.py index 9b0a9f9ed8..f75e81f571 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.py @@ -17,7 +17,7 @@ from flyteidl.core import types_pb2 as flyteidl_dot_core_dot_types__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/core/literals.proto\x12\rflyteidl.core\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19\x66lyteidl/core/types.proto\"\x87\x02\n\tPrimitive\x12\x1a\n\x07integer\x18\x01 \x01(\x03H\x00R\x07integer\x12!\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00R\nfloatValue\x12#\n\x0cstring_value\x18\x03 \x01(\tH\x00R\x0bstringValue\x12\x1a\n\x07\x62oolean\x18\x04 \x01(\x08H\x00R\x07\x62oolean\x12\x38\n\x08\x64\x61tetime\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x08\x64\x61tetime\x12\x37\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00R\x08\x64urationB\x07\n\x05value\"\x06\n\x04Void\"Q\n\x04\x42lob\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.BlobMetadataR\x08metadata\x12\x10\n\x03uri\x18\x03 \x01(\tR\x03uri\";\n\x0c\x42lobMetadata\x12+\n\x04type\x18\x01 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeR\x04type\"0\n\x06\x42inary\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\x12\x10\n\x03tag\x18\x02 \x01(\tR\x03tag\"I\n\x06Schema\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12-\n\x04type\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeR\x04type\"e\n\x05Union\x12,\n\x05value\x18\x01 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value\x12.\n\x04type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x04type\"y\n\x19StructuredDatasetMetadata\x12\\\n\x17structured_dataset_type\x18\x01 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeR\x15structuredDatasetType\"k\n\x11StructuredDataset\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x44\n\x08metadata\x18\x02 \x01(\x0b\x32(.flyteidl.core.StructuredDatasetMetadataR\x08metadata\"\xf0\x03\n\x06Scalar\x12\x38\n\tprimitive\x18\x01 \x01(\x0b\x32\x18.flyteidl.core.PrimitiveH\x00R\tprimitive\x12)\n\x04\x62lob\x18\x02 \x01(\x0b\x32\x13.flyteidl.core.BlobH\x00R\x04\x62lob\x12/\n\x06\x62inary\x18\x03 \x01(\x0b\x32\x15.flyteidl.core.BinaryH\x00R\x06\x62inary\x12/\n\x06schema\x18\x04 \x01(\x0b\x32\x15.flyteidl.core.SchemaH\x00R\x06schema\x12\x32\n\tnone_type\x18\x05 \x01(\x0b\x32\x13.flyteidl.core.VoidH\x00R\x08noneType\x12,\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x14.flyteidl.core.ErrorH\x00R\x05\x65rror\x12\x33\n\x07generic\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructH\x00R\x07generic\x12Q\n\x12structured_dataset\x18\x08 \x01(\x0b\x32 .flyteidl.core.StructuredDatasetH\x00R\x11structuredDataset\x12,\n\x05union\x18\t \x01(\x0b\x32\x14.flyteidl.core.UnionH\x00R\x05unionB\x07\n\x05value\"\xaf\x03\n\x07Literal\x12/\n\x06scalar\x18\x01 \x01(\x0b\x32\x15.flyteidl.core.ScalarH\x00R\x06scalar\x12\x42\n\ncollection\x18\x02 \x01(\x0b\x32 .flyteidl.core.LiteralCollectionH\x00R\ncollection\x12-\n\x03map\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x03map\x12X\n\x12offloaded_metadata\x18\x08 \x01(\x0b\x32\'.flyteidl.core.LiteralOffloadedMetadataH\x00R\x11offloadedMetadata\x12\x12\n\x04hash\x18\x04 \x01(\tR\x04hash\x12@\n\x08metadata\x18\x05 \x03(\x0b\x32$.flyteidl.core.Literal.MetadataEntryR\x08metadata\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x07\n\x05valueJ\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08\"\x8c\x01\n\x18LiteralOffloadedMetadata\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x1d\n\nsize_bytes\x18\x02 \x01(\x04R\tsizeBytes\x12?\n\rinferred_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0cinferredType\"G\n\x11LiteralCollection\x12\x32\n\x08literals\x18\x01 \x03(\x0b\x32\x16.flyteidl.core.LiteralR\x08literals\"\xa6\x01\n\nLiteralMap\x12\x43\n\x08literals\x18\x01 \x03(\x0b\x32\'.flyteidl.core.LiteralMap.LiteralsEntryR\x08literals\x1aS\n\rLiteralsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value:\x02\x38\x01\"O\n\x15\x42indingDataCollection\x12\x36\n\x08\x62indings\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.BindingDataR\x08\x62indings\"\xb2\x01\n\x0e\x42indingDataMap\x12G\n\x08\x62indings\x18\x01 \x03(\x0b\x32+.flyteidl.core.BindingDataMap.BindingsEntryR\x08\x62indings\x1aW\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.BindingDataR\x05value:\x02\x38\x01\"G\n\tUnionInfo\x12:\n\ntargetType\x18\x01 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\ntargetType\"\xae\x02\n\x0b\x42indingData\x12/\n\x06scalar\x18\x01 \x01(\x0b\x32\x15.flyteidl.core.ScalarH\x00R\x06scalar\x12\x46\n\ncollection\x18\x02 \x01(\x0b\x32$.flyteidl.core.BindingDataCollectionH\x00R\ncollection\x12:\n\x07promise\x18\x03 \x01(\x0b\x32\x1e.flyteidl.core.OutputReferenceH\x00R\x07promise\x12\x31\n\x03map\x18\x04 \x01(\x0b\x32\x1d.flyteidl.core.BindingDataMapH\x00R\x03map\x12.\n\x05union\x18\x05 \x01(\x0b\x32\x18.flyteidl.core.UnionInfoR\x05unionB\x07\n\x05value\"Q\n\x07\x42inding\x12\x10\n\x03var\x18\x01 \x01(\tR\x03var\x12\x34\n\x07\x62inding\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.BindingDataR\x07\x62inding\"6\n\x0cKeyValuePair\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\")\n\rRetryStrategy\x12\x18\n\x07retries\x18\x05 \x01(\rR\x07retriesB\xb3\x01\n\x11\x63om.flyteidl.coreB\rLiteralsProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/core/literals.proto\x12\rflyteidl.core\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19\x66lyteidl/core/types.proto\"\x87\x02\n\tPrimitive\x12\x1a\n\x07integer\x18\x01 \x01(\x03H\x00R\x07integer\x12!\n\x0b\x66loat_value\x18\x02 \x01(\x01H\x00R\nfloatValue\x12#\n\x0cstring_value\x18\x03 \x01(\tH\x00R\x0bstringValue\x12\x1a\n\x07\x62oolean\x18\x04 \x01(\x08H\x00R\x07\x62oolean\x12\x38\n\x08\x64\x61tetime\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\x08\x64\x61tetime\x12\x37\n\x08\x64uration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00R\x08\x64urationB\x07\n\x05value\"\x06\n\x04Void\"Q\n\x04\x42lob\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32\x1b.flyteidl.core.BlobMetadataR\x08metadata\x12\x10\n\x03uri\x18\x03 \x01(\tR\x03uri\";\n\x0c\x42lobMetadata\x12+\n\x04type\x18\x01 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeR\x04type\"0\n\x06\x42inary\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\x12\x10\n\x03tag\x18\x02 \x01(\tR\x03tag\"O\n\x04Json\x12\x14\n\x05value\x18\x01 \x01(\x0cR\x05value\x12\x31\n\x14serialization_format\x18\x02 \x01(\tR\x13serializationFormat\"I\n\x06Schema\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12-\n\x04type\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeR\x04type\"e\n\x05Union\x12,\n\x05value\x18\x01 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value\x12.\n\x04type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x04type\"y\n\x19StructuredDatasetMetadata\x12\\\n\x17structured_dataset_type\x18\x01 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeR\x15structuredDatasetType\"k\n\x11StructuredDataset\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x44\n\x08metadata\x18\x02 \x01(\x0b\x32(.flyteidl.core.StructuredDatasetMetadataR\x08metadata\"\x9b\x04\n\x06Scalar\x12\x38\n\tprimitive\x18\x01 \x01(\x0b\x32\x18.flyteidl.core.PrimitiveH\x00R\tprimitive\x12)\n\x04\x62lob\x18\x02 \x01(\x0b\x32\x13.flyteidl.core.BlobH\x00R\x04\x62lob\x12/\n\x06\x62inary\x18\x03 \x01(\x0b\x32\x15.flyteidl.core.BinaryH\x00R\x06\x62inary\x12/\n\x06schema\x18\x04 \x01(\x0b\x32\x15.flyteidl.core.SchemaH\x00R\x06schema\x12\x32\n\tnone_type\x18\x05 \x01(\x0b\x32\x13.flyteidl.core.VoidH\x00R\x08noneType\x12,\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x14.flyteidl.core.ErrorH\x00R\x05\x65rror\x12\x33\n\x07generic\x18\x07 \x01(\x0b\x32\x17.google.protobuf.StructH\x00R\x07generic\x12Q\n\x12structured_dataset\x18\x08 \x01(\x0b\x32 .flyteidl.core.StructuredDatasetH\x00R\x11structuredDataset\x12,\n\x05union\x18\t \x01(\x0b\x32\x14.flyteidl.core.UnionH\x00R\x05union\x12)\n\x04json\x18\n \x01(\x0b\x32\x13.flyteidl.core.JsonH\x00R\x04jsonB\x07\n\x05value\"\xaf\x03\n\x07Literal\x12/\n\x06scalar\x18\x01 \x01(\x0b\x32\x15.flyteidl.core.ScalarH\x00R\x06scalar\x12\x42\n\ncollection\x18\x02 \x01(\x0b\x32 .flyteidl.core.LiteralCollectionH\x00R\ncollection\x12-\n\x03map\x18\x03 \x01(\x0b\x32\x19.flyteidl.core.LiteralMapH\x00R\x03map\x12X\n\x12offloaded_metadata\x18\x08 \x01(\x0b\x32\'.flyteidl.core.LiteralOffloadedMetadataH\x00R\x11offloadedMetadata\x12\x12\n\x04hash\x18\x04 \x01(\tR\x04hash\x12@\n\x08metadata\x18\x05 \x03(\x0b\x32$.flyteidl.core.Literal.MetadataEntryR\x08metadata\x1a;\n\rMetadataEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x42\x07\n\x05valueJ\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08\"\x8c\x01\n\x18LiteralOffloadedMetadata\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12\x1d\n\nsize_bytes\x18\x02 \x01(\x04R\tsizeBytes\x12?\n\rinferred_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0cinferredType\"G\n\x11LiteralCollection\x12\x32\n\x08literals\x18\x01 \x03(\x0b\x32\x16.flyteidl.core.LiteralR\x08literals\"\xa6\x01\n\nLiteralMap\x12\x43\n\x08literals\x18\x01 \x03(\x0b\x32\'.flyteidl.core.LiteralMap.LiteralsEntryR\x08literals\x1aS\n\rLiteralsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value:\x02\x38\x01\"O\n\x15\x42indingDataCollection\x12\x36\n\x08\x62indings\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.BindingDataR\x08\x62indings\"\xb2\x01\n\x0e\x42indingDataMap\x12G\n\x08\x62indings\x18\x01 \x03(\x0b\x32+.flyteidl.core.BindingDataMap.BindingsEntryR\x08\x62indings\x1aW\n\rBindingsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.BindingDataR\x05value:\x02\x38\x01\"G\n\tUnionInfo\x12:\n\ntargetType\x18\x01 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\ntargetType\"\xae\x02\n\x0b\x42indingData\x12/\n\x06scalar\x18\x01 \x01(\x0b\x32\x15.flyteidl.core.ScalarH\x00R\x06scalar\x12\x46\n\ncollection\x18\x02 \x01(\x0b\x32$.flyteidl.core.BindingDataCollectionH\x00R\ncollection\x12:\n\x07promise\x18\x03 \x01(\x0b\x32\x1e.flyteidl.core.OutputReferenceH\x00R\x07promise\x12\x31\n\x03map\x18\x04 \x01(\x0b\x32\x1d.flyteidl.core.BindingDataMapH\x00R\x03map\x12.\n\x05union\x18\x05 \x01(\x0b\x32\x18.flyteidl.core.UnionInfoR\x05unionB\x07\n\x05value\"Q\n\x07\x42inding\x12\x10\n\x03var\x18\x01 \x01(\tR\x03var\x12\x34\n\x07\x62inding\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.BindingDataR\x07\x62inding\"6\n\x0cKeyValuePair\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\")\n\rRetryStrategy\x12\x18\n\x07retries\x18\x05 \x01(\rR\x07retriesB\xb3\x01\n\x11\x63om.flyteidl.coreB\rLiteralsProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -42,42 +42,44 @@ _globals['_BLOBMETADATA']._serialized_end=585 _globals['_BINARY']._serialized_start=587 _globals['_BINARY']._serialized_end=635 - _globals['_SCHEMA']._serialized_start=637 - _globals['_SCHEMA']._serialized_end=710 - _globals['_UNION']._serialized_start=712 - _globals['_UNION']._serialized_end=813 - _globals['_STRUCTUREDDATASETMETADATA']._serialized_start=815 - _globals['_STRUCTUREDDATASETMETADATA']._serialized_end=936 - _globals['_STRUCTUREDDATASET']._serialized_start=938 - _globals['_STRUCTUREDDATASET']._serialized_end=1045 - _globals['_SCALAR']._serialized_start=1048 - _globals['_SCALAR']._serialized_end=1544 - _globals['_LITERAL']._serialized_start=1547 - _globals['_LITERAL']._serialized_end=1978 - _globals['_LITERAL_METADATAENTRY']._serialized_start=1898 - _globals['_LITERAL_METADATAENTRY']._serialized_end=1957 - _globals['_LITERALOFFLOADEDMETADATA']._serialized_start=1981 - _globals['_LITERALOFFLOADEDMETADATA']._serialized_end=2121 - _globals['_LITERALCOLLECTION']._serialized_start=2123 - _globals['_LITERALCOLLECTION']._serialized_end=2194 - _globals['_LITERALMAP']._serialized_start=2197 - _globals['_LITERALMAP']._serialized_end=2363 - _globals['_LITERALMAP_LITERALSENTRY']._serialized_start=2280 - _globals['_LITERALMAP_LITERALSENTRY']._serialized_end=2363 - _globals['_BINDINGDATACOLLECTION']._serialized_start=2365 - _globals['_BINDINGDATACOLLECTION']._serialized_end=2444 - _globals['_BINDINGDATAMAP']._serialized_start=2447 - _globals['_BINDINGDATAMAP']._serialized_end=2625 - _globals['_BINDINGDATAMAP_BINDINGSENTRY']._serialized_start=2538 - _globals['_BINDINGDATAMAP_BINDINGSENTRY']._serialized_end=2625 - _globals['_UNIONINFO']._serialized_start=2627 - _globals['_UNIONINFO']._serialized_end=2698 - _globals['_BINDINGDATA']._serialized_start=2701 - _globals['_BINDINGDATA']._serialized_end=3003 - _globals['_BINDING']._serialized_start=3005 - _globals['_BINDING']._serialized_end=3086 - _globals['_KEYVALUEPAIR']._serialized_start=3088 - _globals['_KEYVALUEPAIR']._serialized_end=3142 - _globals['_RETRYSTRATEGY']._serialized_start=3144 - _globals['_RETRYSTRATEGY']._serialized_end=3185 + _globals['_JSON']._serialized_start=637 + _globals['_JSON']._serialized_end=716 + _globals['_SCHEMA']._serialized_start=718 + _globals['_SCHEMA']._serialized_end=791 + _globals['_UNION']._serialized_start=793 + _globals['_UNION']._serialized_end=894 + _globals['_STRUCTUREDDATASETMETADATA']._serialized_start=896 + _globals['_STRUCTUREDDATASETMETADATA']._serialized_end=1017 + _globals['_STRUCTUREDDATASET']._serialized_start=1019 + _globals['_STRUCTUREDDATASET']._serialized_end=1126 + _globals['_SCALAR']._serialized_start=1129 + _globals['_SCALAR']._serialized_end=1668 + _globals['_LITERAL']._serialized_start=1671 + _globals['_LITERAL']._serialized_end=2102 + _globals['_LITERAL_METADATAENTRY']._serialized_start=2022 + _globals['_LITERAL_METADATAENTRY']._serialized_end=2081 + _globals['_LITERALOFFLOADEDMETADATA']._serialized_start=2105 + _globals['_LITERALOFFLOADEDMETADATA']._serialized_end=2245 + _globals['_LITERALCOLLECTION']._serialized_start=2247 + _globals['_LITERALCOLLECTION']._serialized_end=2318 + _globals['_LITERALMAP']._serialized_start=2321 + _globals['_LITERALMAP']._serialized_end=2487 + _globals['_LITERALMAP_LITERALSENTRY']._serialized_start=2404 + _globals['_LITERALMAP_LITERALSENTRY']._serialized_end=2487 + _globals['_BINDINGDATACOLLECTION']._serialized_start=2489 + _globals['_BINDINGDATACOLLECTION']._serialized_end=2568 + _globals['_BINDINGDATAMAP']._serialized_start=2571 + _globals['_BINDINGDATAMAP']._serialized_end=2749 + _globals['_BINDINGDATAMAP_BINDINGSENTRY']._serialized_start=2662 + _globals['_BINDINGDATAMAP_BINDINGSENTRY']._serialized_end=2749 + _globals['_UNIONINFO']._serialized_start=2751 + _globals['_UNIONINFO']._serialized_end=2822 + _globals['_BINDINGDATA']._serialized_start=2825 + _globals['_BINDINGDATA']._serialized_end=3127 + _globals['_BINDING']._serialized_start=3129 + _globals['_BINDING']._serialized_end=3210 + _globals['_KEYVALUEPAIR']._serialized_start=3212 + _globals['_KEYVALUEPAIR']._serialized_end=3266 + _globals['_RETRYSTRATEGY']._serialized_start=3268 + _globals['_RETRYSTRATEGY']._serialized_end=3309 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.pyi index e2337f8efa..aee3e88a22 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/core/literals_pb2.pyi @@ -51,6 +51,14 @@ class Binary(_message.Message): tag: str def __init__(self, value: _Optional[bytes] = ..., tag: _Optional[str] = ...) -> None: ... +class Json(_message.Message): + __slots__ = ["value", "serialization_format"] + VALUE_FIELD_NUMBER: _ClassVar[int] + SERIALIZATION_FORMAT_FIELD_NUMBER: _ClassVar[int] + value: bytes + serialization_format: str + def __init__(self, value: _Optional[bytes] = ..., serialization_format: _Optional[str] = ...) -> None: ... + class Schema(_message.Message): __slots__ = ["uri", "type"] URI_FIELD_NUMBER: _ClassVar[int] @@ -82,7 +90,7 @@ class StructuredDataset(_message.Message): def __init__(self, uri: _Optional[str] = ..., metadata: _Optional[_Union[StructuredDatasetMetadata, _Mapping]] = ...) -> None: ... class Scalar(_message.Message): - __slots__ = ["primitive", "blob", "binary", "schema", "none_type", "error", "generic", "structured_dataset", "union"] + __slots__ = ["primitive", "blob", "binary", "schema", "none_type", "error", "generic", "structured_dataset", "union", "json"] PRIMITIVE_FIELD_NUMBER: _ClassVar[int] BLOB_FIELD_NUMBER: _ClassVar[int] BINARY_FIELD_NUMBER: _ClassVar[int] @@ -92,6 +100,7 @@ class Scalar(_message.Message): GENERIC_FIELD_NUMBER: _ClassVar[int] STRUCTURED_DATASET_FIELD_NUMBER: _ClassVar[int] UNION_FIELD_NUMBER: _ClassVar[int] + JSON_FIELD_NUMBER: _ClassVar[int] primitive: Primitive blob: Blob binary: Binary @@ -101,7 +110,8 @@ class Scalar(_message.Message): generic: _struct_pb2.Struct structured_dataset: StructuredDataset union: Union - def __init__(self, primitive: _Optional[_Union[Primitive, _Mapping]] = ..., blob: _Optional[_Union[Blob, _Mapping]] = ..., binary: _Optional[_Union[Binary, _Mapping]] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., none_type: _Optional[_Union[Void, _Mapping]] = ..., error: _Optional[_Union[_types_pb2.Error, _Mapping]] = ..., generic: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., structured_dataset: _Optional[_Union[StructuredDataset, _Mapping]] = ..., union: _Optional[_Union[Union, _Mapping]] = ...) -> None: ... + json: Json + def __init__(self, primitive: _Optional[_Union[Primitive, _Mapping]] = ..., blob: _Optional[_Union[Blob, _Mapping]] = ..., binary: _Optional[_Union[Binary, _Mapping]] = ..., schema: _Optional[_Union[Schema, _Mapping]] = ..., none_type: _Optional[_Union[Void, _Mapping]] = ..., error: _Optional[_Union[_types_pb2.Error, _Mapping]] = ..., generic: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., structured_dataset: _Optional[_Union[StructuredDataset, _Mapping]] = ..., union: _Optional[_Union[Union, _Mapping]] = ..., json: _Optional[_Union[Json, _Mapping]] = ...) -> None: ... class Literal(_message.Message): __slots__ = ["scalar", "collection", "map", "offloaded_metadata", "hash", "metadata"] diff --git a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py index 3043a0cf6b..f91f2c90a1 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.py @@ -14,7 +14,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66lyteidl/core/types.proto\x12\rflyteidl.core\x1a\x1cgoogle/protobuf/struct.proto\"\xa1\x02\n\nSchemaType\x12@\n\x07\x63olumns\x18\x03 \x03(\x0b\x32&.flyteidl.core.SchemaType.SchemaColumnR\x07\x63olumns\x1a\xd0\x01\n\x0cSchemaColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12K\n\x04type\x18\x02 \x01(\x0e\x32\x37.flyteidl.core.SchemaType.SchemaColumn.SchemaColumnTypeR\x04type\"_\n\x10SchemaColumnType\x12\x0b\n\x07INTEGER\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07\x42OOLEAN\x10\x03\x12\x0c\n\x08\x44\x41TETIME\x10\x04\x12\x0c\n\x08\x44URATION\x10\x05\"\xc7\x02\n\x15StructuredDatasetType\x12L\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x32.flyteidl.core.StructuredDatasetType.DatasetColumnR\x07\x63olumns\x12\x16\n\x06\x66ormat\x18\x02 \x01(\tR\x06\x66ormat\x12\x30\n\x14\x65xternal_schema_type\x18\x03 \x01(\tR\x12\x65xternalSchemaType\x12\x32\n\x15\x65xternal_schema_bytes\x18\x04 \x01(\x0cR\x13\x65xternalSchemaBytes\x1a\x62\n\rDatasetColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12=\n\x0cliteral_type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0bliteralType\"\xa7\x01\n\x08\x42lobType\x12\x16\n\x06\x66ormat\x18\x01 \x01(\tR\x06\x66ormat\x12R\n\x0e\x64imensionality\x18\x02 \x01(\x0e\x32*.flyteidl.core.BlobType.BlobDimensionalityR\x0e\x64imensionality\"/\n\x12\x42lobDimensionality\x12\n\n\x06SINGLE\x10\x00\x12\r\n\tMULTIPART\x10\x01\"\"\n\x08\x45numType\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"C\n\tUnionType\x12\x36\n\x08variants\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x08variants\"\xd7\x01\n\rTypeStructure\x12\x10\n\x03tag\x18\x01 \x01(\tR\x03tag\x12V\n\x0e\x64\x61taclass_type\x18\x02 \x03(\x0b\x32/.flyteidl.core.TypeStructure.DataclassTypeEntryR\rdataclassType\x1a\\\n\x12\x44\x61taclassTypeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x05value:\x02\x38\x01\"K\n\x0eTypeAnnotation\x12\x39\n\x0b\x61nnotations\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0b\x61nnotations\"\xbc\x05\n\x0bLiteralType\x12\x33\n\x06simple\x18\x01 \x01(\x0e\x32\x19.flyteidl.core.SimpleTypeH\x00R\x06simple\x12\x33\n\x06schema\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeH\x00R\x06schema\x12\x45\n\x0f\x63ollection_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0e\x63ollectionType\x12\x42\n\x0emap_value_type\x18\x04 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0cmapValueType\x12-\n\x04\x62lob\x18\x05 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeH\x00R\x04\x62lob\x12\x36\n\tenum_type\x18\x07 \x01(\x0b\x32\x17.flyteidl.core.EnumTypeH\x00R\x08\x65numType\x12^\n\x17structured_dataset_type\x18\x08 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeH\x00R\x15structuredDatasetType\x12\x39\n\nunion_type\x18\n \x01(\x0b\x32\x18.flyteidl.core.UnionTypeH\x00R\tunionType\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12=\n\nannotation\x18\t \x01(\x0b\x32\x1d.flyteidl.core.TypeAnnotationR\nannotation\x12:\n\tstructure\x18\x0b \x01(\x0b\x32\x1c.flyteidl.core.TypeStructureR\tstructureB\x06\n\x04type\"z\n\x0fOutputReference\x12\x17\n\x07node_id\x18\x01 \x01(\tR\x06nodeId\x12\x10\n\x03var\x18\x02 \x01(\tR\x03var\x12<\n\tattr_path\x18\x03 \x03(\x0b\x32\x1f.flyteidl.core.PromiseAttributeR\x08\x61ttrPath\"_\n\x10PromiseAttribute\x12#\n\x0cstring_value\x18\x01 \x01(\tH\x00R\x0bstringValue\x12\x1d\n\tint_value\x18\x02 \x01(\x05H\x00R\x08intValueB\x07\n\x05value\"G\n\x05\x45rror\x12$\n\x0e\x66\x61iled_node_id\x18\x01 \x01(\tR\x0c\x66\x61iledNodeId\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message*\x86\x01\n\nSimpleType\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07INTEGER\x10\x01\x12\t\n\x05\x46LOAT\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0c\n\x08\x44\x41TETIME\x10\x05\x12\x0c\n\x08\x44URATION\x10\x06\x12\n\n\x06\x42INARY\x10\x07\x12\t\n\x05\x45RROR\x10\x08\x12\n\n\x06STRUCT\x10\tB\xb0\x01\n\x11\x63om.flyteidl.coreB\nTypesProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x66lyteidl/core/types.proto\x12\rflyteidl.core\x1a\x1cgoogle/protobuf/struct.proto\"\xa1\x02\n\nSchemaType\x12@\n\x07\x63olumns\x18\x03 \x03(\x0b\x32&.flyteidl.core.SchemaType.SchemaColumnR\x07\x63olumns\x1a\xd0\x01\n\x0cSchemaColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12K\n\x04type\x18\x02 \x01(\x0e\x32\x37.flyteidl.core.SchemaType.SchemaColumn.SchemaColumnTypeR\x04type\"_\n\x10SchemaColumnType\x12\x0b\n\x07INTEGER\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07\x42OOLEAN\x10\x03\x12\x0c\n\x08\x44\x41TETIME\x10\x04\x12\x0c\n\x08\x44URATION\x10\x05\"\xc7\x02\n\x15StructuredDatasetType\x12L\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\x32.flyteidl.core.StructuredDatasetType.DatasetColumnR\x07\x63olumns\x12\x16\n\x06\x66ormat\x18\x02 \x01(\tR\x06\x66ormat\x12\x30\n\x14\x65xternal_schema_type\x18\x03 \x01(\tR\x12\x65xternalSchemaType\x12\x32\n\x15\x65xternal_schema_bytes\x18\x04 \x01(\x0cR\x13\x65xternalSchemaBytes\x1a\x62\n\rDatasetColumn\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12=\n\x0cliteral_type\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x0bliteralType\"\xa7\x01\n\x08\x42lobType\x12\x16\n\x06\x66ormat\x18\x01 \x01(\tR\x06\x66ormat\x12R\n\x0e\x64imensionality\x18\x02 \x01(\x0e\x32*.flyteidl.core.BlobType.BlobDimensionalityR\x0e\x64imensionality\"/\n\x12\x42lobDimensionality\x12\n\n\x06SINGLE\x10\x00\x12\r\n\tMULTIPART\x10\x01\"\"\n\x08\x45numType\x12\x16\n\x06values\x18\x01 \x03(\tR\x06values\"C\n\tUnionType\x12\x36\n\x08variants\x18\x01 \x03(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x08variants\"\xd7\x01\n\rTypeStructure\x12\x10\n\x03tag\x18\x01 \x01(\tR\x03tag\x12V\n\x0e\x64\x61taclass_type\x18\x02 \x03(\x0b\x32/.flyteidl.core.TypeStructure.DataclassTypeEntryR\rdataclassType\x1a\\\n\x12\x44\x61taclassTypeEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x30\n\x05value\x18\x02 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeR\x05value:\x02\x38\x01\"K\n\x0eTypeAnnotation\x12\x39\n\x0b\x61nnotations\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x0b\x61nnotations\"\xbc\x05\n\x0bLiteralType\x12\x33\n\x06simple\x18\x01 \x01(\x0e\x32\x19.flyteidl.core.SimpleTypeH\x00R\x06simple\x12\x33\n\x06schema\x18\x02 \x01(\x0b\x32\x19.flyteidl.core.SchemaTypeH\x00R\x06schema\x12\x45\n\x0f\x63ollection_type\x18\x03 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0e\x63ollectionType\x12\x42\n\x0emap_value_type\x18\x04 \x01(\x0b\x32\x1a.flyteidl.core.LiteralTypeH\x00R\x0cmapValueType\x12-\n\x04\x62lob\x18\x05 \x01(\x0b\x32\x17.flyteidl.core.BlobTypeH\x00R\x04\x62lob\x12\x36\n\tenum_type\x18\x07 \x01(\x0b\x32\x17.flyteidl.core.EnumTypeH\x00R\x08\x65numType\x12^\n\x17structured_dataset_type\x18\x08 \x01(\x0b\x32$.flyteidl.core.StructuredDatasetTypeH\x00R\x15structuredDatasetType\x12\x39\n\nunion_type\x18\n \x01(\x0b\x32\x18.flyteidl.core.UnionTypeH\x00R\tunionType\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12=\n\nannotation\x18\t \x01(\x0b\x32\x1d.flyteidl.core.TypeAnnotationR\nannotation\x12:\n\tstructure\x18\x0b \x01(\x0b\x32\x1c.flyteidl.core.TypeStructureR\tstructureB\x06\n\x04type\"z\n\x0fOutputReference\x12\x17\n\x07node_id\x18\x01 \x01(\tR\x06nodeId\x12\x10\n\x03var\x18\x02 \x01(\tR\x03var\x12<\n\tattr_path\x18\x03 \x03(\x0b\x32\x1f.flyteidl.core.PromiseAttributeR\x08\x61ttrPath\"_\n\x10PromiseAttribute\x12#\n\x0cstring_value\x18\x01 \x01(\tH\x00R\x0bstringValue\x12\x1d\n\tint_value\x18\x02 \x01(\x05H\x00R\x08intValueB\x07\n\x05value\"G\n\x05\x45rror\x12$\n\x0e\x66\x61iled_node_id\x18\x01 \x01(\tR\x0c\x66\x61iledNodeId\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message*\x90\x01\n\nSimpleType\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07INTEGER\x10\x01\x12\t\n\x05\x46LOAT\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\x0c\n\x08\x44\x41TETIME\x10\x05\x12\x0c\n\x08\x44URATION\x10\x06\x12\n\n\x06\x42INARY\x10\x07\x12\t\n\x05\x45RROR\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x08\n\x04JSON\x10\nB\xb0\x01\n\x11\x63om.flyteidl.coreB\nTypesProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _TYPESTRUCTURE_DATACLASSTYPEENTRY._options = None _TYPESTRUCTURE_DATACLASSTYPEENTRY._serialized_options = b'8\001' _globals['_SIMPLETYPE']._serialized_start=2264 - _globals['_SIMPLETYPE']._serialized_end=2398 + _globals['_SIMPLETYPE']._serialized_end=2408 _globals['_SCHEMATYPE']._serialized_start=75 _globals['_SCHEMATYPE']._serialized_end=364 _globals['_SCHEMATYPE_SCHEMACOLUMN']._serialized_start=156 diff --git a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi index 9028afabd5..694a1961ee 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/core/types_pb2.pyi @@ -19,6 +19,7 @@ class SimpleType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): BINARY: _ClassVar[SimpleType] ERROR: _ClassVar[SimpleType] STRUCT: _ClassVar[SimpleType] + JSON: _ClassVar[SimpleType] NONE: SimpleType INTEGER: SimpleType FLOAT: SimpleType @@ -29,6 +30,7 @@ DURATION: SimpleType BINARY: SimpleType ERROR: SimpleType STRUCT: SimpleType +JSON: SimpleType class SchemaType(_message.Message): __slots__ = ["columns"] diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 441609be89..ff5f1a5fd8 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -306,6 +306,7 @@ pub enum SimpleType { Binary = 7, Error = 8, Struct = 9, + Json = 10, } impl SimpleType { /// String value of the enum field names used in the ProtoBuf definition. @@ -324,6 +325,7 @@ impl SimpleType { SimpleType::Binary => "BINARY", SimpleType::Error => "ERROR", SimpleType::Struct => "STRUCT", + SimpleType::Json => "JSON", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -339,6 +341,7 @@ impl SimpleType { "BINARY" => Some(Self::Binary), "ERROR" => Some(Self::Error), "STRUCT" => Some(Self::Struct), + "JSON" => Some(Self::Json), _ => None, } } @@ -405,6 +408,25 @@ pub struct Binary { #[prost(string, tag="2")] pub tag: ::prost::alloc::string::String, } +/// Represents a JSON object encoded as a byte array. +/// This field is used to store JSON-serialized data, which can include +/// dataclasses, dictionaries, Pydantic models, or other structures that +/// can be represented as JSON objects. When utilized, the data should be +/// deserialized into its corresponding structure. +/// This design ensures that the data is stored in a format that can be +/// fully reconstructed without loss of information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Json { + /// The JSON object serialized as a byte array. + #[prost(bytes="vec", tag="1")] + pub value: ::prost::alloc::vec::Vec, + /// The format used to serialize the byte array. + /// This field identifies the specific format of the serialized JSON data, + /// allowing future flexibility in supporting different JSON variants. + #[prost(string, tag="2")] + pub serialization_format: ::prost::alloc::string::String, +} /// A strongly typed schema that defines the interface of data retrieved from the underlying storage medium. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -449,7 +471,7 @@ pub struct StructuredDataset { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Scalar { - #[prost(oneof="scalar::Value", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")] + #[prost(oneof="scalar::Value", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10")] pub value: ::core::option::Option, } /// Nested message and enum types in `Scalar`. @@ -475,6 +497,8 @@ pub mod scalar { StructuredDataset(super::StructuredDataset), #[prost(message, tag="9")] Union(::prost::alloc::boxed::Box), + #[prost(message, tag="10")] + Json(super::Json), } } /// A simple value. This supports any level of nesting (e.g. array of array of array of Blobs) as well as simple primitives. diff --git a/flyteidl/go.mod b/flyteidl/go.mod index 55ec124554..811040d350 100644 --- a/flyteidl/go.mod +++ b/flyteidl/go.mod @@ -15,6 +15,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 + github.com/vmihailenco/msgpack/v5 v5.4.1 golang.org/x/net v0.27.0 golang.org/x/oauth2 v0.16.0 google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 @@ -83,6 +84,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect diff --git a/flyteidl/go.sum b/flyteidl/go.sum index 5d5cb7e9a2..25d4cc402d 100644 --- a/flyteidl/go.sum +++ b/flyteidl/go.sum @@ -241,6 +241,10 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/flyteidl/protos/flyteidl/core/literals.proto b/flyteidl/protos/flyteidl/core/literals.proto index 1eb004482c..ebc8ad9c35 100644 --- a/flyteidl/protos/flyteidl/core/literals.proto +++ b/flyteidl/protos/flyteidl/core/literals.proto @@ -46,6 +46,29 @@ message Binary { string tag = 2; } +// Represents a JSON object encoded as a byte array. +// This field is used to store JSON-serialized data, which can include +// dataclasses, dictionaries, Pydantic models, or other structures that +// can be represented as JSON objects. When utilized, the data should be +// deserialized into its corresponding structure. +// This design ensures that the data is stored in a format that can be +// fully reconstructed without loss of information. +message Json { + // The JSON object serialized as a byte array. + bytes value = 1; + + // The format used to serialize the byte array. + // This field identifies the specific format of the serialized JSON data, + // allowing future flexibility in supporting different JSON variants. + string serialization_format = 2; + + // Placeholder for future extensions to support other types of JSON objects, + // such as "eJSON" or "ndJSON". + // reference: https://stackoverflow.com/questions/18692060/different-types-of-json + // string json_type = 3; +} + + // A strongly typed schema that defines the interface of data retrieved from the underlying storage medium. message Schema { string uri = 1; @@ -88,6 +111,7 @@ message Scalar { google.protobuf.Struct generic = 7; StructuredDataset structured_dataset = 8; Union union = 9; + Json json = 10; } } diff --git a/flyteidl/protos/flyteidl/core/types.proto b/flyteidl/protos/flyteidl/core/types.proto index 3580eea9f0..006d483833 100644 --- a/flyteidl/protos/flyteidl/core/types.proto +++ b/flyteidl/protos/flyteidl/core/types.proto @@ -18,6 +18,7 @@ enum SimpleType { BINARY = 7; ERROR = 8; STRUCT = 9; + JSON = 10; } // Defines schema columns and types to strongly type-validate schemas interoperability. diff --git a/flyteplugins/go.mod b/flyteplugins/go.mod index c4287581bc..2cf730b5cf 100644 --- a/flyteplugins/go.mod +++ b/flyteplugins/go.mod @@ -116,6 +116,8 @@ require ( github.com/spf13/viper v1.11.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.2.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect diff --git a/flyteplugins/go.sum b/flyteplugins/go.sum index fa26e3cfda..6cd76df01d 100644 --- a/flyteplugins/go.sum +++ b/flyteplugins/go.sum @@ -375,6 +375,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod index 5d828f9e9b..358e4c7966 100644 --- a/flytepropeller/go.mod +++ b/flytepropeller/go.mod @@ -25,6 +25,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 + github.com/vmihailenco/msgpack/v5 v5.4.1 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 @@ -123,6 +124,7 @@ require ( github.com/spf13/viper v1.11.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.2.0 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect diff --git a/flytepropeller/go.sum b/flytepropeller/go.sum index 8bbdd06eba..cba516732a 100644 --- a/flytepropeller/go.sum +++ b/flytepropeller/go.sum @@ -407,6 +407,10 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/flytepropeller/pkg/compiler/validators/typing.go b/flytepropeller/pkg/compiler/validators/typing.go index 2bde60b47b..c55fe32d92 100644 --- a/flytepropeller/pkg/compiler/validators/typing.go +++ b/flytepropeller/pkg/compiler/validators/typing.go @@ -44,6 +44,10 @@ func (t trivialChecker) CastsFrom(upstreamType *flyte.LiteralType) bool { downstreamTypeCopy.Metadata = &structpb.Struct{} upstreamTypeCopy.Annotation = &flyte.TypeAnnotation{} downstreamTypeCopy.Annotation = &flyte.TypeAnnotation{} + // Handle cases when upstream: STRUCT, downstream JSON + if upstreamTypeCopy.GetSimple() == flyte.SimpleType_STRUCT && downstreamTypeCopy.GetSimple() == flyte.SimpleType_JSON { + return true + } return upstreamTypeCopy.String() == downstreamTypeCopy.String() } diff --git a/flytepropeller/pkg/compiler/validators/typing_test.go b/flytepropeller/pkg/compiler/validators/typing_test.go index f2e407b986..c61459d7bc 100644 --- a/flytepropeller/pkg/compiler/validators/typing_test.go +++ b/flytepropeller/pkg/compiler/validators/typing_test.go @@ -22,6 +22,30 @@ func TestSimpleLiteralCasting(t *testing.T) { assert.True(t, castable, "Integers should be castable to other integers") }) + t.Run("BaseCase_Json", func(t *testing.T) { + castable := AreTypesCastable( + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_JSON}, + }, + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_JSON}, + }, + ) + assert.True(t, castable, "Json should be castable to other Json") + }) + + t.Run("Struct_to_Json", func(t *testing.T) { + castable := AreTypesCastable( + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_STRUCT}, + }, + &core.LiteralType{ + Type: &core.LiteralType_Simple{Simple: core.SimpleType_JSON}, + }, + ) + assert.True(t, castable, "Struct should be castable to Json") + }) + t.Run("IntegerToFloat", func(t *testing.T) { castable := AreTypesCastable( &core.LiteralType{ diff --git a/flytepropeller/pkg/compiler/validators/utils.go b/flytepropeller/pkg/compiler/validators/utils.go index 5f41a6e65e..2ecc34a68b 100644 --- a/flytepropeller/pkg/compiler/validators/utils.go +++ b/flytepropeller/pkg/compiler/validators/utils.go @@ -79,6 +79,8 @@ func literalTypeForScalar(scalar *core.Scalar) *core.LiteralType { }, }, } + case *core.Scalar_Json: + literalType = &core.LiteralType{Type: &core.LiteralType_Simple{Simple: core.SimpleType_JSON}} default: return nil } diff --git a/flytepropeller/pkg/compiler/validators/utils_test.go b/flytepropeller/pkg/compiler/validators/utils_test.go index 4a37f100dc..fad75827bd 100644 --- a/flytepropeller/pkg/compiler/validators/utils_test.go +++ b/flytepropeller/pkg/compiler/validators/utils_test.go @@ -336,6 +336,28 @@ func TestLiteralTypeForLiterals(t *testing.T) { assert.True(t, proto.Equal(expectedLt, lt)) }) + t.Run("json type", func(t *testing.T) { + jsonLiteral := &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: []byte(`{"key": "value"}`), + }, + }, + }, + }, + } + + lt := literalTypeForScalar(jsonLiteral.GetScalar()) + expectedLt := &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_JSON, + }, + } + + assert.True(t, proto.Equal(expectedLt, lt), "LiteralType should be of type JSON") + }) } func TestJoinVariableMapsUniqueKeys(t *testing.T) { diff --git a/flytepropeller/pkg/controller/nodes/attr_path_resolver.go b/flytepropeller/pkg/controller/nodes/attr_path_resolver.go index 42150cb887..8cfc1297a5 100644 --- a/flytepropeller/pkg/controller/nodes/attr_path_resolver.go +++ b/flytepropeller/pkg/controller/nodes/attr_path_resolver.go @@ -1,6 +1,7 @@ package nodes import ( + "github.com/vmihailenco/msgpack/v5" "google.golang.org/protobuf/types/known/structpb" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -10,9 +11,8 @@ import ( // resolveAttrPathInPromise resolves the literal with attribute path // If the promise is chained with attributes (e.g. promise.a["b"][0]), then we need to resolve the promise func resolveAttrPathInPromise(nodeID string, literal *core.Literal, bindAttrPath []*core.PromiseAttribute) (*core.Literal, error) { - var currVal *core.Literal = literal + var currVal = literal var tmpVal *core.Literal - var err error var exist bool count := 0 @@ -38,13 +38,20 @@ func resolveAttrPathInPromise(nodeID string, literal *core.Literal, bindAttrPath } // resolve dataclass - if currVal.GetScalar() != nil && currVal.GetScalar().GetGeneric() != nil { - st := currVal.GetScalar().GetGeneric() + if scalar := currVal.GetScalar(); scalar != nil { // start from index "count" - currVal, err = resolveAttrPathInPbStruct(nodeID, st, bindAttrPath[count:]) + var err error + + if jsonIDL := scalar.GetJson(); jsonIDL != nil { + serializationFormat := jsonIDL.GetSerializationFormat() + currVal, err = resolveAttrPathInJSON(nodeID, jsonIDL.GetValue(), bindAttrPath[count:], serializationFormat) + } else if generic := scalar.GetGeneric(); generic != nil { + currVal, err = resolveAttrPathInPbStruct(nodeID, generic, bindAttrPath[count:]) + } if err != nil { return nil, err } + } return currVal, nil @@ -59,7 +66,6 @@ func resolveAttrPathInPbStruct(nodeID string, st *structpb.Struct, bindAttrPath currVal = st.AsMap() - // Turn the current value to a map so it can be resolved more easily for _, attr := range bindAttrPath { switch resolvedVal := currVal.(type) { // map @@ -79,13 +85,58 @@ func resolveAttrPathInPbStruct(nodeID string, st *structpb.Struct, bindAttrPath } // After resolve, convert the interface to literal - literal, err := convertInterfaceToLiteral(nodeID, currVal) + literal, err := convertStructToLiteral(nodeID, currVal) + + return literal, err +} + +// resolveAttrPathInJSON resolves the msgpack bytes (e.g. dataclass) with attribute path +func resolveAttrPathInJSON(nodeID string, msgpackBytes []byte, bindAttrPath []*core.PromiseAttribute, + serializationFormat string) (*core.Literal, + error) { + + var currVal interface{} + var tmpVal interface{} + var exist bool + + if serializationFormat == "msgpack" { + err := msgpack.Unmarshal(msgpackBytes, &currVal) + if err != nil { + return nil, err + } + } else { + return nil, errors.Errorf(errors.PromiseAttributeResolveError, nodeID, + "Unsupported format '%v' found for literal value.\n"+ + "Please ensure the serialization format is supported.", serializationFormat) + } + + // Turn the current value to a map, so it can be resolved more easily + for _, attr := range bindAttrPath { + switch resolvedVal := currVal.(type) { + // map + case map[string]interface{}: + tmpVal, exist = resolvedVal[attr.GetStringValue()] + if !exist { + return nil, errors.Errorf(errors.PromiseAttributeResolveError, nodeID, "key [%v] does not exist in literal %v", attr.GetStringValue(), currVal) + } + currVal = tmpVal + // list + case []interface{}: + if int(attr.GetIntValue()) >= len(resolvedVal) { + return nil, errors.Errorf(errors.PromiseAttributeResolveError, nodeID, "index [%v] is out of range of %v", attr.GetIntValue(), currVal) + } + currVal = resolvedVal[attr.GetIntValue()] + } + } + + // After resolve, convert the interface to literal + literal, err := convertJSONToLiteral(nodeID, currVal, serializationFormat) return literal, err } -// convertInterfaceToLiteral converts the protobuf struct (e.g. dataclass) to literal -func convertInterfaceToLiteral(nodeID string, obj interface{}) (*core.Literal, error) { +// convertStructToLiteral converts the protobuf struct (e.g. dataclass) to literal +func convertStructToLiteral(nodeID string, obj interface{}) (*core.Literal, error) { literal := &core.Literal{} @@ -106,7 +157,7 @@ func convertInterfaceToLiteral(nodeID string, obj interface{}) (*core.Literal, e literals := []*core.Literal{} for _, v := range obj { // recursively convert the interface to literal - literal, err := convertInterfaceToLiteral(nodeID, v) + literal, err := convertStructToLiteral(nodeID, v) if err != nil { return nil, err } @@ -128,6 +179,59 @@ func convertInterfaceToLiteral(nodeID string, obj interface{}) (*core.Literal, e return literal, nil } +// convertJSONToLiteral converts the JSON (e.g. dataclass) to literal +func convertJSONToLiteral(nodeID string, obj interface{}, serializationFormat string) (*core.Literal, error) { + literal := &core.Literal{} + + switch obj := obj.(type) { + case map[string]interface{}: + if serializationFormat == "msgpack" { + msgpackBytes, err := msgpack.Marshal(obj) + if err != nil { + return nil, err + } + literal.Value = &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: msgpackBytes, + SerializationFormat: serializationFormat, + }, + }, + }, + } + } else { + return nil, errors.Errorf(errors.PromiseAttributeResolveError, nodeID, + "Unsupported serialization format '%v' found for literal value.\n"+ + "Please ensure the serialization format is supported.", serializationFormat) + } + case []interface{}: + literals := []*core.Literal{} + for _, v := range obj { + // recursively convert the interface to literal + literal, err := convertJSONToLiteral(nodeID, v, serializationFormat) + if err != nil { + return nil, err + } + literals = append(literals, literal) + } + literal.Value = &core.Literal_Collection{ + Collection: &core.LiteralCollection{ + Literals: literals, + }, + } + case interface{}: + scalar, err := convertInterfaceToLiteralScalar(nodeID, obj) + if err != nil { + return nil, err + } + literal.Value = scalar + } + + return literal, nil +} + +// TODO: We should support Blob Types in the future. // convertInterfaceToLiteralScalar converts the a single value to a literal scalar func convertInterfaceToLiteralScalar(nodeID string, obj interface{}) (*core.Literal_Scalar, error) { value := &core.Primitive{} @@ -137,6 +241,10 @@ func convertInterfaceToLiteralScalar(nodeID string, obj interface{}) (*core.Lite value.Value = &core.Primitive_StringValue{StringValue: obj} case int: value.Value = &core.Primitive_Integer{Integer: int64(obj)} + case int8: + value.Value = &core.Primitive_Integer{Integer: int64(obj)} + case int64: + value.Value = &core.Primitive_Integer{Integer: obj} case float64: value.Value = &core.Primitive_FloatValue{FloatValue: obj} case bool: diff --git a/flytepropeller/pkg/controller/nodes/attr_path_resolver_test.go b/flytepropeller/pkg/controller/nodes/attr_path_resolver_test.go index fb966c666e..a02adcecfa 100644 --- a/flytepropeller/pkg/controller/nodes/attr_path_resolver_test.go +++ b/flytepropeller/pkg/controller/nodes/attr_path_resolver_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/vmihailenco/msgpack/v5" "google.golang.org/protobuf/types/known/structpb" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -31,7 +32,7 @@ func NewStructFromMap(m map[string]interface{}) *structpb.Struct { return st } -func TestResolveAttrPathIn(t *testing.T) { +func TestResolveAttrPathInStruct(t *testing.T) { args := []struct { literal *core.Literal @@ -51,7 +52,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, @@ -73,7 +74,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_IntValue{ IntValue: 1, }, @@ -94,7 +95,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, @@ -119,12 +120,12 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, }, - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_IntValue{ IntValue: 1, }, @@ -149,7 +150,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, @@ -159,7 +160,7 @@ func TestResolveAttrPathIn(t *testing.T) { Value: &core.Literal_Collection{ Collection: &core.LiteralCollection{ Literals: []*core.Literal{ - &core.Literal{ + { Value: &core.Literal_Collection{ Collection: &core.LiteralCollection{ Literals: []*core.Literal{ @@ -181,11 +182,11 @@ func TestResolveAttrPathIn(t *testing.T) { Value: &core.Literal_Map{ Map: &core.LiteralMap{ Literals: map[string]*core.Literal{ - "foo": &core.Literal{ + "foo": { Value: &core.Literal_Collection{ Collection: &core.LiteralCollection{ Literals: []*core.Literal{ - &core.Literal{ + { Value: &core.Literal_Scalar{ Scalar: &core.Scalar{ Value: &core.Scalar_Generic{ @@ -203,17 +204,17 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, }, - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_IntValue{ IntValue: 0, }, }, - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "bar", }, @@ -222,6 +223,53 @@ func TestResolveAttrPathIn(t *testing.T) { expected: NewScalarLiteral("car"), hasError: false, }, + // - nested map {"foo": {"bar": {"baz": 42}}} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Generic{ + Generic: NewStructFromMap( + map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": map[string]interface{}{ + "baz": 42, + }, + }, + }, + ), + }, + }, + }, + }, + // Test accessing the entire nested map at foo.bar + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "bar", + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Generic{ + Generic: NewStructFromMap( + map[string]interface{}{ + "baz": 42, + }, + ), + }, + }, + }, + }, + hasError: false, + }, // - exception key error with map { literal: &core.Literal{ @@ -234,7 +282,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "random", }, @@ -256,7 +304,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_IntValue{ IntValue: 2, }, @@ -277,7 +325,7 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "random", }, @@ -302,12 +350,12 @@ func TestResolveAttrPathIn(t *testing.T) { }, }, path: []*core.PromiseAttribute{ - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_StringValue{ StringValue: "foo", }, }, - &core.PromiseAttribute{ + { Value: &core.PromiseAttribute_IntValue{ IntValue: 100, }, @@ -328,3 +376,456 @@ func TestResolveAttrPathIn(t *testing.T) { } } } + +func TestResolveAttrPathInJson(t *testing.T) { + // Helper function to convert a map to JSON and then to msgpack + toMsgpackBytes := func(m map[string]interface{}) []byte { + msgpackBytes, _ := msgpack.Marshal(m) + return msgpackBytes + } + + args := []struct { + literal *core.Literal + path []*core.PromiseAttribute + expected *core.Literal + hasError bool + }{ + // - nested map {"foo": {"bar": 42, "baz": {"qux": 3.14, "quux": "str"}}} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": int64(42), + "baz": map[string]interface{}{ + "qux": 3.14, + "quux": "str", + }, + }, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the int value at foo.bar + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "bar", + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{Integer: int64(42)}, + }, + }, + }, + }, + }, + hasError: false, + }, + // - nested map {"foo": {"bar": 42, "baz": {"qux": 3.14, "quux": "str"}}} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": int64(42), + "baz": map[string]interface{}{ + "qux": 3.14, + "quux": "str", + }, + }, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the float value at foo.baz.qux + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "baz", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "qux", + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_FloatValue{FloatValue: 3.14}, + }, + }, + }, + }, + }, + hasError: false, + }, + // - nested map {"foo": {"bar": 42, "baz": {"qux": 3.14, "quux": "str"}}} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": int64(42), + "baz": map[string]interface{}{ + "qux": 3.14, + "quux": "str", + }, + }, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the string value at foo.baz.quux + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "baz", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "quux", + }, + }, + }, + expected: NewScalarLiteral("str"), + hasError: false, + }, + // - nested list {"foo": [42, 3.14, "str"]} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": []interface{}{int64(42), 3.14, "str"}, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the int value at foo[0] + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_IntValue{ + IntValue: 0, + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{Integer: int64(42)}, + }, + }, + }, + }, + }, + hasError: false, + }, + // - nested list {"foo": [42, 3.14, "str"]} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": []interface{}{int64(42), 3.14, "str"}, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the float value at foo[1] + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_IntValue{ + IntValue: 1, + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_FloatValue{FloatValue: 3.14}, + }, + }, + }, + }, + }, + hasError: false, + }, + // - nested list {"foo": [42, 3.14, "str"]} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": []interface{}{int64(42), 3.14, "str"}, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the string value at foo[2] + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_IntValue{ + IntValue: 2, + }, + }, + }, + expected: NewScalarLiteral("str"), + hasError: false, + }, + // - test extracting a nested map as a JSON object {"foo": {"bar": {"baz": 42}}} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": map[string]interface{}{ + "baz": int64(42), + }, + }, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing the entire nested map at foo.bar + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "bar", + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "baz": int64(42), + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + hasError: false, + }, + // - exception case with non-existing key in nested map + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": int64(42), + "baz": map[string]interface{}{ + "qux": 3.14, + "quux": "str", + }, + }, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing a non-existing key in the nested map + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "baz", + }, + }, + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "unknown", + }, + }, + }, + expected: &core.Literal{}, + hasError: true, + }, + // - exception case with out-of-range index in list + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": []interface{}{int64(42), 3.14, "str"}, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + // Test accessing an out-of-range index in the list + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + { + Value: &core.PromiseAttribute_IntValue{ + IntValue: 10, + }, + }, + }, + expected: &core.Literal{}, + hasError: true, + }, + // - nested list struct {"foo": [["bar1", "bar2"]]} + { + literal: &core.Literal{ + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Json{ + Json: &core.Json{ + Value: toMsgpackBytes(map[string]interface{}{ + "foo": []interface{}{[]interface{}{"bar1", "bar2"}}, + }), + SerializationFormat: "msgpack", + }, + }, + }, + }, + }, + path: []*core.PromiseAttribute{ + { + Value: &core.PromiseAttribute_StringValue{ + StringValue: "foo", + }, + }, + }, + expected: &core.Literal{ + Value: &core.Literal_Collection{ + Collection: &core.LiteralCollection{ + Literals: []*core.Literal{ + { + Value: &core.Literal_Collection{ + Collection: &core.LiteralCollection{ + Literals: []*core.Literal{ + NewScalarLiteral("bar1"), + NewScalarLiteral("bar2"), + }, + }, + }, + }, + }, + }, + }, + }, + hasError: false, + }, + } + + for i, arg := range args { + resolved, err := resolveAttrPathInPromise("", arg.literal, arg.path) + if arg.hasError { + assert.Error(t, err, i) + assert.ErrorContains(t, err, errors.PromiseAttributeResolveError, i) + } else { + assert.Equal(t, arg.expected, resolved, i) + } + } +} diff --git a/go.mod b/go.mod index 3a7098d3c0..d0709feb20 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( golang.org/x/sync v0.7.0 gorm.io/driver/postgres v1.5.3 sigs.k8s.io/controller-runtime v0.16.3 + ) require ( @@ -177,6 +178,8 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect; indirects + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/wI2L/jsondiff v0.5.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect diff --git a/go.sum b/go.sum index 05db1b9c1c..f2b201cdeb 100644 --- a/go.sum +++ b/go.sum @@ -1331,6 +1331,10 @@ github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IA github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/wI2L/jsondiff v0.5.0 h1:RRMTi/mH+R2aXcPe1VYyvGINJqQfC3R+KSEakuU1Ikw= github.com/wI2L/jsondiff v0.5.0/go.mod h1:qqG6hnK0Lsrz2BpIVCxWiK9ItsBCpIZQiv0izJjOZ9s= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=