PiperOrigin-RevId: 569281779pull/14138/head
parent
0cb912c37c
commit
0433561505
1 changed files with 48 additions and 0 deletions
@ -0,0 +1,48 @@ |
||||
// Protocol Buffers - Google's data interchange format |
||||
// Copyright 2023 Google Inc. All rights reserved. |
||||
// |
||||
// Use of this source code is governed by a BSD-style |
||||
// license that can be found in the LICENSE file or at |
||||
// https://developers.google.com/open-source/licenses/bsd |
||||
|
||||
syntax = "proto2"; |
||||
|
||||
package pb; |
||||
|
||||
import "google/protobuf/descriptor.proto"; |
||||
|
||||
extend google.protobuf.FeatureSet { |
||||
optional JavaFeatures java = 1001; |
||||
} |
||||
|
||||
message JavaFeatures { |
||||
// Whether or not to treat an enum field as closed. This option is only |
||||
// applicable to enum fields, and will be removed in the future. It is |
||||
// consistent with the legacy behavior of using proto3 enum types for proto2 |
||||
// fields. |
||||
optional bool legacy_closed_enum = 1 [ |
||||
retention = RETENTION_RUNTIME, |
||||
targets = TARGET_TYPE_FIELD, |
||||
targets = TARGET_TYPE_FILE, |
||||
edition_defaults = { edition: EDITION_2023, value: "false" } |
||||
]; |
||||
|
||||
// The UTF8 validation strategy to use. See go/editions-utf8-validation for |
||||
// more information on this feature. |
||||
enum Utf8Validation { |
||||
// Invalid default, which should never be used. |
||||
UTF8_VALIDATION_UNKNOWN = 0; |
||||
// Respect the UTF8 validation behavior specified by the global |
||||
// utf8_validation feature. |
||||
DEFAULT = 1; |
||||
// Verifies UTF8 validity overriding the global utf8_validation |
||||
// feature. This represents the legacy java_string_check_utf8 option. |
||||
VERIFY = 2; |
||||
} |
||||
optional Utf8Validation utf8_validation = 2 [ |
||||
retention = RETENTION_RUNTIME, |
||||
targets = TARGET_TYPE_FIELD, |
||||
targets = TARGET_TYPE_FILE, |
||||
edition_defaults = { edition: EDITION_2023, value: "DEFAULT" } |
||||
]; |
||||
} |
Loading…
Reference in new issue