From aecfe0de5983f20fcc3af8f2e2b73384319b89a8 Mon Sep 17 00:00:00 2001 From: Farhad Shabani Date: Fri, 5 Jan 2024 07:56:25 -0800 Subject: [PATCH] feat: add `08-wasm` client proto types (#170) * feat: add Wasm light client proto types fix: add wasm mod to lib.rs * chore: add unclog * feat: derive JsonSchema on Wasm ClientMessage --- .../features/168-add-wasm-client-protos.md | 3 + src/IBC_GO_COMMIT | 2 +- src/lib.rs | 7 + src/prost/google.protobuf.rs | 783 +++++- src/prost/google.protobuf.serde.rs | 2337 +++++++++++++++-- src/prost/ibc.lightclients.wasm.v1.rs | 1100 ++++++++ src/prost/ibc.lightclients.wasm.v1.serde.rs | 1581 +++++++++++ src/prost/proto_descriptor.bin | Bin 702918 -> 727802 bytes tools/proto-compiler/src/cmd/compile.rs | 1 + 9 files changed, 5584 insertions(+), 230 deletions(-) create mode 100644 .changelog/unreleased/features/168-add-wasm-client-protos.md create mode 100644 src/prost/ibc.lightclients.wasm.v1.rs create mode 100644 src/prost/ibc.lightclients.wasm.v1.serde.rs diff --git a/.changelog/unreleased/features/168-add-wasm-client-protos.md b/.changelog/unreleased/features/168-add-wasm-client-protos.md new file mode 100644 index 00000000..f0c59e3d --- /dev/null +++ b/.changelog/unreleased/features/168-add-wasm-client-protos.md @@ -0,0 +1,3 @@ +- Integrate Wasm light client proto types by updating `IBC_GO_COMMIT` to the + hash associated with the ibc-go `wasm-v8.0.0` tag + ([#168](https://github.com/cosmos/ibc-proto-rs/issues/168)). diff --git a/src/IBC_GO_COMMIT b/src/IBC_GO_COMMIT index 47f08cce..90e668bc 100644 --- a/src/IBC_GO_COMMIT +++ b/src/IBC_GO_COMMIT @@ -1 +1 @@ -2551dea41cd3c512845007ca895c8402afa9b79f +57fcdb9a9a9db9b206f7df2f955866dc4e10fef4 diff --git a/src/lib.rs b/src/lib.rs index f32a2f6f..37e76f5b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -361,6 +361,13 @@ pub mod ibc { include_proto!("ibc.lightclients.tendermint.v1.serde.rs"); } } + pub mod wasm { + pub mod v1 { + include_proto!("ibc.lightclients.wasm.v1.rs"); + #[cfg(feature = "serde")] + include_proto!("ibc.lightclients.wasm.v1.serde.rs"); + } + } } pub mod mock { include_proto!("ibc.mock.rs"); diff --git a/src/prost/google.protobuf.rs b/src/prost/google.protobuf.rs index d58b594a..5976a8b1 100644 --- a/src/prost/google.protobuf.rs +++ b/src/prost/google.protobuf.rs @@ -22,8 +22,12 @@ /// if (any.is(Foo.class)) { /// foo = any.unpack(Foo.class); /// } +/// // or ... +/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +/// 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() @@ -33,7 +37,7 @@ /// 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) @@ -52,9 +56,8 @@ /// in the type URL, for example "foo.bar.com/x/y.z" will yield type /// 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: @@ -112,7 +115,8 @@ pub struct 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. + /// type.googleapis.com. As of May 2023, there are no widely used type server + /// implementations and no plans to implement one. /// /// Schemes other than `http`, `https` (or the empty scheme) might be /// used with implementation specific semantics. @@ -183,9 +187,14 @@ pub struct FileDescriptorProto { #[prost(message, optional, tag = "9")] pub source_code_info: ::core::option::Option, /// The syntax of the proto file. - /// The supported values are "proto2" and "proto3". + /// The supported values are "proto2", "proto3", and "editions". + /// + /// If `edition` is present, this value must be "editions". #[prost(string, optional, tag = "12")] pub syntax: ::core::option::Option<::prost::alloc::string::String>, + /// The edition of the proto file. + #[prost(enumeration = "Edition", optional, tag = "14")] + pub edition: ::core::option::Option, } impl ::prost::Name for FileDescriptorProto { const NAME: &'static str = "FileDescriptorProto"; @@ -276,6 +285,99 @@ pub struct ExtensionRangeOptions { /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, + /// 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. + #[prost(message, repeated, tag = "2")] + pub declaration: ::prost::alloc::vec::Vec, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "50")] + pub features: ::core::option::Option, + /// The verification state of the range. + /// TODO: flip the default to DECLARATION once all empty ranges + /// are marked as UNVERIFIED. + #[prost( + enumeration = "extension_range_options::VerificationState", + optional, + tag = "3", + default = "Unverified" + )] + pub verification: ::core::option::Option, +} +/// Nested message and enum types in `ExtensionRangeOptions`. +pub mod extension_range_options { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Declaration { + /// The extension number declared within the extension range. + #[prost(int32, optional, tag = "1")] + pub number: ::core::option::Option, + /// The fully-qualified name of the extension field. There must be a leading + /// dot in front of the full name. + #[prost(string, optional, tag = "2")] + pub full_name: ::core::option::Option<::prost::alloc::string::String>, + /// The fully-qualified type name of the extension field. Unlike + /// Metadata.type, Declaration.type must have a leading dot for messages + /// and enums. + #[prost(string, optional, tag = "3")] + pub r#type: ::core::option::Option<::prost::alloc::string::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. + #[prost(bool, optional, tag = "5")] + pub reserved: ::core::option::Option, + /// If true, indicates that the extension must be defined as repeated. + /// Otherwise the extension must be defined as optional. + #[prost(bool, optional, tag = "6")] + pub repeated: ::core::option::Option, + } + impl ::prost::Name for Declaration { + const NAME: &'static str = "Declaration"; + const PACKAGE: &'static str = "google.protobuf"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "google.protobuf.ExtensionRangeOptions.{}", Self::NAME + ) + } + } + /// The verification state of the extension range. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum VerificationState { + /// All the extensions of the range must be declared. + Declaration = 0, + Unverified = 1, + } + impl VerificationState { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + VerificationState::Declaration => "DECLARATION", + VerificationState::Unverified => "UNVERIFIED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "DECLARATION" => Some(Self::Declaration), + "UNVERIFIED" => Some(Self::Unverified), + _ => None, + } + } + } } impl ::prost::Name for ExtensionRangeOptions { const NAME: &'static str = "ExtensionRangeOptions"; @@ -382,9 +484,10 @@ pub mod field_descriptor_proto { Bool = 8, String = 9, /// Tag-delimited aggregate. - /// Group type is deprecated and not supported in proto3. However, Proto3 + /// Group type is deprecated and not supported after google.protobuf. However, Proto3 /// implementations should still be able to parse the group wire format and - /// treat group fields as unknown fields. + /// treat group fields as unknown fields. In Editions, the group wire format + /// can be enabled via the `message_encoding` feature. Group = 10, /// Length-delimited aggregate. Message = 11, @@ -466,8 +569,11 @@ pub mod field_descriptor_proto { pub enum Label { /// 0 is reserved for errors Optional = 1, - Required = 2, Repeated = 3, + /// 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. + Required = 2, } impl Label { /// String value of the enum field names used in the ProtoBuf definition. @@ -477,16 +583,16 @@ pub mod field_descriptor_proto { pub fn as_str_name(&self) -> &'static str { match self { Label::Optional => "LABEL_OPTIONAL", - Label::Required => "LABEL_REQUIRED", Label::Repeated => "LABEL_REPEATED", + Label::Required => "LABEL_REQUIRED", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "LABEL_OPTIONAL" => Some(Self::Optional), - "LABEL_REQUIRED" => Some(Self::Required), "LABEL_REPEATED" => Some(Self::Repeated), + "LABEL_REQUIRED" => Some(Self::Required), _ => None, } } @@ -744,6 +850,9 @@ pub struct FileOptions { /// determining the ruby package. #[prost(string, optional, tag = "45")] pub ruby_package: ::core::option::Option<::prost::alloc::string::String>, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "50")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. /// See the documentation for the "Options" section above. #[prost(message, repeated, tag = "999")] @@ -838,6 +947,10 @@ pub struct MessageOptions { /// this is a formalization for deprecating messages. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. + /// /// Whether the message is an automatically generated map entry type for the /// maps field. /// @@ -855,12 +968,24 @@ pub struct MessageOptions { /// use a native map in the target language to hold the keys and values. /// The reflection APIs in such implementations still need to work as /// if the field is a repeated message field. - /// - /// NOTE: Do not set the option in .proto files. Always use the maps syntax - /// instead. The option should only be implicitly set by the proto compiler - /// parser. #[prost(bool, optional, tag = "7")] pub map_entry: ::core::option::Option, + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// 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. + /// + /// 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 + /// teams have had time to migrate. + #[deprecated] + #[prost(bool, optional, tag = "11")] + pub deprecated_legacy_json_field_conflicts: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "12")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -877,8 +1002,10 @@ impl ::prost::Name for MessageOptions { pub struct 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 not yet implemented in the open source - /// release -- sorry, we'll try to include it in a future version! + /// 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! #[prost( enumeration = "field_options::CType", optional, @@ -890,7 +1017,9 @@ pub struct 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. + /// 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. #[prost(bool, optional, tag = "2")] pub packed: ::core::option::Option, /// The jstype option determines the JavaScript type used for values of the @@ -928,7 +1057,6 @@ pub struct FieldOptions { /// call from multiple threads concurrently, while non-const methods continue /// to require exclusive access. /// - /// /// Note that implementations may choose not to check required fields within /// a lazy sub-message. That is, calling IsInitialized() on the outer message /// may return true even if the inner message has missing required fields. @@ -940,11 +1068,8 @@ pub struct FieldOptions { /// check its required fields, regardless of whether or not the message has /// been parsed. /// - /// As of 2021, lazy does no correctness checks on the byte stream during - /// parsing. This may lead to crashes if and when an invalid byte stream is - /// finally parsed upon access. - /// - /// TODO(b/211906113): Enable validation on lazy fields. + /// As of May 2022, lazy verifies the contents of the byte stream during + /// parsing. An invalid byte stream will cause the overall parsing to fail. #[prost(bool, optional, tag = "5", default = "false")] pub lazy: ::core::option::Option, /// unverified_lazy does no correctness checks on the byte stream. This should @@ -961,12 +1086,46 @@ pub struct FieldOptions { /// For Google-internal migration only. Do not use. #[prost(bool, optional, tag = "10", default = "false")] pub weak: ::core::option::Option, + /// Indicate that the field value should not be printed out when using debug + /// formats, e.g. when the field contains sensitive credentials. + #[prost(bool, optional, tag = "16", default = "false")] + pub debug_redact: ::core::option::Option, + #[prost(enumeration = "field_options::OptionRetention", optional, tag = "17")] + pub retention: ::core::option::Option, + #[prost( + enumeration = "field_options::OptionTargetType", + repeated, + packed = "false", + tag = "19" + )] + pub targets: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "20")] + pub edition_defaults: ::prost::alloc::vec::Vec, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "21")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `FieldOptions`. pub mod field_options { + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EditionDefault { + #[prost(enumeration = "super::Edition", optional, tag = "3")] + pub edition: ::core::option::Option, + /// Textproto value. + #[prost(string, optional, tag = "2")] + pub value: ::core::option::Option<::prost::alloc::string::String>, + } + impl ::prost::Name for EditionDefault { + const NAME: &'static str = "EditionDefault"; + const PACKAGE: &'static str = "google.protobuf"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("google.protobuf.FieldOptions.{}", Self::NAME) + } + } #[derive( Clone, Copy, @@ -982,6 +1141,12 @@ pub mod field_options { pub enum CType { /// Default mode. String = 0, + /// 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, StringPiece = 2, } @@ -1049,6 +1214,114 @@ pub mod field_options { } } } + /// 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). + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum OptionRetention { + RetentionUnknown = 0, + RetentionRuntime = 1, + RetentionSource = 2, + } + impl OptionRetention { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OptionRetention::RetentionUnknown => "RETENTION_UNKNOWN", + OptionRetention::RetentionRuntime => "RETENTION_RUNTIME", + OptionRetention::RetentionSource => "RETENTION_SOURCE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RETENTION_UNKNOWN" => Some(Self::RetentionUnknown), + "RETENTION_RUNTIME" => Some(Self::RetentionRuntime), + "RETENTION_SOURCE" => Some(Self::RetentionSource), + _ => None, + } + } + } + /// 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). + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum OptionTargetType { + TargetTypeUnknown = 0, + TargetTypeFile = 1, + TargetTypeExtensionRange = 2, + TargetTypeMessage = 3, + TargetTypeField = 4, + TargetTypeOneof = 5, + TargetTypeEnum = 6, + TargetTypeEnumEntry = 7, + TargetTypeService = 8, + TargetTypeMethod = 9, + } + impl OptionTargetType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + OptionTargetType::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN", + OptionTargetType::TargetTypeFile => "TARGET_TYPE_FILE", + OptionTargetType::TargetTypeExtensionRange => { + "TARGET_TYPE_EXTENSION_RANGE" + } + OptionTargetType::TargetTypeMessage => "TARGET_TYPE_MESSAGE", + OptionTargetType::TargetTypeField => "TARGET_TYPE_FIELD", + OptionTargetType::TargetTypeOneof => "TARGET_TYPE_ONEOF", + OptionTargetType::TargetTypeEnum => "TARGET_TYPE_ENUM", + OptionTargetType::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY", + OptionTargetType::TargetTypeService => "TARGET_TYPE_SERVICE", + OptionTargetType::TargetTypeMethod => "TARGET_TYPE_METHOD", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TARGET_TYPE_UNKNOWN" => Some(Self::TargetTypeUnknown), + "TARGET_TYPE_FILE" => Some(Self::TargetTypeFile), + "TARGET_TYPE_EXTENSION_RANGE" => Some(Self::TargetTypeExtensionRange), + "TARGET_TYPE_MESSAGE" => Some(Self::TargetTypeMessage), + "TARGET_TYPE_FIELD" => Some(Self::TargetTypeField), + "TARGET_TYPE_ONEOF" => Some(Self::TargetTypeOneof), + "TARGET_TYPE_ENUM" => Some(Self::TargetTypeEnum), + "TARGET_TYPE_ENUM_ENTRY" => Some(Self::TargetTypeEnumEntry), + "TARGET_TYPE_SERVICE" => Some(Self::TargetTypeService), + "TARGET_TYPE_METHOD" => Some(Self::TargetTypeMethod), + _ => None, + } + } + } } impl ::prost::Name for FieldOptions { const NAME: &'static str = "FieldOptions"; @@ -1060,6 +1333,9 @@ impl ::prost::Name for FieldOptions { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OneofOptions { + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "1")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1084,6 +1360,18 @@ pub struct EnumOptions { /// is a formalization for deprecating enums. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, + /// Enable the legacy handling of JSON field name conflicts. This lowercases + /// 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 + /// had time to migrate. + #[deprecated] + #[prost(bool, optional, tag = "6")] + pub deprecated_legacy_json_field_conflicts: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "7")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1104,6 +1392,14 @@ pub struct EnumValueOptions { /// this is a formalization for deprecating enum values. #[prost(bool, optional, tag = "1", default = "false")] pub deprecated: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "2")] + pub features: ::core::option::Option, + /// 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. + #[prost(bool, optional, tag = "3", default = "false")] + pub debug_redact: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1118,6 +1414,9 @@ impl ::prost::Name for EnumValueOptions { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServiceOptions { + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "34")] + pub features: ::core::option::Option, /// 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, @@ -1151,6 +1450,9 @@ pub struct MethodOptions { default = "IdempotencyUnknown" )] pub idempotency_level: ::core::option::Option, + /// Any features defined in the specific edition. + #[prost(message, optional, tag = "35")] + pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1265,6 +1567,324 @@ impl ::prost::Name for UninterpretedOption { ::prost::alloc::format!("google.protobuf.{}", Self::NAME) } } +/// 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. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeatureSet { + #[prost(enumeration = "feature_set::FieldPresence", optional, tag = "1")] + pub field_presence: ::core::option::Option, + #[prost(enumeration = "feature_set::EnumType", optional, tag = "2")] + pub enum_type: ::core::option::Option, + #[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")] + pub repeated_field_encoding: ::core::option::Option, + #[prost(enumeration = "feature_set::Utf8Validation", optional, tag = "4")] + pub utf8_validation: ::core::option::Option, + #[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")] + pub message_encoding: ::core::option::Option, + #[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")] + pub json_format: ::core::option::Option, +} +/// Nested message and enum types in `FeatureSet`. +pub mod feature_set { + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum FieldPresence { + Unknown = 0, + Explicit = 1, + Implicit = 2, + LegacyRequired = 3, + } + impl FieldPresence { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + FieldPresence::Unknown => "FIELD_PRESENCE_UNKNOWN", + FieldPresence::Explicit => "EXPLICIT", + FieldPresence::Implicit => "IMPLICIT", + FieldPresence::LegacyRequired => "LEGACY_REQUIRED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "FIELD_PRESENCE_UNKNOWN" => Some(Self::Unknown), + "EXPLICIT" => Some(Self::Explicit), + "IMPLICIT" => Some(Self::Implicit), + "LEGACY_REQUIRED" => Some(Self::LegacyRequired), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum EnumType { + Unknown = 0, + Open = 1, + Closed = 2, + } + impl EnumType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + EnumType::Unknown => "ENUM_TYPE_UNKNOWN", + EnumType::Open => "OPEN", + EnumType::Closed => "CLOSED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ENUM_TYPE_UNKNOWN" => Some(Self::Unknown), + "OPEN" => Some(Self::Open), + "CLOSED" => Some(Self::Closed), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum RepeatedFieldEncoding { + Unknown = 0, + Packed = 1, + Expanded = 2, + } + impl RepeatedFieldEncoding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + RepeatedFieldEncoding::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN", + RepeatedFieldEncoding::Packed => "PACKED", + RepeatedFieldEncoding::Expanded => "EXPANDED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "REPEATED_FIELD_ENCODING_UNKNOWN" => Some(Self::Unknown), + "PACKED" => Some(Self::Packed), + "EXPANDED" => Some(Self::Expanded), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Utf8Validation { + Unknown = 0, + None = 1, + Verify = 2, + } + impl Utf8Validation { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Utf8Validation::Unknown => "UTF8_VALIDATION_UNKNOWN", + Utf8Validation::None => "NONE", + Utf8Validation::Verify => "VERIFY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UTF8_VALIDATION_UNKNOWN" => Some(Self::Unknown), + "NONE" => Some(Self::None), + "VERIFY" => Some(Self::Verify), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum MessageEncoding { + Unknown = 0, + LengthPrefixed = 1, + Delimited = 2, + } + impl MessageEncoding { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + MessageEncoding::Unknown => "MESSAGE_ENCODING_UNKNOWN", + MessageEncoding::LengthPrefixed => "LENGTH_PREFIXED", + MessageEncoding::Delimited => "DELIMITED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "MESSAGE_ENCODING_UNKNOWN" => Some(Self::Unknown), + "LENGTH_PREFIXED" => Some(Self::LengthPrefixed), + "DELIMITED" => Some(Self::Delimited), + _ => None, + } + } + } + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum JsonFormat { + Unknown = 0, + Allow = 1, + LegacyBestEffort = 2, + } + impl JsonFormat { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + JsonFormat::Unknown => "JSON_FORMAT_UNKNOWN", + JsonFormat::Allow => "ALLOW", + JsonFormat::LegacyBestEffort => "LEGACY_BEST_EFFORT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "JSON_FORMAT_UNKNOWN" => Some(Self::Unknown), + "ALLOW" => Some(Self::Allow), + "LEGACY_BEST_EFFORT" => Some(Self::LegacyBestEffort), + _ => None, + } + } + } +} +impl ::prost::Name for FeatureSet { + const NAME: &'static str = "FeatureSet"; + const PACKAGE: &'static str = "google.protobuf"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("google.protobuf.{}", Self::NAME) + } +} +/// 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. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeatureSetDefaults { + #[prost(message, repeated, tag = "1")] + pub defaults: ::prost::alloc::vec::Vec< + feature_set_defaults::FeatureSetEditionDefault, + >, + /// The minimum supported edition (inclusive) when this was constructed. + /// Editions before this will not have defaults. + #[prost(enumeration = "Edition", optional, tag = "4")] + pub minimum_edition: ::core::option::Option, + /// The maximum known edition (inclusive) when this was constructed. Editions + /// after this will not have reliable defaults. + #[prost(enumeration = "Edition", optional, tag = "5")] + pub maximum_edition: ::core::option::Option, +} +/// Nested message and enum types in `FeatureSetDefaults`. +pub mod feature_set_defaults { + /// 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. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct FeatureSetEditionDefault { + #[prost(enumeration = "super::Edition", optional, tag = "3")] + pub edition: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub features: ::core::option::Option, + } + impl ::prost::Name for FeatureSetEditionDefault { + const NAME: &'static str = "FeatureSetEditionDefault"; + const PACKAGE: &'static str = "google.protobuf"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("google.protobuf.FeatureSetDefaults.{}", Self::NAME) + } + } +} +impl ::prost::Name for FeatureSetDefaults { + const NAME: &'static str = "FeatureSetDefaults"; + const PACKAGE: &'static str = "google.protobuf"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("google.protobuf.{}", Self::NAME) + } +} /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1452,10 +2072,59 @@ pub mod generated_code_info { #[prost(int32, optional, tag = "3")] pub begin: ::core::option::Option, /// Identifies the ending offset in bytes in the generated code that - /// relates to the identified offset. The end offset should be one past + /// relates to the identified object. The end offset should be one past /// the last relevant byte (so the length of the text = end - begin). #[prost(int32, optional, tag = "4")] pub end: ::core::option::Option, + #[prost(enumeration = "annotation::Semantic", optional, tag = "5")] + pub semantic: ::core::option::Option, + } + /// Nested message and enum types in `Annotation`. + pub mod annotation { + /// Represents the identified object's effect on the element in the original + /// .proto file. + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] + #[repr(i32)] + pub enum Semantic { + /// There is no effect or the effect is indescribable. + None = 0, + /// The element is set or otherwise mutated. + Set = 1, + /// An alias to the element is returned. + Alias = 2, + } + impl Semantic { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Semantic::None => "NONE", + Semantic::Set => "SET", + Semantic::Alias => "ALIAS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "NONE" => Some(Self::None), + "SET" => Some(Self::Set), + "ALIAS" => Some(Self::Alias), + _ => None, + } + } + } } impl ::prost::Name for Annotation { const NAME: &'static str = "Annotation"; @@ -1472,6 +2141,64 @@ impl ::prost::Name for GeneratedCodeInfo { ::prost::alloc::format!("google.protobuf.{}", Self::NAME) } } +/// The full set of known editions. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum Edition { + /// A placeholder for an unknown edition value. + Unknown = 0, + /// 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. + Proto2 = 998, + Proto3 = 999, + /// 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. + Edition2023 = 1000, + /// Placeholder editions for testing feature resolution. These should not be + /// used or relyed on outside of tests. + Edition1TestOnly = 1, + Edition2TestOnly = 2, + Edition99997TestOnly = 99997, + Edition99998TestOnly = 99998, + Edition99999TestOnly = 99999, +} +impl Edition { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Edition::Unknown => "EDITION_UNKNOWN", + Edition::Proto2 => "EDITION_PROTO2", + Edition::Proto3 => "EDITION_PROTO3", + Edition::Edition2023 => "EDITION_2023", + Edition::Edition1TestOnly => "EDITION_1_TEST_ONLY", + Edition::Edition2TestOnly => "EDITION_2_TEST_ONLY", + Edition::Edition99997TestOnly => "EDITION_99997_TEST_ONLY", + Edition::Edition99998TestOnly => "EDITION_99998_TEST_ONLY", + Edition::Edition99999TestOnly => "EDITION_99999_TEST_ONLY", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EDITION_UNKNOWN" => Some(Self::Unknown), + "EDITION_PROTO2" => Some(Self::Proto2), + "EDITION_PROTO3" => Some(Self::Proto3), + "EDITION_2023" => Some(Self::Edition2023), + "EDITION_1_TEST_ONLY" => Some(Self::Edition1TestOnly), + "EDITION_2_TEST_ONLY" => Some(Self::Edition2TestOnly), + "EDITION_99997_TEST_ONLY" => Some(Self::Edition99997TestOnly), + "EDITION_99998_TEST_ONLY" => Some(Self::Edition99998TestOnly), + "EDITION_99999_TEST_ONLY" => Some(Self::Edition99999TestOnly), + _ => None, + } + } +} /// A Timestamp represents a point in time independent of any time zone or local /// calendar, encoded as a count of seconds and fractions of seconds at /// nanosecond resolution. The count is relative to an epoch at UTC midnight on @@ -1522,7 +2249,6 @@ impl ::prost::Name for GeneratedCodeInfo { /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) /// .setNanos((int) ((millis % 1000) * 1000000)).build(); /// -/// /// Example 5: Compute Timestamp from Java `Instant.now()`. /// /// Instant now = Instant.now(); @@ -1531,7 +2257,6 @@ impl ::prost::Name for GeneratedCodeInfo { /// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) /// .setNanos(now.getNano()).build(); /// -/// /// Example 6: Compute Timestamp from current time in Python. /// /// timestamp = Timestamp() @@ -1561,10 +2286,9 @@ impl ::prost::Name for GeneratedCodeInfo { /// [`strftime`]() with /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use /// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -/// +/// ) /// ) to obtain a formatter capable of generating timestamps in this format. /// -/// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Timestamp { @@ -1646,7 +2370,6 @@ impl ::prost::Name for Timestamp { /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". /// -/// #[derive(Eq)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/prost/google.protobuf.serde.rs b/src/prost/google.protobuf.serde.rs index a974819b..1467d307 100644 --- a/src/prost/google.protobuf.serde.rs +++ b/src/prost/google.protobuf.serde.rs @@ -712,6 +712,100 @@ impl<'de> serde::Deserialize<'de> for Duration { deserializer.deserialize_struct("google.protobuf.Duration", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for Edition { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "EDITION_UNKNOWN", + Self::Proto2 => "EDITION_PROTO2", + Self::Proto3 => "EDITION_PROTO3", + Self::Edition2023 => "EDITION_2023", + Self::Edition1TestOnly => "EDITION_1_TEST_ONLY", + Self::Edition2TestOnly => "EDITION_2_TEST_ONLY", + Self::Edition99997TestOnly => "EDITION_99997_TEST_ONLY", + Self::Edition99998TestOnly => "EDITION_99998_TEST_ONLY", + Self::Edition99999TestOnly => "EDITION_99999_TEST_ONLY", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for Edition { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "EDITION_UNKNOWN", + "EDITION_PROTO2", + "EDITION_PROTO3", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Edition; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(Edition::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(Edition::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "EDITION_UNKNOWN" => Ok(Edition::Unknown), + "EDITION_PROTO2" => Ok(Edition::Proto2), + "EDITION_PROTO3" => Ok(Edition::Proto3), + "EDITION_2023" => Ok(Edition::Edition2023), + "EDITION_1_TEST_ONLY" => Ok(Edition::Edition1TestOnly), + "EDITION_2_TEST_ONLY" => Ok(Edition::Edition2TestOnly), + "EDITION_99997_TEST_ONLY" => Ok(Edition::Edition99997TestOnly), + "EDITION_99998_TEST_ONLY" => Ok(Edition::Edition99998TestOnly), + "EDITION_99999_TEST_ONLY" => Ok(Edition::Edition99999TestOnly), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} impl serde::Serialize for EnumDescriptorProto { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result @@ -1002,6 +1096,12 @@ impl serde::Serialize for EnumOptions { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.EnumOptions", len)?; if let Some(v) = self.allow_alias.as_ref() { struct_ser.serialize_field("allowAlias", v)?; @@ -1009,6 +1109,12 @@ impl serde::Serialize for EnumOptions { if let Some(v) = self.deprecated.as_ref() { struct_ser.serialize_field("deprecated", v)?; } + if let Some(v) = self.deprecated_legacy_json_field_conflicts.as_ref() { + struct_ser.serialize_field("deprecatedLegacyJsonFieldConflicts", v)?; + } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -1025,6 +1131,9 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { "allow_alias", "allowAlias", "deprecated", + "deprecated_legacy_json_field_conflicts", + "deprecatedLegacyJsonFieldConflicts", + "features", "uninterpreted_option", "uninterpretedOption", ]; @@ -1033,6 +1142,8 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { enum GeneratedField { AllowAlias, Deprecated, + DeprecatedLegacyJsonFieldConflicts, + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -1057,6 +1168,8 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { match value { "allowAlias" | "allow_alias" => Ok(GeneratedField::AllowAlias), "deprecated" => Ok(GeneratedField::Deprecated), + "deprecatedLegacyJsonFieldConflicts" | "deprecated_legacy_json_field_conflicts" => Ok(GeneratedField::DeprecatedLegacyJsonFieldConflicts), + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -1079,6 +1192,8 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { { let mut allow_alias__ = None; let mut deprecated__ = None; + let mut deprecated_legacy_json_field_conflicts__ = None; + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -1094,6 +1209,18 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { } deprecated__ = map.next_value()?; } + GeneratedField::DeprecatedLegacyJsonFieldConflicts => { + if deprecated_legacy_json_field_conflicts__.is_some() { + return Err(serde::de::Error::duplicate_field("deprecatedLegacyJsonFieldConflicts")); + } + deprecated_legacy_json_field_conflicts__ = map.next_value()?; + } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -1105,6 +1232,8 @@ impl<'de> serde::Deserialize<'de> for EnumOptions { Ok(EnumOptions { allow_alias: allow_alias__, deprecated: deprecated__, + deprecated_legacy_json_field_conflicts: deprecated_legacy_json_field_conflicts__, + features: features__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -1253,10 +1382,22 @@ impl serde::Serialize for EnumValueOptions { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.EnumValueOptions", len)?; if let Some(v) = self.deprecated.as_ref() { struct_ser.serialize_field("deprecated", v)?; } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } + if let Some(v) = self.debug_redact.as_ref() { + struct_ser.serialize_field("debugRedact", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -1271,6 +1412,9 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { { const FIELDS: &[&str] = &[ "deprecated", + "features", + "debug_redact", + "debugRedact", "uninterpreted_option", "uninterpretedOption", ]; @@ -1278,6 +1422,8 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { #[allow(clippy::enum_variant_names)] enum GeneratedField { Deprecated, + Features, + DebugRedact, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -1301,6 +1447,8 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { { match value { "deprecated" => Ok(GeneratedField::Deprecated), + "features" => Ok(GeneratedField::Features), + "debugRedact" | "debug_redact" => Ok(GeneratedField::DebugRedact), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -1322,6 +1470,8 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { V: serde::de::MapAccess<'de>, { let mut deprecated__ = None; + let mut features__ = None; + let mut debug_redact__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -1331,6 +1481,18 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { } deprecated__ = map.next_value()?; } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } + GeneratedField::DebugRedact => { + if debug_redact__.is_some() { + return Err(serde::de::Error::duplicate_field("debugRedact")); + } + debug_redact__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -1341,6 +1503,8 @@ impl<'de> serde::Deserialize<'de> for EnumValueOptions { } Ok(EnumValueOptions { deprecated: deprecated__, + features: features__, + debug_redact: debug_redact__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -1359,10 +1523,30 @@ impl serde::Serialize for ExtensionRangeOptions { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.ExtensionRangeOptions", len)?; if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } + if true { + struct_ser.serialize_field("declaration", &self.declaration)?; + } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } + if let Some(v) = self.verification.as_ref() { + let v = extension_range_options::VerificationState::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("verification", &v)?; + } struct_ser.end() } } @@ -1375,11 +1559,17 @@ impl<'de> serde::Deserialize<'de> for ExtensionRangeOptions { const FIELDS: &[&str] = &[ "uninterpreted_option", "uninterpretedOption", + "declaration", + "features", + "verification", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { UninterpretedOption, + Declaration, + Features, + Verification, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -1402,6 +1592,9 @@ impl<'de> serde::Deserialize<'de> for ExtensionRangeOptions { { match value { "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), + "declaration" => Ok(GeneratedField::Declaration), + "features" => Ok(GeneratedField::Features), + "verification" => Ok(GeneratedField::Verification), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1422,6 +1615,9 @@ impl<'de> serde::Deserialize<'de> for ExtensionRangeOptions { V: serde::de::MapAccess<'de>, { let mut uninterpreted_option__ = None; + let mut declaration__ = None; + let mut features__ = None; + let mut verification__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::UninterpretedOption => { @@ -1430,17 +1626,38 @@ impl<'de> serde::Deserialize<'de> for ExtensionRangeOptions { } uninterpreted_option__ = Some(map.next_value()?); } + GeneratedField::Declaration => { + if declaration__.is_some() { + return Err(serde::de::Error::duplicate_field("declaration")); + } + declaration__ = Some(map.next_value()?); + } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } + GeneratedField::Verification => { + if verification__.is_some() { + return Err(serde::de::Error::duplicate_field("verification")); + } + verification__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } } } Ok(ExtensionRangeOptions { uninterpreted_option: uninterpreted_option__.unwrap_or_default(), + declaration: declaration__.unwrap_or_default(), + features: features__, + verification: verification__, }) } } deserializer.deserialize_struct("google.protobuf.ExtensionRangeOptions", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for FieldDescriptorProto { +impl serde::Serialize for extension_range_options::Declaration { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where @@ -1463,103 +1680,47 @@ impl serde::Serialize for FieldDescriptorProto { if true { len += 1; } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("google.protobuf.FieldDescriptorProto", len)?; - if let Some(v) = self.name.as_ref() { - struct_ser.serialize_field("name", v)?; - } + let mut struct_ser = serializer.serialize_struct("google.protobuf.ExtensionRangeOptions.Declaration", len)?; if let Some(v) = self.number.as_ref() { struct_ser.serialize_field("number", v)?; } - if let Some(v) = self.label.as_ref() { - let v = field_descriptor_proto::Label::from_i32(*v) - .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; - struct_ser.serialize_field("label", &v)?; + if let Some(v) = self.full_name.as_ref() { + struct_ser.serialize_field("fullName", v)?; } if let Some(v) = self.r#type.as_ref() { - let v = field_descriptor_proto::Type::from_i32(*v) - .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; - struct_ser.serialize_field("type", &v)?; - } - if let Some(v) = self.type_name.as_ref() { - struct_ser.serialize_field("typeName", v)?; - } - if let Some(v) = self.extendee.as_ref() { - struct_ser.serialize_field("extendee", v)?; - } - if let Some(v) = self.default_value.as_ref() { - struct_ser.serialize_field("defaultValue", v)?; - } - if let Some(v) = self.oneof_index.as_ref() { - struct_ser.serialize_field("oneofIndex", v)?; + struct_ser.serialize_field("type", v)?; } - if let Some(v) = self.json_name.as_ref() { - struct_ser.serialize_field("jsonName", v)?; - } - if let Some(v) = self.options.as_ref() { - struct_ser.serialize_field("options", v)?; + if let Some(v) = self.reserved.as_ref() { + struct_ser.serialize_field("reserved", v)?; } - if let Some(v) = self.proto3_optional.as_ref() { - struct_ser.serialize_field("proto3Optional", v)?; + if let Some(v) = self.repeated.as_ref() { + struct_ser.serialize_field("repeated", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for FieldDescriptorProto { +impl<'de> serde::Deserialize<'de> for extension_range_options::Declaration { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "name", "number", - "label", + "full_name", + "fullName", "type", - "type_name", - "typeName", - "extendee", - "default_value", - "defaultValue", - "oneof_index", - "oneofIndex", - "json_name", - "jsonName", - "options", - "proto3_optional", - "proto3Optional", + "reserved", + "repeated", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Name, Number, - Label, + FullName, Type, - TypeName, - Extendee, - DefaultValue, - OneofIndex, - JsonName, - Options, - Proto3Optional, + Reserved, + Repeated, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -1581,17 +1742,11 @@ impl<'de> serde::Deserialize<'de> for FieldDescriptorProto { E: serde::de::Error, { match value { - "name" => Ok(GeneratedField::Name), "number" => Ok(GeneratedField::Number), - "label" => Ok(GeneratedField::Label), + "fullName" | "full_name" => Ok(GeneratedField::FullName), "type" => Ok(GeneratedField::Type), - "typeName" | "type_name" => Ok(GeneratedField::TypeName), - "extendee" => Ok(GeneratedField::Extendee), - "defaultValue" | "default_value" => Ok(GeneratedField::DefaultValue), - "oneofIndex" | "oneof_index" => Ok(GeneratedField::OneofIndex), - "jsonName" | "json_name" => Ok(GeneratedField::JsonName), - "options" => Ok(GeneratedField::Options), - "proto3Optional" | "proto3_optional" => Ok(GeneratedField::Proto3Optional), + "reserved" => Ok(GeneratedField::Reserved), + "repeated" => Ok(GeneratedField::Repeated), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1601,35 +1756,23 @@ impl<'de> serde::Deserialize<'de> for FieldDescriptorProto { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = FieldDescriptorProto; + type Value = extension_range_options::Declaration; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct google.protobuf.FieldDescriptorProto") + formatter.write_str("struct google.protobuf.ExtensionRangeOptions.Declaration") } - fn visit_map(self, mut map: V) -> core::result::Result + fn visit_map(self, mut map: V) -> core::result::Result where V: serde::de::MapAccess<'de>, { - let mut name__ = None; let mut number__ = None; - let mut label__ = None; + let mut full_name__ = None; let mut r#type__ = None; - let mut type_name__ = None; - let mut extendee__ = None; - let mut default_value__ = None; - let mut oneof_index__ = None; - let mut json_name__ = None; - let mut options__ = None; - let mut proto3_optional__ = None; + let mut reserved__ = None; + let mut repeated__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = map.next_value()?; - } GeneratedField::Number => { if number__.is_some() { return Err(serde::de::Error::duplicate_field("number")); @@ -1638,71 +1781,1274 @@ impl<'de> serde::Deserialize<'de> for FieldDescriptorProto { map.next_value::<::core::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) ; } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); + GeneratedField::FullName => { + if full_name__.is_some() { + return Err(serde::de::Error::duplicate_field("fullName")); } - label__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + full_name__ = map.next_value()?; } GeneratedField::Type => { if r#type__.is_some() { return Err(serde::de::Error::duplicate_field("type")); } - r#type__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); - } - GeneratedField::TypeName => { - if type_name__.is_some() { - return Err(serde::de::Error::duplicate_field("typeName")); - } - type_name__ = map.next_value()?; - } - GeneratedField::Extendee => { - if extendee__.is_some() { - return Err(serde::de::Error::duplicate_field("extendee")); - } - extendee__ = map.next_value()?; - } - GeneratedField::DefaultValue => { - if default_value__.is_some() { - return Err(serde::de::Error::duplicate_field("defaultValue")); - } - default_value__ = map.next_value()?; - } - GeneratedField::OneofIndex => { - if oneof_index__.is_some() { - return Err(serde::de::Error::duplicate_field("oneofIndex")); - } - oneof_index__ = - map.next_value::<::core::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) - ; - } - GeneratedField::JsonName => { - if json_name__.is_some() { - return Err(serde::de::Error::duplicate_field("jsonName")); - } - json_name__ = map.next_value()?; + r#type__ = map.next_value()?; } - GeneratedField::Options => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); + GeneratedField::Reserved => { + if reserved__.is_some() { + return Err(serde::de::Error::duplicate_field("reserved")); } - options__ = map.next_value()?; + reserved__ = map.next_value()?; } - GeneratedField::Proto3Optional => { - if proto3_optional__.is_some() { - return Err(serde::de::Error::duplicate_field("proto3Optional")); + GeneratedField::Repeated => { + if repeated__.is_some() { + return Err(serde::de::Error::duplicate_field("repeated")); } - proto3_optional__ = map.next_value()?; + repeated__ = map.next_value()?; } } } - Ok(FieldDescriptorProto { - name: name__, + Ok(extension_range_options::Declaration { number: number__, - label: label__, + full_name: full_name__, r#type: r#type__, - type_name: type_name__, - extendee: extendee__, + reserved: reserved__, + repeated: repeated__, + }) + } + } + deserializer.deserialize_struct("google.protobuf.ExtensionRangeOptions.Declaration", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for extension_range_options::VerificationState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Declaration => "DECLARATION", + Self::Unverified => "UNVERIFIED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for extension_range_options::VerificationState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "DECLARATION", + "UNVERIFIED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = extension_range_options::VerificationState; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(extension_range_options::VerificationState::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(extension_range_options::VerificationState::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "DECLARATION" => Ok(extension_range_options::VerificationState::Declaration), + "UNVERIFIED" => Ok(extension_range_options::VerificationState::Unverified), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for FeatureSet { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("google.protobuf.FeatureSet", len)?; + if let Some(v) = self.field_presence.as_ref() { + let v = feature_set::FieldPresence::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("fieldPresence", &v)?; + } + if let Some(v) = self.enum_type.as_ref() { + let v = feature_set::EnumType::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("enumType", &v)?; + } + if let Some(v) = self.repeated_field_encoding.as_ref() { + let v = feature_set::RepeatedFieldEncoding::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("repeatedFieldEncoding", &v)?; + } + if let Some(v) = self.utf8_validation.as_ref() { + let v = feature_set::Utf8Validation::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("utf8Validation", &v)?; + } + if let Some(v) = self.message_encoding.as_ref() { + let v = feature_set::MessageEncoding::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("messageEncoding", &v)?; + } + if let Some(v) = self.json_format.as_ref() { + let v = feature_set::JsonFormat::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("jsonFormat", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FeatureSet { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "field_presence", + "fieldPresence", + "enum_type", + "enumType", + "repeated_field_encoding", + "repeatedFieldEncoding", + "utf8_validation", + "utf8Validation", + "message_encoding", + "messageEncoding", + "json_format", + "jsonFormat", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FieldPresence, + EnumType, + RepeatedFieldEncoding, + Utf8Validation, + MessageEncoding, + JsonFormat, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "fieldPresence" | "field_presence" => Ok(GeneratedField::FieldPresence), + "enumType" | "enum_type" => Ok(GeneratedField::EnumType), + "repeatedFieldEncoding" | "repeated_field_encoding" => Ok(GeneratedField::RepeatedFieldEncoding), + "utf8Validation" | "utf8_validation" => Ok(GeneratedField::Utf8Validation), + "messageEncoding" | "message_encoding" => Ok(GeneratedField::MessageEncoding), + "jsonFormat" | "json_format" => Ok(GeneratedField::JsonFormat), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FeatureSet; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct google.protobuf.FeatureSet") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut field_presence__ = None; + let mut enum_type__ = None; + let mut repeated_field_encoding__ = None; + let mut utf8_validation__ = None; + let mut message_encoding__ = None; + let mut json_format__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FieldPresence => { + if field_presence__.is_some() { + return Err(serde::de::Error::duplicate_field("fieldPresence")); + } + field_presence__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::EnumType => { + if enum_type__.is_some() { + return Err(serde::de::Error::duplicate_field("enumType")); + } + enum_type__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::RepeatedFieldEncoding => { + if repeated_field_encoding__.is_some() { + return Err(serde::de::Error::duplicate_field("repeatedFieldEncoding")); + } + repeated_field_encoding__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::Utf8Validation => { + if utf8_validation__.is_some() { + return Err(serde::de::Error::duplicate_field("utf8Validation")); + } + utf8_validation__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::MessageEncoding => { + if message_encoding__.is_some() { + return Err(serde::de::Error::duplicate_field("messageEncoding")); + } + message_encoding__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::JsonFormat => { + if json_format__.is_some() { + return Err(serde::de::Error::duplicate_field("jsonFormat")); + } + json_format__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + } + } + Ok(FeatureSet { + field_presence: field_presence__, + enum_type: enum_type__, + repeated_field_encoding: repeated_field_encoding__, + utf8_validation: utf8_validation__, + message_encoding: message_encoding__, + json_format: json_format__, + }) + } + } + deserializer.deserialize_struct("google.protobuf.FeatureSet", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::EnumType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "ENUM_TYPE_UNKNOWN", + Self::Open => "OPEN", + Self::Closed => "CLOSED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::EnumType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "ENUM_TYPE_UNKNOWN", + "OPEN", + "CLOSED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::EnumType; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::EnumType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::EnumType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "ENUM_TYPE_UNKNOWN" => Ok(feature_set::EnumType::Unknown), + "OPEN" => Ok(feature_set::EnumType::Open), + "CLOSED" => Ok(feature_set::EnumType::Closed), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::FieldPresence { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "FIELD_PRESENCE_UNKNOWN", + Self::Explicit => "EXPLICIT", + Self::Implicit => "IMPLICIT", + Self::LegacyRequired => "LEGACY_REQUIRED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::FieldPresence { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "FIELD_PRESENCE_UNKNOWN", + "EXPLICIT", + "IMPLICIT", + "LEGACY_REQUIRED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::FieldPresence; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::FieldPresence::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::FieldPresence::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "FIELD_PRESENCE_UNKNOWN" => Ok(feature_set::FieldPresence::Unknown), + "EXPLICIT" => Ok(feature_set::FieldPresence::Explicit), + "IMPLICIT" => Ok(feature_set::FieldPresence::Implicit), + "LEGACY_REQUIRED" => Ok(feature_set::FieldPresence::LegacyRequired), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::JsonFormat { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "JSON_FORMAT_UNKNOWN", + Self::Allow => "ALLOW", + Self::LegacyBestEffort => "LEGACY_BEST_EFFORT", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::JsonFormat { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "JSON_FORMAT_UNKNOWN", + "ALLOW", + "LEGACY_BEST_EFFORT", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::JsonFormat; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::JsonFormat::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::JsonFormat::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "JSON_FORMAT_UNKNOWN" => Ok(feature_set::JsonFormat::Unknown), + "ALLOW" => Ok(feature_set::JsonFormat::Allow), + "LEGACY_BEST_EFFORT" => Ok(feature_set::JsonFormat::LegacyBestEffort), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::MessageEncoding { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "MESSAGE_ENCODING_UNKNOWN", + Self::LengthPrefixed => "LENGTH_PREFIXED", + Self::Delimited => "DELIMITED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::MessageEncoding { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "MESSAGE_ENCODING_UNKNOWN", + "LENGTH_PREFIXED", + "DELIMITED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::MessageEncoding; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::MessageEncoding::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::MessageEncoding::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "MESSAGE_ENCODING_UNKNOWN" => Ok(feature_set::MessageEncoding::Unknown), + "LENGTH_PREFIXED" => Ok(feature_set::MessageEncoding::LengthPrefixed), + "DELIMITED" => Ok(feature_set::MessageEncoding::Delimited), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::RepeatedFieldEncoding { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN", + Self::Packed => "PACKED", + Self::Expanded => "EXPANDED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::RepeatedFieldEncoding { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "REPEATED_FIELD_ENCODING_UNKNOWN", + "PACKED", + "EXPANDED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::RepeatedFieldEncoding; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::RepeatedFieldEncoding::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::RepeatedFieldEncoding::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "REPEATED_FIELD_ENCODING_UNKNOWN" => Ok(feature_set::RepeatedFieldEncoding::Unknown), + "PACKED" => Ok(feature_set::RepeatedFieldEncoding::Packed), + "EXPANDED" => Ok(feature_set::RepeatedFieldEncoding::Expanded), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for feature_set::Utf8Validation { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "UTF8_VALIDATION_UNKNOWN", + Self::None => "NONE", + Self::Verify => "VERIFY", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for feature_set::Utf8Validation { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "UTF8_VALIDATION_UNKNOWN", + "NONE", + "VERIFY", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set::Utf8Validation; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::Utf8Validation::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(feature_set::Utf8Validation::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "UTF8_VALIDATION_UNKNOWN" => Ok(feature_set::Utf8Validation::Unknown), + "NONE" => Ok(feature_set::Utf8Validation::None), + "VERIFY" => Ok(feature_set::Utf8Validation::Verify), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for FeatureSetDefaults { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("google.protobuf.FeatureSetDefaults", len)?; + if true { + struct_ser.serialize_field("defaults", &self.defaults)?; + } + if let Some(v) = self.minimum_edition.as_ref() { + let v = Edition::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("minimumEdition", &v)?; + } + if let Some(v) = self.maximum_edition.as_ref() { + let v = Edition::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("maximumEdition", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FeatureSetDefaults { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "defaults", + "minimum_edition", + "minimumEdition", + "maximum_edition", + "maximumEdition", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Defaults, + MinimumEdition, + MaximumEdition, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "defaults" => Ok(GeneratedField::Defaults), + "minimumEdition" | "minimum_edition" => Ok(GeneratedField::MinimumEdition), + "maximumEdition" | "maximum_edition" => Ok(GeneratedField::MaximumEdition), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FeatureSetDefaults; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct google.protobuf.FeatureSetDefaults") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut defaults__ = None; + let mut minimum_edition__ = None; + let mut maximum_edition__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Defaults => { + if defaults__.is_some() { + return Err(serde::de::Error::duplicate_field("defaults")); + } + defaults__ = Some(map.next_value()?); + } + GeneratedField::MinimumEdition => { + if minimum_edition__.is_some() { + return Err(serde::de::Error::duplicate_field("minimumEdition")); + } + minimum_edition__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::MaximumEdition => { + if maximum_edition__.is_some() { + return Err(serde::de::Error::duplicate_field("maximumEdition")); + } + maximum_edition__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + } + } + Ok(FeatureSetDefaults { + defaults: defaults__.unwrap_or_default(), + minimum_edition: minimum_edition__, + maximum_edition: maximum_edition__, + }) + } + } + deserializer.deserialize_struct("google.protobuf.FeatureSetDefaults", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for feature_set_defaults::FeatureSetEditionDefault { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", len)?; + if let Some(v) = self.edition.as_ref() { + let v = Edition::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("edition", &v)?; + } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for feature_set_defaults::FeatureSetEditionDefault { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "edition", + "features", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Edition, + Features, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "edition" => Ok(GeneratedField::Edition), + "features" => Ok(GeneratedField::Features), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = feature_set_defaults::FeatureSetEditionDefault; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut edition__ = None; + let mut features__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Edition => { + if edition__.is_some() { + return Err(serde::de::Error::duplicate_field("edition")); + } + edition__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } + } + } + Ok(feature_set_defaults::FeatureSetEditionDefault { + edition: edition__, + features: features__, + }) + } + } + deserializer.deserialize_struct("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for FieldDescriptorProto { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("google.protobuf.FieldDescriptorProto", len)?; + if let Some(v) = self.name.as_ref() { + struct_ser.serialize_field("name", v)?; + } + if let Some(v) = self.number.as_ref() { + struct_ser.serialize_field("number", v)?; + } + if let Some(v) = self.label.as_ref() { + let v = field_descriptor_proto::Label::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("label", &v)?; + } + if let Some(v) = self.r#type.as_ref() { + let v = field_descriptor_proto::Type::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("type", &v)?; + } + if let Some(v) = self.type_name.as_ref() { + struct_ser.serialize_field("typeName", v)?; + } + if let Some(v) = self.extendee.as_ref() { + struct_ser.serialize_field("extendee", v)?; + } + if let Some(v) = self.default_value.as_ref() { + struct_ser.serialize_field("defaultValue", v)?; + } + if let Some(v) = self.oneof_index.as_ref() { + struct_ser.serialize_field("oneofIndex", v)?; + } + if let Some(v) = self.json_name.as_ref() { + struct_ser.serialize_field("jsonName", v)?; + } + if let Some(v) = self.options.as_ref() { + struct_ser.serialize_field("options", v)?; + } + if let Some(v) = self.proto3_optional.as_ref() { + struct_ser.serialize_field("proto3Optional", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FieldDescriptorProto { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "name", + "number", + "label", + "type", + "type_name", + "typeName", + "extendee", + "default_value", + "defaultValue", + "oneof_index", + "oneofIndex", + "json_name", + "jsonName", + "options", + "proto3_optional", + "proto3Optional", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Name, + Number, + Label, + Type, + TypeName, + Extendee, + DefaultValue, + OneofIndex, + JsonName, + Options, + Proto3Optional, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "name" => Ok(GeneratedField::Name), + "number" => Ok(GeneratedField::Number), + "label" => Ok(GeneratedField::Label), + "type" => Ok(GeneratedField::Type), + "typeName" | "type_name" => Ok(GeneratedField::TypeName), + "extendee" => Ok(GeneratedField::Extendee), + "defaultValue" | "default_value" => Ok(GeneratedField::DefaultValue), + "oneofIndex" | "oneof_index" => Ok(GeneratedField::OneofIndex), + "jsonName" | "json_name" => Ok(GeneratedField::JsonName), + "options" => Ok(GeneratedField::Options), + "proto3Optional" | "proto3_optional" => Ok(GeneratedField::Proto3Optional), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FieldDescriptorProto; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct google.protobuf.FieldDescriptorProto") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut name__ = None; + let mut number__ = None; + let mut label__ = None; + let mut r#type__ = None; + let mut type_name__ = None; + let mut extendee__ = None; + let mut default_value__ = None; + let mut oneof_index__ = None; + let mut json_name__ = None; + let mut options__ = None; + let mut proto3_optional__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); + } + name__ = map.next_value()?; + } + GeneratedField::Number => { + if number__.is_some() { + return Err(serde::de::Error::duplicate_field("number")); + } + number__ = + map.next_value::<::core::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) + ; + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); + } + r#type__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::TypeName => { + if type_name__.is_some() { + return Err(serde::de::Error::duplicate_field("typeName")); + } + type_name__ = map.next_value()?; + } + GeneratedField::Extendee => { + if extendee__.is_some() { + return Err(serde::de::Error::duplicate_field("extendee")); + } + extendee__ = map.next_value()?; + } + GeneratedField::DefaultValue => { + if default_value__.is_some() { + return Err(serde::de::Error::duplicate_field("defaultValue")); + } + default_value__ = map.next_value()?; + } + GeneratedField::OneofIndex => { + if oneof_index__.is_some() { + return Err(serde::de::Error::duplicate_field("oneofIndex")); + } + oneof_index__ = + map.next_value::<::core::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) + ; + } + GeneratedField::JsonName => { + if json_name__.is_some() { + return Err(serde::de::Error::duplicate_field("jsonName")); + } + json_name__ = map.next_value()?; + } + GeneratedField::Options => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); + } + options__ = map.next_value()?; + } + GeneratedField::Proto3Optional => { + if proto3_optional__.is_some() { + return Err(serde::de::Error::duplicate_field("proto3Optional")); + } + proto3_optional__ = map.next_value()?; + } + } + } + Ok(FieldDescriptorProto { + name: name__, + number: number__, + label: label__, + r#type: r#type__, + type_name: type_name__, + extendee: extendee__, default_value: default_value__, oneof_index: oneof_index__, json_name: json_name__, @@ -1722,8 +3068,8 @@ impl serde::Serialize for field_descriptor_proto::Label { { let variant = match self { Self::Optional => "LABEL_OPTIONAL", - Self::Required => "LABEL_REQUIRED", Self::Repeated => "LABEL_REPEATED", + Self::Required => "LABEL_REQUIRED", }; serializer.serialize_str(variant) } @@ -1736,8 +3082,8 @@ impl<'de> serde::Deserialize<'de> for field_descriptor_proto::Label { { const FIELDS: &[&str] = &[ "LABEL_OPTIONAL", - "LABEL_REQUIRED", "LABEL_REPEATED", + "LABEL_REQUIRED", ]; struct GeneratedVisitor; @@ -1781,8 +3127,8 @@ impl<'de> serde::Deserialize<'de> for field_descriptor_proto::Label { { match value { "LABEL_OPTIONAL" => Ok(field_descriptor_proto::Label::Optional), - "LABEL_REQUIRED" => Ok(field_descriptor_proto::Label::Required), "LABEL_REPEATED" => Ok(field_descriptor_proto::Label::Repeated), + "LABEL_REQUIRED" => Ok(field_descriptor_proto::Label::Required), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -1943,6 +3289,21 @@ impl serde::Serialize for FieldOptions { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.FieldOptions", len)?; if let Some(v) = self.ctype.as_ref() { let v = field_options::CType::from_i32(*v) @@ -1969,6 +3330,27 @@ impl serde::Serialize for FieldOptions { if let Some(v) = self.weak.as_ref() { struct_ser.serialize_field("weak", v)?; } + if let Some(v) = self.debug_redact.as_ref() { + struct_ser.serialize_field("debugRedact", v)?; + } + if let Some(v) = self.retention.as_ref() { + let v = field_options::OptionRetention::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("retention", &v)?; + } + if true { + let v = self.targets.iter().cloned().map(|v| { + field_options::OptionTargetType::from_i32(v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", v))) + }).collect::, _>>()?; + struct_ser.serialize_field("targets", &v)?; + } + if true { + struct_ser.serialize_field("editionDefaults", &self.edition_defaults)?; + } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -1990,6 +3372,13 @@ impl<'de> serde::Deserialize<'de> for FieldOptions { "unverifiedLazy", "deprecated", "weak", + "debug_redact", + "debugRedact", + "retention", + "targets", + "edition_defaults", + "editionDefaults", + "features", "uninterpreted_option", "uninterpretedOption", ]; @@ -2003,6 +3392,11 @@ impl<'de> serde::Deserialize<'de> for FieldOptions { UnverifiedLazy, Deprecated, Weak, + DebugRedact, + Retention, + Targets, + EditionDefaults, + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2032,6 +3426,11 @@ impl<'de> serde::Deserialize<'de> for FieldOptions { "unverifiedLazy" | "unverified_lazy" => Ok(GeneratedField::UnverifiedLazy), "deprecated" => Ok(GeneratedField::Deprecated), "weak" => Ok(GeneratedField::Weak), + "debugRedact" | "debug_redact" => Ok(GeneratedField::DebugRedact), + "retention" => Ok(GeneratedField::Retention), + "targets" => Ok(GeneratedField::Targets), + "editionDefaults" | "edition_defaults" => Ok(GeneratedField::EditionDefaults), + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -2059,6 +3458,11 @@ impl<'de> serde::Deserialize<'de> for FieldOptions { let mut unverified_lazy__ = None; let mut deprecated__ = None; let mut weak__ = None; + let mut debug_redact__ = None; + let mut retention__ = None; + let mut targets__ = None; + let mut edition_defaults__ = None; + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -2098,65 +3502,286 @@ impl<'de> serde::Deserialize<'de> for FieldOptions { } deprecated__ = map.next_value()?; } - GeneratedField::Weak => { - if weak__.is_some() { - return Err(serde::de::Error::duplicate_field("weak")); + GeneratedField::Weak => { + if weak__.is_some() { + return Err(serde::de::Error::duplicate_field("weak")); + } + weak__ = map.next_value()?; + } + GeneratedField::DebugRedact => { + if debug_redact__.is_some() { + return Err(serde::de::Error::duplicate_field("debugRedact")); + } + debug_redact__ = map.next_value()?; + } + GeneratedField::Retention => { + if retention__.is_some() { + return Err(serde::de::Error::duplicate_field("retention")); + } + retention__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } + GeneratedField::Targets => { + if targets__.is_some() { + return Err(serde::de::Error::duplicate_field("targets")); + } + targets__ = Some(map.next_value::<::alloc::vec::Vec>()?.into_iter().map(|x| x as i32).collect()); + } + GeneratedField::EditionDefaults => { + if edition_defaults__.is_some() { + return Err(serde::de::Error::duplicate_field("editionDefaults")); + } + edition_defaults__ = Some(map.next_value()?); + } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } + GeneratedField::UninterpretedOption => { + if uninterpreted_option__.is_some() { + return Err(serde::de::Error::duplicate_field("uninterpretedOption")); + } + uninterpreted_option__ = Some(map.next_value()?); + } + } + } + Ok(FieldOptions { + ctype: ctype__, + packed: packed__, + jstype: jstype__, + lazy: lazy__, + unverified_lazy: unverified_lazy__, + deprecated: deprecated__, + weak: weak__, + debug_redact: debug_redact__, + retention: retention__, + targets: targets__.unwrap_or_default(), + edition_defaults: edition_defaults__.unwrap_or_default(), + features: features__, + uninterpreted_option: uninterpreted_option__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("google.protobuf.FieldOptions", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for field_options::CType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::String => "STRING", + Self::Cord => "CORD", + Self::StringPiece => "STRING_PIECE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for field_options::CType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "STRING", + "CORD", + "STRING_PIECE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = field_options::CType; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(field_options::CType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(field_options::CType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "STRING" => Ok(field_options::CType::String), + "CORD" => Ok(field_options::CType::Cord), + "STRING_PIECE" => Ok(field_options::CType::StringPiece), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for field_options::EditionDefault { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("google.protobuf.FieldOptions.EditionDefault", len)?; + if let Some(v) = self.edition.as_ref() { + let v = Edition::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("edition", &v)?; + } + if let Some(v) = self.value.as_ref() { + struct_ser.serialize_field("value", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for field_options::EditionDefault { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "edition", + "value", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Edition, + Value, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "edition" => Ok(GeneratedField::Edition), + "value" => Ok(GeneratedField::Value), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = field_options::EditionDefault; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct google.protobuf.FieldOptions.EditionDefault") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut edition__ = None; + let mut value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Edition => { + if edition__.is_some() { + return Err(serde::de::Error::duplicate_field("edition")); } - weak__ = map.next_value()?; + edition__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); } - GeneratedField::UninterpretedOption => { - if uninterpreted_option__.is_some() { - return Err(serde::de::Error::duplicate_field("uninterpretedOption")); + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); } - uninterpreted_option__ = Some(map.next_value()?); + value__ = map.next_value()?; } } } - Ok(FieldOptions { - ctype: ctype__, - packed: packed__, - jstype: jstype__, - lazy: lazy__, - unverified_lazy: unverified_lazy__, - deprecated: deprecated__, - weak: weak__, - uninterpreted_option: uninterpreted_option__.unwrap_or_default(), + Ok(field_options::EditionDefault { + edition: edition__, + value: value__, }) } } - deserializer.deserialize_struct("google.protobuf.FieldOptions", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("google.protobuf.FieldOptions.EditionDefault", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for field_options::CType { +impl serde::Serialize for field_options::JsType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where S: serde::Serializer, { let variant = match self { - Self::String => "STRING", - Self::Cord => "CORD", - Self::StringPiece => "STRING_PIECE", + Self::JsNormal => "JS_NORMAL", + Self::JsString => "JS_STRING", + Self::JsNumber => "JS_NUMBER", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for field_options::CType { +impl<'de> serde::Deserialize<'de> for field_options::JsType { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "STRING", - "CORD", - "STRING_PIECE", + "JS_NORMAL", + "JS_STRING", + "JS_NUMBER", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = field_options::CType; + type Value = field_options::JsType; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -2169,7 +3794,7 @@ impl<'de> serde::Deserialize<'de> for field_options::CType { use core::convert::TryFrom; i32::try_from(v) .ok() - .and_then(field_options::CType::from_i32) + .and_then(field_options::JsType::from_i32) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -2182,7 +3807,7 @@ impl<'de> serde::Deserialize<'de> for field_options::CType { use core::convert::TryFrom; i32::try_from(v) .ok() - .and_then(field_options::CType::from_i32) + .and_then(field_options::JsType::from_i32) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -2193,9 +3818,9 @@ impl<'de> serde::Deserialize<'de> for field_options::CType { E: serde::de::Error, { match value { - "STRING" => Ok(field_options::CType::String), - "CORD" => Ok(field_options::CType::Cord), - "STRING_PIECE" => Ok(field_options::CType::StringPiece), + "JS_NORMAL" => Ok(field_options::JsType::JsNormal), + "JS_STRING" => Ok(field_options::JsType::JsString), + "JS_NUMBER" => Ok(field_options::JsType::JsNumber), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -2203,36 +3828,36 @@ impl<'de> serde::Deserialize<'de> for field_options::CType { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for field_options::JsType { +impl serde::Serialize for field_options::OptionRetention { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result where S: serde::Serializer, { let variant = match self { - Self::JsNormal => "JS_NORMAL", - Self::JsString => "JS_STRING", - Self::JsNumber => "JS_NUMBER", + Self::RetentionUnknown => "RETENTION_UNKNOWN", + Self::RetentionRuntime => "RETENTION_RUNTIME", + Self::RetentionSource => "RETENTION_SOURCE", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for field_options::JsType { +impl<'de> serde::Deserialize<'de> for field_options::OptionRetention { #[allow(deprecated)] fn deserialize(deserializer: D) -> core::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "JS_NORMAL", - "JS_STRING", - "JS_NUMBER", + "RETENTION_UNKNOWN", + "RETENTION_RUNTIME", + "RETENTION_SOURCE", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = field_options::JsType; + type Value = field_options::OptionRetention; fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -2245,7 +3870,7 @@ impl<'de> serde::Deserialize<'de> for field_options::JsType { use core::convert::TryFrom; i32::try_from(v) .ok() - .and_then(field_options::JsType::from_i32) + .and_then(field_options::OptionRetention::from_i32) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) }) @@ -2258,7 +3883,7 @@ impl<'de> serde::Deserialize<'de> for field_options::JsType { use core::convert::TryFrom; i32::try_from(v) .ok() - .and_then(field_options::JsType::from_i32) + .and_then(field_options::OptionRetention::from_i32) .ok_or_else(|| { serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) }) @@ -2269,9 +3894,106 @@ impl<'de> serde::Deserialize<'de> for field_options::JsType { E: serde::de::Error, { match value { - "JS_NORMAL" => Ok(field_options::JsType::JsNormal), - "JS_STRING" => Ok(field_options::JsType::JsString), - "JS_NUMBER" => Ok(field_options::JsType::JsNumber), + "RETENTION_UNKNOWN" => Ok(field_options::OptionRetention::RetentionUnknown), + "RETENTION_RUNTIME" => Ok(field_options::OptionRetention::RetentionRuntime), + "RETENTION_SOURCE" => Ok(field_options::OptionRetention::RetentionSource), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for field_options::OptionTargetType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN", + Self::TargetTypeFile => "TARGET_TYPE_FILE", + Self::TargetTypeExtensionRange => "TARGET_TYPE_EXTENSION_RANGE", + Self::TargetTypeMessage => "TARGET_TYPE_MESSAGE", + Self::TargetTypeField => "TARGET_TYPE_FIELD", + Self::TargetTypeOneof => "TARGET_TYPE_ONEOF", + Self::TargetTypeEnum => "TARGET_TYPE_ENUM", + Self::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY", + Self::TargetTypeService => "TARGET_TYPE_SERVICE", + Self::TargetTypeMethod => "TARGET_TYPE_METHOD", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for field_options::OptionTargetType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "TARGET_TYPE_UNKNOWN", + "TARGET_TYPE_FILE", + "TARGET_TYPE_EXTENSION_RANGE", + "TARGET_TYPE_MESSAGE", + "TARGET_TYPE_FIELD", + "TARGET_TYPE_ONEOF", + "TARGET_TYPE_ENUM", + "TARGET_TYPE_ENUM_ENTRY", + "TARGET_TYPE_SERVICE", + "TARGET_TYPE_METHOD", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = field_options::OptionTargetType; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(field_options::OptionTargetType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(field_options::OptionTargetType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "TARGET_TYPE_UNKNOWN" => Ok(field_options::OptionTargetType::TargetTypeUnknown), + "TARGET_TYPE_FILE" => Ok(field_options::OptionTargetType::TargetTypeFile), + "TARGET_TYPE_EXTENSION_RANGE" => Ok(field_options::OptionTargetType::TargetTypeExtensionRange), + "TARGET_TYPE_MESSAGE" => Ok(field_options::OptionTargetType::TargetTypeMessage), + "TARGET_TYPE_FIELD" => Ok(field_options::OptionTargetType::TargetTypeField), + "TARGET_TYPE_ONEOF" => Ok(field_options::OptionTargetType::TargetTypeOneof), + "TARGET_TYPE_ENUM" => Ok(field_options::OptionTargetType::TargetTypeEnum), + "TARGET_TYPE_ENUM_ENTRY" => Ok(field_options::OptionTargetType::TargetTypeEnumEntry), + "TARGET_TYPE_SERVICE" => Ok(field_options::OptionTargetType::TargetTypeService), + "TARGET_TYPE_METHOD" => Ok(field_options::OptionTargetType::TargetTypeMethod), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -2323,6 +4045,9 @@ impl serde::Serialize for FileDescriptorProto { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.FileDescriptorProto", len)?; if let Some(v) = self.name.as_ref() { struct_ser.serialize_field("name", v)?; @@ -2360,6 +4085,11 @@ impl serde::Serialize for FileDescriptorProto { if let Some(v) = self.syntax.as_ref() { struct_ser.serialize_field("syntax", v)?; } + if let Some(v) = self.edition.as_ref() { + let v = Edition::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("edition", &v)?; + } struct_ser.end() } } @@ -2387,6 +4117,7 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { "source_code_info", "sourceCodeInfo", "syntax", + "edition", ]; #[allow(clippy::enum_variant_names)] @@ -2403,6 +4134,7 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { Options, SourceCodeInfo, Syntax, + Edition, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -2436,6 +4168,7 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { "options" => Ok(GeneratedField::Options), "sourceCodeInfo" | "source_code_info" => Ok(GeneratedField::SourceCodeInfo), "syntax" => Ok(GeneratedField::Syntax), + "edition" => Ok(GeneratedField::Edition), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2467,6 +4200,7 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { let mut options__ = None; let mut source_code_info__ = None; let mut syntax__ = None; + let mut edition__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Name => { @@ -2547,6 +4281,12 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { } syntax__ = map.next_value()?; } + GeneratedField::Edition => { + if edition__.is_some() { + return Err(serde::de::Error::duplicate_field("edition")); + } + edition__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } } } Ok(FileDescriptorProto { @@ -2562,6 +4302,7 @@ impl<'de> serde::Deserialize<'de> for FileDescriptorProto { options: options__, source_code_info: source_code_info__, syntax: syntax__, + edition: edition__, }) } } @@ -2730,6 +4471,9 @@ impl serde::Serialize for FileOptions { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.FileOptions", len)?; if let Some(v) = self.java_package.as_ref() { struct_ser.serialize_field("javaPackage", v)?; @@ -2793,6 +4537,9 @@ impl serde::Serialize for FileOptions { if let Some(v) = self.ruby_package.as_ref() { struct_ser.serialize_field("rubyPackage", v)?; } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -2845,6 +4592,7 @@ impl<'de> serde::Deserialize<'de> for FileOptions { "phpMetadataNamespace", "ruby_package", "rubyPackage", + "features", "uninterpreted_option", "uninterpretedOption", ]; @@ -2871,6 +4619,7 @@ impl<'de> serde::Deserialize<'de> for FileOptions { PhpNamespace, PhpMetadataNamespace, RubyPackage, + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2913,6 +4662,7 @@ impl<'de> serde::Deserialize<'de> for FileOptions { "phpNamespace" | "php_namespace" => Ok(GeneratedField::PhpNamespace), "phpMetadataNamespace" | "php_metadata_namespace" => Ok(GeneratedField::PhpMetadataNamespace), "rubyPackage" | "ruby_package" => Ok(GeneratedField::RubyPackage), + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -2953,6 +4703,7 @@ impl<'de> serde::Deserialize<'de> for FileOptions { let mut php_namespace__ = None; let mut php_metadata_namespace__ = None; let mut ruby_package__ = None; + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -3076,6 +4827,12 @@ impl<'de> serde::Deserialize<'de> for FileOptions { } ruby_package__ = map.next_value()?; } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -3105,6 +4862,7 @@ impl<'de> serde::Deserialize<'de> for FileOptions { php_namespace: php_namespace__, php_metadata_namespace: php_metadata_namespace__, ruby_package: ruby_package__, + features: features__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -3299,6 +5057,9 @@ impl serde::Serialize for generated_code_info::Annotation { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.GeneratedCodeInfo.Annotation", len)?; if true { struct_ser.serialize_field("path", &self.path)?; @@ -3312,6 +5073,11 @@ impl serde::Serialize for generated_code_info::Annotation { if let Some(v) = self.end.as_ref() { struct_ser.serialize_field("end", v)?; } + if let Some(v) = self.semantic.as_ref() { + let v = generated_code_info::annotation::Semantic::from_i32(*v) + .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("semantic", &v)?; + } struct_ser.end() } } @@ -3327,6 +5093,7 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { "sourceFile", "begin", "end", + "semantic", ]; #[allow(clippy::enum_variant_names)] @@ -3335,6 +5102,7 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { SourceFile, Begin, End, + Semantic, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -3360,6 +5128,7 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { "sourceFile" | "source_file" => Ok(GeneratedField::SourceFile), "begin" => Ok(GeneratedField::Begin), "end" => Ok(GeneratedField::End), + "semantic" => Ok(GeneratedField::Semantic), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3383,6 +5152,7 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { let mut source_file__ = None; let mut begin__ = None; let mut end__ = None; + let mut semantic__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Path => { @@ -3416,6 +5186,12 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { map.next_value::<::core::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) ; } + GeneratedField::Semantic => { + if semantic__.is_some() { + return Err(serde::de::Error::duplicate_field("semantic")); + } + semantic__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); + } } } Ok(generated_code_info::Annotation { @@ -3423,12 +5199,89 @@ impl<'de> serde::Deserialize<'de> for generated_code_info::Annotation { source_file: source_file__, begin: begin__, end: end__, + semantic: semantic__, }) } } deserializer.deserialize_struct("google.protobuf.GeneratedCodeInfo.Annotation", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for generated_code_info::annotation::Semantic { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::None => "NONE", + Self::Set => "SET", + Self::Alias => "ALIAS", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for generated_code_info::annotation::Semantic { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "NONE", + "SET", + "ALIAS", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = generated_code_info::annotation::Semantic; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(generated_code_info::annotation::Semantic::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> core::result::Result + where + E: serde::de::Error, + { + use core::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(generated_code_info::annotation::Semantic::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "NONE" => Ok(generated_code_info::annotation::Semantic::None), + "SET" => Ok(generated_code_info::annotation::Semantic::Set), + "ALIAS" => Ok(generated_code_info::annotation::Semantic::Alias), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} impl serde::Serialize for MessageOptions { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result @@ -3452,6 +5305,12 @@ impl serde::Serialize for MessageOptions { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.MessageOptions", len)?; if let Some(v) = self.message_set_wire_format.as_ref() { struct_ser.serialize_field("messageSetWireFormat", v)?; @@ -3465,6 +5324,12 @@ impl serde::Serialize for MessageOptions { if let Some(v) = self.map_entry.as_ref() { struct_ser.serialize_field("mapEntry", v)?; } + if let Some(v) = self.deprecated_legacy_json_field_conflicts.as_ref() { + struct_ser.serialize_field("deprecatedLegacyJsonFieldConflicts", v)?; + } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -3485,6 +5350,9 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { "deprecated", "map_entry", "mapEntry", + "deprecated_legacy_json_field_conflicts", + "deprecatedLegacyJsonFieldConflicts", + "features", "uninterpreted_option", "uninterpretedOption", ]; @@ -3495,6 +5363,8 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { NoStandardDescriptorAccessor, Deprecated, MapEntry, + DeprecatedLegacyJsonFieldConflicts, + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3521,6 +5391,8 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { "noStandardDescriptorAccessor" | "no_standard_descriptor_accessor" => Ok(GeneratedField::NoStandardDescriptorAccessor), "deprecated" => Ok(GeneratedField::Deprecated), "mapEntry" | "map_entry" => Ok(GeneratedField::MapEntry), + "deprecatedLegacyJsonFieldConflicts" | "deprecated_legacy_json_field_conflicts" => Ok(GeneratedField::DeprecatedLegacyJsonFieldConflicts), + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -3545,6 +5417,8 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { let mut no_standard_descriptor_accessor__ = None; let mut deprecated__ = None; let mut map_entry__ = None; + let mut deprecated_legacy_json_field_conflicts__ = None; + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -3572,6 +5446,18 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { } map_entry__ = map.next_value()?; } + GeneratedField::DeprecatedLegacyJsonFieldConflicts => { + if deprecated_legacy_json_field_conflicts__.is_some() { + return Err(serde::de::Error::duplicate_field("deprecatedLegacyJsonFieldConflicts")); + } + deprecated_legacy_json_field_conflicts__ = map.next_value()?; + } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -3585,6 +5471,8 @@ impl<'de> serde::Deserialize<'de> for MessageOptions { no_standard_descriptor_accessor: no_standard_descriptor_accessor__, deprecated: deprecated__, map_entry: map_entry__, + deprecated_legacy_json_field_conflicts: deprecated_legacy_json_field_conflicts__, + features: features__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -3789,6 +5677,9 @@ impl serde::Serialize for MethodOptions { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.MethodOptions", len)?; if let Some(v) = self.deprecated.as_ref() { struct_ser.serialize_field("deprecated", v)?; @@ -3798,6 +5689,9 @@ impl serde::Serialize for MethodOptions { .ok_or_else(|| serde::ser::Error::custom(::alloc::format!("Invalid variant {}", *v)))?; struct_ser.serialize_field("idempotencyLevel", &v)?; } + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -3814,6 +5708,7 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { "deprecated", "idempotency_level", "idempotencyLevel", + "features", "uninterpreted_option", "uninterpretedOption", ]; @@ -3822,6 +5717,7 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { enum GeneratedField { Deprecated, IdempotencyLevel, + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3846,6 +5742,7 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { match value { "deprecated" => Ok(GeneratedField::Deprecated), "idempotencyLevel" | "idempotency_level" => Ok(GeneratedField::IdempotencyLevel), + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -3868,6 +5765,7 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { { let mut deprecated__ = None; let mut idempotency_level__ = None; + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { @@ -3883,6 +5781,12 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { } idempotency_level__ = map.next_value::<::core::option::Option>()?.map(|x| x as i32); } + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -3894,6 +5798,7 @@ impl<'de> serde::Deserialize<'de> for MethodOptions { Ok(MethodOptions { deprecated: deprecated__, idempotency_level: idempotency_level__, + features: features__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -4096,7 +6001,13 @@ impl serde::Serialize for OneofOptions { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.OneofOptions", len)?; + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if true { struct_ser.serialize_field("uninterpretedOption", &self.uninterpreted_option)?; } @@ -4110,12 +6021,14 @@ impl<'de> serde::Deserialize<'de> for OneofOptions { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "features", "uninterpreted_option", "uninterpretedOption", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + Features, UninterpretedOption, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4138,6 +6051,7 @@ impl<'de> serde::Deserialize<'de> for OneofOptions { E: serde::de::Error, { match value { + "features" => Ok(GeneratedField::Features), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -4158,9 +6072,16 @@ impl<'de> serde::Deserialize<'de> for OneofOptions { where V: serde::de::MapAccess<'de>, { + let mut features__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::UninterpretedOption => { if uninterpreted_option__.is_some() { return Err(serde::de::Error::duplicate_field("uninterpretedOption")); @@ -4170,6 +6091,7 @@ impl<'de> serde::Deserialize<'de> for OneofOptions { } } Ok(OneofOptions { + features: features__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) } @@ -4316,7 +6238,13 @@ impl serde::Serialize for ServiceOptions { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("google.protobuf.ServiceOptions", len)?; + if let Some(v) = self.features.as_ref() { + struct_ser.serialize_field("features", v)?; + } if let Some(v) = self.deprecated.as_ref() { struct_ser.serialize_field("deprecated", v)?; } @@ -4333,6 +6261,7 @@ impl<'de> serde::Deserialize<'de> for ServiceOptions { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "features", "deprecated", "uninterpreted_option", "uninterpretedOption", @@ -4340,6 +6269,7 @@ impl<'de> serde::Deserialize<'de> for ServiceOptions { #[allow(clippy::enum_variant_names)] enum GeneratedField { + Features, Deprecated, UninterpretedOption, } @@ -4363,6 +6293,7 @@ impl<'de> serde::Deserialize<'de> for ServiceOptions { E: serde::de::Error, { match value { + "features" => Ok(GeneratedField::Features), "deprecated" => Ok(GeneratedField::Deprecated), "uninterpretedOption" | "uninterpreted_option" => Ok(GeneratedField::UninterpretedOption), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), @@ -4384,10 +6315,17 @@ impl<'de> serde::Deserialize<'de> for ServiceOptions { where V: serde::de::MapAccess<'de>, { + let mut features__ = None; let mut deprecated__ = None; let mut uninterpreted_option__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::Features => { + if features__.is_some() { + return Err(serde::de::Error::duplicate_field("features")); + } + features__ = map.next_value()?; + } GeneratedField::Deprecated => { if deprecated__.is_some() { return Err(serde::de::Error::duplicate_field("deprecated")); @@ -4403,6 +6341,7 @@ impl<'de> serde::Deserialize<'de> for ServiceOptions { } } Ok(ServiceOptions { + features: features__, deprecated: deprecated__, uninterpreted_option: uninterpreted_option__.unwrap_or_default(), }) diff --git a/src/prost/ibc.lightclients.wasm.v1.rs b/src/prost/ibc.lightclients.wasm.v1.rs new file mode 100644 index 00000000..0d4a2936 --- /dev/null +++ b/src/prost/ibc.lightclients.wasm.v1.rs @@ -0,0 +1,1100 @@ +/// MsgStoreCode defines the request type for the StoreCode rpc. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreCode { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// wasm byte code of light client contract. It can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgStoreCode { + const NAME: &'static str = "MsgStoreCode"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgStoreCodeResponse defines the response type for the StoreCode rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgStoreCodeResponse { + /// checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "1")] + pub checksum: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgStoreCodeResponse { + const NAME: &'static str = "MsgStoreCodeResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveChecksum { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// checksum is the sha256 hash to be removed from the store + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgRemoveChecksum { + const NAME: &'static str = "MsgRemoveChecksum"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgStoreChecksumResponse defines the response type for the StoreCode rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveChecksumResponse {} +impl ::prost::Name for MsgRemoveChecksumResponse { + const NAME: &'static str = "MsgRemoveChecksumResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgMigrateContract defines the request type for the MigrateContract rpc. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMigrateContract { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// the client id of the contract + #[prost(string, tag = "2")] + pub client_id: ::prost::alloc::string::String, + /// checksum is the sha256 hash of the new wasm byte code for the contract + #[prost(bytes = "vec", tag = "3")] + pub checksum: ::prost::alloc::vec::Vec, + /// the json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgMigrateContract { + const NAME: &'static str = "MsgMigrateContract"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgMigrateContractResponse defines the response type for the MigrateContract rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMigrateContractResponse {} +impl ::prost::Name for MsgMigrateContractResponse { + const NAME: &'static str = "MsgMigrateContractResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the ibc/08-wasm Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// StoreCode defines a rpc handler method for MsgStoreCode. + pub async fn store_code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/StoreCode", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "StoreCode")); + self.inner.unary(req, path, codec).await + } + /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. + pub async fn remove_checksum( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "RemoveChecksum"), + ); + self.inner.unary(req, path, codec).await + } + /// MigrateContract defines a rpc handler method for MsgMigrateContract. + pub async fn migrate_contract( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/MigrateContract", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "MigrateContract"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// StoreCode defines a rpc handler method for MsgStoreCode. + async fn store_code( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. + async fn remove_checksum( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// MigrateContract defines a rpc handler method for MsgMigrateContract. + async fn migrate_contract( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the ibc/08-wasm Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.lightclients.wasm.v1.Msg/StoreCode" => { + #[allow(non_camel_case_types)] + struct StoreCodeSvc(pub Arc); + impl tonic::server::UnaryService + for StoreCodeSvc { + type Response = super::MsgStoreCodeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::store_code(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = StoreCodeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum" => { + #[allow(non_camel_case_types)] + struct RemoveChecksumSvc(pub Arc); + impl tonic::server::UnaryService + for RemoveChecksumSvc { + type Response = super::MsgRemoveChecksumResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::remove_checksum(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = RemoveChecksumSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.lightclients.wasm.v1.Msg/MigrateContract" => { + #[allow(non_camel_case_types)] + struct MigrateContractSvc(pub Arc); + impl tonic::server::UnaryService + for MigrateContractSvc { + type Response = super::MsgMigrateContractResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::migrate_contract(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = MigrateContractSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for MsgServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.lightclients.wasm.v1.Msg"; + } +} +/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryChecksumsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryChecksumsRequest { + const NAME: &'static str = "QueryChecksumsRequest"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryChecksumsResponse { + /// checksums is a list of the hex encoded checksums of all wasm codes stored. + #[prost(string, repeated, tag = "1")] + pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryChecksumsResponse { + const NAME: &'static str = "QueryChecksumsResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// QueryCodeRequest is the request type for the Query/Code RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryCodeRequest { + /// checksum is a hex encoded string of the code stored. + #[prost(string, tag = "1")] + pub checksum: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryCodeRequest { + const NAME: &'static str = "QueryCodeRequest"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// QueryCodeResponse is the response type for the Query/Code RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryCodeResponse { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryCodeResponse { + const NAME: &'static str = "QueryCodeResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query service for wasm module + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Get all Wasm checksums + pub async fn checksums( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Query/Checksums", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Checksums")); + self.inner.unary(req, path, codec).await + } + /// Get Wasm code for given code hash + pub async fn code( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Query/Code", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Code")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod query_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + #[async_trait] + pub trait Query: Send + Sync + 'static { + /// Get all Wasm checksums + async fn checksums( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Get Wasm code for given code hash + async fn code( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Query service for wasm module + #[derive(Debug)] + pub struct QueryServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl QueryServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for QueryServer + where + T: Query, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.lightclients.wasm.v1.Query/Checksums" => { + #[allow(non_camel_case_types)] + struct ChecksumsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ChecksumsSvc { + type Response = super::QueryChecksumsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::checksums(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ChecksumsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.lightclients.wasm.v1.Query/Code" => { + #[allow(non_camel_case_types)] + struct CodeSvc(pub Arc); + impl tonic::server::UnaryService + for CodeSvc { + type Response = super::QueryCodeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::code(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = CodeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.lightclients.wasm.v1.Query"; + } +} +/// GenesisState defines 08-wasm's keeper genesis state +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + /// uploaded light client wasm contracts + #[prost(message, repeated, tag = "1")] + pub contracts: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Contract stores contract code +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Contract { + /// contract byte code + #[prost(bytes = "vec", tag = "1")] + pub code_bytes: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Contract { + const NAME: &'static str = "Contract"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Wasm light client's Client state +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClientState { + /// bytes encoding the client state of the underlying light client + /// implemented as a Wasm contract. + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub latest_height: ::core::option::Option< + super::super::super::core::client::v1::Height, + >, +} +impl ::prost::Name for ClientState { + const NAME: &'static str = "ClientState"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Wasm light client's ConsensusState +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusState { + /// bytes encoding the consensus state of the underlying light client + /// implemented as a Wasm contract. + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ConsensusState { + const NAME: &'static str = "ConsensusState"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Wasm light client message (either header(s) or misbehaviour) +#[cfg_attr( + all(feature = "json-schema", feature = "serde"), + derive(::schemars::JsonSchema) +)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ClientMessage { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ClientMessage { + const NAME: &'static str = "ClientMessage"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// Checksums defines a list of all checksums that are stored +/// +/// Deprecated: This message is deprecated in favor of storing the checksums +/// using a Collections.KeySet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Checksums { + #[prost(bytes = "vec", repeated, tag = "1")] + pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +impl ::prost::Name for Checksums { + const NAME: &'static str = "Checksums"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} diff --git a/src/prost/ibc.lightclients.wasm.v1.serde.rs b/src/prost/ibc.lightclients.wasm.v1.serde.rs new file mode 100644 index 00000000..7eadd637 --- /dev/null +++ b/src/prost/ibc.lightclients.wasm.v1.serde.rs @@ -0,0 +1,1581 @@ +impl serde::Serialize for Checksums { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.Checksums", len)?; + if true { + struct_ser.serialize_field("checksums", &self.checksums.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Checksums { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "checksums", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Checksums, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "checksums" => Ok(GeneratedField::Checksums), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Checksums; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.Checksums") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut checksums__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Checksums => { + if checksums__.is_some() { + return Err(serde::de::Error::duplicate_field("checksums")); + } + checksums__ = + Some(map.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? + .into_iter().map(|x| x.0).collect()) + ; + } + } + } + Ok(Checksums { + checksums: checksums__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.Checksums", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ClientMessage { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.ClientMessage", len)?; + if true { + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ClientMessage { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ClientMessage; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.ClientMessage") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(ClientMessage { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.ClientMessage", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ClientState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.ClientState", len)?; + if true { + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + if true { + struct_ser.serialize_field("checksum", pbjson::private::base64::encode(&self.checksum).as_str())?; + } + if let Some(v) = self.latest_height.as_ref() { + struct_ser.serialize_field("latestHeight", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ClientState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "data", + "checksum", + "latest_height", + "latestHeight", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + Checksum, + LatestHeight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + "checksum" => Ok(GeneratedField::Checksum), + "latestHeight" | "latest_height" => Ok(GeneratedField::LatestHeight), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ClientState; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.ClientState") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + let mut checksum__ = None; + let mut latest_height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::LatestHeight => { + if latest_height__.is_some() { + return Err(serde::de::Error::duplicate_field("latestHeight")); + } + latest_height__ = map.next_value()?; + } + } + } + Ok(ClientState { + data: data__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + latest_height: latest_height__, + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.ClientState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ConsensusState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.ConsensusState", len)?; + if true { + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConsensusState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConsensusState; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.ConsensusState") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(ConsensusState { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.ConsensusState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Contract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.Contract", len)?; + if true { + struct_ser.serialize_field("codeBytes", pbjson::private::base64::encode(&self.code_bytes).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Contract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code_bytes", + "codeBytes", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + CodeBytes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "codeBytes" | "code_bytes" => Ok(GeneratedField::CodeBytes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Contract; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.Contract") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code_bytes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::CodeBytes => { + if code_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("codeBytes")); + } + code_bytes__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(Contract { + code_bytes: code_bytes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.Contract", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GenesisState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.GenesisState", len)?; + if true { + struct_ser.serialize_field("contracts", &self.contracts)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GenesisState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "contracts", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Contracts, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "contracts" => Ok(GeneratedField::Contracts), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GenesisState; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.GenesisState") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut contracts__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Contracts => { + if contracts__.is_some() { + return Err(serde::de::Error::duplicate_field("contracts")); + } + contracts__ = Some(map.next_value()?); + } + } + } + Ok(GenesisState { + contracts: contracts__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.GenesisState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgMigrateContract { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgMigrateContract", len)?; + if true { + struct_ser.serialize_field("signer", &self.signer)?; + } + if true { + struct_ser.serialize_field("clientId", &self.client_id)?; + } + if true { + struct_ser.serialize_field("checksum", pbjson::private::base64::encode(&self.checksum).as_str())?; + } + if true { + struct_ser.serialize_field("msg", pbjson::private::base64::encode(&self.msg).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMigrateContract { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signer", + "client_id", + "clientId", + "checksum", + "msg", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signer, + ClientId, + Checksum, + Msg, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "signer" => Ok(GeneratedField::Signer), + "clientId" | "client_id" => Ok(GeneratedField::ClientId), + "checksum" => Ok(GeneratedField::Checksum), + "msg" => Ok(GeneratedField::Msg), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgMigrateContract; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgMigrateContract") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signer__ = None; + let mut client_id__ = None; + let mut checksum__ = None; + let mut msg__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signer => { + if signer__.is_some() { + return Err(serde::de::Error::duplicate_field("signer")); + } + signer__ = Some(map.next_value()?); + } + GeneratedField::ClientId => { + if client_id__.is_some() { + return Err(serde::de::Error::duplicate_field("clientId")); + } + client_id__ = Some(map.next_value()?); + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::Msg => { + if msg__.is_some() { + return Err(serde::de::Error::duplicate_field("msg")); + } + msg__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(MsgMigrateContract { + signer: signer__.unwrap_or_default(), + client_id: client_id__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + msg: msg__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgMigrateContract", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgMigrateContractResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgMigrateContractResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgMigrateContractResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgMigrateContractResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgMigrateContractResponse") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgMigrateContractResponse { + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgMigrateContractResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgRemoveChecksum { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgRemoveChecksum", len)?; + if true { + struct_ser.serialize_field("signer", &self.signer)?; + } + if true { + struct_ser.serialize_field("checksum", pbjson::private::base64::encode(&self.checksum).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRemoveChecksum { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signer", + "checksum", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signer, + Checksum, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "signer" => Ok(GeneratedField::Signer), + "checksum" => Ok(GeneratedField::Checksum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgRemoveChecksum; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgRemoveChecksum") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signer__ = None; + let mut checksum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signer => { + if signer__.is_some() { + return Err(serde::de::Error::duplicate_field("signer")); + } + signer__ = Some(map.next_value()?); + } + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(MsgRemoveChecksum { + signer: signer__.unwrap_or_default(), + checksum: checksum__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgRemoveChecksum", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgRemoveChecksumResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgRemoveChecksumResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgRemoveChecksumResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(MsgRemoveChecksumResponse { + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgStoreCode { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgStoreCode", len)?; + if true { + struct_ser.serialize_field("signer", &self.signer)?; + } + if true { + struct_ser.serialize_field("wasmByteCode", pbjson::private::base64::encode(&self.wasm_byte_code).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreCode { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signer", + "wasm_byte_code", + "wasmByteCode", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signer, + WasmByteCode, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "signer" => Ok(GeneratedField::Signer), + "wasmByteCode" | "wasm_byte_code" => Ok(GeneratedField::WasmByteCode), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreCode; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgStoreCode") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signer__ = None; + let mut wasm_byte_code__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signer => { + if signer__.is_some() { + return Err(serde::de::Error::duplicate_field("signer")); + } + signer__ = Some(map.next_value()?); + } + GeneratedField::WasmByteCode => { + if wasm_byte_code__.is_some() { + return Err(serde::de::Error::duplicate_field("wasmByteCode")); + } + wasm_byte_code__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(MsgStoreCode { + signer: signer__.unwrap_or_default(), + wasm_byte_code: wasm_byte_code__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgStoreCode", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgStoreCodeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.MsgStoreCodeResponse", len)?; + if true { + struct_ser.serialize_field("checksum", pbjson::private::base64::encode(&self.checksum).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgStoreCodeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "checksum", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Checksum, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "checksum" => Ok(GeneratedField::Checksum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgStoreCodeResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.MsgStoreCodeResponse") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut checksum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(MsgStoreCodeResponse { + checksum: checksum__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.MsgStoreCodeResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryChecksumsRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.QueryChecksumsRequest", len)?; + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryChecksumsRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryChecksumsRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.QueryChecksumsRequest") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryChecksumsRequest { + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.QueryChecksumsRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryChecksumsResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.QueryChecksumsResponse", len)?; + if true { + struct_ser.serialize_field("checksums", &self.checksums)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryChecksumsResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "checksums", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Checksums, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "checksums" => Ok(GeneratedField::Checksums), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryChecksumsResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.QueryChecksumsResponse") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut checksums__ = None; + let mut pagination__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Checksums => { + if checksums__.is_some() { + return Err(serde::de::Error::duplicate_field("checksums")); + } + checksums__ = Some(map.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map.next_value()?; + } + } + } + Ok(QueryChecksumsResponse { + checksums: checksums__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.QueryChecksumsResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryCodeRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.QueryCodeRequest", len)?; + if true { + struct_ser.serialize_field("checksum", &self.checksum)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCodeRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "checksum", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Checksum, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "checksum" => Ok(GeneratedField::Checksum), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCodeRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.QueryCodeRequest") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut checksum__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Checksum => { + if checksum__.is_some() { + return Err(serde::de::Error::duplicate_field("checksum")); + } + checksum__ = Some(map.next_value()?); + } + } + } + Ok(QueryCodeRequest { + checksum: checksum__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.QueryCodeRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryCodeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("ibc.lightclients.wasm.v1.QueryCodeResponse", len)?; + if true { + struct_ser.serialize_field("data", pbjson::private::base64::encode(&self.data).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryCodeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Data, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "data" => Ok(GeneratedField::Data), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryCodeResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct ibc.lightclients.wasm.v1.QueryCodeResponse") + } + + fn visit_map(self, mut map: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(QueryCodeResponse { + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("ibc.lightclients.wasm.v1.QueryCodeResponse", FIELDS, GeneratedVisitor) + } +} diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index bb1bdf04b84fa0804aba2499b430697819814b7f..4b58165469d40b53689796670fd1f6992b6b01d2 100644 GIT binary patch delta 42272 zcmd^od3;sXwf{ZyxhK=j%|N&Wa=Bp)Axu^Q0Syq4F&J>bq2ZETAR3aGn}}H3Beo8u zj=jop{D}`+T3f7|YSca}w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rIRc32=UKJebaAa#Xs5;Se7Lx)SmWs;F$CC#&-f^ zli2Li_X1<>Uhf7rcs}tyLmIi^Od!ub`);83d5!<<@N|7Y@Mllt05h{!{maOu#^9shnjuZ#PE9_kR%RHNdMaju&ScEw!XjT;JM=h(Oh?6@>yZ=VN|iy7-$B zq?P|P|@P4~TH{_HbBf3|z{Gx9{dZ!H`oV|qo^ z<<--tSJc(vIlOR^&i1r^MwAwUI1?5;#mums@ife_sh@GbSSxGnewP>zCTsPR*^j68 zhf#m7T6BudDg!UcOt`HYIZ)Yz`s!)rRdx2Q1B~uJC(@ntgh=X7n#*;RBFn}JhW>%C zpz@LUw*!m;!+(xR=0?-!8=aW_$x@@Gz4IQUU&0j%a?FT5`aUCK2NoFnljU8D+s4A5 zSJAFnXtc1GFEsjkY?NZ|xewvvMmk`yvS(fHE4nCwCxHbGoHHG=r0tC*stAV zq~nxsqQ1x+&M{wmLJS|E`K$u_ d88uiNc5iCN1W;Q>@z);mt=T(Xtp%60_+Mr4J}CeI diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index 90164458..41fcb0f8 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -161,6 +161,7 @@ impl CompileCmd { .type_attribute(".ibc.core.connection.v1.ConnectionEnd", attrs_jsonschema) .type_attribute(".ibc.core.connection.v1.Counterparty", attrs_jsonschema) .type_attribute(".ibc.core.connection.v1.Version", attrs_jsonschema) + .type_attribute(".ibc.lightclients.wasm.v1.ClientMessage", attrs_jsonschema) .compile_with_config(config, &protos, &includes)?; println!("[info ] Protos compiled successfully");