This is an automated email from the ASF dual-hosted git repository. linxinyuan pushed a commit to branch xinyuan-fix-protoc-frontend in repository https://gitbox.apache.org/repos/asf/texera.git
commit c29c1820707dc9ef12c1dd5177180f2095b4a1d1 Author: Xinyuan Lin <[email protected]> AuthorDate: Sat Mar 28 01:04:42 2026 -0700 init --- frontend/src/app/common/type/physical-plan.ts | 4 +- .../type/proto/google/protobuf/descriptor.ts | 1045 ++++++++++++++------ .../{engine/common => core}/virtualidentity.ts | 67 +- .../amber/{engine/common => core}/workflow.ts | 237 ++++- .../src/app/common/type/proto/scalapb/scalapb.ts | 293 +++--- .../src/app/common/util/port-identity-serde.ts | 2 +- 6 files changed, 1144 insertions(+), 504 deletions(-) diff --git a/frontend/src/app/common/type/physical-plan.ts b/frontend/src/app/common/type/physical-plan.ts index a2efaa5b93..03be29bffa 100644 --- a/frontend/src/app/common/type/physical-plan.ts +++ b/frontend/src/app/common/type/physical-plan.ts @@ -21,8 +21,8 @@ import { ExecutionIdentity, PhysicalOpIdentity, WorkflowIdentity, -} from "./proto/org/apache/texera/amber/engine/common/virtualidentity"; -import { PhysicalLink } from "./proto/org/apache/texera/amber/engine/common/workflow"; +} from "./proto/org/apache/texera/amber/core/virtualidentity"; +import { PhysicalLink } from "./proto/org/apache/texera/amber/core/workflow"; export interface PhysicalOp { id: PhysicalOpIdentity; diff --git a/frontend/src/app/common/type/proto/google/protobuf/descriptor.ts b/frontend/src/app/common/type/proto/google/protobuf/descriptor.ts index fc4fce0c2c..c22ae8955e 100644 --- a/frontend/src/app/common/type/proto/google/protobuf/descriptor.ts +++ b/frontend/src/app/common/type/proto/google/protobuf/descriptor.ts @@ -1,26 +1,7 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.2.0 -// protoc v5.28.3 +// protoc v6.33.4 // source: google/protobuf/descriptor.proto /* eslint-disable */ @@ -52,9 +33,11 @@ export enum Edition { */ EDITION_2023 = 1000, EDITION_2024 = 1001, + /** EDITION_UNSTABLE - A placeholder edition for developing and testing unscheduled features. */ + EDITION_UNSTABLE = 9999, /** * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be - * used or relyed on outside of tests. + * used or relied on outside of tests. */ EDITION_1_TEST_ONLY = 1, EDITION_2_TEST_ONLY = 2, @@ -90,6 +73,9 @@ export function editionFromJSON(object: any): Edition { case 1001: case "EDITION_2024": return Edition.EDITION_2024; + case 9999: + case "EDITION_UNSTABLE": + return Edition.EDITION_UNSTABLE; case 1: case "EDITION_1_TEST_ONLY": return Edition.EDITION_1_TEST_ONLY; @@ -129,6 +115,8 @@ export function editionToJSON(object: Edition): string { return "EDITION_2023"; case Edition.EDITION_2024: return "EDITION_2024"; + case Edition.EDITION_UNSTABLE: + return "EDITION_UNSTABLE"; case Edition.EDITION_1_TEST_ONLY: return "EDITION_1_TEST_ONLY"; case Edition.EDITION_2_TEST_ONLY: @@ -147,6 +135,52 @@ export function editionToJSON(object: Edition): string { } } +/** + * Describes the 'visibility' of a symbol with respect to the proto import + * system. Symbols can only be imported when the visibility rules do not prevent + * it (ex: local symbols cannot be imported). Visibility modifiers can only set + * on `message` and `enum` as they are the only types available to be referenced + * from other files. + */ +export enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2, + UNRECOGNIZED = -1, +} + +export function symbolVisibilityFromJSON(object: any): SymbolVisibility { + switch (object) { + case 0: + case "VISIBILITY_UNSET": + return SymbolVisibility.VISIBILITY_UNSET; + case 1: + case "VISIBILITY_LOCAL": + return SymbolVisibility.VISIBILITY_LOCAL; + case 2: + case "VISIBILITY_EXPORT": + return SymbolVisibility.VISIBILITY_EXPORT; + case -1: + case "UNRECOGNIZED": + default: + return SymbolVisibility.UNRECOGNIZED; + } +} + +export function symbolVisibilityToJSON(object: SymbolVisibility): string { + switch (object) { + case SymbolVisibility.VISIBILITY_UNSET: + return "VISIBILITY_UNSET"; + case SymbolVisibility.VISIBILITY_LOCAL: + return "VISIBILITY_LOCAL"; + case SymbolVisibility.VISIBILITY_EXPORT: + return "VISIBILITY_EXPORT"; + case SymbolVisibility.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + /** * The protocol compiler can output a FileDescriptorSet containing the .proto * files it parses. @@ -158,9 +192,13 @@ export interface FileDescriptorSet { /** Describes a complete .proto file. */ export interface FileDescriptorProto { /** file name, relative to root of source tree */ - name?: string | undefined; + name?: + | string + | undefined; /** e.g. "foo", "foo.bar", etc. */ - package?: string | undefined; + package?: + | string + | undefined; /** Names of files imported by this file. */ dependency: string[]; /** Indexes of the public imported files in the dependency list above. */ @@ -170,27 +208,46 @@ export interface FileDescriptorProto { * For Google-internal migration only. Do not use. */ weakDependency: number[]; + /** + * Names of files imported by this file purely for the purpose of providing + * option extensions. These are excluded from the dependency list above. + */ + optionDependency: string[]; /** All top-level definitions in this file. */ messageType: DescriptorProto[]; enumType: EnumDescriptorProto[]; service: ServiceDescriptorProto[]; extension: FieldDescriptorProto[]; - options?: FileOptions | undefined; + options?: + | FileOptions + | undefined; /** * This field contains optional information about the original source code. * You may safely remove this entire field without harming runtime * functionality of the descriptors -- the information is needed only by * development tools. */ - sourceCodeInfo?: SourceCodeInfo | undefined; + sourceCodeInfo?: + | SourceCodeInfo + | undefined; /** * The syntax of the proto file. * The supported values are "proto2", "proto3", and "editions". * * If `edition` is present, this value must be "editions". + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + syntax?: + | string + | undefined; + /** + * The edition of the proto file. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. */ - syntax?: string | undefined; - /** The edition of the proto file. */ edition?: Edition | undefined; } @@ -210,11 +267,15 @@ export interface DescriptorProto { * A given name may only be reserved once. */ reservedName: string[]; + /** Support for `export` and `local` keywords on enums. */ + visibility?: SymbolVisibility | undefined; } export interface DescriptorProto_ExtensionRange { /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Exclusive. */ end?: number | undefined; options?: ExtensionRangeOptions | undefined; @@ -227,7 +288,9 @@ export interface DescriptorProto_ExtensionRange { */ export interface DescriptorProto_ReservedRange { /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Exclusive. */ end?: number | undefined; } @@ -242,7 +305,9 @@ export interface ExtensionRangeOptions { */ declaration: ExtensionRangeOptions_Declaration[]; /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + features?: + | FeatureSet + | undefined; /** * The verification state of the range. * TODO: flip the default to DECLARATION once all empty ranges @@ -288,24 +353,32 @@ export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionR export interface ExtensionRangeOptions_Declaration { /** The extension number declared within the extension range. */ - number?: number | undefined; + number?: + | number + | undefined; /** * The fully-qualified name of the extension field. There must be a leading * dot in front of the full name. */ - fullName?: string | undefined; + fullName?: + | string + | undefined; /** * The fully-qualified type name of the extension field. Unlike * Metadata.type, Declaration.type must have a leading dot for messages * and enums. */ - type?: string | undefined; + type?: + | string + | undefined; /** * If true, indicates that the number is reserved in the extension range, * and any extension field with the number will fail to compile. Set this * when a declared extension field is deleted. */ - reserved?: boolean | undefined; + reserved?: + | boolean + | undefined; /** * If true, indicates that the extension must be defined as repeated. * Otherwise the extension must be defined as optional. @@ -317,12 +390,16 @@ export interface ExtensionRangeOptions_Declaration { export interface FieldDescriptorProto { name?: string | undefined; number?: number | undefined; - label?: FieldDescriptorProto_Label | undefined; + label?: + | FieldDescriptorProto_Label + | undefined; /** * If type_name is set, this need not be set. If both this and type_name * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. */ - type?: FieldDescriptorProto_Type | undefined; + type?: + | FieldDescriptorProto_Type + | undefined; /** * For message and enum types, this is the name of the type. If the name * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping @@ -330,24 +407,32 @@ export interface FieldDescriptorProto { * message are searched, then within the parent, on up to the root * namespace). */ - typeName?: string | undefined; + typeName?: + | string + | undefined; /** * For extensions, this is the name of the type being extended. It is * resolved in the same manner as type_name. */ - extendee?: string | undefined; + extendee?: + | string + | undefined; /** * For numeric types, contains the original text representation of the value. * For booleans, "true" or "false". * For strings, contains the default text contents (not escaped in any way). * For bytes, contains the C escaped value. All bytes >= 128 are escaped. */ - defaultValue?: string | undefined; + defaultValue?: + | string + | undefined; /** * If set, gives the index of a oneof in the containing type's oneof_decl * list. This field is a member of that oneof. */ - oneofIndex?: number | undefined; + oneofIndex?: + | number + | undefined; /** * JSON name of this field. The value is set by protocol compiler. If the * user has set a "json_name" option on this field, that option's value @@ -355,7 +440,9 @@ export interface FieldDescriptorProto { * it to camelCase. */ jsonName?: string | undefined; - options?: FieldOptions | undefined; + options?: + | FieldOptions + | undefined; /** * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. @@ -589,7 +676,9 @@ export interface OneofDescriptorProto { export interface EnumDescriptorProto { name?: string | undefined; value: EnumValueDescriptorProto[]; - options?: EnumOptions | undefined; + options?: + | EnumOptions + | undefined; /** * Range of reserved numeric values. Reserved numeric values may not be used * by enum values in the same enum declaration. Reserved ranges may not @@ -601,6 +690,8 @@ export interface EnumDescriptorProto { * be reserved once. */ reservedName: string[]; + /** Support for `export` and `local` keywords on enums. */ + visibility?: SymbolVisibility | undefined; } /** @@ -613,7 +704,9 @@ export interface EnumDescriptorProto { */ export interface EnumDescriptorProto_EnumReservedRange { /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Inclusive. */ end?: number | undefined; } @@ -634,16 +727,22 @@ export interface ServiceDescriptorProto { /** Describes a method of a service. */ export interface MethodDescriptorProto { - name?: string | undefined; + name?: + | string + | undefined; /** * Input and output type names. These are resolved in the same way as * FieldDescriptorProto.type_name, but must refer to a message type. */ inputType?: string | undefined; outputType?: string | undefined; - options?: MethodOptions | undefined; + options?: + | MethodOptions + | undefined; /** Identifies if client streams multiple client messages */ - clientStreaming?: boolean | undefined; + clientStreaming?: + | boolean + | undefined; /** Identifies if server streams multiple server messages */ serverStreaming?: boolean | undefined; } @@ -655,7 +754,9 @@ export interface FileOptions { * inappropriate because proto packages do not normally start with backwards * domain names. */ - javaPackage?: string | undefined; + javaPackage?: + | string + | undefined; /** * Controls the name of the wrapper Java class generated for the .proto file. * That class will always contain the .proto file's getDescriptor() method as @@ -663,7 +764,9 @@ export interface FileOptions { * If java_multiple_files is disabled, then all the other classes from the * .proto file will be nested inside the single wrapper outer class. */ - javaOuterClassname?: string | undefined; + javaOuterClassname?: + | string + | undefined; /** * If enabled, then the Java code generator will generate a separate .java * file for each top-level message, enum, and service defined in the .proto @@ -672,13 +775,17 @@ export interface FileOptions { * generated to contain the file's getDescriptor() method as well as any * top-level extensions defined in the file. */ - javaMultipleFiles?: boolean | undefined; + javaMultipleFiles?: + | boolean + | undefined; /** * This option does nothing. * * @deprecated */ - javaGenerateEqualsAndHash?: boolean | undefined; + javaGenerateEqualsAndHash?: + | boolean + | undefined; /** * A proto2 file can set this to true to opt in to UTF-8 checking for Java, * which will throw an exception if invalid UTF-8 is parsed from the wire or @@ -692,7 +799,9 @@ export interface FileOptions { * checks. */ javaStringCheckUtf8?: boolean | undefined; - optimizeFor?: FileOptions_OptimizeMode | undefined; + optimizeFor?: + | FileOptions_OptimizeMode + | undefined; /** * Sets the Go package where structs generated from this .proto will be * placed. If omitted, the Go package will be derived from the following: @@ -700,7 +809,9 @@ export interface FileOptions { * - Otherwise, the package statement in the .proto file, if present. * - Otherwise, the basename of the .proto file, without extension. */ - goPackage?: string | undefined; + goPackage?: + | string + | undefined; /** * Should generic services be generated in each language? "Generic" services * are not specific to any particular RPC system. They are generated by the @@ -715,58 +826,85 @@ export interface FileOptions { */ ccGenericServices?: boolean | undefined; javaGenericServices?: boolean | undefined; - pyGenericServices?: boolean | undefined; + pyGenericServices?: + | boolean + | undefined; /** * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations * for everything in the file, or it will be completely ignored; in the very * least, this is a formalization for deprecating files. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** * Enables the use of arenas for the proto messages in this file. This applies * only to generated classes for C++. */ - ccEnableArenas?: boolean | undefined; + ccEnableArenas?: + | boolean + | undefined; /** * Sets the objective c class prefix which is prepended to all objective c * generated classes from this .proto. There is no default. */ - objcClassPrefix?: string | undefined; + objcClassPrefix?: + | string + | undefined; /** Namespace for generated classes; defaults to the package. */ - csharpNamespace?: string | undefined; + csharpNamespace?: + | string + | undefined; /** * By default Swift generators will take the proto package and CamelCase it * replacing '.' with underscore and use that to prefix the types/symbols * defined. When this options is provided, they will use this value instead * to prefix the types/symbols defined. */ - swiftPrefix?: string | undefined; + swiftPrefix?: + | string + | undefined; /** * Sets the php class prefix which is prepended to all php generated classes * from this .proto. Default is empty. */ - phpClassPrefix?: string | undefined; + phpClassPrefix?: + | string + | undefined; /** * Use this option to change the namespace of php generated classes. Default * is empty. When this option is empty, the package name will be used for * determining the namespace. */ - phpNamespace?: string | undefined; + phpNamespace?: + | string + | undefined; /** * Use this option to change the namespace of php generated metadata classes. * Default is empty. When this option is empty, the proto file name will be * used for determining the namespace. */ - phpMetadataNamespace?: string | undefined; + phpMetadataNamespace?: + | string + | undefined; /** * Use this option to change the package of ruby generated classes. Default * is empty. When this option is not set, the package name will be used for * determining the ruby package. */ - rubyPackage?: string | undefined; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + rubyPackage?: + | string + | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -838,20 +976,26 @@ export interface MessageOptions { * Because this is an option, the above two restrictions are not enforced by * the protocol compiler. */ - messageSetWireFormat?: boolean | undefined; + messageSetWireFormat?: + | boolean + | undefined; /** * Disables the generation of the standard "descriptor()" accessor, which can * conflict with a field of the same name. This is meant to make migration * from proto1 easier; new code should avoid fields named "descriptor". */ - noStandardDescriptorAccessor?: boolean | undefined; + noStandardDescriptorAccessor?: + | boolean + | undefined; /** * Is this message deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the message, or it will be completely ignored; in the very least, * this is a formalization for deprecating messages. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** * Whether the message is an automatically generated map entry type for the * maps field. @@ -875,7 +1019,9 @@ export interface MessageOptions { * instead. The option should only be implicitly set by the proto compiler * parser. */ - mapEntry?: boolean | undefined; + mapEntry?: + | boolean + | undefined; /** * Enable the legacy handling of JSON field name conflicts. This lowercases * and strips underscored from the fields before comparison in proto3 only. @@ -890,9 +1036,18 @@ export interface MessageOptions { * * @deprecated */ - deprecatedLegacyJsonFieldConflicts?: boolean | undefined; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + deprecatedLegacyJsonFieldConflicts?: + | boolean + | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -907,7 +1062,9 @@ export interface FieldOptions { * type "bytes" in the open source release. * TODO: make ctype actually deprecated. */ - ctype?: FieldOptions_CType | undefined; + ctype?: + | FieldOptions_CType + | undefined; /** * The packed option can be enabled for repeated primitive fields to enable * a more efficient representation on the wire. Rather than repeatedly @@ -917,7 +1074,9 @@ export interface FieldOptions { * Editions, but the `repeated_field_encoding` feature can be used to control * the behavior. */ - packed?: boolean | undefined; + packed?: + | boolean + | undefined; /** * The jstype option determines the JavaScript type used for values of the * field. The option is permitted only for 64 bit integral and fixed types @@ -931,7 +1090,9 @@ export interface FieldOptions { * This option is an enum to permit additional types to be added, e.g. * goog.math.Integer. */ - jstype?: FieldOptions_JSType | undefined; + jstype?: + | FieldOptions_JSType + | undefined; /** * Should this field be parsed lazily? Lazy applies only to message-type * fields. It means that when the outer message is initially parsed, the @@ -956,22 +1117,35 @@ export interface FieldOptions { * fields. Failed verification would result in parsing failure (except when * uninitialized messages are acceptable). */ - lazy?: boolean | undefined; + lazy?: + | boolean + | undefined; /** * unverified_lazy does no correctness checks on the byte stream. This should * only be used where lazy with verification is prohibitive for performance * reasons. */ - unverifiedLazy?: boolean | undefined; + unverifiedLazy?: + | boolean + | undefined; /** * Is this field deprecated? * Depending on the target platform, this can emit Deprecated annotations * for accessors, or it will be completely ignored; in the very least, this * is a formalization for deprecating fields. */ - deprecated?: boolean | undefined; - /** For Google-internal migration only. Do not use. */ - weak?: boolean | undefined; + deprecated?: + | boolean + | undefined; + /** + * DEPRECATED. DO NOT USE! + * For Google-internal migration only. Do not use. + * + * @deprecated + */ + weak?: + | boolean + | undefined; /** * Indicate that the field value should not be printed out when using debug * formats, e.g. when the field contains sensitive credentials. @@ -980,9 +1154,16 @@ export interface FieldOptions { retention?: FieldOptions_OptionRetention | undefined; targets: FieldOptions_OptionTargetType[]; editionDefaults: FieldOptions_EditionDefault[]; - /** Any features defined in the specific edition. */ + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ features?: FeatureSet | undefined; - featureSupport?: FieldOptions_FeatureSupport | undefined; + featureSupport?: + | FieldOptions_FeatureSupport + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1077,11 +1258,7 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { } } -/** - * If set to RETENTION_SOURCE, the option will be omitted from the binary. - * Note: as of January 2023, support for this is in progress and does not yet - * have an effect (b/264593489). - */ +/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */ export enum FieldOptions_OptionRetention { RETENTION_UNKNOWN = 0, RETENTION_RUNTIME = 1, @@ -1124,8 +1301,7 @@ export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRe /** * This indicates the types of entities that the field may apply to when used * as an option. If it is unset, then the field may be freely used as an - * option on any kind of entity. Note: as of January 2023, support for this is - * in progress and does not yet have an effect (b/264593489). + * option on any kind of entity. */ export enum FieldOptions_OptionTargetType { TARGET_TYPE_UNKNOWN = 0, @@ -1209,7 +1385,9 @@ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionT } export interface FieldOptions_EditionDefault { - edition?: Edition | undefined; + edition?: + | Edition + | undefined; /** Textproto value. */ value?: string | undefined; } @@ -1221,17 +1399,23 @@ export interface FieldOptions_FeatureSupport { * earlier than this one, the default assigned to EDITION_LEGACY will be * used, and proto files will not be able to override it. */ - editionIntroduced?: Edition | undefined; + editionIntroduced?: + | Edition + | undefined; /** * The edition this feature becomes deprecated in. Using this after this * edition may trigger warnings. */ - editionDeprecated?: Edition | undefined; + editionDeprecated?: + | Edition + | undefined; /** * The deprecation warning text if this feature is used after the edition it * was marked deprecated in. */ - deprecationWarning?: string | undefined; + deprecationWarning?: + | string + | undefined; /** * The edition this feature is no longer available in. In editions after * this one, the last default assigned will be used, and proto files will @@ -1241,8 +1425,15 @@ export interface FieldOptions_FeatureSupport { } export interface OneofOptions { - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1252,14 +1443,18 @@ export interface EnumOptions { * Set this option to true to allow mapping different tag names to the same * value. */ - allowAlias?: boolean | undefined; + allowAlias?: + | boolean + | undefined; /** * Is this enum deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the enum, or it will be completely ignored; in the very least, this * is a formalization for deprecating enums. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** * Enable the legacy handling of JSON field name conflicts. This lowercases * and strips underscored from the fields before comparison in proto3 only. @@ -1270,9 +1465,18 @@ export interface EnumOptions { * * @deprecated */ - deprecatedLegacyJsonFieldConflicts?: boolean | undefined; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + deprecatedLegacyJsonFieldConflicts?: + | boolean + | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1284,31 +1488,53 @@ export interface EnumValueOptions { * for the enum value, or it will be completely ignored; in the very least, * this is a formalization for deprecating enum values. */ - deprecated?: boolean | undefined; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + deprecated?: + | boolean + | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** * Indicate that fields annotated with this enum value should not be printed * out when using debug formats, e.g. when the field contains sensitive * credentials. */ - debugRedact?: boolean | undefined; + debugRedact?: + | boolean + | undefined; /** Information about the support window of a feature value. */ - featureSupport?: FieldOptions_FeatureSupport | undefined; + featureSupport?: + | FieldOptions_FeatureSupport + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface ServiceOptions { - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the service, or it will be completely ignored; in the very least, * this is a formalization for deprecating services. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1321,9 +1547,18 @@ export interface MethodOptions { * this is a formalization for deprecating methods. */ deprecated?: boolean | undefined; - idempotencyLevel?: MethodOptions_IdempotencyLevel | undefined; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; + idempotencyLevel?: + | MethodOptions_IdempotencyLevel + | undefined; + /** + * Any features defined in the specific edition. + * WARNING: This field should only be used by protobuf plugins or special + * cases like the proto compiler. Other uses are discouraged and + * developers should rely on the protoreflect APIs for their client language. + */ + features?: + | FeatureSet + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1423,6 +1658,8 @@ export interface FeatureSet { utf8Validation?: FeatureSet_Utf8Validation | undefined; messageEncoding?: FeatureSet_MessageEncoding | undefined; jsonFormat?: FeatureSet_JsonFormat | undefined; + enforceNamingStyle?: FeatureSet_EnforceNamingStyle | undefined; + defaultSymbolVisibility?: FeatureSet_VisibilityFeature_DefaultSymbolVisibility | undefined; } export enum FeatureSet_FieldPresence { @@ -1665,6 +1902,111 @@ export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): stri } } +export enum FeatureSet_EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2, + UNRECOGNIZED = -1, +} + +export function featureSet_EnforceNamingStyleFromJSON(object: any): FeatureSet_EnforceNamingStyle { + switch (object) { + case 0: + case "ENFORCE_NAMING_STYLE_UNKNOWN": + return FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN; + case 1: + case "STYLE2024": + return FeatureSet_EnforceNamingStyle.STYLE2024; + case 2: + case "STYLE_LEGACY": + return FeatureSet_EnforceNamingStyle.STYLE_LEGACY; + case -1: + case "UNRECOGNIZED": + default: + return FeatureSet_EnforceNamingStyle.UNRECOGNIZED; + } +} + +export function featureSet_EnforceNamingStyleToJSON(object: FeatureSet_EnforceNamingStyle): string { + switch (object) { + case FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN: + return "ENFORCE_NAMING_STYLE_UNKNOWN"; + case FeatureSet_EnforceNamingStyle.STYLE2024: + return "STYLE2024"; + case FeatureSet_EnforceNamingStyle.STYLE_LEGACY: + return "STYLE_LEGACY"; + case FeatureSet_EnforceNamingStyle.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +export interface FeatureSet_VisibilityFeature { +} + +export enum FeatureSet_VisibilityFeature_DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + /** EXPORT_ALL - Default pre-EDITION_2024, all UNSET visibility are export. */ + EXPORT_ALL = 1, + /** EXPORT_TOP_LEVEL - All top-level symbols default to export, nested default to local. */ + EXPORT_TOP_LEVEL = 2, + /** LOCAL_ALL - All symbols default to local. */ + LOCAL_ALL = 3, + /** + * STRICT - All symbols local by default. Nested types cannot be exported. + * With special case caveat for message { enum {} reserved 1 to max; } + * This is the recommended setting for new protos. + */ + STRICT = 4, + UNRECOGNIZED = -1, +} + +export function featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON( + object: any, +): FeatureSet_VisibilityFeature_DefaultSymbolVisibility { + switch (object) { + case 0: + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN; + case 1: + case "EXPORT_ALL": + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL; + case 2: + case "EXPORT_TOP_LEVEL": + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL; + case 3: + case "LOCAL_ALL": + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL; + case 4: + case "STRICT": + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT; + case -1: + case "UNRECOGNIZED": + default: + return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED; + } +} + +export function featureSet_VisibilityFeature_DefaultSymbolVisibilityToJSON( + object: FeatureSet_VisibilityFeature_DefaultSymbolVisibility, +): string { + switch (object) { + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN: + return "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"; + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL: + return "EXPORT_ALL"; + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL: + return "EXPORT_TOP_LEVEL"; + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL: + return "LOCAL_ALL"; + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT: + return "STRICT"; + case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + /** * A compiled specification for the defaults of a set of features. These * messages are generated from FeatureSet extensions and can be used to seed @@ -1677,7 +2019,9 @@ export interface FeatureSetDefaults { * The minimum supported edition (inclusive) when this was constructed. * Editions before this will not have defaults. */ - minimumEdition?: Edition | undefined; + minimumEdition?: + | Edition + | undefined; /** * The maximum known edition (inclusive) when this was constructed. Editions * after this will not have reliable defaults. @@ -1692,9 +2036,13 @@ export interface FeatureSetDefaults { * be used. This field must be in strict ascending order by edition. */ export interface FeatureSetDefaults_FeatureSetEditionDefault { - edition?: Edition | undefined; + edition?: + | Edition + | undefined; /** Defaults of features that can be overridden in this edition. */ - overridableFeatures?: FeatureSet | undefined; + overridableFeatures?: + | FeatureSet + | undefined; /** Defaults of features that can't be overridden in this edition. */ fixedFeatures?: FeatureSet | undefined; } @@ -1861,12 +2209,16 @@ export interface GeneratedCodeInfo_Annotation { */ path: number[]; /** Identifies the filesystem path to the original source .proto. */ - sourceFile?: string | undefined; + sourceFile?: + | string + | undefined; /** * Identifies the starting offset in bytes in the generated code * that relates to the identified object. */ - begin?: number | undefined; + begin?: + | number + | undefined; /** * Identifies the ending offset in bytes in the generated code that * relates to the identified object. The end offset should be one past @@ -1966,7 +2318,7 @@ export const FileDescriptorSet: MessageFns<FileDescriptorSet> = { toJSON(message: FileDescriptorSet): unknown { const obj: any = {}; if (message.file?.length) { - obj.file = message.file.map(e => FileDescriptorProto.toJSON(e)); + obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e)); } return obj; }, @@ -1976,7 +2328,7 @@ export const FileDescriptorSet: MessageFns<FileDescriptorSet> = { }, fromPartial<I extends Exact<DeepPartial<FileDescriptorSet>, I>>(object: I): FileDescriptorSet { const message = createBaseFileDescriptorSet(); - message.file = object.file?.map(e => FileDescriptorProto.fromPartial(e)) || []; + message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; return message; }, }; @@ -1988,6 +2340,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { dependency: [], publicDependency: [], weakDependency: [], + optionDependency: [], messageType: [], enumType: [], service: [], @@ -2020,6 +2373,9 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = { writer.int32(v); } writer.join(); + for (const v of message.optionDependency) { + writer.uint32(122).string(v!); + } for (const v of message.messageType) { DescriptorProto.encode(v!, writer.uint32(34).fork()).join(); } @@ -2109,6 +2465,13 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = { } break; + case 15: + if (tag !== 122) { + break; + } + + message.optionDependency.push(reader.string()); + continue; case 4: if (tag !== 34) { break; @@ -2187,6 +2550,9 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = { weakDependency: globalThis.Array.isArray(object?.weakDependency) ? object.weakDependency.map((e: any) => globalThis.Number(e)) : [], + optionDependency: globalThis.Array.isArray(object?.optionDependency) + ? object.optionDependency.map((e: any) => globalThis.String(e)) + : [], messageType: globalThis.Array.isArray(object?.messageType) ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) : [], @@ -2218,22 +2584,25 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = { obj.dependency = message.dependency; } if (message.publicDependency?.length) { - obj.publicDependency = message.publicDependency.map(e => Math.round(e)); + obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); } if (message.weakDependency?.length) { - obj.weakDependency = message.weakDependency.map(e => Math.round(e)); + obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); + } + if (message.optionDependency?.length) { + obj.optionDependency = message.optionDependency; } if (message.messageType?.length) { - obj.messageType = message.messageType.map(e => DescriptorProto.toJSON(e)); + obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e)); } if (message.enumType?.length) { - obj.enumType = message.enumType.map(e => EnumDescriptorProto.toJSON(e)); + obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); } if (message.service?.length) { - obj.service = message.service.map(e => ServiceDescriptorProto.toJSON(e)); + obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e)); } if (message.extension?.length) { - obj.extension = message.extension.map(e => FieldDescriptorProto.toJSON(e)); + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = FileOptions.toJSON(message.options); @@ -2257,19 +2626,20 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = { const message = createBaseFileDescriptorProto(); message.name = object.name ?? ""; message.package = object.package ?? ""; - message.dependency = object.dependency?.map(e => e) || []; - message.publicDependency = object.publicDependency?.map(e => e) || []; - message.weakDependency = object.weakDependency?.map(e => e) || []; - message.messageType = object.messageType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.service = object.service?.map(e => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null ? FileOptions.fromPartial(object.options) : undefined; - message.sourceCodeInfo = - object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; + message.dependency = object.dependency?.map((e) => e) || []; + message.publicDependency = object.publicDependency?.map((e) => e) || []; + message.weakDependency = object.weakDependency?.map((e) => e) || []; + message.optionDependency = object.optionDependency?.map((e) => e) || []; + message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? FileOptions.fromPartial(object.options) + : undefined; + message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) + ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) + : undefined; message.syntax = object.syntax ?? ""; message.edition = object.edition ?? 0; return message; @@ -2288,6 +2658,7 @@ function createBaseDescriptorProto(): DescriptorProto { options: undefined, reservedRange: [], reservedName: [], + visibility: 0, }; } @@ -2323,6 +2694,9 @@ export const DescriptorProto: MessageFns<DescriptorProto> = { for (const v of message.reservedName) { writer.uint32(82).string(v!); } + if (message.visibility !== undefined && message.visibility !== 0) { + writer.uint32(88).int32(message.visibility); + } return writer; }, @@ -2403,6 +2777,13 @@ export const DescriptorProto: MessageFns<DescriptorProto> = { message.reservedName.push(reader.string()); continue; + case 11: + if (tag !== 88) { + break; + } + + message.visibility = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2440,6 +2821,7 @@ export const DescriptorProto: MessageFns<DescriptorProto> = { reservedName: globalThis.Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => globalThis.String(e)) : [], + visibility: isSet(object.visibility) ? symbolVisibilityFromJSON(object.visibility) : 0, }; }, @@ -2449,32 +2831,35 @@ export const DescriptorProto: MessageFns<DescriptorProto> = { obj.name = message.name; } if (message.field?.length) { - obj.field = message.field.map(e => FieldDescriptorProto.toJSON(e)); + obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.extension?.length) { - obj.extension = message.extension.map(e => FieldDescriptorProto.toJSON(e)); + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.nestedType?.length) { - obj.nestedType = message.nestedType.map(e => DescriptorProto.toJSON(e)); + obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e)); } if (message.enumType?.length) { - obj.enumType = message.enumType.map(e => EnumDescriptorProto.toJSON(e)); + obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); } if (message.extensionRange?.length) { - obj.extensionRange = message.extensionRange.map(e => DescriptorProto_ExtensionRange.toJSON(e)); + obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e)); } if (message.oneofDecl?.length) { - obj.oneofDecl = message.oneofDecl.map(e => OneofDescriptorProto.toJSON(e)); + obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = MessageOptions.toJSON(message.options); } if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map(e => DescriptorProto_ReservedRange.toJSON(e)); + obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e)); } if (message.reservedName?.length) { obj.reservedName = message.reservedName; } + if (message.visibility !== undefined && message.visibility !== 0) { + obj.visibility = symbolVisibilityToJSON(message.visibility); + } return obj; }, @@ -2484,16 +2869,18 @@ export const DescriptorProto: MessageFns<DescriptorProto> = { fromPartial<I extends Exact<DeepPartial<DescriptorProto>, I>>(object: I): DescriptorProto { const message = createBaseDescriptorProto(); message.name = object.name ?? ""; - message.field = object.field?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = object.nestedType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = object.extensionRange?.map(e => DescriptorProto_ExtensionRange.fromPartial(e)) || []; - message.oneofDecl = object.oneofDecl?.map(e => OneofDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null ? MessageOptions.fromPartial(object.options) : undefined; - message.reservedRange = object.reservedRange?.map(e => DescriptorProto_ReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; + message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || []; + message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? MessageOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || []; + message.reservedName = object.reservedName?.map((e) => e) || []; + message.visibility = object.visibility ?? 0; return message; }, }; @@ -2579,15 +2966,14 @@ export const DescriptorProto_ExtensionRange: MessageFns<DescriptorProto_Extensio return DescriptorProto_ExtensionRange.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<DescriptorProto_ExtensionRange>, I>>( - object: I + object: I, ): DescriptorProto_ExtensionRange { const message = createBaseDescriptorProto_ExtensionRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? ExtensionRangeOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -2659,7 +3045,7 @@ export const DescriptorProto_ReservedRange: MessageFns<DescriptorProto_ReservedR return DescriptorProto_ReservedRange.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<DescriptorProto_ReservedRange>, I>>( - object: I + object: I, ): DescriptorProto_ReservedRange { const message = createBaseDescriptorProto_ReservedRange(); message.start = object.start ?? 0; @@ -2751,10 +3137,10 @@ export const ExtensionRangeOptions: MessageFns<ExtensionRangeOptions> = { toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } if (message.declaration?.length) { - obj.declaration = message.declaration.map(e => ExtensionRangeOptions_Declaration.toJSON(e)); + obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e)); } if (message.features !== undefined) { obj.features = FeatureSet.toJSON(message.features); @@ -2770,10 +3156,11 @@ export const ExtensionRangeOptions: MessageFns<ExtensionRangeOptions> = { }, fromPartial<I extends Exact<DeepPartial<ExtensionRangeOptions>, I>>(object: I): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; - message.declaration = object.declaration?.map(e => ExtensionRangeOptions_Declaration.fromPartial(e)) || []; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; + message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; message.verification = object.verification ?? 1; return message; }, @@ -2885,12 +3272,12 @@ export const ExtensionRangeOptions_Declaration: MessageFns<ExtensionRangeOptions }, create<I extends Exact<DeepPartial<ExtensionRangeOptions_Declaration>, I>>( - base?: I + base?: I, ): ExtensionRangeOptions_Declaration { return ExtensionRangeOptions_Declaration.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<ExtensionRangeOptions_Declaration>, I>>( - object: I + object: I, ): ExtensionRangeOptions_Declaration { const message = createBaseExtensionRangeOptions_Declaration(); message.number = object.number ?? 0; @@ -3117,8 +3504,9 @@ export const FieldDescriptorProto: MessageFns<FieldDescriptorProto> = { message.defaultValue = object.defaultValue ?? ""; message.oneofIndex = object.oneofIndex ?? 0; message.jsonName = object.jsonName ?? ""; - message.options = - object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? FieldOptions.fromPartial(object.options) + : undefined; message.proto3Optional = object.proto3Optional ?? false; return message; }, @@ -3193,14 +3581,15 @@ export const OneofDescriptorProto: MessageFns<OneofDescriptorProto> = { fromPartial<I extends Exact<DeepPartial<OneofDescriptorProto>, I>>(object: I): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); message.name = object.name ?? ""; - message.options = - object.options !== undefined && object.options !== null ? OneofOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? OneofOptions.fromPartial(object.options) + : undefined; return message; }, }; function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; + return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [], visibility: 0 }; } export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { @@ -3220,6 +3609,9 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { for (const v of message.reservedName) { writer.uint32(42).string(v!); } + if (message.visibility !== undefined && message.visibility !== 0) { + writer.uint32(48).int32(message.visibility); + } return writer; }, @@ -3265,6 +3657,13 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { message.reservedName.push(reader.string()); continue; + case 6: + if (tag !== 48) { + break; + } + + message.visibility = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -3287,6 +3686,7 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { reservedName: globalThis.Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => globalThis.String(e)) : [], + visibility: isSet(object.visibility) ? symbolVisibilityFromJSON(object.visibility) : 0, }; }, @@ -3296,17 +3696,20 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { obj.name = message.name; } if (message.value?.length) { - obj.value = message.value.map(e => EnumValueDescriptorProto.toJSON(e)); + obj.value = message.value.map((e) => EnumValueDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = EnumOptions.toJSON(message.options); } if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map(e => EnumDescriptorProto_EnumReservedRange.toJSON(e)); + obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e)); } if (message.reservedName?.length) { obj.reservedName = message.reservedName; } + if (message.visibility !== undefined && message.visibility !== 0) { + obj.visibility = symbolVisibilityToJSON(message.visibility); + } return obj; }, @@ -3316,11 +3719,14 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = { fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto>, I>>(object: I): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); message.name = object.name ?? ""; - message.value = object.value?.map(e => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null ? EnumOptions.fromPartial(object.options) : undefined; - message.reservedRange = object.reservedRange?.map(e => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; + message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? EnumOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || + []; + message.reservedName = object.reservedName?.map((e) => e) || []; + message.visibility = object.visibility ?? 0; return message; }, }; @@ -3389,12 +3795,12 @@ export const EnumDescriptorProto_EnumReservedRange: MessageFns<EnumDescriptorPro }, create<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>( - base?: I + base?: I, ): EnumDescriptorProto_EnumReservedRange { return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<EnumDescriptorProto_EnumReservedRange>, I>>( - object: I + object: I, ): EnumDescriptorProto_EnumReservedRange { const message = createBaseEnumDescriptorProto_EnumReservedRange(); message.start = object.start ?? 0; @@ -3487,10 +3893,9 @@ export const EnumValueDescriptorProto: MessageFns<EnumValueDescriptorProto> = { const message = createBaseEnumValueDescriptorProto(); message.name = object.name ?? ""; message.number = object.number ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? EnumValueOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -3566,7 +3971,7 @@ export const ServiceDescriptorProto: MessageFns<ServiceDescriptorProto> = { obj.name = message.name; } if (message.method?.length) { - obj.method = message.method.map(e => MethodDescriptorProto.toJSON(e)); + obj.method = message.method.map((e) => MethodDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = ServiceOptions.toJSON(message.options); @@ -3580,9 +3985,10 @@ export const ServiceDescriptorProto: MessageFns<ServiceDescriptorProto> = { fromPartial<I extends Exact<DeepPartial<ServiceDescriptorProto>, I>>(object: I): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); message.name = object.name ?? ""; - message.method = object.method?.map(e => MethodDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null ? ServiceOptions.fromPartial(object.options) : undefined; + message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? ServiceOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -3721,8 +4127,9 @@ export const MethodDescriptorProto: MessageFns<MethodDescriptorProto> = { message.name = object.name ?? ""; message.inputType = object.inputType ?? ""; message.outputType = object.outputType ?? ""; - message.options = - object.options !== undefined && object.options !== null ? MethodOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? MethodOptions.fromPartial(object.options) + : undefined; message.clientStreaming = object.clientStreaming ?? false; message.serverStreaming = object.serverStreaming ?? false; return message; @@ -4079,7 +4486,7 @@ export const FileOptions: MessageFns<FileOptions> = { obj.features = FeatureSet.toJSON(message.features); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4108,9 +4515,10 @@ export const FileOptions: MessageFns<FileOptions> = { message.phpNamespace = object.phpNamespace ?? ""; message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; message.rubyPackage = object.rubyPackage ?? ""; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4142,8 +4550,7 @@ export const MessageOptions: MessageFns<MessageOptions> = { writer.uint32(56).bool(message.mapEntry); } if ( - message.deprecatedLegacyJsonFieldConflicts !== undefined && - message.deprecatedLegacyJsonFieldConflicts !== false + message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false ) { writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts); } @@ -4256,8 +4663,7 @@ export const MessageOptions: MessageFns<MessageOptions> = { obj.mapEntry = message.mapEntry; } if ( - message.deprecatedLegacyJsonFieldConflicts !== undefined && - message.deprecatedLegacyJsonFieldConflicts !== false + message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false ) { obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; } @@ -4265,7 +4671,7 @@ export const MessageOptions: MessageFns<MessageOptions> = { obj.features = FeatureSet.toJSON(message.features); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4280,9 +4686,10 @@ export const MessageOptions: MessageFns<MessageOptions> = { message.deprecated = object.deprecated ?? false; message.mapEntry = object.mapEntry ?? false; message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4536,10 +4943,10 @@ export const FieldOptions: MessageFns<FieldOptions> = { obj.retention = fieldOptions_OptionRetentionToJSON(message.retention); } if (message.targets?.length) { - obj.targets = message.targets.map(e => fieldOptions_OptionTargetTypeToJSON(e)); + obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e)); } if (message.editionDefaults?.length) { - obj.editionDefaults = message.editionDefaults.map(e => FieldOptions_EditionDefault.toJSON(e)); + obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e)); } if (message.features !== undefined) { obj.features = FeatureSet.toJSON(message.features); @@ -4548,7 +4955,7 @@ export const FieldOptions: MessageFns<FieldOptions> = { obj.featureSupport = FieldOptions_FeatureSupport.toJSON(message.featureSupport); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4567,15 +4974,15 @@ export const FieldOptions: MessageFns<FieldOptions> = { message.weak = object.weak ?? false; message.debugRedact = object.debugRedact ?? false; message.retention = object.retention ?? 0; - message.targets = object.targets?.map(e => e) || []; - message.editionDefaults = object.editionDefaults?.map(e => FieldOptions_EditionDefault.fromPartial(e)) || []; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.featureSupport = - object.featureSupport !== undefined && object.featureSupport !== null - ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport) - : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.targets = object.targets?.map((e) => e) || []; + message.editionDefaults = object.editionDefaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.featureSupport = (object.featureSupport !== undefined && object.featureSupport !== null) + ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4818,7 +5225,7 @@ export const OneofOptions: MessageFns<OneofOptions> = { obj.features = FeatureSet.toJSON(message.features); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4828,9 +5235,10 @@ export const OneofOptions: MessageFns<OneofOptions> = { }, fromPartial<I extends Exact<DeepPartial<OneofOptions>, I>>(object: I): OneofOptions { const message = createBaseOneofOptions(); - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4854,8 +5262,7 @@ export const EnumOptions: MessageFns<EnumOptions> = { writer.uint32(24).bool(message.deprecated); } if ( - message.deprecatedLegacyJsonFieldConflicts !== undefined && - message.deprecatedLegacyJsonFieldConflicts !== false + message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false ) { writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts); } @@ -4942,8 +5349,7 @@ export const EnumOptions: MessageFns<EnumOptions> = { obj.deprecated = message.deprecated; } if ( - message.deprecatedLegacyJsonFieldConflicts !== undefined && - message.deprecatedLegacyJsonFieldConflicts !== false + message.deprecatedLegacyJsonFieldConflicts !== undefined && message.deprecatedLegacyJsonFieldConflicts !== false ) { obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; } @@ -4951,7 +5357,7 @@ export const EnumOptions: MessageFns<EnumOptions> = { obj.features = FeatureSet.toJSON(message.features); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4964,9 +5370,10 @@ export const EnumOptions: MessageFns<EnumOptions> = { message.allowAlias = object.allowAlias ?? false; message.deprecated = object.deprecated ?? false; message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -5081,7 +5488,7 @@ export const EnumValueOptions: MessageFns<EnumValueOptions> = { obj.featureSupport = FieldOptions_FeatureSupport.toJSON(message.featureSupport); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -5092,14 +5499,14 @@ export const EnumValueOptions: MessageFns<EnumValueOptions> = { fromPartial<I extends Exact<DeepPartial<EnumValueOptions>, I>>(object: I): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; message.debugRedact = object.debugRedact ?? false; - message.featureSupport = - object.featureSupport !== undefined && object.featureSupport !== null - ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport) - : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.featureSupport = (object.featureSupport !== undefined && object.featureSupport !== null) + ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -5178,7 +5585,7 @@ export const ServiceOptions: MessageFns<ServiceOptions> = { obj.deprecated = message.deprecated; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -5188,10 +5595,11 @@ export const ServiceOptions: MessageFns<ServiceOptions> = { }, fromPartial<I extends Exact<DeepPartial<ServiceOptions>, I>>(object: I): ServiceOptions { const message = createBaseServiceOptions(); - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -5286,7 +5694,7 @@ export const MethodOptions: MessageFns<MethodOptions> = { obj.features = FeatureSet.toJSON(message.features); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => UninterpretedOption.toJSON(e)); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -5298,9 +5706,10 @@ export const MethodOptions: MessageFns<MethodOptions> = { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.features = - object.features !== undefined && object.features !== null ? FeatureSet.fromPartial(object.features) : undefined; - message.uninterpretedOption = object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + message.features = (object.features !== undefined && object.features !== null) + ? FeatureSet.fromPartial(object.features) + : undefined; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -5425,7 +5834,7 @@ export const UninterpretedOption: MessageFns<UninterpretedOption> = { toJSON(message: UninterpretedOption): unknown { const obj: any = {}; if (message.name?.length) { - obj.name = message.name.map(e => UninterpretedOption_NamePart.toJSON(e)); + obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e)); } if (message.identifierValue !== undefined && message.identifierValue !== "") { obj.identifierValue = message.identifierValue; @@ -5453,7 +5862,7 @@ export const UninterpretedOption: MessageFns<UninterpretedOption> = { }, fromPartial<I extends Exact<DeepPartial<UninterpretedOption>, I>>(object: I): UninterpretedOption { const message = createBaseUninterpretedOption(); - message.name = object.name?.map(e => UninterpretedOption_NamePart.fromPartial(e)) || []; + message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; message.identifierValue = object.identifierValue ?? ""; message.positiveIntValue = object.positiveIntValue ?? 0; message.negativeIntValue = object.negativeIntValue ?? 0; @@ -5546,6 +5955,8 @@ function createBaseFeatureSet(): FeatureSet { utf8Validation: 0, messageEncoding: 0, jsonFormat: 0, + enforceNamingStyle: 0, + defaultSymbolVisibility: 0, }; } @@ -5569,6 +5980,12 @@ export const FeatureSet: MessageFns<FeatureSet> = { if (message.jsonFormat !== undefined && message.jsonFormat !== 0) { writer.uint32(48).int32(message.jsonFormat); } + if (message.enforceNamingStyle !== undefined && message.enforceNamingStyle !== 0) { + writer.uint32(56).int32(message.enforceNamingStyle); + } + if (message.defaultSymbolVisibility !== undefined && message.defaultSymbolVisibility !== 0) { + writer.uint32(64).int32(message.defaultSymbolVisibility); + } return writer; }, @@ -5621,6 +6038,20 @@ export const FeatureSet: MessageFns<FeatureSet> = { message.jsonFormat = reader.int32() as any; continue; + case 7: + if (tag !== 56) { + break; + } + + message.enforceNamingStyle = reader.int32() as any; + continue; + case 8: + if (tag !== 64) { + break; + } + + message.defaultSymbolVisibility = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -5640,6 +6071,12 @@ export const FeatureSet: MessageFns<FeatureSet> = { utf8Validation: isSet(object.utf8Validation) ? featureSet_Utf8ValidationFromJSON(object.utf8Validation) : 0, messageEncoding: isSet(object.messageEncoding) ? featureSet_MessageEncodingFromJSON(object.messageEncoding) : 0, jsonFormat: isSet(object.jsonFormat) ? featureSet_JsonFormatFromJSON(object.jsonFormat) : 0, + enforceNamingStyle: isSet(object.enforceNamingStyle) + ? featureSet_EnforceNamingStyleFromJSON(object.enforceNamingStyle) + : 0, + defaultSymbolVisibility: isSet(object.defaultSymbolVisibility) + ? featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON(object.defaultSymbolVisibility) + : 0, }; }, @@ -5663,6 +6100,14 @@ export const FeatureSet: MessageFns<FeatureSet> = { if (message.jsonFormat !== undefined && message.jsonFormat !== 0) { obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat); } + if (message.enforceNamingStyle !== undefined && message.enforceNamingStyle !== 0) { + obj.enforceNamingStyle = featureSet_EnforceNamingStyleToJSON(message.enforceNamingStyle); + } + if (message.defaultSymbolVisibility !== undefined && message.defaultSymbolVisibility !== 0) { + obj.defaultSymbolVisibility = featureSet_VisibilityFeature_DefaultSymbolVisibilityToJSON( + message.defaultSymbolVisibility, + ); + } return obj; }, @@ -5677,6 +6122,51 @@ export const FeatureSet: MessageFns<FeatureSet> = { message.utf8Validation = object.utf8Validation ?? 0; message.messageEncoding = object.messageEncoding ?? 0; message.jsonFormat = object.jsonFormat ?? 0; + message.enforceNamingStyle = object.enforceNamingStyle ?? 0; + message.defaultSymbolVisibility = object.defaultSymbolVisibility ?? 0; + return message; + }, +}; + +function createBaseFeatureSet_VisibilityFeature(): FeatureSet_VisibilityFeature { + return {}; +} + +export const FeatureSet_VisibilityFeature: MessageFns<FeatureSet_VisibilityFeature> = { + encode(_: FeatureSet_VisibilityFeature, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): FeatureSet_VisibilityFeature { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseFeatureSet_VisibilityFeature(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(_: any): FeatureSet_VisibilityFeature { + return {}; + }, + + toJSON(_: FeatureSet_VisibilityFeature): unknown { + const obj: any = {}; + return obj; + }, + + create<I extends Exact<DeepPartial<FeatureSet_VisibilityFeature>, I>>(base?: I): FeatureSet_VisibilityFeature { + return FeatureSet_VisibilityFeature.fromPartial(base ?? ({} as any)); + }, + fromPartial<I extends Exact<DeepPartial<FeatureSet_VisibilityFeature>, I>>(_: I): FeatureSet_VisibilityFeature { + const message = createBaseFeatureSet_VisibilityFeature(); return message; }, }; @@ -5749,7 +6239,7 @@ export const FeatureSetDefaults: MessageFns<FeatureSetDefaults> = { toJSON(message: FeatureSetDefaults): unknown { const obj: any = {}; if (message.defaults?.length) { - obj.defaults = message.defaults.map(e => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e)); + obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e)); } if (message.minimumEdition !== undefined && message.minimumEdition !== 0) { obj.minimumEdition = editionToJSON(message.minimumEdition); @@ -5765,7 +6255,7 @@ export const FeatureSetDefaults: MessageFns<FeatureSetDefaults> = { }, fromPartial<I extends Exact<DeepPartial<FeatureSetDefaults>, I>>(object: I): FeatureSetDefaults { const message = createBaseFeatureSetDefaults(); - message.defaults = object.defaults?.map(e => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || []; + message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || []; message.minimumEdition = object.minimumEdition ?? 0; message.maximumEdition = object.maximumEdition ?? 0; return message; @@ -5779,7 +6269,7 @@ function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefa export const FeatureSetDefaults_FeatureSetEditionDefault: MessageFns<FeatureSetDefaults_FeatureSetEditionDefault> = { encode( message: FeatureSetDefaults_FeatureSetEditionDefault, - writer: BinaryWriter = new BinaryWriter() + writer: BinaryWriter = new BinaryWriter(), ): BinaryWriter { if (message.edition !== undefined && message.edition !== 0) { writer.uint32(24).int32(message.edition); @@ -5855,23 +6345,21 @@ export const FeatureSetDefaults_FeatureSetEditionDefault: MessageFns<FeatureSetD }, create<I extends Exact<DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>, I>>( - base?: I + base?: I, ): FeatureSetDefaults_FeatureSetEditionDefault { return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>, I>>( - object: I + object: I, ): FeatureSetDefaults_FeatureSetEditionDefault { const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault(); message.edition = object.edition ?? 0; - message.overridableFeatures = - object.overridableFeatures !== undefined && object.overridableFeatures !== null - ? FeatureSet.fromPartial(object.overridableFeatures) - : undefined; - message.fixedFeatures = - object.fixedFeatures !== undefined && object.fixedFeatures !== null - ? FeatureSet.fromPartial(object.fixedFeatures) - : undefined; + message.overridableFeatures = (object.overridableFeatures !== undefined && object.overridableFeatures !== null) + ? FeatureSet.fromPartial(object.overridableFeatures) + : undefined; + message.fixedFeatures = (object.fixedFeatures !== undefined && object.fixedFeatures !== null) + ? FeatureSet.fromPartial(object.fixedFeatures) + : undefined; return message; }, }; @@ -5922,7 +6410,7 @@ export const SourceCodeInfo: MessageFns<SourceCodeInfo> = { toJSON(message: SourceCodeInfo): unknown { const obj: any = {}; if (message.location?.length) { - obj.location = message.location.map(e => SourceCodeInfo_Location.toJSON(e)); + obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e)); } return obj; }, @@ -5932,7 +6420,7 @@ export const SourceCodeInfo: MessageFns<SourceCodeInfo> = { }, fromPartial<I extends Exact<DeepPartial<SourceCodeInfo>, I>>(object: I): SourceCodeInfo { const message = createBaseSourceCodeInfo(); - message.location = object.location?.map(e => SourceCodeInfo_Location.fromPartial(e)) || []; + message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; return message; }, }; @@ -6051,10 +6539,10 @@ export const SourceCodeInfo_Location: MessageFns<SourceCodeInfo_Location> = { toJSON(message: SourceCodeInfo_Location): unknown { const obj: any = {}; if (message.path?.length) { - obj.path = message.path.map(e => Math.round(e)); + obj.path = message.path.map((e) => Math.round(e)); } if (message.span?.length) { - obj.span = message.span.map(e => Math.round(e)); + obj.span = message.span.map((e) => Math.round(e)); } if (message.leadingComments !== undefined && message.leadingComments !== "") { obj.leadingComments = message.leadingComments; @@ -6073,11 +6561,11 @@ export const SourceCodeInfo_Location: MessageFns<SourceCodeInfo_Location> = { }, fromPartial<I extends Exact<DeepPartial<SourceCodeInfo_Location>, I>>(object: I): SourceCodeInfo_Location { const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map(e => e) || []; - message.span = object.span?.map(e => e) || []; + message.path = object.path?.map((e) => e) || []; + message.span = object.span?.map((e) => e) || []; message.leadingComments = object.leadingComments ?? ""; message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = object.leadingDetachedComments?.map(e => e) || []; + message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || []; return message; }, }; @@ -6128,7 +6616,7 @@ export const GeneratedCodeInfo: MessageFns<GeneratedCodeInfo> = { toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; if (message.annotation?.length) { - obj.annotation = message.annotation.map(e => GeneratedCodeInfo_Annotation.toJSON(e)); + obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e)); } return obj; }, @@ -6138,7 +6626,7 @@ export const GeneratedCodeInfo: MessageFns<GeneratedCodeInfo> = { }, fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo>, I>>(object: I): GeneratedCodeInfo { const message = createBaseGeneratedCodeInfo(); - message.annotation = object.annotation?.map(e => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; + message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; return message; }, }; @@ -6243,7 +6731,7 @@ export const GeneratedCodeInfo_Annotation: MessageFns<GeneratedCodeInfo_Annotati toJSON(message: GeneratedCodeInfo_Annotation): unknown { const obj: any = {}; if (message.path?.length) { - obj.path = message.path.map(e => Math.round(e)); + obj.path = message.path.map((e) => Math.round(e)); } if (message.sourceFile !== undefined && message.sourceFile !== "") { obj.sourceFile = message.sourceFile; @@ -6265,7 +6753,7 @@ export const GeneratedCodeInfo_Annotation: MessageFns<GeneratedCodeInfo_Annotati }, fromPartial<I extends Exact<DeepPartial<GeneratedCodeInfo_Annotation>, I>>(object: I): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map(e => e) || []; + message.path = object.path?.map((e) => e) || []; message.sourceFile = object.sourceFile ?? ""; message.begin = object.begin ?? 0; message.end = object.end ?? 0; @@ -6292,7 +6780,7 @@ function base64FromBytes(arr: Uint8Array): string { return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; - arr.forEach(byte => { + arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); return globalThis.btoa(bin.join("")); @@ -6301,19 +6789,14 @@ function base64FromBytes(arr: Uint8Array): string { type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial<T> = T extends Builtin - ? T - : T extends globalThis.Array<infer U> - ? globalThis.Array<DeepPartial<U>> - : T extends ReadonlyArray<infer U> - ? ReadonlyArray<DeepPartial<U>> - : T extends {} - ? { [K in keyof T]?: DeepPartial<T[K]> } - : Partial<T>; +export type DeepPartial<T> = T extends Builtin ? T + : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> + : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> + : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } + : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; -export type Exact<P, I extends P> = P extends Builtin - ? P +export type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never }; function longToNumber(int64: { toString(): string }): number { diff --git a/frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/virtualidentity.ts b/frontend/src/app/common/type/proto/org/apache/texera/amber/core/virtualidentity.ts similarity index 88% rename from frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/virtualidentity.ts rename to frontend/src/app/common/type/proto/org/apache/texera/amber/core/virtualidentity.ts index 9b1b10d0c7..92952cad7f 100644 --- a/frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/virtualidentity.ts +++ b/frontend/src/app/common/type/proto/org/apache/texera/amber/core/virtualidentity.ts @@ -1,32 +1,13 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.2.0 -// protoc v5.28.3 -// source: org/apache/amber/engine/common/virtualidentity.proto +// protoc v6.33.4 +// source: org/apache/texera/amber/core/virtualidentity.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -export const protobufPackage = "org.apache.texera.amber.engine.common"; +export const protobufPackage = "org.apache.texera.amber.core"; export interface WorkflowIdentity { id: number; @@ -312,14 +293,12 @@ export const ChannelIdentity: MessageFns<ChannelIdentity> = { }, fromPartial<I extends Exact<DeepPartial<ChannelIdentity>, I>>(object: I): ChannelIdentity { const message = createBaseChannelIdentity(); - message.fromWorkerId = - object.fromWorkerId !== undefined && object.fromWorkerId !== null - ? ActorVirtualIdentity.fromPartial(object.fromWorkerId) - : undefined; - message.toWorkerId = - object.toWorkerId !== undefined && object.toWorkerId !== null - ? ActorVirtualIdentity.fromPartial(object.toWorkerId) - : undefined; + message.fromWorkerId = (object.fromWorkerId !== undefined && object.fromWorkerId !== null) + ? ActorVirtualIdentity.fromPartial(object.fromWorkerId) + : undefined; + message.toWorkerId = (object.toWorkerId !== undefined && object.toWorkerId !== null) + ? ActorVirtualIdentity.fromPartial(object.toWorkerId) + : undefined; message.isControl = object.isControl ?? false; return message; }, @@ -450,10 +429,9 @@ export const PhysicalOpIdentity: MessageFns<PhysicalOpIdentity> = { }, fromPartial<I extends Exact<DeepPartial<PhysicalOpIdentity>, I>>(object: I): PhysicalOpIdentity { const message = createBasePhysicalOpIdentity(); - message.logicalOpId = - object.logicalOpId !== undefined && object.logicalOpId !== null - ? OperatorIdentity.fromPartial(object.logicalOpId) - : undefined; + message.logicalOpId = (object.logicalOpId !== undefined && object.logicalOpId !== null) + ? OperatorIdentity.fromPartial(object.logicalOpId) + : undefined; message.layerName = object.layerName ?? ""; return message; }, @@ -509,7 +487,9 @@ export const EmbeddedControlMessageIdentity: MessageFns<EmbeddedControlMessageId create<I extends Exact<DeepPartial<EmbeddedControlMessageIdentity>, I>>(base?: I): EmbeddedControlMessageIdentity { return EmbeddedControlMessageIdentity.fromPartial(base ?? ({} as any)); }, - fromPartial<I extends Exact<DeepPartial<EmbeddedControlMessageIdentity>, I>>(object: I): EmbeddedControlMessageIdentity { + fromPartial<I extends Exact<DeepPartial<EmbeddedControlMessageIdentity>, I>>( + object: I, + ): EmbeddedControlMessageIdentity { const message = createBaseEmbeddedControlMessageIdentity(); message.id = object.id ?? ""; return message; @@ -518,19 +498,14 @@ export const EmbeddedControlMessageIdentity: MessageFns<EmbeddedControlMessageId type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial<T> = T extends Builtin - ? T - : T extends globalThis.Array<infer U> - ? globalThis.Array<DeepPartial<U>> - : T extends ReadonlyArray<infer U> - ? ReadonlyArray<DeepPartial<U>> - : T extends {} - ? { [K in keyof T]?: DeepPartial<T[K]> } - : Partial<T>; +export type DeepPartial<T> = T extends Builtin ? T + : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> + : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> + : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } + : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; -export type Exact<P, I extends P> = P extends Builtin - ? P +export type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never }; function longToNumber(int64: { toString(): string }): number { diff --git a/frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/workflow.ts b/frontend/src/app/common/type/proto/org/apache/texera/amber/core/workflow.ts similarity index 65% rename from frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/workflow.ts rename to frontend/src/app/common/type/proto/org/apache/texera/amber/core/workflow.ts index 05dc6cde45..04371d42bf 100644 --- a/frontend/src/app/common/type/proto/org/apache/texera/amber/engine/common/workflow.ts +++ b/frontend/src/app/common/type/proto/org/apache/texera/amber/core/workflow.ts @@ -1,39 +1,26 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.2.0 -// protoc v5.28.3 -// source: org/apache/amber/engine/common/workflow.proto +// protoc v6.33.4 +// source: org/apache/texera/amber/core/workflow.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { PhysicalOpIdentity } from "./virtualidentity"; -export const protobufPackage = "org.apache.texera.amber.engine.common"; +export const protobufPackage = "org.apache.texera.amber.core"; export interface PortIdentity { id: number; internal: boolean; } +export interface GlobalPortIdentity { + opId: PhysicalOpIdentity | undefined; + portId: PortIdentity | undefined; + input: boolean; +} + export interface InputPort { id: PortIdentity | undefined; displayName: string; @@ -45,6 +32,53 @@ export interface OutputPort { id: PortIdentity | undefined; displayName: string; blocking: boolean; + mode: OutputPort_OutputMode; +} + +export enum OutputPort_OutputMode { + /** SET_SNAPSHOT - outputs complete result set snapshot for each update */ + SET_SNAPSHOT = 0, + /** SET_DELTA - outputs incremental result set delta for each update */ + SET_DELTA = 1, + /** + * SINGLE_SNAPSHOT - outputs a single snapshot for the entire execution, + * used explicitly to support visualization operators that may exceed the memory limit + * TODO: remove this mode after we have a better solution for output size limit + */ + SINGLE_SNAPSHOT = 2, + UNRECOGNIZED = -1, +} + +export function outputPort_OutputModeFromJSON(object: any): OutputPort_OutputMode { + switch (object) { + case 0: + case "SET_SNAPSHOT": + return OutputPort_OutputMode.SET_SNAPSHOT; + case 1: + case "SET_DELTA": + return OutputPort_OutputMode.SET_DELTA; + case 2: + case "SINGLE_SNAPSHOT": + return OutputPort_OutputMode.SINGLE_SNAPSHOT; + case -1: + case "UNRECOGNIZED": + default: + return OutputPort_OutputMode.UNRECOGNIZED; + } +} + +export function outputPort_OutputModeToJSON(object: OutputPort_OutputMode): string { + switch (object) { + case OutputPort_OutputMode.SET_SNAPSHOT: + return "SET_SNAPSHOT"; + case OutputPort_OutputMode.SET_DELTA: + return "SET_DELTA"; + case OutputPort_OutputMode.SINGLE_SNAPSHOT: + return "SINGLE_SNAPSHOT"; + case OutputPort_OutputMode.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } } export interface PhysicalLink { @@ -128,6 +162,99 @@ export const PortIdentity: MessageFns<PortIdentity> = { }, }; +function createBaseGlobalPortIdentity(): GlobalPortIdentity { + return { opId: undefined, portId: undefined, input: false }; +} + +export const GlobalPortIdentity: MessageFns<GlobalPortIdentity> = { + encode(message: GlobalPortIdentity, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.opId !== undefined) { + PhysicalOpIdentity.encode(message.opId, writer.uint32(10).fork()).join(); + } + if (message.portId !== undefined) { + PortIdentity.encode(message.portId, writer.uint32(18).fork()).join(); + } + if (message.input !== false) { + writer.uint32(24).bool(message.input); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GlobalPortIdentity { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGlobalPortIdentity(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.opId = PhysicalOpIdentity.decode(reader, reader.uint32()); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.portId = PortIdentity.decode(reader, reader.uint32()); + continue; + case 3: + if (tag !== 24) { + break; + } + + message.input = reader.bool(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GlobalPortIdentity { + return { + opId: isSet(object.opId) ? PhysicalOpIdentity.fromJSON(object.opId) : undefined, + portId: isSet(object.portId) ? PortIdentity.fromJSON(object.portId) : undefined, + input: isSet(object.input) ? globalThis.Boolean(object.input) : false, + }; + }, + + toJSON(message: GlobalPortIdentity): unknown { + const obj: any = {}; + if (message.opId !== undefined) { + obj.opId = PhysicalOpIdentity.toJSON(message.opId); + } + if (message.portId !== undefined) { + obj.portId = PortIdentity.toJSON(message.portId); + } + if (message.input !== false) { + obj.input = message.input; + } + return obj; + }, + + create<I extends Exact<DeepPartial<GlobalPortIdentity>, I>>(base?: I): GlobalPortIdentity { + return GlobalPortIdentity.fromPartial(base ?? ({} as any)); + }, + fromPartial<I extends Exact<DeepPartial<GlobalPortIdentity>, I>>(object: I): GlobalPortIdentity { + const message = createBaseGlobalPortIdentity(); + message.opId = (object.opId !== undefined && object.opId !== null) + ? PhysicalOpIdentity.fromPartial(object.opId) + : undefined; + message.portId = (object.portId !== undefined && object.portId !== null) + ? PortIdentity.fromPartial(object.portId) + : undefined; + message.input = object.input ?? false; + return message; + }, +}; + function createBaseInputPort(): InputPort { return { id: undefined, displayName: "", allowMultiLinks: false, dependencies: [] }; } @@ -216,7 +343,7 @@ export const InputPort: MessageFns<InputPort> = { obj.allowMultiLinks = message.allowMultiLinks; } if (message.dependencies?.length) { - obj.dependencies = message.dependencies.map(e => PortIdentity.toJSON(e)); + obj.dependencies = message.dependencies.map((e) => PortIdentity.toJSON(e)); } return obj; }, @@ -226,16 +353,16 @@ export const InputPort: MessageFns<InputPort> = { }, fromPartial<I extends Exact<DeepPartial<InputPort>, I>>(object: I): InputPort { const message = createBaseInputPort(); - message.id = object.id !== undefined && object.id !== null ? PortIdentity.fromPartial(object.id) : undefined; + message.id = (object.id !== undefined && object.id !== null) ? PortIdentity.fromPartial(object.id) : undefined; message.displayName = object.displayName ?? ""; message.allowMultiLinks = object.allowMultiLinks ?? false; - message.dependencies = object.dependencies?.map(e => PortIdentity.fromPartial(e)) || []; + message.dependencies = object.dependencies?.map((e) => PortIdentity.fromPartial(e)) || []; return message; }, }; function createBaseOutputPort(): OutputPort { - return { id: undefined, displayName: "", blocking: false }; + return { id: undefined, displayName: "", blocking: false, mode: 0 }; } export const OutputPort: MessageFns<OutputPort> = { @@ -249,6 +376,9 @@ export const OutputPort: MessageFns<OutputPort> = { if (message.blocking !== false) { writer.uint32(24).bool(message.blocking); } + if (message.mode !== 0) { + writer.uint32(32).int32(message.mode); + } return writer; }, @@ -280,6 +410,13 @@ export const OutputPort: MessageFns<OutputPort> = { message.blocking = reader.bool(); continue; + case 4: + if (tag !== 32) { + break; + } + + message.mode = reader.int32() as any; + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -294,6 +431,7 @@ export const OutputPort: MessageFns<OutputPort> = { id: isSet(object.id) ? PortIdentity.fromJSON(object.id) : undefined, displayName: isSet(object.displayName) ? globalThis.String(object.displayName) : "", blocking: isSet(object.blocking) ? globalThis.Boolean(object.blocking) : false, + mode: isSet(object.mode) ? outputPort_OutputModeFromJSON(object.mode) : 0, }; }, @@ -308,6 +446,9 @@ export const OutputPort: MessageFns<OutputPort> = { if (message.blocking !== false) { obj.blocking = message.blocking; } + if (message.mode !== 0) { + obj.mode = outputPort_OutputModeToJSON(message.mode); + } return obj; }, @@ -316,9 +457,10 @@ export const OutputPort: MessageFns<OutputPort> = { }, fromPartial<I extends Exact<DeepPartial<OutputPort>, I>>(object: I): OutputPort { const message = createBaseOutputPort(); - message.id = object.id !== undefined && object.id !== null ? PortIdentity.fromPartial(object.id) : undefined; + message.id = (object.id !== undefined && object.id !== null) ? PortIdentity.fromPartial(object.id) : undefined; message.displayName = object.displayName ?? ""; message.blocking = object.blocking ?? false; + message.mode = object.mode ?? 0; return message; }, }; @@ -419,37 +561,32 @@ export const PhysicalLink: MessageFns<PhysicalLink> = { }, fromPartial<I extends Exact<DeepPartial<PhysicalLink>, I>>(object: I): PhysicalLink { const message = createBasePhysicalLink(); - message.fromOpId = - object.fromOpId !== undefined && object.fromOpId !== null - ? PhysicalOpIdentity.fromPartial(object.fromOpId) - : undefined; - message.fromPortId = - object.fromPortId !== undefined && object.fromPortId !== null - ? PortIdentity.fromPartial(object.fromPortId) - : undefined; - message.toOpId = - object.toOpId !== undefined && object.toOpId !== null ? PhysicalOpIdentity.fromPartial(object.toOpId) : undefined; - message.toPortId = - object.toPortId !== undefined && object.toPortId !== null ? PortIdentity.fromPartial(object.toPortId) : undefined; + message.fromOpId = (object.fromOpId !== undefined && object.fromOpId !== null) + ? PhysicalOpIdentity.fromPartial(object.fromOpId) + : undefined; + message.fromPortId = (object.fromPortId !== undefined && object.fromPortId !== null) + ? PortIdentity.fromPartial(object.fromPortId) + : undefined; + message.toOpId = (object.toOpId !== undefined && object.toOpId !== null) + ? PhysicalOpIdentity.fromPartial(object.toOpId) + : undefined; + message.toPortId = (object.toPortId !== undefined && object.toPortId !== null) + ? PortIdentity.fromPartial(object.toPortId) + : undefined; return message; }, }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial<T> = T extends Builtin - ? T - : T extends globalThis.Array<infer U> - ? globalThis.Array<DeepPartial<U>> - : T extends ReadonlyArray<infer U> - ? ReadonlyArray<DeepPartial<U>> - : T extends {} - ? { [K in keyof T]?: DeepPartial<T[K]> } - : Partial<T>; +export type DeepPartial<T> = T extends Builtin ? T + : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> + : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> + : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } + : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; -export type Exact<P, I extends P> = P extends Builtin - ? P +export type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never }; function isSet(value: any): boolean { diff --git a/frontend/src/app/common/type/proto/scalapb/scalapb.ts b/frontend/src/app/common/type/proto/scalapb/scalapb.ts index f1432ae38b..1aca3bb179 100644 --- a/frontend/src/app/common/type/proto/scalapb/scalapb.ts +++ b/frontend/src/app/common/type/proto/scalapb/scalapb.ts @@ -1,26 +1,7 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.2.0 -// protoc v5.28.3 +// protoc v6.33.4 // source: scalapb/scalapb.proto /* eslint-disable */ @@ -70,14 +51,18 @@ export function matchTypeToJSON(object: MatchType): string { export interface ScalaPbOptions { /** If set then it overrides the java_package and package. */ - packageName?: string | undefined; + packageName?: + | string + | undefined; /** * If true, the compiler does not append the proto base file name * into the generated package name. If false (the default), the * generated scala package name is the package_name.basename where * basename is the proto file name without the .proto extension. */ - flatPackage?: boolean | undefined; + flatPackage?: + | boolean + | undefined; /** * Adds the following imports at the top of the file (this is meant * to provide implicit TypeMappers) @@ -92,65 +77,93 @@ export interface ScalaPbOptions { * If true, all messages and enums (but not services) will be written * to a single Scala file. */ - singleFile?: boolean | undefined; + singleFile?: + | boolean + | undefined; /** * By default, wrappers defined at * https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto, * are mapped to an Option[T] where T is a primitive type. When this field * is set to true, we do not perform this transformation. */ - noPrimitiveWrappers?: boolean | undefined; + noPrimitiveWrappers?: + | boolean + | undefined; /** * DEPRECATED. In ScalaPB <= 0.5.47, it was necessary to explicitly enable * primitive_wrappers. This field remains here for backwards compatibility, * but it has no effect on generated code. It is an error to set both * `primitive_wrappers` and `no_primitive_wrappers`. */ - primitiveWrappers?: boolean | undefined; + primitiveWrappers?: + | boolean + | undefined; /** * Scala type to be used for repeated fields. If unspecified, * `scala.collection.Seq` will be used. */ - collectionType?: string | undefined; + collectionType?: + | string + | undefined; /** * If set to true, all generated messages in this file will preserve unknown * fields. */ - preserveUnknownFields?: boolean | undefined; + preserveUnknownFields?: + | boolean + | undefined; /** * If defined, sets the name of the file-level object that would be generated. This * object extends `GeneratedFileObject` and contains descriptors, and list of message * and enum companions. */ - objectName?: string | undefined; + objectName?: + | string + | undefined; /** Experimental: scope to apply the given options. */ - scope?: ScalaPbOptions_OptionsScope | undefined; + scope?: + | ScalaPbOptions_OptionsScope + | undefined; /** If true, lenses will be generated. */ - lenses?: boolean | undefined; + lenses?: + | boolean + | undefined; /** * If true, then source-code info information will be included in the * generated code - normally the source code info is cleared out to reduce * code size. The source code info is useful for extracting source code * location from the descriptors as well as comments. */ - retainSourceCodeInfo?: boolean | undefined; + retainSourceCodeInfo?: + | boolean + | undefined; /** * Scala type to be used for maps. If unspecified, * `scala.collection.immutable.Map` will be used. */ - mapType?: string | undefined; + mapType?: + | string + | undefined; /** If true, no default values will be generated in message constructors. */ noDefaultValuesInConstructor?: boolean | undefined; - enumValueNaming?: ScalaPbOptions_EnumValueNaming | undefined; + enumValueNaming?: + | ScalaPbOptions_EnumValueNaming + | undefined; /** * Indicate if prefix (enum name + optional underscore) should be removed in scala code * Strip is applied before enum value naming changes. */ - enumStripPrefix?: boolean | undefined; + enumStripPrefix?: + | boolean + | undefined; /** Scala type to use for bytes fields. */ - bytesType?: string | undefined; + bytesType?: + | string + | undefined; /** Enable java conversions for this file. */ - javaConversions?: boolean | undefined; + javaConversions?: + | boolean + | undefined; /** List of message options to apply to some messages. */ auxMessageOptions: ScalaPbOptions_AuxMessageOptions[]; /** List of message options to apply to some fields. */ @@ -166,9 +179,13 @@ export interface ScalaPbOptions { * Ignores all transformations for this file. This is meant to allow specific files to * opt out from transformations inherited through package-scoped options. */ - ignoreAllTransformations?: boolean | undefined; + ignoreAllTransformations?: + | boolean + | undefined; /** If true, getters will be generated. */ - getters?: boolean | undefined; + getters?: + | boolean + | undefined; /** * For use in tests only. Inhibit Java conversions even when when generator parameters * request for it. @@ -255,7 +272,9 @@ export function scalaPbOptions_EnumValueNamingToJSON(object: ScalaPbOptions_Enum */ export interface ScalaPbOptions_AuxMessageOptions { /** The fully-qualified name of the message in the proto name space. */ - target?: string | undefined; + target?: + | string + | undefined; /** * Options to apply to the message. If there are any options defined on the target message * they take precedence over the options. @@ -270,7 +289,9 @@ export interface ScalaPbOptions_AuxMessageOptions { */ export interface ScalaPbOptions_AuxFieldOptions { /** The fully-qualified name of the field in the proto name space. */ - target?: string | undefined; + target?: + | string + | undefined; /** * Options to apply to the field. If there are any options defined on the target message * they take precedence over the options. @@ -285,7 +306,9 @@ export interface ScalaPbOptions_AuxFieldOptions { */ export interface ScalaPbOptions_AuxEnumOptions { /** The fully-qualified name of the enum in the proto name space. */ - target?: string | undefined; + target?: + | string + | undefined; /** * Options to apply to the enum. If there are any options defined on the target enum * they take precedence over the options. @@ -300,7 +323,9 @@ export interface ScalaPbOptions_AuxEnumOptions { */ export interface ScalaPbOptions_AuxEnumValueOptions { /** The fully-qualified name of the enum value in the proto name space. */ - target?: string | undefined; + target?: + | string + | undefined; /** * Options to apply to the enum value. If there are any options defined on * the target enum value they take precedence over the options. @@ -319,7 +344,9 @@ export interface MessageOptions { * All instances of this message will be converted to this type. An implicit TypeMapper * must be present. */ - type?: string | undefined; + type?: + | string + | undefined; /** Custom annotations to add to the companion object of the generated class. */ companionAnnotations: string[]; /** Additional classes and traits to mix in to generated sealed_oneof base trait. */ @@ -328,7 +355,9 @@ export interface MessageOptions { * If true, when this message is used as an optional field, do not wrap it in an `Option`. * This is equivalent of setting `(field).no_box` to true on each field with the message type. */ - noBox?: boolean | undefined; + noBox?: + | boolean + | undefined; /** Custom annotations to add to the generated `unknownFields` case class field. */ unknownFieldsAnnotations: string[]; } @@ -339,13 +368,17 @@ export interface MessageOptions { */ export interface Collection { /** Type of the collection */ - type?: string | undefined; + type?: + | string + | undefined; /** * Set to true if this collection type is not allowed to be empty, for example * cats.data.NonEmptyList. When true, ScalaPB will not generate `clearX` for the repeated * field and not provide a default argument in the constructor. */ - nonEmpty?: boolean | undefined; + nonEmpty?: + | boolean + | undefined; /** * An Adapter is a Scala object available at runtime that provides certain static methods * that can operate on this collection type. @@ -355,20 +388,26 @@ export interface Collection { export interface FieldOptions { type?: string | undefined; - scalaName?: string | undefined; + scalaName?: + | string + | undefined; /** * Can be specified only if this field is repeated. If unspecified, * it falls back to the file option named `collection_type`, which defaults * to `scala.collection.Seq`. */ collectionType?: string | undefined; - collection?: Collection | undefined; + collection?: + | Collection + | undefined; /** * If the field is a map, you can specify custom Scala types for the key * or value. */ keyType?: string | undefined; - valueType?: string | undefined; + valueType?: + | string + | undefined; /** Custom annotations to add to the field. */ annotations: string[]; /** @@ -376,9 +415,13 @@ export interface FieldOptions { * it falls back to the file option named `map_type` which defaults to * `scala.collection.immutable.Map` */ - mapType?: string | undefined; + mapType?: + | string + | undefined; /** Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box */ - noBox?: boolean | undefined; + noBox?: + | boolean + | undefined; /** * Like no_box it does not box a value in Option[T], but also fails parsing when a value * is not provided. This enables to emulate required fields in proto3. @@ -395,7 +438,9 @@ export interface EnumOptions { * All instances of this enum will be converted to this type. An implicit TypeMapper * must be present. */ - type?: string | undefined; + type?: + | string + | undefined; /** Custom annotations to add to the generated enum's base class. */ baseAnnotations: string[]; /** Custom annotations to add to the generated trait. */ @@ -408,7 +453,9 @@ export interface EnumValueOptions { /** Additional classes and traits to mix in to an individual enum value. */ extends: string[]; /** Name in Scala to use for this enum value. */ - scalaName?: string | undefined; + scalaName?: + | string + | undefined; /** Custom annotations to add to the generated case object for this enum value. */ annotations: string[]; } @@ -886,22 +933,22 @@ export const ScalaPbOptions: MessageFns<ScalaPbOptions> = { obj.javaConversions = message.javaConversions; } if (message.auxMessageOptions?.length) { - obj.auxMessageOptions = message.auxMessageOptions.map(e => ScalaPbOptions_AuxMessageOptions.toJSON(e)); + obj.auxMessageOptions = message.auxMessageOptions.map((e) => ScalaPbOptions_AuxMessageOptions.toJSON(e)); } if (message.auxFieldOptions?.length) { - obj.auxFieldOptions = message.auxFieldOptions.map(e => ScalaPbOptions_AuxFieldOptions.toJSON(e)); + obj.auxFieldOptions = message.auxFieldOptions.map((e) => ScalaPbOptions_AuxFieldOptions.toJSON(e)); } if (message.auxEnumOptions?.length) { - obj.auxEnumOptions = message.auxEnumOptions.map(e => ScalaPbOptions_AuxEnumOptions.toJSON(e)); + obj.auxEnumOptions = message.auxEnumOptions.map((e) => ScalaPbOptions_AuxEnumOptions.toJSON(e)); } if (message.auxEnumValueOptions?.length) { - obj.auxEnumValueOptions = message.auxEnumValueOptions.map(e => ScalaPbOptions_AuxEnumValueOptions.toJSON(e)); + obj.auxEnumValueOptions = message.auxEnumValueOptions.map((e) => ScalaPbOptions_AuxEnumValueOptions.toJSON(e)); } if (message.preprocessors?.length) { obj.preprocessors = message.preprocessors; } if (message.fieldTransformations?.length) { - obj.fieldTransformations = message.fieldTransformations.map(e => FieldTransformation.toJSON(e)); + obj.fieldTransformations = message.fieldTransformations.map((e) => FieldTransformation.toJSON(e)); } if (message.ignoreAllTransformations !== undefined && message.ignoreAllTransformations !== false) { obj.ignoreAllTransformations = message.ignoreAllTransformations; @@ -922,8 +969,8 @@ export const ScalaPbOptions: MessageFns<ScalaPbOptions> = { const message = createBaseScalaPbOptions(); message.packageName = object.packageName ?? ""; message.flatPackage = object.flatPackage ?? false; - message.import = object.import?.map(e => e) || []; - message.preamble = object.preamble?.map(e => e) || []; + message.import = object.import?.map((e) => e) || []; + message.preamble = object.preamble?.map((e) => e) || []; message.singleFile = object.singleFile ?? false; message.noPrimitiveWrappers = object.noPrimitiveWrappers ?? false; message.primitiveWrappers = object.primitiveWrappers ?? false; @@ -939,14 +986,14 @@ export const ScalaPbOptions: MessageFns<ScalaPbOptions> = { message.enumStripPrefix = object.enumStripPrefix ?? false; message.bytesType = object.bytesType ?? ""; message.javaConversions = object.javaConversions ?? false; - message.auxMessageOptions = - object.auxMessageOptions?.map(e => ScalaPbOptions_AuxMessageOptions.fromPartial(e)) || []; - message.auxFieldOptions = object.auxFieldOptions?.map(e => ScalaPbOptions_AuxFieldOptions.fromPartial(e)) || []; - message.auxEnumOptions = object.auxEnumOptions?.map(e => ScalaPbOptions_AuxEnumOptions.fromPartial(e)) || []; + message.auxMessageOptions = object.auxMessageOptions?.map((e) => ScalaPbOptions_AuxMessageOptions.fromPartial(e)) || + []; + message.auxFieldOptions = object.auxFieldOptions?.map((e) => ScalaPbOptions_AuxFieldOptions.fromPartial(e)) || []; + message.auxEnumOptions = object.auxEnumOptions?.map((e) => ScalaPbOptions_AuxEnumOptions.fromPartial(e)) || []; message.auxEnumValueOptions = - object.auxEnumValueOptions?.map(e => ScalaPbOptions_AuxEnumValueOptions.fromPartial(e)) || []; - message.preprocessors = object.preprocessors?.map(e => e) || []; - message.fieldTransformations = object.fieldTransformations?.map(e => FieldTransformation.fromPartial(e)) || []; + object.auxEnumValueOptions?.map((e) => ScalaPbOptions_AuxEnumValueOptions.fromPartial(e)) || []; + message.preprocessors = object.preprocessors?.map((e) => e) || []; + message.fieldTransformations = object.fieldTransformations?.map((e) => FieldTransformation.fromPartial(e)) || []; message.ignoreAllTransformations = object.ignoreAllTransformations ?? false; message.getters = object.getters ?? true; message.testOnlyNoJavaConversions = object.testOnlyNoJavaConversions ?? false; @@ -1018,17 +1065,18 @@ export const ScalaPbOptions_AuxMessageOptions: MessageFns<ScalaPbOptions_AuxMess }, create<I extends Exact<DeepPartial<ScalaPbOptions_AuxMessageOptions>, I>>( - base?: I + base?: I, ): ScalaPbOptions_AuxMessageOptions { return ScalaPbOptions_AuxMessageOptions.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<ScalaPbOptions_AuxMessageOptions>, I>>( - object: I + object: I, ): ScalaPbOptions_AuxMessageOptions { const message = createBaseScalaPbOptions_AuxMessageOptions(); message.target = object.target ?? ""; - message.options = - object.options !== undefined && object.options !== null ? MessageOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? MessageOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -1100,12 +1148,13 @@ export const ScalaPbOptions_AuxFieldOptions: MessageFns<ScalaPbOptions_AuxFieldO return ScalaPbOptions_AuxFieldOptions.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<ScalaPbOptions_AuxFieldOptions>, I>>( - object: I + object: I, ): ScalaPbOptions_AuxFieldOptions { const message = createBaseScalaPbOptions_AuxFieldOptions(); message.target = object.target ?? ""; - message.options = - object.options !== undefined && object.options !== null ? FieldOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? FieldOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -1177,12 +1226,13 @@ export const ScalaPbOptions_AuxEnumOptions: MessageFns<ScalaPbOptions_AuxEnumOpt return ScalaPbOptions_AuxEnumOptions.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<ScalaPbOptions_AuxEnumOptions>, I>>( - object: I + object: I, ): ScalaPbOptions_AuxEnumOptions { const message = createBaseScalaPbOptions_AuxEnumOptions(); message.target = object.target ?? ""; - message.options = - object.options !== undefined && object.options !== null ? EnumOptions.fromPartial(object.options) : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? EnumOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -1251,19 +1301,18 @@ export const ScalaPbOptions_AuxEnumValueOptions: MessageFns<ScalaPbOptions_AuxEn }, create<I extends Exact<DeepPartial<ScalaPbOptions_AuxEnumValueOptions>, I>>( - base?: I + base?: I, ): ScalaPbOptions_AuxEnumValueOptions { return ScalaPbOptions_AuxEnumValueOptions.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<ScalaPbOptions_AuxEnumValueOptions>, I>>( - object: I + object: I, ): ScalaPbOptions_AuxEnumValueOptions { const message = createBaseScalaPbOptions_AuxEnumValueOptions(); message.target = object.target ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? EnumValueOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -1439,14 +1488,14 @@ export const MessageOptions: MessageFns<MessageOptions> = { }, fromPartial<I extends Exact<DeepPartial<MessageOptions>, I>>(object: I): MessageOptions { const message = createBaseMessageOptions(); - message.extends = object.extends?.map(e => e) || []; - message.companionExtends = object.companionExtends?.map(e => e) || []; - message.annotations = object.annotations?.map(e => e) || []; + message.extends = object.extends?.map((e) => e) || []; + message.companionExtends = object.companionExtends?.map((e) => e) || []; + message.annotations = object.annotations?.map((e) => e) || []; message.type = object.type ?? ""; - message.companionAnnotations = object.companionAnnotations?.map(e => e) || []; - message.sealedOneofExtends = object.sealedOneofExtends?.map(e => e) || []; + message.companionAnnotations = object.companionAnnotations?.map((e) => e) || []; + message.sealedOneofExtends = object.sealedOneofExtends?.map((e) => e) || []; message.noBox = object.noBox ?? false; - message.unknownFieldsAnnotations = object.unknownFieldsAnnotations?.map(e => e) || []; + message.unknownFieldsAnnotations = object.unknownFieldsAnnotations?.map((e) => e) || []; return message; }, }; @@ -1736,13 +1785,12 @@ export const FieldOptions: MessageFns<FieldOptions> = { message.type = object.type ?? ""; message.scalaName = object.scalaName ?? ""; message.collectionType = object.collectionType ?? ""; - message.collection = - object.collection !== undefined && object.collection !== null - ? Collection.fromPartial(object.collection) - : undefined; + message.collection = (object.collection !== undefined && object.collection !== null) + ? Collection.fromPartial(object.collection) + : undefined; message.keyType = object.keyType ?? ""; message.valueType = object.valueType ?? ""; - message.annotations = object.annotations?.map(e => e) || []; + message.annotations = object.annotations?.map((e) => e) || []; message.mapType = object.mapType ?? ""; message.noBox = object.noBox ?? false; message.required = object.required ?? false; @@ -1889,12 +1937,12 @@ export const EnumOptions: MessageFns<EnumOptions> = { }, fromPartial<I extends Exact<DeepPartial<EnumOptions>, I>>(object: I): EnumOptions { const message = createBaseEnumOptions(); - message.extends = object.extends?.map(e => e) || []; - message.companionExtends = object.companionExtends?.map(e => e) || []; + message.extends = object.extends?.map((e) => e) || []; + message.companionExtends = object.companionExtends?.map((e) => e) || []; message.type = object.type ?? ""; - message.baseAnnotations = object.baseAnnotations?.map(e => e) || []; - message.recognizedAnnotations = object.recognizedAnnotations?.map(e => e) || []; - message.unrecognizedAnnotations = object.unrecognizedAnnotations?.map(e => e) || []; + message.baseAnnotations = object.baseAnnotations?.map((e) => e) || []; + message.recognizedAnnotations = object.recognizedAnnotations?.map((e) => e) || []; + message.unrecognizedAnnotations = object.unrecognizedAnnotations?.map((e) => e) || []; return message; }, }; @@ -1983,9 +2031,9 @@ export const EnumValueOptions: MessageFns<EnumValueOptions> = { }, fromPartial<I extends Exact<DeepPartial<EnumValueOptions>, I>>(object: I): EnumValueOptions { const message = createBaseEnumValueOptions(); - message.extends = object.extends?.map(e => e) || []; + message.extends = object.extends?.map((e) => e) || []; message.scalaName = object.scalaName ?? ""; - message.annotations = object.annotations?.map(e => e) || []; + message.annotations = object.annotations?.map((e) => e) || []; return message; }, }; @@ -2058,7 +2106,7 @@ export const OneofOptions: MessageFns<OneofOptions> = { }, fromPartial<I extends Exact<DeepPartial<OneofOptions>, I>>(object: I): OneofOptions { const message = createBaseOneofOptions(); - message.extends = object.extends?.map(e => e) || []; + message.extends = object.extends?.map((e) => e) || []; message.scalaName = object.scalaName ?? ""; return message; }, @@ -2146,10 +2194,11 @@ export const FieldTransformation: MessageFns<FieldTransformation> = { }, fromPartial<I extends Exact<DeepPartial<FieldTransformation>, I>>(object: I): FieldTransformation { const message = createBaseFieldTransformation(); - message.when = - object.when !== undefined && object.when !== null ? FieldDescriptorProto.fromPartial(object.when) : undefined; + message.when = (object.when !== undefined && object.when !== null) + ? FieldDescriptorProto.fromPartial(object.when) + : undefined; message.matchType = object.matchType ?? 0; - message.set = object.set !== undefined && object.set !== null ? FieldOptions1.fromPartial(object.set) : undefined; + message.set = (object.set !== undefined && object.set !== null) ? FieldOptions1.fromPartial(object.set) : undefined; return message; }, }; @@ -2196,9 +2245,9 @@ export const PreprocessorOutput: MessageFns<PreprocessorOutput> = { return { optionsByFile: isObject(object.optionsByFile) ? Object.entries(object.optionsByFile).reduce<{ [key: string]: ScalaPbOptions }>((acc, [key, value]) => { - acc[key] = ScalaPbOptions.fromJSON(value); - return acc; - }, {}) + acc[key] = ScalaPbOptions.fromJSON(value); + return acc; + }, {}) : {}, }; }, @@ -2229,7 +2278,7 @@ export const PreprocessorOutput: MessageFns<PreprocessorOutput> = { } return acc; }, - {} + {}, ); return message; }, @@ -2299,36 +2348,32 @@ export const PreprocessorOutput_OptionsByFileEntry: MessageFns<PreprocessorOutpu }, create<I extends Exact<DeepPartial<PreprocessorOutput_OptionsByFileEntry>, I>>( - base?: I + base?: I, ): PreprocessorOutput_OptionsByFileEntry { return PreprocessorOutput_OptionsByFileEntry.fromPartial(base ?? ({} as any)); }, fromPartial<I extends Exact<DeepPartial<PreprocessorOutput_OptionsByFileEntry>, I>>( - object: I + object: I, ): PreprocessorOutput_OptionsByFileEntry { const message = createBasePreprocessorOutput_OptionsByFileEntry(); message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null ? ScalaPbOptions.fromPartial(object.value) : undefined; + message.value = (object.value !== undefined && object.value !== null) + ? ScalaPbOptions.fromPartial(object.value) + : undefined; return message; }, }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -export type DeepPartial<T> = T extends Builtin - ? T - : T extends globalThis.Array<infer U> - ? globalThis.Array<DeepPartial<U>> - : T extends ReadonlyArray<infer U> - ? ReadonlyArray<DeepPartial<U>> - : T extends {} - ? { [K in keyof T]?: DeepPartial<T[K]> } - : Partial<T>; +export type DeepPartial<T> = T extends Builtin ? T + : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> + : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> + : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> } + : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; -export type Exact<P, I extends P> = P extends Builtin - ? P +export type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never }; function isObject(value: any): boolean { diff --git a/frontend/src/app/common/util/port-identity-serde.ts b/frontend/src/app/common/util/port-identity-serde.ts index 3041c7d454..f85501ced8 100644 --- a/frontend/src/app/common/util/port-identity-serde.ts +++ b/frontend/src/app/common/util/port-identity-serde.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { PortIdentity } from "../type/proto/org/apache/texera/amber/engine/common/workflow"; +import { PortIdentity } from "../type/proto/org/apache/texera/amber/core/workflow"; /** * Serializes a PortIdentity object to a string in the format "{isInput}-{id}-{internal}"
