diff --git a/ydb-grpc/src/descriptors.bin b/ydb-grpc/src/descriptors.bin index 1334e116..538cbf78 100644 Binary files a/ydb-grpc/src/descriptors.bin and b/ydb-grpc/src/descriptors.bin differ diff --git a/ydb-grpc/src/generated/google.protobuf.rs b/ydb-grpc/src/generated/google.protobuf.rs index 82e92b65..ca75fe76 100644 --- a/ydb-grpc/src/generated/google.protobuf.rs +++ b/ydb-grpc/src/generated/google.protobuf.rs @@ -17,10 +17,6 @@ /// 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. /// foo = Foo(...) /// any = Any() @@ -91,8 +87,7 @@ pub struct Any { /// breaking changes.) /// Note: this functionality is not currently available in the official /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. As of May 2023, there are no widely used type server - /// implementations and no plans to implement one. + /// type.googleapis.com. /// Schemes other than `http`, `https` (or the empty scheme) might be /// used with implementation specific semantics. #[prost(string, tag = "1")] @@ -207,13 +202,9 @@ 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", "proto3", and "editions". - /// If `edition` is present, this value must be "editions". + /// The supported values are "proto2" and "proto3". #[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, } /// Describes a message type. #[derive(Clone, PartialEq, ::prost::Message)] @@ -272,80 +263,6 @@ 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 { - #[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, - } - /// 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", - } - } - } } /// Describes a field within a message. #[derive(Clone, PartialEq, ::prost::Message)] @@ -375,6 +292,7 @@ pub struct FieldDescriptorProto { /// For booleans, "true" or "false". /// For strings, contains the default text contents (not escaped in any way). /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. + /// TODO(kenton): Base-64 encode? #[prost(string, optional, tag = "7")] pub default_value: ::core::option::Option<::prost::alloc::string::String>, /// If set, gives the index of a oneof in the containing type's oneof_decl @@ -441,10 +359,9 @@ pub mod field_descriptor_proto { Bool = 8, String = 9, /// Tag-delimited aggregate. - /// Group type is deprecated and not supported after google.protobuf. However, Proto3 + /// Group type is deprecated and not supported in proto3. However, Proto3 /// implementations should still be able to parse the group wire format and - /// treat group fields as unknown fields. In Editions, the group wire format - /// can be enabled via the `message_encoding` feature. + /// treat group fields as unknown fields. Group = 10, /// Length-delimited aggregate. Message = 11, @@ -501,11 +418,8 @@ pub mod field_descriptor_proto { pub enum Label { /// 0 is reserved for errors Optional = 1, - 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, + Repeated = 3, } impl Label { /// String value of the enum field names used in the ProtoBuf definition. @@ -514,8 +428,8 @@ pub mod field_descriptor_proto { pub fn as_str_name(&self) -> &'static str { match self { Label::Optional => "LABEL_OPTIONAL", - Label::Repeated => "LABEL_REPEATED", Label::Required => "LABEL_REQUIRED", + Label::Repeated => "LABEL_REPEATED", } } } @@ -714,9 +628,6 @@ 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")] @@ -789,9 +700,6 @@ 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. /// For maps fields: @@ -807,22 +715,11 @@ 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, @@ -831,10 +728,8 @@ pub struct 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 only implemented to support use of - /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of - /// type "bytes" in the open source release -- sorry, we'll try to include - /// other types in a future version! + /// options below. This option is not yet implemented in the open source + /// release -- sorry, we'll try to include it in a future version! #[prost( enumeration = "field_options::CType", optional, @@ -846,9 +741,7 @@ 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. This option is prohibited in - /// Editions, but the `repeated_field_encoding` feature can be used to control - /// the behavior. + /// false will avoid using packed encoding. #[prost(bool, optional, tag = "2")] pub packed: ::core::option::Option, /// The jstype option determines the JavaScript type used for values of the @@ -892,15 +785,8 @@ pub struct FieldOptions { /// implementation must either *always* check its required fields, or *never* /// check its required fields, regardless of whether or not the message has /// been parsed. - /// 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 - /// only be used where lazy with verification is prohibitive for performance - /// reasons. - #[prost(bool, optional, tag = "15", default = "false")] - pub unverified_lazy: ::core::option::Option, /// Is this field deprecated? /// Depending on the target platform, this can emit Deprecated annotations /// for accessors, or it will be completely ignored; in the very least, this @@ -910,38 +796,12 @@ 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 { - #[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>, - } #[derive( Clone, Copy, @@ -957,12 +817,6 @@ 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, } @@ -1010,93 +864,9 @@ 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", - } - } - } - /// 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", - } - } - } } #[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, @@ -1113,18 +883,6 @@ 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, @@ -1137,23 +895,12 @@ 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, } #[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, @@ -1179,9 +926,6 @@ 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, @@ -1253,8 +997,8 @@ pub mod uninterpreted_option { /// The name of the uninterpreted option. Each string represents a segment in /// a dot-separated name. is_extension is true iff a segment represents an /// extension (denoted with parentheses in options specs in .proto files). - /// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents - /// "foo.(bar.baz).moo". + /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + /// "foo.(bar.baz).qux". #[derive(Clone, PartialEq, ::prost::Message)] pub struct NamePart { #[prost(string, required, tag = "1")] @@ -1263,239 +1007,6 @@ pub mod uninterpreted_option { pub is_extension: bool, } } -/// 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. -#[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", - } - } - } - #[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", - } - } - } - #[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", - } - } - } - #[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", - } - } - } - #[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", - } - } - } - #[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", - } - } - } -} -/// 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. -#[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. - #[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, - } -} /// Encapsulates information about the original source file from which a /// FileDescriptorProto was generated. #[derive(Clone, PartialEq, ::prost::Message)] @@ -1551,8 +1062,8 @@ pub mod source_code_info { /// Identifies which part of the FileDescriptorProto was defined at this /// location. /// Each element is a field number or an index. They form a path from - /// the root FileDescriptorProto to the place where the definition occurs. - /// For example, this path: + /// the root FileDescriptorProto to the place where the definition. For + /// example, this path: /// [ 4, 3, 2, 7, 1 ] /// refers to: /// file.message_type(3) // 4, 3 @@ -1598,12 +1109,12 @@ pub mod source_code_info { /// optional string baz = 3; /// // Comment attached to baz. /// // Another line attached to baz. - /// // Comment attached to moo. + /// // Comment attached to qux. /// // - /// // Another line attached to moo. - /// optional double moo = 4; + /// // Another line attached to qux. + /// optional double qux = 4; /// // Detached comment for corge. This is not leading or trailing comments - /// // to moo or corge because there are blank lines separating it from + /// // to qux or corge because there are blank lines separating it from /// // both. /// // Detached comment for corge paragraph 2. /// optional string corge = 5; @@ -1650,91 +1161,10 @@ 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 object. The end offset should be one past + /// relates to the identified offset. 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", - } - } - } - } -} -/// 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", - } } } /// `Struct` represents a structured data value, consisting of fields @@ -1796,7 +1226,7 @@ pub struct ListValue { } /// `NullValue` is a singleton enumeration to represent the null value for the /// `Value` type union. -/// The JSON representation for `NullValue` is JSON `null`. +/// The JSON representation for `NullValue` is JSON `null`. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum NullValue { @@ -1877,7 +1307,7 @@ impl NullValue { /// \[`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. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1900,6 +1330,7 @@ pub struct Timestamp { /// service Foo { /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); /// } +/// The JSON representation for `Empty` is empty JSON object `{}`. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Empty {} \ No newline at end of file diff --git a/ydb-grpc/src/generated/mod.rs b/ydb-grpc/src/generated/mod.rs index 998108e3..d3970cc5 100644 --- a/ydb-grpc/src/generated/mod.rs +++ b/ydb-grpc/src/generated/mod.rs @@ -53,4 +53,4 @@ pub mod ydb { include!("ydb.topic.rs"); } include!("ydb.rs"); -} +} \ No newline at end of file diff --git a/ydb-grpc/src/generated/ydb.formats.rs b/ydb-grpc/src/generated/ydb.formats.rs index 880e2fc9..8767bfaf 100644 --- a/ydb-grpc/src/generated/ydb.formats.rs +++ b/ydb-grpc/src/generated/ydb.formats.rs @@ -19,4 +19,19 @@ pub struct CsvSettings { /// First not skipped line is a CSV header (list of column names). #[prost(bool, tag = "4")] pub header: bool, + #[prost(message, optional, tag = "5")] + pub quoting: ::core::option::Option, +} +/// Nested message and enum types in `CsvSettings`. +pub mod csv_settings { + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct Quoting { + #[prost(bool, tag = "1")] + pub disabled: bool, + #[prost(bytes = "vec", tag = "2")] + pub quote_char: ::prost::alloc::vec::Vec, + #[prost(bool, tag = "3")] + pub double_quote_disabled: bool, + } } \ No newline at end of file diff --git a/ydb-grpc/src/generated/ydb.rs b/ydb-grpc/src/generated/ydb.rs index 6252b630..725c9bd9 100644 --- a/ydb-grpc/src/generated/ydb.rs +++ b/ydb-grpc/src/generated/ydb.rs @@ -304,6 +304,10 @@ pub mod r#type { TzDate = 52, TzDatetime = 53, TzTimestamp = 54, + Date32 = 64, + Datetime64 = 65, + Timestamp64 = 66, + Interval64 = 67, String = 4097, Utf8 = 4608, Yson = 4609, @@ -337,6 +341,10 @@ pub mod r#type { PrimitiveTypeId::TzDate => "TZ_DATE", PrimitiveTypeId::TzDatetime => "TZ_DATETIME", PrimitiveTypeId::TzTimestamp => "TZ_TIMESTAMP", + PrimitiveTypeId::Date32 => "DATE32", + PrimitiveTypeId::Datetime64 => "DATETIME64", + PrimitiveTypeId::Timestamp64 => "TIMESTAMP64", + PrimitiveTypeId::Interval64 => "INTERVAL64", PrimitiveTypeId::String => "STRING", PrimitiveTypeId::Utf8 => "UTF8", PrimitiveTypeId::Yson => "YSON", diff --git a/ydb-grpc/src/generated/ydb.table.rs b/ydb-grpc/src/generated/ydb.table.rs index ae936ba4..501039f9 100644 --- a/ydb-grpc/src/generated/ydb.table.rs +++ b/ydb-grpc/src/generated/ydb.table.rs @@ -519,6 +519,9 @@ pub struct PartitionStats { /// Approximate size of shard (bytes) #[prost(uint64, tag = "2")] pub store_size: u64, + /// id of node that serve shard key range + #[prost(uint32, tag = "3")] + pub leader_node_id: u32, } #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1265,6 +1268,9 @@ pub struct DescribeTableRequest { /// Includes partition statistics (required include_table_statistics) #[prost(bool, tag = "7")] pub include_partition_stats: bool, + /// Includes shard -> node id maping (required include_partition_stats) + #[prost(bool, tag = "9")] + pub include_shard_nodes_info: bool, } #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/ydb-grpc/src/generated/ydb.topic.rs b/ydb-grpc/src/generated/ydb.topic.rs index 630e58a3..1f769d2d 100644 --- a/ydb-grpc/src/generated/ydb.topic.rs +++ b/ydb-grpc/src/generated/ydb.topic.rs @@ -432,7 +432,10 @@ pub mod stream_read_message { /// Issues if any. #[prost(message, repeated, tag = "2")] pub issues: ::prost::alloc::vec::Vec, - #[prost(oneof = "from_server::ServerMessage", tags = "3, 4, 5, 6, 7, 8, 9, 10")] + #[prost( + oneof = "from_server::ServerMessage", + tags = "3, 4, 5, 6, 7, 8, 9, 10, 11" + )] pub server_message: ::core::option::Option, } /// Nested message and enum types in `FromServer`. @@ -458,6 +461,8 @@ pub mod stream_read_message { StopPartitionSessionRequest(super::StopPartitionSessionRequest), #[prost(message, tag = "10")] UpdatePartitionSession(super::UpdatePartitionSession), + #[prost(message, tag = "11")] + EndPartitionSession(super::EndPartitionSession), } } /// Handshake request. @@ -479,6 +484,9 @@ pub mod stream_read_message { /// Direct reading from a partition node. #[prost(bool, tag = "4")] pub direct_read: bool, + /// Indicates that the SDK supports auto partitioning. + #[prost(bool, tag = "5")] + pub auto_partitioning_support: bool, } /// Nested message and enum types in `InitRequest`. pub mod init_request { @@ -711,7 +719,7 @@ pub mod stream_read_message { #[prost(message, optional, tag = "4")] pub partition_location: ::core::option::Option, } - /// Signal for server that cient is ready to recive data for partition. + /// Signal for server that client is ready to recive data for partition. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StartPartitionSessionResponse { @@ -793,6 +801,24 @@ pub mod stream_read_message { #[prost(int64, tag = "2")] pub direct_read_id: i64, } + /// Signal from server that client has finished reading the partition and all messages have been read. + /// Once a partition has been finished no further messages will ever arrive to that partition. + /// This command is a hint to the client to commit offsets, after which the child partitions will be balanced independently in different reading sessions. + /// Unlike StopPartitionSessionRequest, the client does not have to close the reading session. + /// Client should not send a response to the command. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct EndPartitionSession { + /// Partition session identifier. + #[prost(int64, tag = "1")] + pub partition_session_id: i64, + /// Ids of partitions which were merged with the ended partition. + #[prost(int64, repeated, tag = "2")] + pub adjacent_partition_ids: ::prost::alloc::vec::Vec, + /// Ids of partitions which was formed when the ended partition was split or merged. + #[prost(int64, repeated, tag = "3")] + pub child_partition_ids: ::prost::alloc::vec::Vec, + } } /// Messages for bidirectional streaming rpc StreamDirectRead #[derive(serde::Serialize, serde::Deserialize)] @@ -801,8 +827,9 @@ pub struct StreamDirectReadMessage {} /// Nested message and enum types in `StreamDirectReadMessage`. pub mod stream_direct_read_message { /// Client-server message for direct read session. - /// InitDirectRead - command from client to create and start a direct read session. - /// StartDirectReadPartitionSession - command from client to create and start a direct read partition session. + /// InitRequest - command from client to create and start a direct read session. + /// StartDirectReadPartitionSessionRequest - command from client to create and start a direct read partition session. + /// Client signals it is ready to get data from partition. /// UpdateTokenRequest - request to update auth token #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -816,14 +843,18 @@ pub mod stream_direct_read_message { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ClientMessage { #[prost(message, tag = "1")] - InitDirectRead(super::InitDirectRead), + InitRequest(super::InitRequest), #[prost(message, tag = "2")] - StartDirectReadPartitionSession(super::StartDirectReadPartitionSession), + StartDirectReadPartitionSessionRequest( + super::StartDirectReadPartitionSessionRequest, + ), #[prost(message, tag = "3")] UpdateTokenRequest(super::super::UpdateTokenRequest), } } /// Server-client message for direct read session. + /// InitResponse - correct handshake response. + /// StartDirectReadPartitionSessionResponse - Response to StartDirectReadPartitionSessionRequest. /// DirectReadResponse - portion of message data. /// StopDirectReadPartitionSession - command from server to stop a direct read partition session. /// UpdateTokenResponse - acknowledgment of token update. @@ -836,7 +867,7 @@ pub mod stream_direct_read_message { /// Issues if any. #[prost(message, repeated, tag = "2")] pub issues: ::prost::alloc::vec::Vec, - #[prost(oneof = "from_server::ServerMessage", tags = "3, 4, 5")] + #[prost(oneof = "from_server::ServerMessage", tags = "6, 7, 3, 4, 5")] pub server_message: ::core::option::Option, } /// Nested message and enum types in `FromServer`. @@ -844,6 +875,12 @@ pub mod stream_direct_read_message { #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum ServerMessage { + #[prost(message, tag = "6")] + InitResponse(super::InitResponse), + #[prost(message, tag = "7")] + StartDirectReadPartitionSessionResponse( + super::StartDirectReadPartitionSessionResponse, + ), #[prost(message, tag = "3")] StopDirectReadPartitionSession(super::StopDirectReadPartitionSession), #[prost(message, tag = "4")] @@ -856,21 +893,21 @@ pub mod stream_direct_read_message { /// Server should not send a response to the command. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] - pub struct InitDirectRead { + pub struct InitRequest { /// Read session identifier. #[prost(string, tag = "1")] pub session_id: ::prost::alloc::string::String, /// Topics that will be read by this session. #[prost(message, repeated, tag = "2")] pub topics_read_settings: ::prost::alloc::vec::Vec< - init_direct_read::TopicReadSettings, + init_request::TopicReadSettings, >, /// Path of consumer that is used for reading by this session. #[prost(string, tag = "3")] pub consumer: ::prost::alloc::string::String, } - /// Nested message and enum types in `InitDirectRead`. - pub mod init_direct_read { + /// Nested message and enum types in `InitRequest`. + pub mod init_request { #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicReadSettings { @@ -879,11 +916,14 @@ pub mod stream_direct_read_message { pub path: ::prost::alloc::string::String, } } + /// Response to the handshake. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct InitResponse {} /// Command from client to create and start a direct read partition session. - /// Server should not send a response to the command. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] - pub struct StartDirectReadPartitionSession { + pub struct StartDirectReadPartitionSessionRequest { /// Partition session identifier. #[prost(int64, tag = "1")] pub partition_session_id: i64, @@ -894,6 +934,17 @@ pub mod stream_direct_read_message { #[prost(int64, tag = "3")] pub generation: i64, } + /// Signal for server that client is ready to receive data for partition. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct StartDirectReadPartitionSessionResponse { + /// Partition session identifier of partition to start read. + #[prost(int64, tag = "1")] + pub partition_session_id: i64, + /// Partition generation. + #[prost(int64, tag = "2")] + pub generation: i64, + } /// Command from server to stop a direct read partition session. /// Client should not send a response to the command. #[derive(serde::Serialize, serde::Deserialize)] @@ -908,6 +959,9 @@ pub mod stream_direct_read_message { /// Partition session identifier. #[prost(int64, tag = "3")] pub partition_session_id: i64, + /// Partition generation. + #[prost(int64, tag = "4")] + pub generation: i64, } /// Messages that have been read directly from the partition node. /// It's a response to StreamRead.ReadRequest @@ -925,6 +979,10 @@ pub mod stream_direct_read_message { pub partition_data: ::core::option::Option< super::stream_read_message::read_response::PartitionData, >, + /// Total size in bytes of this response as calculated by server. + /// See ReadRequest comment above. + #[prost(int64, tag = "4")] + pub bytes_size: i64, } } #[derive(serde::Serialize, serde::Deserialize)] @@ -1009,6 +1067,9 @@ pub struct CommitOffsetRequest { /// Processed offset. #[prost(int64, tag = "5")] pub offset: i64, + /// Read session identifier from StreamRead RPC. + #[prost(string, tag = "6")] + pub read_session_id: ::prost::alloc::string::String, } /// Commit offset response sent from server to client. #[derive(serde::Serialize, serde::Deserialize)] @@ -1083,6 +1144,11 @@ pub mod consumer { pub max_write_time_lag: ::core::option::Option< super::super::super::google::protobuf::Duration, >, + /// The difference between the write timestamp of the last commited message and the current time. + #[prost(message, optional, tag = "5")] + pub max_committed_time_lag: ::core::option::Option< + super::super::super::google::protobuf::Duration, + >, /// Bytes read statistics. #[prost(message, optional, tag = "4")] pub bytes_read: ::core::option::Option, @@ -1120,14 +1186,52 @@ pub struct AlterConsumer { #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PartitioningSettings { - /// Minimum partition count auto merge would stop working at. + /// Auto merge would stop working when the partitions count reaches min_active_partitions /// Zero value means default - 1. #[prost(int64, tag = "1")] pub min_active_partitions: i64, + /// Auto split would stop working when the partitions count reaches max_active_partitions + /// Zero value means default - 1. + #[prost(int64, tag = "3")] + pub max_active_partitions: i64, /// Limit for total partition count, including active (open for write) and read-only partitions. /// Zero value means default - 100. + /// Use max_active_partitions + #[deprecated] #[prost(int64, tag = "2")] pub partition_count_limit: i64, + /// Settings for the partitions count auto partitioning. + #[prost(message, optional, tag = "4")] + pub auto_partitioning_settings: ::core::option::Option, +} +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AutoPartitioningSettings { + /// Strategy of auto partitioning. + #[prost(enumeration = "AutoPartitioningStrategy", tag = "1")] + pub strategy: i32, + /// Partition write speed auto partitioning options. + #[prost(message, optional, tag = "2")] + pub partition_write_speed: ::core::option::Option< + AutoPartitioningWriteSpeedStrategy, + >, +} +/// Partition will be auto partitioned up (divided into 2 partitions) +/// after write speed to the partition exceeds up_utilization_percent (in percentage of maximum write speed to the partition) for the period of time stabilization_window +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AutoPartitioningWriteSpeedStrategy { + /// Zero value means default - 300. + #[prost(message, optional, tag = "1")] + pub stabilization_window: ::core::option::Option< + super::super::google::protobuf::Duration, + >, + /// Zero value means default - 90. + #[prost(int32, tag = "2")] + pub up_utilization_percent: i32, + /// Zero value means default - 30. + #[prost(int32, tag = "3")] + pub down_utilization_percent: i32, } /// Partitioning settings for topic. #[derive(serde::Serialize, serde::Deserialize)] @@ -1137,10 +1241,54 @@ pub struct AlterPartitioningSettings { /// Zero value means default - 1. #[prost(int64, optional, tag = "1")] pub set_min_active_partitions: ::core::option::Option, + /// Maximum partition count auto merge would stop working at. + /// Zero value means default - 1. + #[prost(int64, optional, tag = "3")] + pub set_max_active_partitions: ::core::option::Option, /// Limit for total partition count, including active (open for write) and read-only partitions. /// Zero value means default - 100. + /// Use set_max_active_partitions + #[deprecated] #[prost(int64, optional, tag = "2")] pub set_partition_count_limit: ::core::option::Option, + /// Settings for auto partitioning the partition number + #[prost(message, optional, tag = "4")] + pub alter_auto_partitioning_settings: ::core::option::Option< + AlterAutoPartitioningSettings, + >, +} +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterAutoPartitioningSettings { + /// Strategy of auto partitioning + #[prost(enumeration = "AutoPartitioningStrategy", optional, tag = "1")] + pub set_strategy: ::core::option::Option, + /// Auto partitioning write speed options. + #[prost(message, optional, tag = "2")] + pub set_partition_write_speed: ::core::option::Option< + AlterAutoPartitioningWriteSpeedStrategy, + >, +} +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterAutoPartitioningWriteSpeedStrategy { + /// The time of exceeding the threshold value, after which the partition will be + /// auto partitioning. + /// Zero value means default - 300. + #[prost(message, optional, tag = "1")] + pub set_stabilization_window: ::core::option::Option< + super::super::google::protobuf::Duration, + >, + /// The threshold value of the write speed to the partition as a percentage, when exceeded, + /// the partition will be auto split. + /// Zero value means default - 90. + #[prost(int32, optional, tag = "2")] + pub set_up_utilization_percent: ::core::option::Option, + /// The threshold value of the write speed to the partition as a percentage, if it is not reached, + /// the partition will be auto merged. + /// Zero value means default - 30. + #[prost(int32, optional, tag = "3")] + pub set_down_utilization_percent: ::core::option::Option, } /// Create topic request sent from client to server. #[derive(serde::Serialize, serde::Deserialize)] @@ -1241,6 +1389,16 @@ pub struct DescribeTopicResponse { #[prost(message, optional, tag = "1")] pub operation: ::core::option::Option, } +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PartitionKeyRange { + /// Inclusive left border. Emptiness means -inf. + #[prost(bytes = "vec", optional, tag = "1")] + pub from_bound: ::core::option::Option<::prost::alloc::vec::Vec>, + /// Exclusive right border. Emptiness means +inf. + #[prost(bytes = "vec", optional, tag = "2")] + pub to_bound: ::core::option::Option<::prost::alloc::vec::Vec>, +} /// Describe topic result message that will be inside DescribeTopicResponse.operation. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1321,6 +1479,8 @@ pub mod describe_topic_result { /// Partition location, filled only when include_location in request is true. #[prost(message, optional, tag = "6")] pub partition_location: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub key_range: ::core::option::Option, } #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1371,7 +1531,7 @@ pub struct DescribePartitionResponse { #[prost(message, optional, tag = "1")] pub operation: ::core::option::Option, } -/// Describe partition result message that will be inside DescribeTopicResponse.operation. +/// Describe partition result message that will be inside DescribePartitionResponse.operation. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DescribePartitionResult { @@ -1478,6 +1638,11 @@ pub mod describe_consumer_result { pub max_write_time_lag: ::core::option::Option< super::super::super::google::protobuf::Duration, >, + /// The difference between the write timestamp of the last commited message and the current time. + #[prost(message, optional, tag = "13")] + pub max_committed_time_lag: ::core::option::Option< + super::super::super::google::protobuf::Duration, + >, /// How much bytes were read during several windows statistics from this partition. #[prost(message, optional, tag = "8")] pub bytes_read: ::core::option::Option, @@ -1633,6 +1798,40 @@ impl Codec { } } } +#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AutoPartitioningStrategy { + /// The auto partitioning algorithm is not specified. The default value will be used. + Unspecified = 0, + /// The auto partitioning is disabled. + Disabled = 1, + /// The auto partitioning algorithm will increase partitions count depending on the load characteristics. + /// The auto partitioning algorithm will never decrease the number of partitions. + ScaleUp = 2, + /// The auto partitioning algorithm will both increase and decrease partitions count depending on the load characteristics. + ScaleUpAndDown = 3, + /// The auto partitioning is paused. + Paused = 4, +} +impl AutoPartitioningStrategy { + /// 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 { + AutoPartitioningStrategy::Unspecified => { + "AUTO_PARTITIONING_STRATEGY_UNSPECIFIED" + } + AutoPartitioningStrategy::Disabled => "AUTO_PARTITIONING_STRATEGY_DISABLED", + AutoPartitioningStrategy::ScaleUp => "AUTO_PARTITIONING_STRATEGY_SCALE_UP", + AutoPartitioningStrategy::ScaleUpAndDown => { + "AUTO_PARTITIONING_STRATEGY_SCALE_UP_AND_DOWN" + } + AutoPartitioningStrategy::Paused => "AUTO_PARTITIONING_STRATEGY_PAUSED", + } + } +} /// Metering mode specifies the method used to determine consumption of resources by the topic. /// This settings will have an effect only in a serverless database. #[derive(serde::Serialize, serde::Deserialize)] diff --git a/ydb-grpc/ydb-api-protos b/ydb-grpc/ydb-api-protos index 86872319..97ae28e0 160000 --- a/ydb-grpc/ydb-api-protos +++ b/ydb-grpc/ydb-api-protos @@ -1 +1 @@ -Subproject commit 868723199e4ad5feb84e7fd2a241fd8c2ed8565d +Subproject commit 97ae28e0194df0daabf5aba34a019413e0e487ad diff --git a/ydb/src/grpc_wrapper/raw_table_service/value/type.rs b/ydb/src/grpc_wrapper/raw_table_service/value/type.rs index d944e136..4e8a6ed1 100644 --- a/ydb/src/grpc_wrapper/raw_table_service/value/type.rs +++ b/ydb/src/grpc_wrapper/raw_table_service/value/type.rs @@ -22,9 +22,13 @@ pub(crate) enum RawType { Float, Double, Date, + Date32, DateTime, + DateTime64, Timestamp, + Timestamp64, Interval, + Interval64, TzDate, TzDatetime, TzTimestamp, @@ -130,6 +134,10 @@ impl RawType { PrimitiveTypeId::Uuid => RawType::Uuid, PrimitiveTypeId::JsonDocument => RawType::JSONDocument, PrimitiveTypeId::Dynumber => RawType::DyNumber, + PrimitiveTypeId::Date32 => RawType::Date32, + PrimitiveTypeId::Datetime64 => RawType::DateTime64, + PrimitiveTypeId::Timestamp64 => RawType::Timestamp64, + PrimitiveTypeId::Interval64 => RawType::Interval64, }; Ok(res) @@ -156,9 +164,13 @@ impl RawType { RawType::Float => Value::Float(0.0), RawType::Double => Value::Double(0.0), RawType::Date => Value::Date(SystemTime::UNIX_EPOCH), + t @ RawType::Date32 => return unimplemented_type(t), RawType::DateTime => Value::DateTime(SystemTime::UNIX_EPOCH), + t @ RawType::DateTime64 => return unimplemented_type(t), RawType::Timestamp => Value::Timestamp(SystemTime::UNIX_EPOCH), + t @ RawType::Timestamp64 => return unimplemented_type(t), RawType::Interval => Value::Interval(SignedInterval::default()), + t @ RawType::Interval64 => return unimplemented_type(t), t @ RawType::TzDate => return unimplemented_type(t), t @ RawType::TzDatetime => return unimplemented_type(t), t @ RawType::TzTimestamp => return unimplemented_type(t), @@ -357,9 +369,13 @@ impl From for ydb_grpc::ydb_proto::Type { RawType::Float => ProtoType::TypeId(PrimitiveTypeId::Float as i32), RawType::Double => ProtoType::TypeId(PrimitiveTypeId::Double as i32), RawType::Date => ProtoType::TypeId(PrimitiveTypeId::Date as i32), + RawType::Date32 => ProtoType::TypeId(PrimitiveTypeId::Date32 as i32), RawType::DateTime => ProtoType::TypeId(PrimitiveTypeId::Datetime as i32), + RawType::DateTime64 => ProtoType::TypeId(PrimitiveTypeId::Datetime64 as i32), RawType::Timestamp => ProtoType::TypeId(PrimitiveTypeId::Timestamp as i32), + RawType::Timestamp64 => ProtoType::TypeId(PrimitiveTypeId::Timestamp64 as i32), RawType::Interval => ProtoType::TypeId(PrimitiveTypeId::Interval as i32), + RawType::Interval64 => ProtoType::TypeId(PrimitiveTypeId::Interval64 as i32), RawType::TzDate => ProtoType::TypeId(PrimitiveTypeId::TzDate as i32), RawType::TzDatetime => ProtoType::TypeId(PrimitiveTypeId::TzDatetime as i32), RawType::TzTimestamp => ProtoType::TypeId(PrimitiveTypeId::TzTimestamp as i32), diff --git a/ydb/src/grpc_wrapper/raw_table_service/value/value_ydb.rs b/ydb/src/grpc_wrapper/raw_table_service/value/value_ydb.rs index c0c007ef..18d5c217 100644 --- a/ydb/src/grpc_wrapper/raw_table_service/value/value_ydb.rs +++ b/ydb/src/grpc_wrapper/raw_table_service/value/value_ydb.rs @@ -246,19 +246,23 @@ impl TryFrom for Value { (RawType::Date, RawValue::UInt32(v)) => Value::Date( SystemTime::UNIX_EPOCH + Duration::from_secs((v as u64) * SECONDS_PER_DAY), ), + (t @ RawType::Date32, _) => return type_unimplemented(t), (t @ RawType::Date, v) => return types_mismatch(t, v), (RawType::DateTime, RawValue::UInt32(v)) => { Value::DateTime(SystemTime::UNIX_EPOCH + Duration::from_secs(v.into())) } (t @ RawType::DateTime, v) => return types_mismatch(t, v), + (t @ RawType::DateTime64, _) => return type_unimplemented(t), (RawType::Timestamp, RawValue::UInt64(v)) => { Value::Timestamp(SystemTime::UNIX_EPOCH + Duration::from_micros(v)) } (t @ RawType::Timestamp, v) => return types_mismatch(t, v), + (t @ RawType::Timestamp64, _) => return type_unimplemented(t), (RawType::Interval, RawValue::Int64(v)) => { Value::Interval(SignedInterval::from_nanos(v)) } (t @ RawType::Interval, v) => return types_mismatch(t, v), + (t @ RawType::Interval64, _) => return type_unimplemented(t), (t @ RawType::TzDate, _) => return type_unimplemented(t), (t @ RawType::TzDatetime, _) => return type_unimplemented(t), (t @ RawType::TzTimestamp, _) => return type_unimplemented(t), diff --git a/ydb/src/grpc_wrapper/raw_topic_service/common/partitioning_settings.rs b/ydb/src/grpc_wrapper/raw_topic_service/common/partitioning_settings.rs index 8d0d328b..ec12195f 100644 --- a/ydb/src/grpc_wrapper/raw_topic_service/common/partitioning_settings.rs +++ b/ydb/src/grpc_wrapper/raw_topic_service/common/partitioning_settings.rs @@ -19,7 +19,10 @@ impl From for PartitioningSettings { fn from(value: RawPartitioningSettings) -> Self { Self { min_active_partitions: value.min_active_partitions, + max_active_partitions: 0, partition_count_limit: value.partition_count_limit, + + auto_partitioning_settings: None, } } } @@ -44,6 +47,8 @@ impl From for AlterPartitioningSettings { Self { set_min_active_partitions: value.set_min_active_partitions, set_partition_count_limit: value.set_partition_count_limit, + set_max_active_partitions: None, + alter_auto_partitioning_settings: None, } } }