diff --git a/packages/api/google/protobuf/any.ts b/packages/api/google/protobuf/any.ts index 1f3e89aeaf..99dfc69c1a 100644 --- a/packages/api/google/protobuf/any.ts +++ b/packages/api/google/protobuf/any.ts @@ -33,7 +33,7 @@ export const protobufPackage = "google.protobuf"; * foo = any.unpack(Foo.getDefaultInstance()); * } * - * Example 3: Pack and unpack a message in Python. + * Example 3: Pack and unpack a message in Python. * * foo = Foo(...) * any = Any() @@ -43,7 +43,7 @@ export const protobufPackage = "google.protobuf"; * any.Unpack(foo) * ... * - * Example 4: Pack and unpack a message in Go + * Example 4: Pack and unpack a message in Go * * foo := &pb.Foo{...} * any, err := anypb.New(foo) @@ -63,7 +63,7 @@ export const protobufPackage = "google.protobuf"; * name "y.z". * * JSON - * ==== + * * The JSON representation of an `Any` value uses the regular * representation of the deserialized, embedded message, with an * additional field `@type` which contains the type URL. Example: @@ -115,8 +115,7 @@ export interface Any { * * Note: this functionality is not currently available in the official * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. As of May 2023, there are no widely used type server - * implementations and no plans to implement one. + * type.googleapis.com. * * Schemes other than `http`, `https` (or the empty scheme) might be * used with implementation specific semantics. diff --git a/packages/api/marketplace/v1/marketplace.ts b/packages/api/marketplace/v1/marketplace.ts index 801d975bf1..a2921aef70 100644 --- a/packages/api/marketplace/v1/marketplace.ts +++ b/packages/api/marketplace/v1/marketplace.ts @@ -4485,9 +4485,7 @@ export class GrpcWebImpl { } }, }); - observer.add(() => { - return client.close(); - }); + observer.add(() => client.close()); }; upStream(); }).pipe(share()); diff --git a/packages/api/p2e/v1/p2e.ts b/packages/api/p2e/v1/p2e.ts index f0233e02ce..ecccb4cf45 100644 --- a/packages/api/p2e/v1/p2e.ts +++ b/packages/api/p2e/v1/p2e.ts @@ -1131,9 +1131,7 @@ export class GrpcWebImpl { } }, }); - observer.add(() => { - return client.close(); - }); + observer.add(() => client.close()); }; upStream(); }).pipe(share()); diff --git a/packages/api/weshnet/google/protobuf/descriptor.ts b/packages/api/weshnet/google/protobuf/descriptor.ts index c922333981..afbd56df56 100644 --- a/packages/api/weshnet/google/protobuf/descriptor.ts +++ b/packages/api/weshnet/google/protobuf/descriptor.ts @@ -4,98 +4,6 @@ import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.protobuf"; -/** The full set of known editions. */ -export enum Edition { - /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ - EDITION_UNKNOWN = 0, - /** - * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like - * distinct editions. These can't be used to specify the edition of proto - * files, but feature definitions must supply proto2/proto3 defaults for - * backwards compatibility. - */ - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - /** - * EDITION_2023 - Editions that have been released. The specific values are arbitrary and - * should not be depended on, but they will always be time-ordered for easy - * comparison. - */ - EDITION_2023 = 1000, - /** - * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be - * used or relyed on outside of tests. - */ - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - UNRECOGNIZED = -1, -} - -export function editionFromJSON(object: any): Edition { - switch (object) { - case 0: - case "EDITION_UNKNOWN": - return Edition.EDITION_UNKNOWN; - case 998: - case "EDITION_PROTO2": - return Edition.EDITION_PROTO2; - case 999: - case "EDITION_PROTO3": - return Edition.EDITION_PROTO3; - case 1000: - case "EDITION_2023": - return Edition.EDITION_2023; - case 1: - case "EDITION_1_TEST_ONLY": - return Edition.EDITION_1_TEST_ONLY; - case 2: - case "EDITION_2_TEST_ONLY": - return Edition.EDITION_2_TEST_ONLY; - case 99997: - case "EDITION_99997_TEST_ONLY": - return Edition.EDITION_99997_TEST_ONLY; - case 99998: - case "EDITION_99998_TEST_ONLY": - return Edition.EDITION_99998_TEST_ONLY; - case 99999: - case "EDITION_99999_TEST_ONLY": - return Edition.EDITION_99999_TEST_ONLY; - case -1: - case "UNRECOGNIZED": - default: - return Edition.UNRECOGNIZED; - } -} - -export function editionToJSON(object: Edition): string { - switch (object) { - case Edition.EDITION_UNKNOWN: - return "EDITION_UNKNOWN"; - case Edition.EDITION_PROTO2: - return "EDITION_PROTO2"; - case Edition.EDITION_PROTO3: - return "EDITION_PROTO3"; - case Edition.EDITION_2023: - return "EDITION_2023"; - case Edition.EDITION_1_TEST_ONLY: - return "EDITION_1_TEST_ONLY"; - case Edition.EDITION_2_TEST_ONLY: - return "EDITION_2_TEST_ONLY"; - case Edition.EDITION_99997_TEST_ONLY: - return "EDITION_99997_TEST_ONLY"; - case Edition.EDITION_99998_TEST_ONLY: - return "EDITION_99998_TEST_ONLY"; - case Edition.EDITION_99999_TEST_ONLY: - return "EDITION_99999_TEST_ONLY"; - case Edition.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - /** * The protocol compiler can output a FileDescriptorSet containing the .proto * files it parses. @@ -143,8 +51,8 @@ export interface FileDescriptorProto { * If `edition` is present, this value must be "editions". */ syntax: string; - /** The edition of the proto file. */ - edition: Edition; + /** The edition of the proto file, which is an opaque string. */ + edition: string; } /** Describes a message type. */ @@ -188,84 +96,6 @@ export interface DescriptorProto_ReservedRange { export interface ExtensionRangeOptions { /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - */ - declaration: ExtensionRangeOptions_Declaration[]; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - */ - verification: ExtensionRangeOptions_VerificationState; -} - -/** The verification state of the extension range. */ -export enum ExtensionRangeOptions_VerificationState { - /** DECLARATION - All the extensions of the range must be declared. */ - DECLARATION = 0, - UNVERIFIED = 1, - UNRECOGNIZED = -1, -} - -export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState { - switch (object) { - case 0: - case "DECLARATION": - return ExtensionRangeOptions_VerificationState.DECLARATION; - case 1: - case "UNVERIFIED": - return ExtensionRangeOptions_VerificationState.UNVERIFIED; - case -1: - case "UNRECOGNIZED": - default: - return ExtensionRangeOptions_VerificationState.UNRECOGNIZED; - } -} - -export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string { - switch (object) { - case ExtensionRangeOptions_VerificationState.DECLARATION: - return "DECLARATION"; - case ExtensionRangeOptions_VerificationState.UNVERIFIED: - return "UNVERIFIED"; - case ExtensionRangeOptions_VerificationState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface ExtensionRangeOptions_Declaration { - /** The extension number declared within the extension range. */ - number: number; - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - */ - fullName: string; - /** - * 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; - /** - * 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; - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - */ - repeated: boolean; } /** Describes a field within a message. */ @@ -363,10 +193,9 @@ export enum FieldDescriptorProto_Type { TYPE_STRING = 9, /** * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * Group type is deprecated and not supported in proto3. However, Proto3 * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. In Editions, the group wire format - * can be enabled via the `message_encoding` feature. + * treat group fields as unknown fields. */ TYPE_GROUP = 10, /** TYPE_MESSAGE - Length-delimited aggregate. */ @@ -494,13 +323,8 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typ export enum FieldDescriptorProto_Label { /** LABEL_OPTIONAL - 0 is reserved for errors */ LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - /** - * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions - * it's explicitly prohibited. In Editions, the `field_presence` feature - * can be used to get this behavior. - */ LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, UNRECOGNIZED = -1, } @@ -509,12 +333,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptor case 1: case "LABEL_OPTIONAL": return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; case 2: case "LABEL_REQUIRED": return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; case -1: case "UNRECOGNIZED": default: @@ -526,10 +350,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; case FieldDescriptorProto_Label.LABEL_REQUIRED: return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; case FieldDescriptorProto_Label.UNRECOGNIZED: default: return "UNRECOGNIZED"; @@ -723,10 +547,6 @@ export interface FileOptions { * determining the ruby package. */ rubyPackage: string; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -845,16 +665,12 @@ export interface MessageOptions { * This should only be used as a temporary measure against broken builds due * to the change in behavior for JSON field name conflicts. * - * TODO This is legacy behavior we plan to remove once downstream + * TODO(b/261750190) This is legacy behavior we plan to remove once downstream * teams have had time to migrate. * * @deprecated */ deprecatedLegacyJsonFieldConflicts: boolean; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -863,10 +679,8 @@ export interface FieldOptions { /** * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release -- sorry, we'll try to include - * other types in a future version! + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! */ ctype: FieldOptions_CType; /** @@ -874,9 +688,7 @@ export interface FieldOptions { * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * false will avoid using packed encoding. */ packed: boolean; /** @@ -947,12 +759,7 @@ export interface FieldOptions { */ debugRedact: boolean; retention: FieldOptions_OptionRetention; - targets: FieldOptions_OptionTargetType[]; - editionDefaults: FieldOptions_EditionDefault[]; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; + target: FieldOptions_OptionTargetType; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -960,14 +767,6 @@ export interface FieldOptions { export enum FieldOptions_CType { /** STRING - Default mode. */ STRING = 0, - /** - * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type - * "bytes". It indicates that in C++, the data should be stored in a Cord - * instead of a string. For very large strings, this may reduce memory - * fragmentation. It may also allow better performance when parsing from a - * Cord, or when parsing with aliasing enabled, as the parsed Cord may then - * alias the original buffer. - */ CORD = 1, STRING_PIECE = 2, UNRECOGNIZED = -1, @@ -1178,17 +977,7 @@ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionT } } -export interface FieldOptions_EditionDefault { - edition: Edition; - /** Textproto value. */ - value: string; -} - export interface OneofOptions { - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1211,16 +1000,12 @@ export interface EnumOptions { * and strips underscored from the fields before comparison in proto3 only. * The new behavior takes `json_name` into account and applies to proto2 as * well. - * TODO Remove this legacy behavior once downstream teams have + * TODO(b/261750190) Remove this legacy behavior once downstream teams have * had time to migrate. * * @deprecated */ deprecatedLegacyJsonFieldConflicts: boolean; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1233,25 +1018,11 @@ export interface EnumValueOptions { * this is a formalization for deprecating enum values. */ deprecated: boolean; - /** Any features defined in the specific edition. */ - 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; /** 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; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -1272,10 +1043,6 @@ export interface MethodOptions { */ deprecated: boolean; idempotencyLevel: MethodOptions_IdempotencyLevel; - /** Any features defined in the specific edition. */ - features: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -1360,294 +1127,6 @@ export interface UninterpretedOption_NamePart { isExtension: boolean; } -/** - * TODO Enums in C++ gencode (and potentially other languages) are - * not well scoped. This means that each of the feature enums below can clash - * with each other. The short names we've chosen maximize call-site - * readability, but leave us very open to this scenario. A future feature will - * be designed and implemented to handle this, hopefully before we ever hit a - * conflict here. - */ -export interface FeatureSet { - fieldPresence: FeatureSet_FieldPresence; - enumType: FeatureSet_EnumType; - repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding; - utf8Validation: FeatureSet_Utf8Validation; - messageEncoding: FeatureSet_MessageEncoding; - jsonFormat: FeatureSet_JsonFormat; -} - -export enum FeatureSet_FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3, - UNRECOGNIZED = -1, -} - -export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence { - switch (object) { - case 0: - case "FIELD_PRESENCE_UNKNOWN": - return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN; - case 1: - case "EXPLICIT": - return FeatureSet_FieldPresence.EXPLICIT; - case 2: - case "IMPLICIT": - return FeatureSet_FieldPresence.IMPLICIT; - case 3: - case "LEGACY_REQUIRED": - return FeatureSet_FieldPresence.LEGACY_REQUIRED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_FieldPresence.UNRECOGNIZED; - } -} - -export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string { - switch (object) { - case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN: - return "FIELD_PRESENCE_UNKNOWN"; - case FeatureSet_FieldPresence.EXPLICIT: - return "EXPLICIT"; - case FeatureSet_FieldPresence.IMPLICIT: - return "IMPLICIT"; - case FeatureSet_FieldPresence.LEGACY_REQUIRED: - return "LEGACY_REQUIRED"; - case FeatureSet_FieldPresence.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType { - switch (object) { - case 0: - case "ENUM_TYPE_UNKNOWN": - return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN; - case 1: - case "OPEN": - return FeatureSet_EnumType.OPEN; - case 2: - case "CLOSED": - return FeatureSet_EnumType.CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_EnumType.UNRECOGNIZED; - } -} - -export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string { - switch (object) { - case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN: - return "ENUM_TYPE_UNKNOWN"; - case FeatureSet_EnumType.OPEN: - return "OPEN"; - case FeatureSet_EnumType.CLOSED: - return "CLOSED"; - case FeatureSet_EnumType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding { - switch (object) { - case 0: - case "REPEATED_FIELD_ENCODING_UNKNOWN": - return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN; - case 1: - case "PACKED": - return FeatureSet_RepeatedFieldEncoding.PACKED; - case 2: - case "EXPANDED": - return FeatureSet_RepeatedFieldEncoding.EXPANDED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED; - } -} - -export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string { - switch (object) { - case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN: - return "REPEATED_FIELD_ENCODING_UNKNOWN"; - case FeatureSet_RepeatedFieldEncoding.PACKED: - return "PACKED"; - case FeatureSet_RepeatedFieldEncoding.EXPANDED: - return "EXPANDED"; - case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - NONE = 1, - VERIFY = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation { - switch (object) { - case 0: - case "UTF8_VALIDATION_UNKNOWN": - return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN; - case 1: - case "NONE": - return FeatureSet_Utf8Validation.NONE; - case 2: - case "VERIFY": - return FeatureSet_Utf8Validation.VERIFY; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_Utf8Validation.UNRECOGNIZED; - } -} - -export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string { - switch (object) { - case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN: - return "UTF8_VALIDATION_UNKNOWN"; - case FeatureSet_Utf8Validation.NONE: - return "NONE"; - case FeatureSet_Utf8Validation.VERIFY: - return "VERIFY"; - case FeatureSet_Utf8Validation.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding { - switch (object) { - case 0: - case "MESSAGE_ENCODING_UNKNOWN": - return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN; - case 1: - case "LENGTH_PREFIXED": - return FeatureSet_MessageEncoding.LENGTH_PREFIXED; - case 2: - case "DELIMITED": - return FeatureSet_MessageEncoding.DELIMITED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_MessageEncoding.UNRECOGNIZED; - } -} - -export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string { - switch (object) { - case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN: - return "MESSAGE_ENCODING_UNKNOWN"; - case FeatureSet_MessageEncoding.LENGTH_PREFIXED: - return "LENGTH_PREFIXED"; - case FeatureSet_MessageEncoding.DELIMITED: - return "DELIMITED"; - case FeatureSet_MessageEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat { - switch (object) { - case 0: - case "JSON_FORMAT_UNKNOWN": - return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN; - case 1: - case "ALLOW": - return FeatureSet_JsonFormat.ALLOW; - case 2: - case "LEGACY_BEST_EFFORT": - return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_JsonFormat.UNRECOGNIZED; - } -} - -export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string { - switch (object) { - case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN: - return "JSON_FORMAT_UNKNOWN"; - case FeatureSet_JsonFormat.ALLOW: - return "ALLOW"; - case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT: - return "LEGACY_BEST_EFFORT"; - case FeatureSet_JsonFormat.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 - * feature resolution. The resolution with this object becomes a simple search - * for the closest matching edition, followed by proto merges. - */ -export interface FeatureSetDefaults { - defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - */ - minimumEdition: Edition; - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - */ - maximumEdition: Edition; -} - -/** - * A map from every known edition with a unique set of defaults to its - * defaults. Not all editions may be contained here. For a given edition, - * the defaults at the closest matching edition ordered at or before it should - * be used. This field must be in strict ascending order by edition. - */ -export interface FeatureSetDefaults_FeatureSetEditionDefault { - edition: Edition; - features: FeatureSet | undefined; -} - /** * Encapsulates information about the original source file from which a * FileDescriptorProto was generated. @@ -1944,7 +1423,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { options: undefined, sourceCodeInfo: undefined, syntax: "", - edition: 0, + edition: "", }; } @@ -1990,8 +1469,8 @@ export const FileDescriptorProto = { if (message.syntax !== "") { writer.uint32(98).string(message.syntax); } - if (message.edition !== 0) { - writer.uint32(112).int32(message.edition); + if (message.edition !== "") { + writer.uint32(106).string(message.edition); } return writer; }, @@ -2107,12 +1586,12 @@ export const FileDescriptorProto = { message.syntax = reader.string(); continue; - case 14: - if (tag !== 112) { + case 13: + if (tag !== 106) { break; } - message.edition = reader.int32() as any; + message.edition = reader.string(); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -2151,7 +1630,7 @@ export const FileDescriptorProto = { options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "", - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, + edition: isSet(object.edition) ? globalThis.String(object.edition) : "", }; }, @@ -2193,8 +1672,8 @@ export const FileDescriptorProto = { if (message.syntax !== "") { obj.syntax = message.syntax; } - if (message.edition !== 0) { - obj.edition = editionToJSON(message.edition); + if (message.edition !== "") { + obj.edition = message.edition; } return obj; }, @@ -2220,7 +1699,7 @@ export const FileDescriptorProto = { ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) : undefined; message.syntax = object.syntax ?? ""; - message.edition = object.edition ?? 0; + message.edition = object.edition ?? ""; return message; }, }; @@ -2618,7 +2097,7 @@ export const DescriptorProto_ReservedRange = { }; function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpretedOption: [], declaration: [], features: undefined, verification: 0 }; + return { uninterpretedOption: [] }; } export const ExtensionRangeOptions = { @@ -2626,15 +2105,6 @@ export const ExtensionRangeOptions = { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } - for (const v of message.declaration) { - ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim(); - } - if (message.verification !== 0) { - writer.uint32(24).int32(message.verification); - } return writer; }, @@ -2652,27 +2122,6 @@ export const ExtensionRangeOptions = { message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; - case 2: - if (tag !== 18) { - break; - } - - message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32())); - continue; - case 50: - if (tag !== 402) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.verification = reader.int32() as any; - continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2687,13 +2136,6 @@ export const ExtensionRangeOptions = { uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], - declaration: globalThis.Array.isArray(object?.declaration) - ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e)) - : [], - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - verification: isSet(object.verification) - ? extensionRangeOptions_VerificationStateFromJSON(object.verification) - : 0, }; }, @@ -2702,15 +2144,6 @@ export const ExtensionRangeOptions = { if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } - if (message.declaration?.length) { - obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e)); - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.verification !== 0) { - obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification); - } return obj; }, @@ -2720,134 +2153,6 @@ export const ExtensionRangeOptions = { fromPartial, 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.verification = object.verification ?? 0; - return message; - }, -}; - -function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { - return { number: 0, fullName: "", type: "", reserved: false, repeated: false }; -} - -export const ExtensionRangeOptions_Declaration = { - encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.number !== 0) { - writer.uint32(8).int32(message.number); - } - if (message.fullName !== "") { - writer.uint32(18).string(message.fullName); - } - if (message.type !== "") { - writer.uint32(26).string(message.type); - } - if (message.reserved === true) { - writer.uint32(40).bool(message.reserved); - } - if (message.repeated === true) { - writer.uint32(48).bool(message.repeated); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions_Declaration(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.number = reader.int32(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.fullName = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.type = reader.string(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.reserved = reader.bool(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.repeated = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions_Declaration { - return { - number: isSet(object.number) ? globalThis.Number(object.number) : 0, - fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false, - repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false, - }; - }, - - toJSON(message: ExtensionRangeOptions_Declaration): unknown { - const obj: any = {}; - if (message.number !== 0) { - obj.number = Math.round(message.number); - } - if (message.fullName !== "") { - obj.fullName = message.fullName; - } - if (message.type !== "") { - obj.type = message.type; - } - if (message.reserved === true) { - obj.reserved = message.reserved; - } - if (message.repeated === true) { - obj.repeated = message.repeated; - } - return obj; - }, - - create, I>>( - base?: I, - ): ExtensionRangeOptions_Declaration { - return ExtensionRangeOptions_Declaration.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): ExtensionRangeOptions_Declaration { - const message = createBaseExtensionRangeOptions_Declaration(); - message.number = object.number ?? 0; - message.fullName = object.fullName ?? ""; - message.type = object.type ?? ""; - message.reserved = object.reserved ?? false; - message.repeated = object.repeated ?? false; return message; }, }; @@ -3706,7 +3011,6 @@ function createBaseFileOptions(): FileOptions { phpNamespace: "", phpMetadataNamespace: "", rubyPackage: "", - features: undefined, uninterpretedOption: [], }; } @@ -3773,9 +3077,6 @@ export const FileOptions = { if (message.rubyPackage !== "") { writer.uint32(362).string(message.rubyPackage); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim(); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -3929,13 +3230,6 @@ export const FileOptions = { message.rubyPackage = reader.string(); continue; - case 50: - if (tag !== 402) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -3976,7 +3270,6 @@ export const FileOptions = { phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "", phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "", rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "", - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4045,9 +3338,6 @@ export const FileOptions = { if (message.rubyPackage !== "") { obj.rubyPackage = message.rubyPackage; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -4079,9 +3369,6 @@ export const 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)) || []; return message; }, @@ -4094,7 +3381,6 @@ function createBaseMessageOptions(): MessageOptions { deprecated: false, mapEntry: false, deprecatedLegacyJsonFieldConflicts: false, - features: undefined, uninterpretedOption: [], }; } @@ -4116,9 +3402,6 @@ export const MessageOptions = { if (message.deprecatedLegacyJsonFieldConflicts === true) { writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim(); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4167,13 +3450,6 @@ export const MessageOptions = { message.deprecatedLegacyJsonFieldConflicts = reader.bool(); continue; - case 12: - if (tag !== 98) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4203,7 +3479,6 @@ export const MessageOptions = { deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts) ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts) : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4227,9 +3502,6 @@ export const MessageOptions = { if (message.deprecatedLegacyJsonFieldConflicts === true) { obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -4246,9 +3518,6 @@ export const 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)) || []; return message; }, @@ -4265,9 +3534,7 @@ function createBaseFieldOptions(): FieldOptions { weak: false, debugRedact: false, retention: 0, - targets: [], - editionDefaults: [], - features: undefined, + target: 0, uninterpretedOption: [], }; } @@ -4301,16 +3568,8 @@ export const FieldOptions = { if (message.retention !== 0) { writer.uint32(136).int32(message.retention); } - writer.uint32(154).fork(); - for (const v of message.targets) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.editionDefaults) { - FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim(); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim(); + if (message.target !== 0) { + writer.uint32(144).int32(message.target); } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); @@ -4388,36 +3647,12 @@ export const FieldOptions = { message.retention = reader.int32() as any; continue; - case 19: - if (tag === 152) { - message.targets.push(reader.int32() as any); - - continue; - } - - if (tag === 154) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.targets.push(reader.int32() as any); - } - - continue; - } - - break; - case 20: - if (tag !== 162) { - break; - } - - message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32())); - continue; - case 21: - if (tag !== 170) { + case 18: + if (tag !== 144) { break; } - message.features = FeatureSet.decode(reader, reader.uint32()); + message.target = reader.int32() as any; continue; case 999: if (tag !== 7994) { @@ -4446,13 +3681,7 @@ export const FieldOptions = { weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false, debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false, retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0, - targets: globalThis.Array.isArray(object?.targets) - ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e)) - : [], - editionDefaults: globalThis.Array.isArray(object?.editionDefaults) - ? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e)) - : [], - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, + target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4488,14 +3717,8 @@ export const FieldOptions = { if (message.retention !== 0) { obj.retention = fieldOptions_OptionRetentionToJSON(message.retention); } - if (message.targets?.length) { - obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e)); - } - if (message.editionDefaults?.length) { - obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e)); - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); + if (message.target !== 0) { + obj.target = fieldOptions_OptionTargetTypeToJSON(message.target); } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); @@ -4517,99 +3740,18 @@ export const 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.target = object.target ?? 0; message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; -function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { - return { edition: 0, value: "" }; -} - -export const FieldOptions_EditionDefault = { - encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.edition !== 0) { - writer.uint32(24).int32(message.edition); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions_EditionDefault(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (tag !== 24) { - break; - } - - message.edition = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.value = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FieldOptions_EditionDefault { - return { - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, - value: isSet(object.value) ? globalThis.String(object.value) : "", - }; - }, - - toJSON(message: FieldOptions_EditionDefault): unknown { - const obj: any = {}; - if (message.edition !== 0) { - obj.edition = editionToJSON(message.edition); - } - if (message.value !== "") { - obj.value = message.value; - } - return obj; - }, - - create, I>>(base?: I): FieldOptions_EditionDefault { - return FieldOptions_EditionDefault.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): FieldOptions_EditionDefault { - const message = createBaseFieldOptions_EditionDefault(); - message.edition = object.edition ?? 0; - message.value = object.value ?? ""; - return message; - }, -}; - function createBaseOneofOptions(): OneofOptions { - return { features: undefined, uninterpretedOption: [] }; + return { uninterpretedOption: [] }; } export const OneofOptions = { encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim(); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4623,13 +3765,6 @@ export const OneofOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4648,7 +3783,6 @@ export const OneofOptions = { fromJSON(object: any): OneofOptions { return { - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4657,9 +3791,6 @@ export const OneofOptions = { toJSON(message: OneofOptions): unknown { const obj: any = {}; - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -4671,22 +3802,13 @@ export const OneofOptions = { }, fromPartial, 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)) || []; return message; }, }; function createBaseEnumOptions(): EnumOptions { - return { - allowAlias: false, - deprecated: false, - deprecatedLegacyJsonFieldConflicts: false, - features: undefined, - uninterpretedOption: [], - }; + return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] }; } export const EnumOptions = { @@ -4700,9 +3822,6 @@ export const EnumOptions = { if (message.deprecatedLegacyJsonFieldConflicts === true) { writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim(); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4737,13 +3856,6 @@ export const EnumOptions = { message.deprecatedLegacyJsonFieldConflicts = reader.bool(); continue; - case 7: - if (tag !== 58) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4767,7 +3879,6 @@ export const EnumOptions = { deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts) ? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts) : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4785,9 +3896,6 @@ export const EnumOptions = { if (message.deprecatedLegacyJsonFieldConflicts === true) { obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -4802,16 +3910,13 @@ export const 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)) || []; return message; }, }; function createBaseEnumValueOptions(): EnumValueOptions { - return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] }; + return { deprecated: false, uninterpretedOption: [] }; } export const EnumValueOptions = { @@ -4819,12 +3924,6 @@ export const EnumValueOptions = { if (message.deprecated === true) { writer.uint32(8).bool(message.deprecated); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim(); - } - if (message.debugRedact === true) { - writer.uint32(24).bool(message.debugRedact); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4845,20 +3944,6 @@ export const EnumValueOptions = { message.deprecated = reader.bool(); continue; - case 2: - if (tag !== 18) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.debugRedact = reader.bool(); - continue; case 999: if (tag !== 7994) { break; @@ -4878,8 +3963,6 @@ export const EnumValueOptions = { fromJSON(object: any): EnumValueOptions { return { deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4891,12 +3974,6 @@ export const EnumValueOptions = { if (message.deprecated === true) { obj.deprecated = message.deprecated; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.debugRedact === true) { - obj.debugRedact = message.debugRedact; - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -4909,24 +3986,17 @@ export const EnumValueOptions = { fromPartial, 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.debugRedact = object.debugRedact ?? false; message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; function createBaseServiceOptions(): ServiceOptions { - return { features: undefined, deprecated: false, uninterpretedOption: [] }; + return { deprecated: false, uninterpretedOption: [] }; } export const ServiceOptions = { encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim(); - } if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -4943,13 +4013,6 @@ export const ServiceOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 34: - if (tag !== 274) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 33: if (tag !== 264) { break; @@ -4975,7 +4038,6 @@ export const ServiceOptions = { fromJSON(object: any): ServiceOptions { return { - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) @@ -4985,9 +4047,6 @@ export const ServiceOptions = { toJSON(message: ServiceOptions): unknown { const obj: any = {}; - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.deprecated === true) { obj.deprecated = message.deprecated; } @@ -5002,9 +4061,6 @@ export const ServiceOptions = { }, fromPartial, I>>(object: I): ServiceOptions { const message = createBaseServiceOptions(); - 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)) || []; return message; @@ -5012,7 +4068,7 @@ export const ServiceOptions = { }; function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotencyLevel: 0, features: undefined, uninterpretedOption: [] }; + return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; } export const MethodOptions = { @@ -5023,9 +4079,6 @@ export const MethodOptions = { if (message.idempotencyLevel !== 0) { writer.uint32(272).int32(message.idempotencyLevel); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim(); - } for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -5053,13 +4106,6 @@ export const MethodOptions = { message.idempotencyLevel = reader.int32() as any; continue; - case 35: - if (tag !== 282) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -5082,7 +4128,6 @@ export const MethodOptions = { idempotencyLevel: isSet(object.idempotencyLevel) ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) : 0, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -5097,9 +4142,6 @@ export const MethodOptions = { if (message.idempotencyLevel !== 0) { obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel); } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpretedOption?.length) { obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } @@ -5113,9 +4155,6 @@ export const 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)) || []; return message; }, @@ -5354,320 +4393,6 @@ export const UninterpretedOption_NamePart = { }, }; -function createBaseFeatureSet(): FeatureSet { - return { - fieldPresence: 0, - enumType: 0, - repeatedFieldEncoding: 0, - utf8Validation: 0, - messageEncoding: 0, - jsonFormat: 0, - }; -} - -export const FeatureSet = { - encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.fieldPresence !== 0) { - writer.uint32(8).int32(message.fieldPresence); - } - if (message.enumType !== 0) { - writer.uint32(16).int32(message.enumType); - } - if (message.repeatedFieldEncoding !== 0) { - writer.uint32(24).int32(message.repeatedFieldEncoding); - } - if (message.utf8Validation !== 0) { - writer.uint32(32).int32(message.utf8Validation); - } - if (message.messageEncoding !== 0) { - writer.uint32(40).int32(message.messageEncoding); - } - if (message.jsonFormat !== 0) { - writer.uint32(48).int32(message.jsonFormat); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.fieldPresence = reader.int32() as any; - continue; - case 2: - if (tag !== 16) { - break; - } - - message.enumType = reader.int32() as any; - continue; - case 3: - if (tag !== 24) { - break; - } - - message.repeatedFieldEncoding = reader.int32() as any; - continue; - case 4: - if (tag !== 32) { - break; - } - - message.utf8Validation = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.messageEncoding = reader.int32() as any; - continue; - case 6: - if (tag !== 48) { - break; - } - - message.jsonFormat = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSet { - return { - fieldPresence: isSet(object.fieldPresence) ? featureSet_FieldPresenceFromJSON(object.fieldPresence) : 0, - enumType: isSet(object.enumType) ? featureSet_EnumTypeFromJSON(object.enumType) : 0, - repeatedFieldEncoding: isSet(object.repeatedFieldEncoding) - ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding) - : 0, - 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, - }; - }, - - toJSON(message: FeatureSet): unknown { - const obj: any = {}; - if (message.fieldPresence !== 0) { - obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence); - } - if (message.enumType !== 0) { - obj.enumType = featureSet_EnumTypeToJSON(message.enumType); - } - if (message.repeatedFieldEncoding !== 0) { - obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding); - } - if (message.utf8Validation !== 0) { - obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation); - } - if (message.messageEncoding !== 0) { - obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding); - } - if (message.jsonFormat !== 0) { - obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat); - } - return obj; - }, - - create, I>>(base?: I): FeatureSet { - return FeatureSet.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): FeatureSet { - const message = createBaseFeatureSet(); - message.fieldPresence = object.fieldPresence ?? 0; - message.enumType = object.enumType ?? 0; - message.repeatedFieldEncoding = object.repeatedFieldEncoding ?? 0; - message.utf8Validation = object.utf8Validation ?? 0; - message.messageEncoding = object.messageEncoding ?? 0; - message.jsonFormat = object.jsonFormat ?? 0; - return message; - }, -}; - -function createBaseFeatureSetDefaults(): FeatureSetDefaults { - return { defaults: [], minimumEdition: 0, maximumEdition: 0 }; -} - -export const FeatureSetDefaults = { - encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.defaults) { - FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.minimumEdition !== 0) { - writer.uint32(32).int32(message.minimumEdition); - } - if (message.maximumEdition !== 0) { - writer.uint32(40).int32(message.maximumEdition); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSetDefaults(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32())); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.minimumEdition = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.maximumEdition = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSetDefaults { - return { - defaults: globalThis.Array.isArray(object?.defaults) - ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e)) - : [], - minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : 0, - maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : 0, - }; - }, - - toJSON(message: FeatureSetDefaults): unknown { - const obj: any = {}; - if (message.defaults?.length) { - obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e)); - } - if (message.minimumEdition !== 0) { - obj.minimumEdition = editionToJSON(message.minimumEdition); - } - if (message.maximumEdition !== 0) { - obj.maximumEdition = editionToJSON(message.maximumEdition); - } - return obj; - }, - - create, I>>(base?: I): FeatureSetDefaults { - return FeatureSetDefaults.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): FeatureSetDefaults { - const message = createBaseFeatureSetDefaults(); - message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || []; - message.minimumEdition = object.minimumEdition ?? 0; - message.maximumEdition = object.maximumEdition ?? 0; - return message; - }, -}; - -function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { - return { edition: 0, features: undefined }; -} - -export const FeatureSetDefaults_FeatureSetEditionDefault = { - encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.edition !== 0) { - writer.uint32(24).int32(message.edition); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (tag !== 24) { - break; - } - - message.edition = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault { - return { - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - }; - }, - - toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown { - const obj: any = {}; - if (message.edition !== 0) { - obj.edition = editionToJSON(message.edition); - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - return obj; - }, - - create, I>>( - base?: I, - ): FeatureSetDefaults_FeatureSetEditionDefault { - return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>( - object: I, - ): FeatureSetDefaults_FeatureSetEditionDefault { - const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault(); - message.edition = object.edition ?? 0; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; - return message; - }, -}; - function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] }; } diff --git a/packages/api/weshnet/protocoltypes.ts b/packages/api/weshnet/protocoltypes.ts index 89d43bdded..a81457509c 100644 --- a/packages/api/weshnet/protocoltypes.ts +++ b/packages/api/weshnet/protocoltypes.ts @@ -15717,9 +15717,7 @@ export class GrpcWebImpl { } }, }); - observer.add(() => { - return client.close(); - }); + observer.add(() => client.close()); }; upStream(); }).pipe(share());