From f654bf94b8ef9e3d2a53b4b4ffc154537a7f4143 Mon Sep 17 00:00:00 2001 From: John Chadwick Date: Wed, 20 Nov 2024 13:15:45 -0500 Subject: [PATCH] Fixes for complex predefined field types --- .../PredefinedAndCustomRuleEdition2023.java | 40 +- ...inedAndCustomRuleEdition2023OrBuilder.java | 4 +- .../cases/PredefinedAndCustomRuleProto2.java | 40 +- ...redefinedAndCustomRuleProto2OrBuilder.java | 4 +- .../cases/PredefinedAndCustomRuleProto3.java | 30 +- ...redefinedAndCustomRuleProto3OrBuilder.java | 2 +- ...nedRepeatedWrappedBoolRuleEdition2023.java | 719 ++++++++++++++++++ ...edWrappedBoolRuleEdition2023OrBuilder.java | 35 + ...edefinedRepeatedWrappedBoolRuleProto2.java | 719 ++++++++++++++++++ ...epeatedWrappedBoolRuleProto2OrBuilder.java | 35 + ...edefinedRepeatedWrappedBoolRuleProto3.java | 719 ++++++++++++++++++ ...epeatedWrappedBoolRuleProto3OrBuilder.java | 35 + ...edRepeatedWrappedBytesRuleEdition2023.java | 719 ++++++++++++++++++ ...dWrappedBytesRuleEdition2023OrBuilder.java | 35 + ...definedRepeatedWrappedBytesRuleProto2.java | 719 ++++++++++++++++++ ...peatedWrappedBytesRuleProto2OrBuilder.java | 35 + ...definedRepeatedWrappedBytesRuleProto3.java | 719 ++++++++++++++++++ ...peatedWrappedBytesRuleProto3OrBuilder.java | 35 + ...dRepeatedWrappedDoubleRuleEdition2023.java | 719 ++++++++++++++++++ ...WrappedDoubleRuleEdition2023OrBuilder.java | 35 + ...efinedRepeatedWrappedDoubleRuleProto2.java | 719 ++++++++++++++++++ ...eatedWrappedDoubleRuleProto2OrBuilder.java | 35 + ...efinedRepeatedWrappedDoubleRuleProto3.java | 719 ++++++++++++++++++ ...eatedWrappedDoubleRuleProto3OrBuilder.java | 35 + ...edRepeatedWrappedFloatRuleEdition2023.java | 719 ++++++++++++++++++ ...dWrappedFloatRuleEdition2023OrBuilder.java | 35 + ...definedRepeatedWrappedFloatRuleProto2.java | 719 ++++++++++++++++++ ...peatedWrappedFloatRuleProto2OrBuilder.java | 35 + ...definedRepeatedWrappedFloatRuleProto3.java | 719 ++++++++++++++++++ ...peatedWrappedFloatRuleProto3OrBuilder.java | 35 + ...edRepeatedWrappedInt32RuleEdition2023.java | 719 ++++++++++++++++++ ...dWrappedInt32RuleEdition2023OrBuilder.java | 35 + ...definedRepeatedWrappedInt32RuleProto2.java | 719 ++++++++++++++++++ ...peatedWrappedInt32RuleProto2OrBuilder.java | 35 + ...definedRepeatedWrappedInt32RuleProto3.java | 719 ++++++++++++++++++ ...peatedWrappedInt32RuleProto3OrBuilder.java | 35 + ...edRepeatedWrappedInt64RuleEdition2023.java | 719 ++++++++++++++++++ ...dWrappedInt64RuleEdition2023OrBuilder.java | 35 + ...definedRepeatedWrappedInt64RuleProto2.java | 719 ++++++++++++++++++ ...peatedWrappedInt64RuleProto2OrBuilder.java | 35 + ...definedRepeatedWrappedInt64RuleProto3.java | 719 ++++++++++++++++++ ...peatedWrappedInt64RuleProto3OrBuilder.java | 35 + ...dRepeatedWrappedStringRuleEdition2023.java | 719 ++++++++++++++++++ ...WrappedStringRuleEdition2023OrBuilder.java | 35 + ...efinedRepeatedWrappedStringRuleProto2.java | 719 ++++++++++++++++++ ...eatedWrappedStringRuleProto2OrBuilder.java | 35 + ...efinedRepeatedWrappedStringRuleProto3.java | 719 ++++++++++++++++++ ...eatedWrappedStringRuleProto3OrBuilder.java | 35 + ...dRepeatedWrappedUInt32RuleEdition2023.java | 719 ++++++++++++++++++ ...WrappedUInt32RuleEdition2023OrBuilder.java | 35 + ...efinedRepeatedWrappedUInt32RuleProto2.java | 719 ++++++++++++++++++ ...eatedWrappedUInt32RuleProto2OrBuilder.java | 35 + ...efinedRepeatedWrappedUInt32RuleProto3.java | 719 ++++++++++++++++++ ...eatedWrappedUInt32RuleProto3OrBuilder.java | 35 + ...dRepeatedWrappedUInt64RuleEdition2023.java | 719 ++++++++++++++++++ ...WrappedUInt64RuleEdition2023OrBuilder.java | 35 + ...efinedRepeatedWrappedUInt64RuleProto2.java | 719 ++++++++++++++++++ ...eatedWrappedUInt64RuleProto2OrBuilder.java | 35 + ...efinedRepeatedWrappedUInt64RuleProto3.java | 719 ++++++++++++++++++ ...eatedWrappedUInt64RuleProto3OrBuilder.java | 35 + .../cases/PredefinedRulesProto2Proto.java | 551 ++++++++++---- .../cases/PredefinedRulesProto3Proto.java | 392 ++++++++-- .../PredefinedRulesProtoEditionsProto.java | 599 ++++++++++----- .../PredefinedWrappedBoolRuleEdition2023.java | 558 ++++++++++++++ ...edWrappedBoolRuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedBoolRuleProto2.java | 558 ++++++++++++++ ...definedWrappedBoolRuleProto2OrBuilder.java | 26 + .../PredefinedWrappedBoolRuleProto3.java | 558 ++++++++++++++ ...definedWrappedBoolRuleProto3OrBuilder.java | 26 + ...PredefinedWrappedBytesRuleEdition2023.java | 558 ++++++++++++++ ...dWrappedBytesRuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedBytesRuleProto2.java | 558 ++++++++++++++ ...efinedWrappedBytesRuleProto2OrBuilder.java | 26 + .../PredefinedWrappedBytesRuleProto3.java | 558 ++++++++++++++ ...efinedWrappedBytesRuleProto3OrBuilder.java | 26 + ...redefinedWrappedDoubleRuleEdition2023.java | 558 ++++++++++++++ ...WrappedDoubleRuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedDoubleRuleProto2.java | 558 ++++++++++++++ ...finedWrappedDoubleRuleProto2OrBuilder.java | 26 + .../PredefinedWrappedDoubleRuleProto3.java | 558 ++++++++++++++ ...finedWrappedDoubleRuleProto3OrBuilder.java | 26 + ...PredefinedWrappedFloatRuleEdition2023.java | 558 ++++++++++++++ ...dWrappedFloatRuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedFloatRuleProto2.java | 558 ++++++++++++++ ...efinedWrappedFloatRuleProto2OrBuilder.java | 26 + .../PredefinedWrappedFloatRuleProto3.java | 558 ++++++++++++++ ...efinedWrappedFloatRuleProto3OrBuilder.java | 26 + ...PredefinedWrappedInt32RuleEdition2023.java | 558 ++++++++++++++ ...dWrappedInt32RuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedInt32RuleProto2.java | 558 ++++++++++++++ ...efinedWrappedInt32RuleProto2OrBuilder.java | 26 + .../PredefinedWrappedInt32RuleProto3.java | 558 ++++++++++++++ ...efinedWrappedInt32RuleProto3OrBuilder.java | 26 + ...PredefinedWrappedInt64RuleEdition2023.java | 558 ++++++++++++++ ...dWrappedInt64RuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedInt64RuleProto2.java | 558 ++++++++++++++ ...efinedWrappedInt64RuleProto2OrBuilder.java | 26 + .../PredefinedWrappedInt64RuleProto3.java | 558 ++++++++++++++ ...efinedWrappedInt64RuleProto3OrBuilder.java | 26 + ...redefinedWrappedStringRuleEdition2023.java | 558 ++++++++++++++ ...WrappedStringRuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedStringRuleProto2.java | 558 ++++++++++++++ ...finedWrappedStringRuleProto2OrBuilder.java | 26 + .../PredefinedWrappedStringRuleProto3.java | 558 ++++++++++++++ ...finedWrappedStringRuleProto3OrBuilder.java | 26 + ...redefinedWrappedUInt32RuleEdition2023.java | 558 ++++++++++++++ ...WrappedUInt32RuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedUInt32RuleProto2.java | 558 ++++++++++++++ ...finedWrappedUInt32RuleProto2OrBuilder.java | 26 + .../PredefinedWrappedUInt32RuleProto3.java | 558 ++++++++++++++ ...finedWrappedUInt32RuleProto3OrBuilder.java | 26 + ...redefinedWrappedUInt64RuleEdition2023.java | 558 ++++++++++++++ ...WrappedUInt64RuleEdition2023OrBuilder.java | 26 + .../PredefinedWrappedUInt64RuleProto2.java | 558 ++++++++++++++ ...finedWrappedUInt64RuleProto2OrBuilder.java | 26 + .../PredefinedWrappedUInt64RuleProto3.java | 558 ++++++++++++++ ...finedWrappedUInt64RuleProto3OrBuilder.java | 26 + ...ardPredefinedAndCustomRuleEdition2023.java | 18 +- ...inedAndCustomRuleEdition2023OrBuilder.java | 4 +- ...StandardPredefinedAndCustomRuleProto2.java | 18 +- ...redefinedAndCustomRuleProto2OrBuilder.java | 4 +- ...StandardPredefinedAndCustomRuleProto3.java | 14 +- ...redefinedAndCustomRuleProto3OrBuilder.java | 2 +- gradle.properties | 2 +- .../internal/constraints/ConstraintCache.java | 2 +- .../constraints/DescriptorMappings.java | 15 +- 126 files changed, 37379 insertions(+), 488 deletions(-) create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2OrBuilder.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3.java create mode 100644 conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3OrBuilder.java diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java index f9ef5be3..c1499a4c 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023.java @@ -47,12 +47,12 @@ public interface NestedOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ boolean hasC(); /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ int getC(); @@ -98,7 +98,7 @@ private Nested() { public static final int C_FIELD_NUMBER = 1; private int c_ = 0; /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ @java.lang.Override @@ -106,7 +106,7 @@ public boolean hasC() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -129,7 +129,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, c_); + output.writeSInt32(1, c_); } getUnknownFields().writeTo(output); } @@ -142,7 +142,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, c_); + .computeSInt32Size(1, c_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -394,7 +394,7 @@ public Builder mergeFrom( done = true; break; case 8: { - c_ = input.readInt32(); + c_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -417,7 +417,7 @@ public Builder mergeFrom( private int c_ ; /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ @java.lang.Override @@ -425,7 +425,7 @@ public boolean hasC() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -433,7 +433,7 @@ public int getC() { return c_; } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @param value The c to set. * @return This builder for chaining. */ @@ -445,7 +445,7 @@ public Builder setC(int value) { return this; } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearC() { @@ -510,7 +510,7 @@ public build.buf.validate.conformance.cases.PredefinedAndCustomRuleEdition2023.N public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -518,7 +518,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -567,7 +567,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getB()); @@ -583,7 +583,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -868,7 +868,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -898,7 +898,7 @@ public Builder mergeFrom( private int a_ ; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -906,7 +906,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -914,7 +914,7 @@ public int getA() { return a_; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -926,7 +926,7 @@ public Builder setA(int value) { return this; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java index 1b5ddeef..c9dcb56e 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleEdition2023OrBuilder.java @@ -10,12 +10,12 @@ public interface PredefinedAndCustomRuleEdition2023OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ boolean hasA(); /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java index a870fb8a..7b2047e7 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2.java @@ -47,12 +47,12 @@ public interface NestedOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ boolean hasC(); /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ int getC(); @@ -98,7 +98,7 @@ private Nested() { public static final int C_FIELD_NUMBER = 1; private int c_ = 0; /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ @java.lang.Override @@ -106,7 +106,7 @@ public boolean hasC() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -129,7 +129,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, c_); + output.writeSInt32(1, c_); } getUnknownFields().writeTo(output); } @@ -142,7 +142,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, c_); + .computeSInt32Size(1, c_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -394,7 +394,7 @@ public Builder mergeFrom( done = true; break; case 8: { - c_ = input.readInt32(); + c_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -417,7 +417,7 @@ public Builder mergeFrom( private int c_ ; /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return Whether the c field is set. */ @java.lang.Override @@ -425,7 +425,7 @@ public boolean hasC() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -433,7 +433,7 @@ public int getC() { return c_; } /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @param value The c to set. * @return This builder for chaining. */ @@ -445,7 +445,7 @@ public Builder setC(int value) { return this; } /** - * optional int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * optional sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearC() { @@ -510,7 +510,7 @@ public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto2.Nested public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -518,7 +518,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -567,7 +567,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getB()); @@ -583,7 +583,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -868,7 +868,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -898,7 +898,7 @@ public Builder mergeFrom( private int a_ ; /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -906,7 +906,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -914,7 +914,7 @@ public int getA() { return a_; } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -926,7 +926,7 @@ public Builder setA(int value) { return this; } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java index d1454c84..3dbc1d10 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto2OrBuilder.java @@ -10,12 +10,12 @@ public interface PredefinedAndCustomRuleProto2OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ boolean hasA(); /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java index 9b9fa9d2..c2733fc8 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3.java @@ -47,7 +47,7 @@ public interface NestedOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ int getC(); @@ -92,7 +92,7 @@ private Nested() { public static final int C_FIELD_NUMBER = 1; private int c_ = 0; /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -115,7 +115,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (c_ != 0) { - output.writeInt32(1, c_); + output.writeSInt32(1, c_); } getUnknownFields().writeTo(output); } @@ -128,7 +128,7 @@ public int getSerializedSize() { size = 0; if (c_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, c_); + .computeSInt32Size(1, c_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -372,7 +372,7 @@ public Builder mergeFrom( done = true; break; case 8: { - c_ = input.readInt32(); + c_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -395,7 +395,7 @@ public Builder mergeFrom( private int c_ ; /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return The c. */ @java.lang.Override @@ -403,7 +403,7 @@ public int getC() { return c_; } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @param value The c to set. * @return This builder for chaining. */ @@ -415,7 +415,7 @@ public Builder setC(int value) { return this; } /** - * int32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } + * sint32 c = 1 [json_name = "c", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearC() { @@ -480,7 +480,7 @@ public build.buf.validate.conformance.cases.PredefinedAndCustomRuleProto3.Nested public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -529,7 +529,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (a_ != 0) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getB()); @@ -545,7 +545,7 @@ public int getSerializedSize() { size = 0; if (a_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -824,7 +824,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -854,7 +854,7 @@ public Builder mergeFrom( private int a_ ; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -862,7 +862,7 @@ public int getA() { return a_; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -874,7 +874,7 @@ public Builder setA(int value) { return this; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java index 482f837d..6106a502 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedAndCustomRuleProto3OrBuilder.java @@ -10,7 +10,7 @@ public interface PredefinedAndCustomRuleProto3OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023.java new file mode 100644 index 00000000..077d2661 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023} + */ +public final class PredefinedRepeatedWrappedBoolRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) + PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBoolRuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedBoolRuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedBoolRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBoolRuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BoolValue m = + input.readMessage( + com.google.protobuf.BoolValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBoolRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..8c522705 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBoolRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValue getVal(int index); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2.java new file mode 100644 index 00000000..fadd9797 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2} + */ +public final class PredefinedRepeatedWrappedBoolRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) + PredefinedRepeatedWrappedBoolRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBoolRuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedBoolRuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedBoolRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBoolRuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BoolValue m = + input.readMessage( + com.google.protobuf.BoolValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBoolRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2OrBuilder.java new file mode 100644 index 00000000..1945d9c8 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBoolRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValue getVal(int index); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3.java new file mode 100644 index 00000000..7e24d12a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3} + */ +public final class PredefinedRepeatedWrappedBoolRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) + PredefinedRepeatedWrappedBoolRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBoolRuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedBoolRuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedBoolRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBoolRuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BoolValue m = + input.readMessage( + com.google.protobuf.BoolValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BoolValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBoolRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3OrBuilder.java new file mode 100644 index 00000000..c3275e7d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBoolRuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBoolRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBoolRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValue getVal(int index); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023.java new file mode 100644 index 00000000..75590fbb --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023} + */ +public final class PredefinedRepeatedWrappedBytesRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) + PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBytesRuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedBytesRuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedBytesRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBytesRuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BytesValue m = + input.readMessage( + com.google.protobuf.BytesValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBytesRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..6bf4bcf8 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBytesRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValue getVal(int index); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2.java new file mode 100644 index 00000000..dfbf24fd --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2} + */ +public final class PredefinedRepeatedWrappedBytesRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) + PredefinedRepeatedWrappedBytesRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBytesRuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedBytesRuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedBytesRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBytesRuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BytesValue m = + input.readMessage( + com.google.protobuf.BytesValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBytesRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2OrBuilder.java new file mode 100644 index 00000000..4ea3fb9e --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBytesRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValue getVal(int index); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3.java new file mode 100644 index 00000000..7a4a8870 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3} + */ +public final class PredefinedRepeatedWrappedBytesRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) + PredefinedRepeatedWrappedBytesRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedBytesRuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedBytesRuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedBytesRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedBytesRuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.BytesValue m = + input.readMessage( + com.google.protobuf.BytesValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.BytesValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedBytesRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3OrBuilder.java new file mode 100644 index 00000000..2a3ed27d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedBytesRuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedBytesRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedBytesRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValue getVal(int index); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023.java new file mode 100644 index 00000000..683b9c42 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023} + */ +public final class PredefinedRepeatedWrappedDoubleRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) + PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedDoubleRuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedDoubleRuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedDoubleRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedDoubleRuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.DoubleValue m = + input.readMessage( + com.google.protobuf.DoubleValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedDoubleRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..06dced8a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedDoubleRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValue getVal(int index); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2.java new file mode 100644 index 00000000..979b10b3 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2} + */ +public final class PredefinedRepeatedWrappedDoubleRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) + PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedDoubleRuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedDoubleRuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedDoubleRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedDoubleRuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.DoubleValue m = + input.readMessage( + com.google.protobuf.DoubleValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedDoubleRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder.java new file mode 100644 index 00000000..46e2dcc4 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedDoubleRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValue getVal(int index); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3.java new file mode 100644 index 00000000..743b6086 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3} + */ +public final class PredefinedRepeatedWrappedDoubleRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) + PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedDoubleRuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedDoubleRuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedDoubleRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedDoubleRuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.DoubleValue m = + input.readMessage( + com.google.protobuf.DoubleValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.DoubleValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedDoubleRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder.java new file mode 100644 index 00000000..d952381b --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedDoubleRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedDoubleRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValue getVal(int index); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023.java new file mode 100644 index 00000000..daaad016 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023} + */ +public final class PredefinedRepeatedWrappedFloatRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) + PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedFloatRuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedFloatRuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedFloatRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedFloatRuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.FloatValue m = + input.readMessage( + com.google.protobuf.FloatValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedFloatRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..e4684f0a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedFloatRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValue getVal(int index); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2.java new file mode 100644 index 00000000..5b00c0af --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2} + */ +public final class PredefinedRepeatedWrappedFloatRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) + PredefinedRepeatedWrappedFloatRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedFloatRuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedFloatRuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedFloatRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedFloatRuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.FloatValue m = + input.readMessage( + com.google.protobuf.FloatValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedFloatRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2OrBuilder.java new file mode 100644 index 00000000..3410be4f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedFloatRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValue getVal(int index); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3.java new file mode 100644 index 00000000..a117c1f1 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3} + */ +public final class PredefinedRepeatedWrappedFloatRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) + PredefinedRepeatedWrappedFloatRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedFloatRuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedFloatRuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedFloatRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedFloatRuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.FloatValue m = + input.readMessage( + com.google.protobuf.FloatValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.FloatValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedFloatRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3OrBuilder.java new file mode 100644 index 00000000..e49760f6 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedFloatRuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedFloatRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedFloatRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValue getVal(int index); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023.java new file mode 100644 index 00000000..83f06e6c --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023} + */ +public final class PredefinedRepeatedWrappedInt32RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) + PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt32RuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedInt32RuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt32RuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int32Value m = + input.readMessage( + com.google.protobuf.Int32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt32RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..3d528276 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt32RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32Value getVal(int index); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2.java new file mode 100644 index 00000000..b327e12d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2} + */ +public final class PredefinedRepeatedWrappedInt32RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) + PredefinedRepeatedWrappedInt32RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt32RuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedInt32RuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt32RuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int32Value m = + input.readMessage( + com.google.protobuf.Int32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt32RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2OrBuilder.java new file mode 100644 index 00000000..bd303d2f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt32RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32Value getVal(int index); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3.java new file mode 100644 index 00000000..416233eb --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3} + */ +public final class PredefinedRepeatedWrappedInt32RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) + PredefinedRepeatedWrappedInt32RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt32RuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedInt32RuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt32RuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int32Value m = + input.readMessage( + com.google.protobuf.Int32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt32RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3OrBuilder.java new file mode 100644 index 00000000..f8328fad --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt32RuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt32RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt32RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32Value getVal(int index); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023.java new file mode 100644 index 00000000..1ac4de3f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023} + */ +public final class PredefinedRepeatedWrappedInt64RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) + PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt64RuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedInt64RuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt64RuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int64Value m = + input.readMessage( + com.google.protobuf.Int64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt64RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..5072c55b --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt64RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64Value getVal(int index); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2.java new file mode 100644 index 00000000..6c2795b5 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2} + */ +public final class PredefinedRepeatedWrappedInt64RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) + PredefinedRepeatedWrappedInt64RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt64RuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedInt64RuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt64RuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int64Value m = + input.readMessage( + com.google.protobuf.Int64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt64RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2OrBuilder.java new file mode 100644 index 00000000..74ad95be --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt64RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64Value getVal(int index); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3.java new file mode 100644 index 00000000..e8c4abff --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3} + */ +public final class PredefinedRepeatedWrappedInt64RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) + PredefinedRepeatedWrappedInt64RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedInt64RuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedInt64RuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedInt64RuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.Int64Value m = + input.readMessage( + com.google.protobuf.Int64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.Int64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedInt64RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3OrBuilder.java new file mode 100644 index 00000000..a8f9b49a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedInt64RuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedInt64RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedInt64RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64Value getVal(int index); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023.java new file mode 100644 index 00000000..c9537b7a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023} + */ +public final class PredefinedRepeatedWrappedStringRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) + PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedStringRuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedStringRuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedStringRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedStringRuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.StringValue m = + input.readMessage( + com.google.protobuf.StringValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedStringRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..2d1ea644 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedStringRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValue getVal(int index); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2.java new file mode 100644 index 00000000..f63a102a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2} + */ +public final class PredefinedRepeatedWrappedStringRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) + PredefinedRepeatedWrappedStringRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedStringRuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedStringRuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedStringRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedStringRuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.StringValue m = + input.readMessage( + com.google.protobuf.StringValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedStringRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2OrBuilder.java new file mode 100644 index 00000000..41ac3f72 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedStringRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValue getVal(int index); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3.java new file mode 100644 index 00000000..cf818d23 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3} + */ +public final class PredefinedRepeatedWrappedStringRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) + PredefinedRepeatedWrappedStringRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedStringRuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedStringRuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedStringRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedStringRuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.StringValue m = + input.readMessage( + com.google.protobuf.StringValue.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.StringValue.getDefaultInstance()); + } + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedStringRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3OrBuilder.java new file mode 100644 index 00000000..cf2ed5bd --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedStringRuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedStringRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedStringRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValue getVal(int index); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023.java new file mode 100644 index 00000000..8448ebf2 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023} + */ +public final class PredefinedRepeatedWrappedUInt32RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) + PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt32RuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt32RuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt32RuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt32Value m = + input.readMessage( + com.google.protobuf.UInt32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt32RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..63bb2be5 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt32RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32Value getVal(int index); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2.java new file mode 100644 index 00000000..b467b4cb --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2} + */ +public final class PredefinedRepeatedWrappedUInt32RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) + PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt32RuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt32RuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt32RuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt32Value m = + input.readMessage( + com.google.protobuf.UInt32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt32RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder.java new file mode 100644 index 00000000..3c165885 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt32RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32Value getVal(int index); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3.java new file mode 100644 index 00000000..93aa5cd9 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3} + */ +public final class PredefinedRepeatedWrappedUInt32RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) + PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt32RuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt32RuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt32RuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt32Value m = + input.readMessage( + com.google.protobuf.UInt32Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt32Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt32RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder.java new file mode 100644 index 00000000..f7f51ad0 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt32RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt32RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32Value getVal(int index); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023.java new file mode 100644 index 00000000..aa997d77 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023} + */ +public final class PredefinedRepeatedWrappedUInt64RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) + PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt64RuleEdition2023.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt64RuleEdition2023.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt64RuleEdition2023() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt64Value m = + input.readMessage( + com.google.protobuf.UInt64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt64RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..46013d04 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt64RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64Value getVal(int index); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2.java new file mode 100644 index 00000000..4de1775a --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2} + */ +public final class PredefinedRepeatedWrappedUInt64RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) + PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt64RuleProto2.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt64RuleProto2.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt64RuleProto2() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt64Value m = + input.readMessage( + com.google.protobuf.UInt64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt64RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder.java new file mode 100644 index 00000000..10b2918d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt64RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64Value getVal(int index); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3.java new file mode 100644 index 00000000..9b7ee72d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3.java @@ -0,0 +1,719 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3} + */ +public final class PredefinedRepeatedWrappedUInt64RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) + PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedRepeatedWrappedUInt64RuleProto3.class.getName()); + } + // Use PredefinedRepeatedWrappedUInt64RuleProto3.newBuilder() to construct. + private PredefinedRepeatedWrappedUInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedRepeatedWrappedUInt64RuleProto3() { + val_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.Builder.class); + } + + public static final int VAL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List val_; + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getValList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getValOrBuilderList() { + return val_; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getValCount() { + return val_.size(); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal(int index) { + return val_.get(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + return val_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < val_.size(); i++) { + output.writeMessage(1, val_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < val_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, val_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) obj; + + if (!getValList() + .equals(other.getValList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValCount() > 0) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getValList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + } else { + val_ = null; + valBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 result) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + val_ = java.util.Collections.unmodifiableList(val_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.val_ = val_; + } else { + result.val_ = valBuilder_.build(); + } + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3.getDefaultInstance()) return this; + if (valBuilder_ == null) { + if (!other.val_.isEmpty()) { + if (val_.isEmpty()) { + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValIsMutable(); + val_.addAll(other.val_); + } + onChanged(); + } + } else { + if (!other.val_.isEmpty()) { + if (valBuilder_.isEmpty()) { + valBuilder_.dispose(); + valBuilder_ = null; + val_ = other.val_; + bitField0_ = (bitField0_ & ~0x00000001); + valBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getValFieldBuilder() : null; + } else { + valBuilder_.addAllMessages(other.val_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.UInt64Value m = + input.readMessage( + com.google.protobuf.UInt64Value.parser(), + extensionRegistry); + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(m); + } else { + valBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List val_ = + java.util.Collections.emptyList(); + private void ensureValIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + val_ = new java.util.ArrayList(val_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List getValList() { + if (valBuilder_ == null) { + return java.util.Collections.unmodifiableList(val_); + } else { + return valBuilder_.getMessageList(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public int getValCount() { + if (valBuilder_ == null) { + return val_.size(); + } else { + return valBuilder_.getCount(); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value getVal(int index) { + if (valBuilder_ == null) { + return val_.get(index); + } else { + return valBuilder_.getMessage(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.set(index, value); + onChanged(); + } else { + valBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.set(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(value); + onChanged(); + } else { + valBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValIsMutable(); + val_.add(index, value); + onChanged(); + } else { + valBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addVal( + int index, com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.add(index, builderForValue.build()); + onChanged(); + } else { + valBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder addAllVal( + java.lang.Iterable values) { + if (valBuilder_ == null) { + ensureValIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, val_); + onChanged(); + } else { + valBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + if (valBuilder_ == null) { + val_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valBuilder_.clear(); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder removeVal(int index) { + if (valBuilder_ == null) { + ensureValIsMutable(); + val_.remove(index); + onChanged(); + } else { + valBuilder_.remove(index); + } + return this; + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder( + int index) { + return getValFieldBuilder().getBuilder(index); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index) { + if (valBuilder_ == null) { + return val_.get(index); } else { + return valBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValOrBuilderList() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(val_); + } + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder() { + return getValFieldBuilder().addBuilder( + com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder addValBuilder( + int index) { + return getValFieldBuilder().addBuilder( + index, com.google.protobuf.UInt64Value.getDefaultInstance()); + } + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public java.util.List + getValBuilderList() { + return getValFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + val_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedRepeatedWrappedUInt64RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder.java new file mode 100644 index 00000000..f6e9887f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedRepeatedWrappedUInt64RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedRepeatedWrappedUInt64RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64Value getVal(int index); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + int getValCount(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + java.util.List + getValOrBuilderList(); + /** + * repeated .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder( + int index); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java index 90773d1b..14f9b68d 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto2Proto.java @@ -20,8 +20,8 @@ public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.floatAbsRangeProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.doubleAbsRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64EvenProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32AbsInProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64AbsInProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.uint64EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sint32EvenProto2); @@ -66,28 +66,28 @@ public static void registerAllExtensions( .newFileScopedGeneratedExtension( java.lang.Double.class, null); - public static final int INT32_EVEN_PROTO2_FIELD_NUMBER = 1161; + public static final int INT32_ABS_IN_PROTO2_FIELD_NUMBER = 1161; /** * extend .buf.validate.Int32Rules { ... } */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< build.buf.validate.Int32Rules, - java.lang.Boolean> int32EvenProto2 = com.google.protobuf.GeneratedMessage + java.util.List> int32AbsInProto2 = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( - java.lang.Boolean.class, + java.lang.Integer.class, null); - public static final int INT64_EVEN_PROTO2_FIELD_NUMBER = 1161; + public static final int INT64_ABS_IN_PROTO2_FIELD_NUMBER = 1161; /** * extend .buf.validate.Int64Rules { ... } */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< build.buf.validate.Int64Rules, - java.lang.Boolean> int64EvenProto2 = com.google.protobuf.GeneratedMessage + java.util.List> int64AbsInProto2 = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); + com.google.protobuf.Int64Value.class, + com.google.protobuf.Int64Value.getDefaultInstance()); public static final int UINT32_EVEN_PROTO2_FIELD_NUMBER = 1161; /** * extend .buf.validate.UInt32Rules { ... } @@ -348,6 +348,96 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor; static final @@ -376,141 +466,192 @@ public static void registerAllExtensions( "ned_rules_proto2.proto\022\036buf.validate.con" + "formance.cases\032\033buf/validate/validate.pr" + "oto\032\036google/protobuf/duration.proto\032\037goo" + - "gle/protobuf/timestamp.proto\":\n\031Predefin" + - "edFloatRuleProto2\022\035\n\003val\030\001 \001(\002B\013\272H\010\n\006\315H\000" + - "\000\200?R\003val\"?\n\032PredefinedDoubleRuleProto2\022!" + - "\n\003val\030\001 \001(\001B\017\272H\014\022\n\311H\000\000\000\000\000\000\360?R\003val\"7\n\031Pre" + - "definedInt32RuleProto2\022\032\n\003val\030\001 \001(\005B\010\272H\005" + - "\032\003\310H\001R\003val\"7\n\031PredefinedInt64RuleProto2\022" + - "\032\n\003val\030\001 \001(\003B\010\272H\005\"\003\310H\001R\003val\"8\n\032Predefine" + - "dUInt32RuleProto2\022\032\n\003val\030\001 \001(\rB\010\272H\005*\003\310H\001" + - "R\003val\"8\n\032PredefinedUInt64RuleProto2\022\032\n\003v" + - "al\030\001 \001(\004B\010\272H\0052\003\310H\001R\003val\"8\n\032PredefinedSIn" + - "t32RuleProto2\022\032\n\003val\030\001 \001(\021B\010\272H\005:\003\310H\001R\003va" + - "l\"8\n\032PredefinedSInt64RuleProto2\022\032\n\003val\030\001" + - " \001(\022B\010\272H\005B\003\310H\001R\003val\"9\n\033PredefinedFixed32" + - "RuleProto2\022\032\n\003val\030\001 \001(\007B\010\272H\005J\003\310H\001R\003val\"9" + - "\n\033PredefinedFixed64RuleProto2\022\032\n\003val\030\001 \001" + - "(\006B\010\272H\005R\003\310H\001R\003val\":\n\034PredefinedSFixed32R" + - "uleProto2\022\032\n\003val\030\001 \001(\017B\010\272H\005Z\003\310H\001R\003val\":\n" + - "\034PredefinedSFixed64RuleProto2\022\032\n\003val\030\001 \001" + - "(\020B\010\272H\005b\003\310H\001R\003val\"6\n\030PredefinedBoolRuleP" + - "roto2\022\032\n\003val\030\001 \001(\010B\010\272H\005j\003\310H\001R\003val\"8\n\032Pre" + - "definedStringRuleProto2\022\032\n\003val\030\001 \001(\tB\010\272H" + - "\005r\003\310H\001R\003val\"7\n\031PredefinedBytesRuleProto2" + - "\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003\310H\001R\003val\"\301\001\n\030Predefi" + - "nedEnumRuleProto2\022`\n\003val\030\001 \001(\0162C.buf.val" + - "idate.conformance.cases.PredefinedEnumRu" + - "leProto2.EnumProto2B\t\272H\006\202\001\003\310H\001R\003val\"C\n\nE" + - "numProto2\022 \n\034ENUM_PROTO2_ZERO_UNSPECIFIE" + - "D\020\000\022\023\n\017ENUM_PROTO2_ONE\020\001\";\n\034PredefinedRe" + - "peatedRuleProto2\022\033\n\003val\030\001 \003(\004B\t\272H\006\222\001\003\310H\001" + - "R\003val\"V\n\034PredefinedDurationRuleProto2\0226\n" + - "\003val\030\001 \001(\0132\031.google.protobuf.DurationB\t\272" + - "H\006\252\001\003\310H\001R\003val\"X\n\035PredefinedTimestampRule" + - "Proto2\0227\n\003val\030\001 \001(\0132\032.google.protobuf.Ti" + - "mestampB\t\272H\006\262\001\003\310H\001R\003val\"\276\003\n\035PredefinedAn" + - "dCustomRuleProto2\022q\n\001a\030\001 \001(\005Bc\272H`\032\003\310H\001\272\001" + - "X\n(predefined_and_custom_rule_scalar_pro" + - "to2\032,this > 24 ? \'\' : \'a must be greater" + - " than 24\'R\001a\022\264\001\n\001b\030\002 \001(\0132D.buf.validate." + - "conformance.cases.PredefinedAndCustomRul" + - "eProto2.NestedB`\272H]\272\001Z\n*predefined_and_c" + - "ustom_rule_embedded_proto2\022\033b.c must be " + - "a multiple of 3\032\017this.c % 3 == 0R\001b\032s\n\006N" + - "ested\022i\n\001c\030\001 \001(\005B[\272HX\032\003\310H\001\272\001P\n(predefine" + - "d_and_custom_rule_nested_proto2\032$this > " + - "0 ? \'\' : \'c must be positive\'R\001c\"\245\001\n%Sta" + - "ndardPredefinedAndCustomRuleProto2\022|\n\001a\030" + - "\001 \001(\005Bn\272Hk\032\005\020\034\310H\001\272\001a\n1standard_predefine" + - "d_and_custom_rule_scalar_proto2\032,this > " + - "24 ? \'\' : \'a must be greater than 24\'R\001a" + - ":\251\001\n\026float_abs_range_proto2\022\030.buf.valida" + - "te.FloatRules\030\211\t \001(\002BY\302HV\nT\n\026float.abs_r" + - "ange.proto2\022\033float value is out of range" + - "\032\035this >= -rule && this <= ruleR\023floatAb" + - "sRangeProto2:\256\001\n\027double_abs_range_proto2" + - "\022\031.buf.validate.DoubleRules\030\211\t \001(\001B[\302HX\n" + - "V\n\027double.abs_range.proto2\022\034double value" + - " is out of range\032\035this >= -rule && this " + - "<= ruleR\024doubleAbsRangeProto2:\207\001\n\021int32_" + - "even_proto2\022\030.buf.validate.Int32Rules\030\211\t" + - " \001(\010B@\302H=\n;\n\021int32.even.proto2\022\027int32 va" + - "lue is not even\032\rthis % 2 == 0R\017int32Eve" + - "nProto2:\207\001\n\021int64_even_proto2\022\030.buf.vali" + - "date.Int64Rules\030\211\t \001(\010B@\302H=\n;\n\021int64.eve" + - "n.proto2\022\027int64 value is not even\032\rthis " + - "% 2 == 0R\017int64EvenProto2:\216\001\n\022uint32_eve" + - "n_proto2\022\031.buf.validate.UInt32Rules\030\211\t \001" + - "(\010BD\302HA\n?\n\022uint32.even.proto2\022\030uint32 va" + - "lue is not even\032\017this % 2u == 0uR\020uint32" + - "EvenProto2:\216\001\n\022uint64_even_proto2\022\031.buf." + - "validate.UInt64Rules\030\211\t \001(\010BD\302HA\n?\n\022uint" + - "64.even.proto2\022\030uint64 value is not even" + - "\032\017this % 2u == 0uR\020uint64EvenProto2:\214\001\n\022" + - "sint32_even_proto2\022\031.buf.validate.SInt32" + - "Rules\030\211\t \001(\010BB\302H?\n=\n\022sint32.even.proto2\022" + - "\030sint32 value is not even\032\rthis % 2 == 0" + - "R\020sint32EvenProto2:\214\001\n\022sint64_even_proto" + - "2\022\031.buf.validate.SInt64Rules\030\211\t \001(\010BB\302H?" + - "\n=\n\022sint64.even.proto2\022\030sint64 value is " + - "not even\032\rthis % 2 == 0R\020sint64EvenProto" + - "2:\223\001\n\023fixed32_even_proto2\022\032.buf.validate" + - ".Fixed32Rules\030\211\t \001(\010BF\302HC\nA\n\023fixed32.eve" + - "n.proto2\022\031fixed32 value is not even\032\017thi" + - "s % 2u == 0uR\021fixed32EvenProto2:\223\001\n\023fixe" + - "d64_even_proto2\022\032.buf.validate.Fixed64Ru" + - "les\030\211\t \001(\010BF\302HC\nA\n\023fixed64.even.proto2\022\031" + - "fixed64 value is not even\032\017this % 2u == " + - "0uR\021fixed64EvenProto2:\226\001\n\024sfixed32_even_" + - "proto2\022\033.buf.validate.SFixed32Rules\030\211\t \001" + - "(\010BF\302HC\nA\n\024sfixed32.even.proto2\022\032sfixed3" + - "2 value is not even\032\rthis % 2 == 0R\022sfix" + - "ed32EvenProto2:\226\001\n\024sfixed64_even_proto2\022" + - "\033.buf.validate.SFixed64Rules\030\211\t \001(\010BF\302HC" + - "\nA\n\024sfixed64.even.proto2\022\032sfixed64 value" + - " is not even\032\rthis % 2 == 0R\022sfixed64Eve" + - "nProto2:\206\001\n\021bool_false_proto2\022\027.buf.vali" + - "date.BoolRules\030\211\t \001(\010B@\302H=\n;\n\021bool.false" + - ".proto2\022\027bool value is not false\032\rthis =" + - "= falseR\017boolFalseProto2:\376\001\n\030string_vali" + - "d_path_proto2\022\031.buf.validate.StringRules" + - "\030\211\t \001(\010B\250\001\302H\244\001\n\241\001\n\030string.valid_path.pro" + - "to2\032\204\001!this.matches(\'^([^/.][^/]?|[^/][^" + - "/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/" + - "]{3,}))*$\') ? \'not a valid path: `%s`\'.f" + - "ormat([this]) : \'\'R\025stringValidPathProto" + - "2:\202\002\n\027bytes_valid_path_proto2\022\030.buf.vali" + - "date.BytesRules\030\211\t \001(\010B\257\001\302H\253\001\n\250\001\n\027bytes." + - "valid_path.proto2\032\214\001!string(this).matche" + - "s(\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^" + - "/.][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not" + - " a valid path: `%s`\'.format([this]) : \'\'" + - "R\024bytesValidPathProto2:\222\001\n\024enum_non_zero" + - "_proto2\022\027.buf.validate.EnumRules\030\211\t \001(\010B" + - "G\302HD\nB\n\024enum.non_zero.proto2\022\032enum value" + - " is not non-zero\032\016int(this) != 0R\021enumNo" + - "nZeroProto2:\314\001\n\035repeated_at_least_five_p" + - "roto2\022\033.buf.validate.RepeatedRules\030\211\t \001(" + - "\010Bl\302Hi\ng\n\035repeated.at_least_five.proto2\022" + - "-repeated field must have at least five " + - "values\032\027uint(this.size()) >= 5uR\031repeate" + - "dAtLeastFiveProto2:\271\001\n\030duration_too_long" + - "_proto2\022\033.buf.validate.DurationRules\030\211\t " + - "\001(\010Bb\302H_\n]\n\030duration.too_long.proto2\022(du" + - "ration can\'t be longer than 10 seconds\032\027" + - "this <= duration(\'10s\')R\025durationTooLong" + - "Proto2:\310\001\n\031timestamp_in_range_proto2\022\034.b" + - "uf.validate.TimestampRules\030\211\t \001(\010Bn\302Hk\ni" + - "\n\033timestamp.time_range.proto2\022\026timestamp" + - " out of range\0322int(this) >= 1049587200 &" + - "& int(this) <= 1080432000R\026timestampInRa" + - "ngeProto2B\336\001\n$build.buf.validate.conform" + - "ance.casesB\032PredefinedRulesProto2ProtoP\001" + - "\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases" + - "\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\" + - "Validate\\Conformance\\Cases\\GPBMetadata\352\002" + - "!Buf::Validate::Conformance::Cases" + "gle/protobuf/timestamp.proto\032\036google/pro" + + "tobuf/wrappers.proto\":\n\031PredefinedFloatR" + + "uleProto2\022\035\n\003val\030\001 \001(\002B\013\272H\010\n\006\315H\000\000\200?R\003val" + + "\"?\n\032PredefinedDoubleRuleProto2\022!\n\003val\030\001 " + + "\001(\001B\017\272H\014\022\n\311H\000\000\000\000\000\000\360?R\003val\"@\n\031PredefinedI" + + "nt32RuleProto2\022#\n\003val\030\001 \001(\005B\021\272H\016\032\014\310H\376\377\377\377" + + "\377\377\377\377\377\001R\003val\"B\n\031PredefinedInt64RuleProto2" + + "\022%\n\003val\030\001 \001(\003B\023\272H\020\"\016\312H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"" + + "8\n\032PredefinedUInt32RuleProto2\022\032\n\003val\030\001 \001" + + "(\rB\010\272H\005*\003\310H\001R\003val\"8\n\032PredefinedUInt64Rul" + + "eProto2\022\032\n\003val\030\001 \001(\004B\010\272H\0052\003\310H\001R\003val\"8\n\032P" + + "redefinedSInt32RuleProto2\022\032\n\003val\030\001 \001(\021B\010" + + "\272H\005:\003\310H\001R\003val\"8\n\032PredefinedSInt64RulePro" + + "to2\022\032\n\003val\030\001 \001(\022B\010\272H\005B\003\310H\001R\003val\"9\n\033Prede" + + "finedFixed32RuleProto2\022\032\n\003val\030\001 \001(\007B\010\272H\005" + + "J\003\310H\001R\003val\"9\n\033PredefinedFixed64RuleProto" + + "2\022\032\n\003val\030\001 \001(\006B\010\272H\005R\003\310H\001R\003val\":\n\034Predefi" + + "nedSFixed32RuleProto2\022\032\n\003val\030\001 \001(\017B\010\272H\005Z" + + "\003\310H\001R\003val\":\n\034PredefinedSFixed64RuleProto" + + "2\022\032\n\003val\030\001 \001(\020B\010\272H\005b\003\310H\001R\003val\"6\n\030Predefi" + + "nedBoolRuleProto2\022\032\n\003val\030\001 \001(\010B\010\272H\005j\003\310H\001" + + "R\003val\"8\n\032PredefinedStringRuleProto2\022\032\n\003v" + + "al\030\001 \001(\tB\010\272H\005r\003\310H\001R\003val\"7\n\031PredefinedByt" + + "esRuleProto2\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003\310H\001R\003val" + + "\"\301\001\n\030PredefinedEnumRuleProto2\022`\n\003val\030\001 \001" + + "(\0162C.buf.validate.conformance.cases.Pred" + + "efinedEnumRuleProto2.EnumProto2B\t\272H\006\202\001\003\310" + + "H\001R\003val\"C\n\nEnumProto2\022 \n\034ENUM_PROTO2_ZER" + + "O_UNSPECIFIED\020\000\022\023\n\017ENUM_PROTO2_ONE\020\001\";\n\034" + + "PredefinedRepeatedRuleProto2\022\033\n\003val\030\001 \003(" + + "\004B\t\272H\006\222\001\003\310H\001R\003val\"V\n\034PredefinedDurationR" + + "uleProto2\0226\n\003val\030\001 \001(\0132\031.google.protobuf" + + ".DurationB\t\272H\006\252\001\003\310H\001R\003val\"X\n\035PredefinedT" + + "imestampRuleProto2\0227\n\003val\030\001 \001(\0132\032.google" + + ".protobuf.TimestampB\t\272H\006\262\001\003\310H\001R\003val\"^\n P" + + "redefinedWrappedFloatRuleProto2\022:\n\003val\030\001" + + " \001(\0132\033.google.protobuf.FloatValueB\013\272H\010\n\006" + + "\315H\000\000\200?R\003val\"d\n!PredefinedWrappedDoubleRu" + + "leProto2\022?\n\003val\030\001 \001(\0132\034.google.protobuf." + + "DoubleValueB\017\272H\014\022\n\311H\000\000\000\000\000\000\360?R\003val\"d\n Pre" + + "definedWrappedInt32RuleProto2\022@\n\003val\030\001 \001" + + "(\0132\033.google.protobuf.Int32ValueB\021\272H\016\032\014\310H" + + "\376\377\377\377\377\377\377\377\377\001R\003val\"f\n PredefinedWrappedInt6" + + "4RuleProto2\022B\n\003val\030\001 \001(\0132\033.google.protob" + + "uf.Int64ValueB\023\272H\020\"\016\312H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"" + + "]\n!PredefinedWrappedUInt32RuleProto2\0228\n\003" + + "val\030\001 \001(\0132\034.google.protobuf.UInt32ValueB" + + "\010\272H\005*\003\310H\001R\003val\"]\n!PredefinedWrappedUInt6" + + "4RuleProto2\0228\n\003val\030\001 \001(\0132\034.google.protob" + + "uf.UInt64ValueB\010\272H\0052\003\310H\001R\003val\"Y\n\037Predefi" + + "nedWrappedBoolRuleProto2\0226\n\003val\030\001 \001(\0132\032." + + "google.protobuf.BoolValueB\010\272H\005j\003\310H\001R\003val" + + "\"]\n!PredefinedWrappedStringRuleProto2\0228\n" + + "\003val\030\001 \001(\0132\034.google.protobuf.StringValue" + + "B\010\272H\005r\003\310H\001R\003val\"[\n PredefinedWrappedByte" + + "sRuleProto2\0227\n\003val\030\001 \001(\0132\033.google.protob" + + "uf.BytesValueB\010\272H\005z\003\310H\001R\003val\"k\n(Predefin" + + "edRepeatedWrappedFloatRuleProto2\022?\n\003val\030" + + "\001 \003(\0132\033.google.protobuf.FloatValueB\020\272H\r\222" + + "\001\n\"\010\n\006\315H\000\000\200?R\003val\"q\n)PredefinedRepeatedW" + + "rappedDoubleRuleProto2\022D\n\003val\030\001 \003(\0132\034.go" + + "ogle.protobuf.DoubleValueB\024\272H\021\222\001\016\"\014\022\n\311H\000" + + "\000\000\000\000\000\360?R\003val\"q\n(PredefinedRepeatedWrappe" + + "dInt32RuleProto2\022E\n\003val\030\001 \003(\0132\033.google.p" + + "rotobuf.Int32ValueB\026\272H\023\222\001\020\"\016\032\014\310H\376\377\377\377\377\377\377\377" + + "\377\001R\003val\"s\n(PredefinedRepeatedWrappedInt6" + + "4RuleProto2\022G\n\003val\030\001 \003(\0132\033.google.protob" + + "uf.Int64ValueB\030\272H\025\222\001\022\"\020\"\016\312H\013\010\376\377\377\377\377\377\377\377\377\001R" + + "\003val\"j\n)PredefinedRepeatedWrappedUInt32R" + + "uleProto2\022=\n\003val\030\001 \003(\0132\034.google.protobuf" + + ".UInt32ValueB\r\272H\n\222\001\007\"\005*\003\310H\001R\003val\"j\n)Pred" + + "efinedRepeatedWrappedUInt64RuleProto2\022=\n" + + "\003val\030\001 \003(\0132\034.google.protobuf.UInt64Value" + + "B\r\272H\n\222\001\007\"\0052\003\310H\001R\003val\"f\n\'PredefinedRepeat" + + "edWrappedBoolRuleProto2\022;\n\003val\030\001 \003(\0132\032.g" + + "oogle.protobuf.BoolValueB\r\272H\n\222\001\007\"\005j\003\310H\001R" + + "\003val\"j\n)PredefinedRepeatedWrappedStringR" + + "uleProto2\022=\n\003val\030\001 \003(\0132\034.google.protobuf" + + ".StringValueB\r\272H\n\222\001\007\"\005r\003\310H\001R\003val\"h\n(Pred" + + "efinedRepeatedWrappedBytesRuleProto2\022<\n\003" + + "val\030\001 \003(\0132\033.google.protobuf.BytesValueB\r" + + "\272H\n\222\001\007\"\005z\003\310H\001R\003val\"\276\003\n\035PredefinedAndCust" + + "omRuleProto2\022q\n\001a\030\001 \001(\021Bc\272H`:\003\310H\001\272\001X\n(pr" + + "edefined_and_custom_rule_scalar_proto2\032," + + "this > 24 ? \'\' : \'a must be greater than" + + " 24\'R\001a\022\264\001\n\001b\030\002 \001(\0132D.buf.validate.confo" + + "rmance.cases.PredefinedAndCustomRuleProt" + + "o2.NestedB`\272H]\272\001Z\n*predefined_and_custom" + + "_rule_embedded_proto2\022\033b.c must be a mul" + + "tiple of 3\032\017this.c % 3 == 0R\001b\032s\n\006Nested" + + "\022i\n\001c\030\001 \001(\021B[\272HX:\003\310H\001\272\001P\n(predefined_and" + + "_custom_rule_nested_proto2\032$this > 0 ? \'" + + "\' : \'c must be positive\'R\001c\"\245\001\n%Standard" + + "PredefinedAndCustomRuleProto2\022|\n\001a\030\001 \001(\021" + + "Bn\272Hk:\005\0208\310H\001\272\001a\n1standard_predefined_and" + + "_custom_rule_scalar_proto2\032,this > 24 ? " + + "\'\' : \'a must be greater than 24\'R\001a:\251\001\n\026" + + "float_abs_range_proto2\022\030.buf.validate.Fl" + + "oatRules\030\211\t \001(\002BY\302HV\nT\n\026float.abs_range." + + "proto2\022\033float value is out of range\032\035thi" + + "s >= -rule && this <= ruleR\023floatAbsRang" + + "eProto2:\256\001\n\027double_abs_range_proto2\022\031.bu" + + "f.validate.DoubleRules\030\211\t \001(\001B[\302HX\nV\n\027do" + + "uble.abs_range.proto2\022\034double value is o" + + "ut of range\032\035this >= -rule && this <= ru" + + "leR\024doubleAbsRangeProto2:\266\001\n\023int32_abs_i" + + "n_proto2\022\030.buf.validate.Int32Rules\030\211\t \003(" + + "\005Bl\302Hi\ng\n\023int32.abs_in.proto2\022\'value mus" + + "t be in absolute value of list\032\'this in " + + "rule || this in rule.map(n, -n)R\020int32Ab" + + "sInProto2:\323\001\n\023int64_abs_in_proto2\022\030.buf." + + "validate.Int64Rules\030\211\t \003(\0132\033.google.prot" + + "obuf.Int64ValueBl\302Hi\ng\n\023int64.abs_in.pro" + + "to2\022\'value must be in absolute value of " + + "list\032\'this in rule || this in rule.map(n" + + ", -n)R\020int64AbsInProto2:\216\001\n\022uint32_even_" + + "proto2\022\031.buf.validate.UInt32Rules\030\211\t \001(\010" + + "BD\302HA\n?\n\022uint32.even.proto2\022\030uint32 valu" + + "e is not even\032\017this % 2u == 0uR\020uint32Ev" + + "enProto2:\216\001\n\022uint64_even_proto2\022\031.buf.va" + + "lidate.UInt64Rules\030\211\t \001(\010BD\302HA\n?\n\022uint64" + + ".even.proto2\022\030uint64 value is not even\032\017" + + "this % 2u == 0uR\020uint64EvenProto2:\214\001\n\022si" + + "nt32_even_proto2\022\031.buf.validate.SInt32Ru" + + "les\030\211\t \001(\010BB\302H?\n=\n\022sint32.even.proto2\022\030s" + + "int32 value is not even\032\rthis % 2 == 0R\020" + + "sint32EvenProto2:\214\001\n\022sint64_even_proto2\022" + + "\031.buf.validate.SInt64Rules\030\211\t \001(\010BB\302H?\n=" + + "\n\022sint64.even.proto2\022\030sint64 value is no" + + "t even\032\rthis % 2 == 0R\020sint64EvenProto2:" + + "\223\001\n\023fixed32_even_proto2\022\032.buf.validate.F" + + "ixed32Rules\030\211\t \001(\010BF\302HC\nA\n\023fixed32.even." + + "proto2\022\031fixed32 value is not even\032\017this " + + "% 2u == 0uR\021fixed32EvenProto2:\223\001\n\023fixed6" + + "4_even_proto2\022\032.buf.validate.Fixed64Rule" + + "s\030\211\t \001(\010BF\302HC\nA\n\023fixed64.even.proto2\022\031fi" + + "xed64 value is not even\032\017this % 2u == 0u" + + "R\021fixed64EvenProto2:\226\001\n\024sfixed32_even_pr" + + "oto2\022\033.buf.validate.SFixed32Rules\030\211\t \001(\010" + + "BF\302HC\nA\n\024sfixed32.even.proto2\022\032sfixed32 " + + "value is not even\032\rthis % 2 == 0R\022sfixed" + + "32EvenProto2:\226\001\n\024sfixed64_even_proto2\022\033." + + "buf.validate.SFixed64Rules\030\211\t \001(\010BF\302HC\nA" + + "\n\024sfixed64.even.proto2\022\032sfixed64 value i" + + "s not even\032\rthis % 2 == 0R\022sfixed64EvenP" + + "roto2:\206\001\n\021bool_false_proto2\022\027.buf.valida" + + "te.BoolRules\030\211\t \001(\010B@\302H=\n;\n\021bool.false.p" + + "roto2\022\027bool value is not false\032\rthis == " + + "falseR\017boolFalseProto2:\376\001\n\030string_valid_" + + "path_proto2\022\031.buf.validate.StringRules\030\211" + + "\t \001(\010B\250\001\302H\244\001\n\241\001\n\030string.valid_path.proto" + + "2\032\204\001!this.matches(\'^([^/.][^/]?|[^/][^/." + + "]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/]{" + + "3,}))*$\') ? \'not a valid path: `%s`\'.for" + + "mat([this]) : \'\'R\025stringValidPathProto2:" + + "\202\002\n\027bytes_valid_path_proto2\022\030.buf.valida" + + "te.BytesRules\030\211\t \001(\010B\257\001\302H\253\001\n\250\001\n\027bytes.va" + + "lid_path.proto2\032\214\001!string(this).matches(" + + "\'^([^/.][^/]?|[^/][^/.]|[^/]{3,})(/([^/." + + "][^/]?|[^/][^/.]|[^/]{3,}))*$\') ? \'not a" + + " valid path: `%s`\'.format([this]) : \'\'R\024" + + "bytesValidPathProto2:\222\001\n\024enum_non_zero_p" + + "roto2\022\027.buf.validate.EnumRules\030\211\t \001(\010BG\302" + + "HD\nB\n\024enum.non_zero.proto2\022\032enum value i" + + "s not non-zero\032\016int(this) != 0R\021enumNonZ" + + "eroProto2:\314\001\n\035repeated_at_least_five_pro" + + "to2\022\033.buf.validate.RepeatedRules\030\211\t \001(\010B" + + "l\302Hi\ng\n\035repeated.at_least_five.proto2\022-r" + + "epeated field must have at least five va" + + "lues\032\027uint(this.size()) >= 5uR\031repeatedA" + + "tLeastFiveProto2:\271\001\n\030duration_too_long_p" + + "roto2\022\033.buf.validate.DurationRules\030\211\t \001(" + + "\010Bb\302H_\n]\n\030duration.too_long.proto2\022(dura" + + "tion can\'t be longer than 10 seconds\032\027th" + + "is <= duration(\'10s\')R\025durationTooLongPr" + + "oto2:\310\001\n\031timestamp_in_range_proto2\022\034.buf" + + ".validate.TimestampRules\030\211\t \001(\010Bn\302Hk\ni\n\033" + + "timestamp.time_range.proto2\022\026timestamp o" + + "ut of range\0322int(this) >= 1049587200 && " + + "int(this) <= 1080432000R\026timestampInRang" + + "eProto2B\336\001\n$build.buf.validate.conforman" + + "ce.casesB\032PredefinedRulesProto2ProtoP\001\242\002" + + "\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312\002" + + "\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\Va" + + "lidate\\Conformance\\Cases\\GPBMetadata\352\002!B" + + "uf::Validate::Conformance::Cases" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -518,6 +659,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto2_descriptor = getDescriptor().getMessageTypes().get(0); @@ -633,8 +775,116 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto2_descriptor, new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor = + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto2_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor = + getDescriptor().getMessageTypes().get(37); internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_descriptor, @@ -646,15 +896,15 @@ public static void registerAllExtensions( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto2_Nested_descriptor, new java.lang.String[] { "C", }); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(38); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto2_descriptor, new java.lang.String[] { "A", }); floatAbsRangeProto2.internalInit(descriptor.getExtensions().get(0)); doubleAbsRangeProto2.internalInit(descriptor.getExtensions().get(1)); - int32EvenProto2.internalInit(descriptor.getExtensions().get(2)); - int64EvenProto2.internalInit(descriptor.getExtensions().get(3)); + int32AbsInProto2.internalInit(descriptor.getExtensions().get(2)); + int64AbsInProto2.internalInit(descriptor.getExtensions().get(3)); uint32EvenProto2.internalInit(descriptor.getExtensions().get(4)); uint64EvenProto2.internalInit(descriptor.getExtensions().get(5)); sint32EvenProto2.internalInit(descriptor.getExtensions().get(6)); @@ -674,6 +924,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.boolFalseProto2); @@ -684,8 +935,8 @@ public static void registerAllExtensions( registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.fixed32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.fixed64EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.floatAbsRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64EvenProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32AbsInProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64AbsInProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.repeatedAtLeastFiveProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sfixed32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sfixed64EvenProto2); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java index 84bca161..e8a0be0f 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProto3Proto.java @@ -130,6 +130,96 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor; static final @@ -167,72 +257,119 @@ public static void registerAllExtensions( "rules_proto_editions.proto\032\033buf/validate" + "/validate.proto\032\036google/protobuf/duratio" + "n.proto\032\037google/protobuf/timestamp.proto" + - "\":\n\031PredefinedFloatRuleProto3\022\035\n\003val\030\001 \001" + - "(\002B\013\272H\010\n\006\315H\000\000\200?R\003val\"?\n\032PredefinedDouble" + - "RuleProto3\022!\n\003val\030\001 \001(\001B\017\272H\014\022\n\311H\000\000\000\000\000\000\360?" + - "R\003val\"7\n\031PredefinedInt32RuleProto3\022\032\n\003va" + - "l\030\001 \001(\005B\010\272H\005\032\003\310H\001R\003val\"7\n\031PredefinedInt6" + - "4RuleProto3\022\032\n\003val\030\001 \001(\003B\010\272H\005\"\003\310H\001R\003val\"" + - "8\n\032PredefinedUInt32RuleProto3\022\032\n\003val\030\001 \001" + - "(\rB\010\272H\005*\003\310H\001R\003val\"8\n\032PredefinedUInt64Rul" + - "eProto3\022\032\n\003val\030\001 \001(\004B\010\272H\0052\003\310H\001R\003val\"8\n\032P" + - "redefinedSInt32RuleProto3\022\032\n\003val\030\001 \001(\021B\010" + - "\272H\005:\003\310H\001R\003val\"8\n\032PredefinedSInt64RulePro" + - "to3\022\032\n\003val\030\001 \001(\022B\010\272H\005B\003\310H\001R\003val\"9\n\033Prede" + - "finedFixed32RuleProto3\022\032\n\003val\030\001 \001(\007B\010\272H\005" + - "J\003\310H\001R\003val\"9\n\033PredefinedFixed64RuleProto" + - "3\022\032\n\003val\030\001 \001(\006B\010\272H\005R\003\310H\001R\003val\":\n\034Predefi" + - "nedSFixed32RuleProto3\022\032\n\003val\030\001 \001(\017B\010\272H\005Z" + - "\003\310H\001R\003val\":\n\034PredefinedSFixed64RuleProto" + - "3\022\032\n\003val\030\001 \001(\020B\010\272H\005b\003\310H\001R\003val\"6\n\030Predefi" + - "nedBoolRuleProto3\022\032\n\003val\030\001 \001(\010B\010\272H\005j\003\310H\001" + - "R\003val\"8\n\032PredefinedStringRuleProto3\022\032\n\003v" + - "al\030\001 \001(\tB\010\272H\005r\003\310H\001R\003val\"7\n\031PredefinedByt" + - "esRuleProto3\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003\310H\001R\003val" + - "\"\301\001\n\030PredefinedEnumRuleProto3\022`\n\003val\030\001 \001" + - "(\0162C.buf.validate.conformance.cases.Pred" + - "efinedEnumRuleProto3.EnumProto3B\t\272H\006\202\001\003\310" + - "H\001R\003val\"C\n\nEnumProto3\022 \n\034ENUM_PROTO3_ZER" + - "O_UNSPECIFIED\020\000\022\023\n\017ENUM_PROTO3_ONE\020\001\"\260\001\n" + - "\027PredefinedMapRuleProto3\022]\n\003val\030\001 \003(\0132@." + - "buf.validate.conformance.cases.Predefine" + - "dMapRuleProto3.ValEntryB\t\272H\006\232\001\003\320H\001R\003val\032" + - "6\n\010ValEntry\022\020\n\003key\030\001 \001(\004R\003key\022\024\n\005value\030\002" + - " \001(\004R\005value:\0028\001\";\n\034PredefinedRepeatedRul" + - "eProto3\022\033\n\003val\030\001 \003(\004B\t\272H\006\222\001\003\310H\001R\003val\"V\n\034" + - "PredefinedDurationRuleProto3\0226\n\003val\030\001 \001(" + - "\0132\031.google.protobuf.DurationB\t\272H\006\252\001\003\310H\001R" + - "\003val\"X\n\035PredefinedTimestampRuleProto3\0227\n" + - "\003val\030\001 \001(\0132\032.google.protobuf.TimestampB\t" + - "\272H\006\262\001\003\310H\001R\003val\"\311\003\n\035PredefinedAndCustomRu" + - "leProto3\022q\n\001a\030\001 \001(\005Bc\272H`\032\003\320H\001\272\001X\n(predef" + - "ined_and_custom_rule_scalar_proto3\032,this" + - " > 24 ? \'\' : \'a must be greater than 24\'" + - "R\001a\022\271\001\n\001b\030\002 \001(\0132D.buf.validate.conforman" + - "ce.cases.PredefinedAndCustomRuleProto3.N" + - "estedB`\272H]\272\001Z\n*predefined_and_custom_rul" + - "e_embedded_proto3\022\033b.c must be a multipl" + - "e of 3\032\017this.c % 3 == 0H\000R\001b\210\001\001\032s\n\006Neste" + - "d\022i\n\001c\030\001 \001(\005B[\272HX\032\003\320H\001\272\001P\n(predefined_an" + - "d_custom_rule_nested_proto3\032$this > 0 ? " + - "\'\' : \'c must be positive\'R\001cB\004\n\002_b\"\245\001\n%S" + - "tandardPredefinedAndCustomRuleProto3\022|\n\001" + - "a\030\001 \001(\005Bn\272Hk\032\005\020\034\310H\001\272\001a\n1standard_predefi" + - "ned_and_custom_rule_scalar_proto3\032,this " + - "> 24 ? \'\' : \'a must be greater than 24\'R" + - "\001a\"\365\001\n.PredefinedRulesProto3UnusedImport" + - "BugWorkaround\022^\n\007dummy_1\030\001 \001(\0132E.buf.val" + - "idate.conformance.cases.StandardPredefin" + - "edAndCustomRuleProto2R\006dummy1\022c\n\007dummy_2" + - "\030\002 \001(\0132J.buf.validate.conformance.cases." + - "StandardPredefinedAndCustomRuleEdition20" + - "23R\006dummy2B\336\001\n$build.buf.validate.confor" + - "mance.casesB\032PredefinedRulesProto3ProtoP" + - "\001\242\002\004BVCC\252\002\036Buf.Validate.Conformance.Case" + - "s\312\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf" + - "\\Validate\\Conformance\\Cases\\GPBMetadata\352" + - "\002!Buf::Validate::Conformance::Casesb\006pro" + - "to3" + "\032\036google/protobuf/wrappers.proto\":\n\031Pred" + + "efinedFloatRuleProto3\022\035\n\003val\030\001 \001(\002B\013\272H\010\n" + + "\006\315H\000\000\200?R\003val\"?\n\032PredefinedDoubleRuleProt" + + "o3\022!\n\003val\030\001 \001(\001B\017\272H\014\022\n\311H\000\000\000\000\000\000\360?R\003val\"@\n" + + "\031PredefinedInt32RuleProto3\022#\n\003val\030\001 \001(\005B" + + "\021\272H\016\032\014\310H\376\377\377\377\377\377\377\377\377\001R\003val\"B\n\031PredefinedInt" + + "64RuleProto3\022%\n\003val\030\001 \001(\003B\023\272H\020\"\016\322H\013\010\376\377\377\377" + + "\377\377\377\377\377\001R\003val\"8\n\032PredefinedUInt32RuleProto" + + "3\022\032\n\003val\030\001 \001(\rB\010\272H\005*\003\310H\001R\003val\"8\n\032Predefi" + + "nedUInt64RuleProto3\022\032\n\003val\030\001 \001(\004B\010\272H\0052\003\310" + + "H\001R\003val\"8\n\032PredefinedSInt32RuleProto3\022\032\n" + + "\003val\030\001 \001(\021B\010\272H\005:\003\310H\001R\003val\"8\n\032PredefinedS" + + "Int64RuleProto3\022\032\n\003val\030\001 \001(\022B\010\272H\005B\003\310H\001R\003" + + "val\"9\n\033PredefinedFixed32RuleProto3\022\032\n\003va" + + "l\030\001 \001(\007B\010\272H\005J\003\310H\001R\003val\"9\n\033PredefinedFixe" + + "d64RuleProto3\022\032\n\003val\030\001 \001(\006B\010\272H\005R\003\310H\001R\003va" + + "l\":\n\034PredefinedSFixed32RuleProto3\022\032\n\003val" + + "\030\001 \001(\017B\010\272H\005Z\003\310H\001R\003val\":\n\034PredefinedSFixe" + + "d64RuleProto3\022\032\n\003val\030\001 \001(\020B\010\272H\005b\003\310H\001R\003va" + + "l\"6\n\030PredefinedBoolRuleProto3\022\032\n\003val\030\001 \001" + + "(\010B\010\272H\005j\003\310H\001R\003val\"8\n\032PredefinedStringRul" + + "eProto3\022\032\n\003val\030\001 \001(\tB\010\272H\005r\003\310H\001R\003val\"7\n\031P" + + "redefinedBytesRuleProto3\022\032\n\003val\030\001 \001(\014B\010\272" + + "H\005z\003\310H\001R\003val\"\301\001\n\030PredefinedEnumRuleProto" + + "3\022`\n\003val\030\001 \001(\0162C.buf.validate.conformanc" + + "e.cases.PredefinedEnumRuleProto3.EnumPro" + + "to3B\t\272H\006\202\001\003\310H\001R\003val\"C\n\nEnumProto3\022 \n\034ENU" + + "M_PROTO3_ZERO_UNSPECIFIED\020\000\022\023\n\017ENUM_PROT" + + "O3_ONE\020\001\"\260\001\n\027PredefinedMapRuleProto3\022]\n\003" + + "val\030\001 \003(\0132@.buf.validate.conformance.cas" + + "es.PredefinedMapRuleProto3.ValEntryB\t\272H\006" + + "\232\001\003\320H\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(\004R\003ke" + + "y\022\024\n\005value\030\002 \001(\004R\005value:\0028\001\";\n\034Predefine" + + "dRepeatedRuleProto3\022\033\n\003val\030\001 \003(\004B\t\272H\006\222\001\003" + + "\310H\001R\003val\"V\n\034PredefinedDurationRuleProto3" + + "\0226\n\003val\030\001 \001(\0132\031.google.protobuf.Duration" + + "B\t\272H\006\252\001\003\310H\001R\003val\"X\n\035PredefinedTimestampR" + + "uleProto3\0227\n\003val\030\001 \001(\0132\032.google.protobuf" + + ".TimestampB\t\272H\006\262\001\003\310H\001R\003val\"^\n Predefined" + + "WrappedFloatRuleProto3\022:\n\003val\030\001 \001(\0132\033.go" + + "ogle.protobuf.FloatValueB\013\272H\010\n\006\315H\000\000\200?R\003v" + + "al\"d\n!PredefinedWrappedDoubleRuleProto3\022" + + "?\n\003val\030\001 \001(\0132\034.google.protobuf.DoubleVal" + + "ueB\017\272H\014\022\n\311H\000\000\000\000\000\000\360?R\003val\"d\n PredefinedWr" + + "appedInt32RuleProto3\022@\n\003val\030\001 \001(\0132\033.goog" + + "le.protobuf.Int32ValueB\021\272H\016\032\014\310H\376\377\377\377\377\377\377\377\377" + + "\001R\003val\"f\n PredefinedWrappedInt64RuleProt" + + "o3\022B\n\003val\030\001 \001(\0132\033.google.protobuf.Int64V" + + "alueB\023\272H\020\"\016\312H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"]\n!Predef" + + "inedWrappedUInt32RuleProto3\0228\n\003val\030\001 \001(\013" + + "2\034.google.protobuf.UInt32ValueB\010\272H\005*\003\310H\001" + + "R\003val\"]\n!PredefinedWrappedUInt64RuleProt" + + "o3\0228\n\003val\030\001 \001(\0132\034.google.protobuf.UInt64" + + "ValueB\010\272H\0052\003\310H\001R\003val\"Y\n\037PredefinedWrappe" + + "dBoolRuleProto3\0226\n\003val\030\001 \001(\0132\032.google.pr" + + "otobuf.BoolValueB\010\272H\005j\003\310H\001R\003val\"]\n!Prede" + + "finedWrappedStringRuleProto3\0228\n\003val\030\001 \001(" + + "\0132\034.google.protobuf.StringValueB\010\272H\005r\003\310H" + + "\001R\003val\"[\n PredefinedWrappedBytesRuleProt" + + "o3\0227\n\003val\030\001 \001(\0132\033.google.protobuf.BytesV" + + "alueB\010\272H\005z\003\310H\001R\003val\"k\n(PredefinedRepeate" + + "dWrappedFloatRuleProto3\022?\n\003val\030\001 \003(\0132\033.g" + + "oogle.protobuf.FloatValueB\020\272H\r\222\001\n\"\010\n\006\315H\000" + + "\000\200?R\003val\"q\n)PredefinedRepeatedWrappedDou" + + "bleRuleProto3\022D\n\003val\030\001 \003(\0132\034.google.prot" + + "obuf.DoubleValueB\024\272H\021\222\001\016\"\014\022\n\311H\000\000\000\000\000\000\360?R\003" + + "val\"q\n(PredefinedRepeatedWrappedInt32Rul" + + "eProto3\022E\n\003val\030\001 \003(\0132\033.google.protobuf.I" + + "nt32ValueB\026\272H\023\222\001\020\"\016\032\014\310H\376\377\377\377\377\377\377\377\377\001R\003val\"s" + + "\n(PredefinedRepeatedWrappedInt64RuleProt" + + "o3\022G\n\003val\030\001 \003(\0132\033.google.protobuf.Int64V" + + "alueB\030\272H\025\222\001\022\"\020\"\016\312H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"j\n)P" + + "redefinedRepeatedWrappedUInt32RuleProto3" + + "\022=\n\003val\030\001 \003(\0132\034.google.protobuf.UInt32Va" + + "lueB\r\272H\n\222\001\007\"\005*\003\310H\001R\003val\"j\n)PredefinedRep" + + "eatedWrappedUInt64RuleProto3\022=\n\003val\030\001 \003(" + + "\0132\034.google.protobuf.UInt64ValueB\r\272H\n\222\001\007\"" + + "\0052\003\310H\001R\003val\"f\n\'PredefinedRepeatedWrapped" + + "BoolRuleProto3\022;\n\003val\030\001 \003(\0132\032.google.pro" + + "tobuf.BoolValueB\r\272H\n\222\001\007\"\005j\003\310H\001R\003val\"j\n)P" + + "redefinedRepeatedWrappedStringRuleProto3" + + "\022=\n\003val\030\001 \003(\0132\034.google.protobuf.StringVa" + + "lueB\r\272H\n\222\001\007\"\005r\003\310H\001R\003val\"h\n(PredefinedRep" + + "eatedWrappedBytesRuleProto3\022<\n\003val\030\001 \003(\013" + + "2\033.google.protobuf.BytesValueB\r\272H\n\222\001\007\"\005z" + + "\003\310H\001R\003val\"\311\003\n\035PredefinedAndCustomRulePro" + + "to3\022q\n\001a\030\001 \001(\021Bc\272H`:\003\320H\001\272\001X\n(predefined_" + + "and_custom_rule_scalar_proto3\032,this > 24" + + " ? \'\' : \'a must be greater than 24\'R\001a\022\271" + + "\001\n\001b\030\002 \001(\0132D.buf.validate.conformance.ca" + + "ses.PredefinedAndCustomRuleProto3.Nested" + + "B`\272H]\272\001Z\n*predefined_and_custom_rule_emb" + + "edded_proto3\022\033b.c must be a multiple of " + + "3\032\017this.c % 3 == 0H\000R\001b\210\001\001\032s\n\006Nested\022i\n\001" + + "c\030\001 \001(\021B[\272HX:\003\320H\001\272\001P\n(predefined_and_cus" + + "tom_rule_nested_proto3\032$this > 0 ? \'\' : " + + "\'c must be positive\'R\001cB\004\n\002_b\"\245\001\n%Standa" + + "rdPredefinedAndCustomRuleProto3\022|\n\001a\030\001 \001" + + "(\021Bn\272Hk:\005\0208\310H\001\272\001a\n1standard_predefined_a" + + "nd_custom_rule_scalar_proto3\032,this > 24 " + + "? \'\' : \'a must be greater than 24\'R\001a\"\365\001" + + "\n.PredefinedRulesProto3UnusedImportBugWo" + + "rkaround\022^\n\007dummy_1\030\001 \001(\0132E.buf.validate" + + ".conformance.cases.StandardPredefinedAnd" + + "CustomRuleProto2R\006dummy1\022c\n\007dummy_2\030\002 \001(" + + "\0132J.buf.validate.conformance.cases.Stand" + + "ardPredefinedAndCustomRuleEdition2023R\006d" + + "ummy2B\336\001\n$build.buf.validate.conformance" + + ".casesB\032PredefinedRulesProto3ProtoP\001\242\002\004B" + + "VCC\252\002\036Buf.Validate.Conformance.Cases\312\002\036B" + + "uf\\Validate\\Conformance\\Cases\342\002*Buf\\Vali" + + "date\\Conformance\\Cases\\GPBMetadata\352\002!Buf" + + "::Validate::Conformance::Casesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -242,6 +379,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_buf_validate_conformance_cases_PredefinedFloatRuleProto3_descriptor = getDescriptor().getMessageTypes().get(0); @@ -369,8 +507,116 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleProto3_descriptor, new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor = + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleProto3_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor = + getDescriptor().getMessageTypes().get(38); internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_descriptor, @@ -382,13 +628,13 @@ public static void registerAllExtensions( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleProto3_Nested_descriptor, new java.lang.String[] { "C", }); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(39); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleProto3_descriptor, new java.lang.String[] { "A", }); internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(40); internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedRulesProto3UnusedImportBugWorkaround_descriptor, @@ -399,6 +645,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.boolFalseProto2); @@ -409,13 +656,14 @@ public static void registerAllExtensions( registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.fixed32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.fixed64EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.floatAbsRangeProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32EvenProto2); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64EvenProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int32AbsInProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int64AbsInEdition2023); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.int64AbsInProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.mapAtLeastFiveEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.repeatedAtLeastFiveProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sfixed32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sfixed64EvenProto2); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint32EvenEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sint32EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.sint64EvenProto2); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.stringValidPathProto2); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java index 6cdd7ebd..3c053edc 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedRulesProtoEditionsProto.java @@ -20,8 +20,8 @@ public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.floatAbsRangeEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.doubleAbsRangeEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int64EvenEdition2023); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int32AbsInEdition2023); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int64AbsInEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.uint32EvenEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.uint64EvenEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sint32EvenEdition2023); @@ -67,28 +67,28 @@ public static void registerAllExtensions( .newFileScopedGeneratedExtension( java.lang.Double.class, null); - public static final int INT32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; + public static final int INT32_ABS_IN_EDITION_2023_FIELD_NUMBER = 1162; /** * extend .buf.validate.Int32Rules { ... } */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< build.buf.validate.Int32Rules, - java.lang.Boolean> int32EvenEdition2023 = com.google.protobuf.GeneratedMessage + java.util.List> int32AbsInEdition2023 = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( - java.lang.Boolean.class, + java.lang.Integer.class, null); - public static final int INT64_EVEN_EDITION_2023_FIELD_NUMBER = 1162; + public static final int INT64_ABS_IN_EDITION_2023_FIELD_NUMBER = 1162; /** * extend .buf.validate.Int64Rules { ... } */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< build.buf.validate.Int64Rules, - java.lang.Boolean> int64EvenEdition2023 = com.google.protobuf.GeneratedMessage + java.util.List> int64AbsInEdition2023 = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( - java.lang.Boolean.class, - null); + com.google.protobuf.Int64Value.class, + com.google.protobuf.Int64Value.getDefaultInstance()); public static final int UINT32_EVEN_EDITION_2023_FIELD_NUMBER = 1162; /** * extend .buf.validate.UInt32Rules { ... } @@ -370,6 +370,96 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor; static final @@ -398,164 +488,217 @@ public static void registerAllExtensions( "ned_rules_proto_editions.proto\022\036buf.vali" + "date.conformance.cases\032\033buf/validate/val" + "idate.proto\032\036google/protobuf/duration.pr" + - "oto\032\037google/protobuf/timestamp.proto\"?\n\036" + - "PredefinedFloatRuleEdition2023\022\035\n\003val\030\001 " + - "\001(\002B\013\272H\010\n\006\325H\000\000\200?R\003val\"D\n\037PredefinedDoubl" + - "eRuleEdition2023\022!\n\003val\030\001 \001(\001B\017\272H\014\022\n\321H\000\000" + - "\000\000\000\000\360?R\003val\"<\n\036PredefinedInt32RuleEditio" + - "n2023\022\032\n\003val\030\001 \001(\005B\010\272H\005\032\003\320H\001R\003val\"<\n\036Pre" + - "definedInt64RuleEdition2023\022\032\n\003val\030\001 \001(\003" + - "B\010\272H\005\"\003\320H\001R\003val\"=\n\037PredefinedUInt32RuleE" + - "dition2023\022\032\n\003val\030\001 \001(\rB\010\272H\005*\003\320H\001R\003val\"=" + - "\n\037PredefinedUInt64RuleEdition2023\022\032\n\003val" + - "\030\001 \001(\004B\010\272H\0052\003\320H\001R\003val\"=\n\037PredefinedSInt3" + - "2RuleEdition2023\022\032\n\003val\030\001 \001(\021B\010\272H\005:\003\320H\001R" + - "\003val\"=\n\037PredefinedSInt64RuleEdition2023\022" + - "\032\n\003val\030\001 \001(\022B\010\272H\005B\003\320H\001R\003val\">\n Predefine" + - "dFixed32RuleEdition2023\022\032\n\003val\030\001 \001(\007B\010\272H" + - "\005J\003\320H\001R\003val\">\n PredefinedFixed64RuleEdit" + - "ion2023\022\032\n\003val\030\001 \001(\006B\010\272H\005R\003\320H\001R\003val\"?\n!P" + - "redefinedSFixed32RuleEdition2023\022\032\n\003val\030" + - "\001 \001(\017B\010\272H\005Z\003\320H\001R\003val\"?\n!PredefinedSFixed" + - "64RuleEdition2023\022\032\n\003val\030\001 \001(\020B\010\272H\005b\003\320H\001" + - "R\003val\";\n\035PredefinedBoolRuleEdition2023\022\032" + - "\n\003val\030\001 \001(\010B\010\272H\005j\003\320H\001R\003val\"=\n\037Predefined" + - "StringRuleEdition2023\022\032\n\003val\030\001 \001(\tB\010\272H\005r" + - "\003\320H\001R\003val\"<\n\036PredefinedBytesRuleEdition2" + - "023\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003\320H\001R\003val\"\337\001\n\035Pred" + - "efinedEnumRuleEdition2023\022j\n\003val\030\001 \001(\0162M" + - ".buf.validate.conformance.cases.Predefin" + - "edEnumRuleEdition2023.EnumEdition2023B\t\272" + - "H\006\202\001\003\320H\001R\003val\"R\n\017EnumEdition2023\022%\n!ENUM" + - "_EDITION2023_ZERO_UNSPECIFIED\020\000\022\030\n\024ENUM_" + - "EDITION2023_ONE\020\001\"@\n!PredefinedRepeatedR" + - "uleEdition2023\022\033\n\003val\030\001 \003(\004B\t\272H\006\222\001\003\320H\001R\003" + - "val\"\272\001\n\034PredefinedMapRuleEdition2023\022b\n\003" + - "val\030\001 \003(\0132E.buf.validate.conformance.cas" + - "es.PredefinedMapRuleEdition2023.ValEntry" + - "B\t\272H\006\232\001\003\320H\001R\003val\0326\n\010ValEntry\022\020\n\003key\030\001 \001(" + - "\004R\003key\022\024\n\005value\030\002 \001(\004R\005value:\0028\001\"[\n!Pred" + - "efinedDurationRuleEdition2023\0226\n\003val\030\001 \001" + - "(\0132\031.google.protobuf.DurationB\t\272H\006\252\001\003\320H\001" + - "R\003val\"]\n\"PredefinedTimestampRuleEdition2" + - "023\0227\n\003val\030\001 \001(\0132\032.google.protobuf.Times" + - "tampB\t\272H\006\262\001\003\320H\001R\003val\"\332\003\n\"PredefinedAndCu" + - "stomRuleEdition2023\022w\n\001a\030\001 \001(\005Bi\272Hf\032\003\320H\001" + - "\272\001^\n.predefined_and_custom_rule_scalar_e" + - "dition_2023\032,this > 24 ? \'\' : \'a must be" + - " greater than 24\'R\001a\022\277\001\n\001b\030\002 \001(\0132I.buf.v" + - "alidate.conformance.cases.PredefinedAndC" + - "ustomRuleEdition2023.NestedBf\272Hc\272\001`\n0pre" + - "defined_and_custom_rule_embedded_edition" + - "_2023\022\033b.c must be a multiple of 3\032\017this" + - ".c % 3 == 0R\001b\032y\n\006Nested\022o\n\001c\030\001 \001(\005Ba\272H^" + - "\032\003\320H\001\272\001V\n.predefined_and_custom_rule_nes" + - "ted_edition_2023\032$this > 0 ? \'\' : \'c mus" + - "t be positive\'R\001c\"\261\001\n*StandardPredefined" + - "AndCustomRuleEdition2023\022\202\001\n\001a\030\001 \001(\005Bt\272H" + - "q\032\005\020\034\320H\001\272\001g\n7standard_predefined_and_cus" + - "tom_rule_scalar_edition_2023\032,this > 24 " + - "? \'\' : \'a must be greater than 24\'R\001a:\272\001" + - "\n\034float_abs_range_edition_2023\022\030.buf.val" + - "idate.FloatRules\030\212\t \001(\002B_\302H\\\nZ\n\034float.ab" + - "s_range.edition_2023\022\033float value is out" + - " of range\032\035this >= -rule && this <= rule" + - "R\030floatAbsRangeEdition2023:\277\001\n\035double_ab" + - "s_range_edition_2023\022\031.buf.validate.Doub" + - "leRules\030\212\t \001(\001Ba\302H^\n\\\n\035double.abs_range." + - "edition_2023\022\034double value is out of ran" + - "ge\032\035this >= -rule && this <= ruleR\031doubl" + - "eAbsRangeEdition2023:\230\001\n\027int32_even_edit" + - "ion_2023\022\030.buf.validate.Int32Rules\030\212\t \001(" + - "\010BF\302HC\nA\n\027int32.even.edition_2023\022\027int32" + - " value is not even\032\rthis % 2 == 0R\024int32" + - "EvenEdition2023:\230\001\n\027int64_even_edition_2" + - "023\022\030.buf.validate.Int64Rules\030\212\t \001(\010BF\302H" + - "C\nA\n\027int64.even.edition_2023\022\027int64 valu" + - "e is not even\032\rthis % 2 == 0R\024int64EvenE" + - "dition2023:\237\001\n\030uint32_even_edition_2023\022" + - "\031.buf.validate.UInt32Rules\030\212\t \001(\010BJ\302HG\nE" + - "\n\030uint32.even.edition_2023\022\030uint32 value" + - " is not even\032\017this % 2u == 0uR\025uint32Eve" + - "nEdition2023:\237\001\n\030uint64_even_edition_202" + - "3\022\031.buf.validate.UInt64Rules\030\212\t \001(\010BJ\302HG" + - "\nE\n\030uint64.even.edition_2023\022\030uint64 val" + - "ue is not even\032\017this % 2u == 0uR\025uint64E" + - "venEdition2023:\235\001\n\030sint32_even_edition_2" + - "023\022\031.buf.validate.SInt32Rules\030\212\t \001(\010BH\302" + - "HE\nC\n\030sint32.even.edition_2023\022\030sint32 v" + - "alue is not even\032\rthis % 2 == 0R\025sint32E" + - "venEdition2023:\235\001\n\030sint64_even_edition_2" + - "023\022\031.buf.validate.SInt64Rules\030\212\t \001(\010BH\302" + - "HE\nC\n\030sint64.even.edition_2023\022\030sint64 v" + - "alue is not even\032\rthis % 2 == 0R\025sint64E" + - "venEdition2023:\244\001\n\031fixed32_even_edition_" + - "2023\022\032.buf.validate.Fixed32Rules\030\212\t \001(\010B" + - "L\302HI\nG\n\031fixed32.even.edition_2023\022\031fixed" + - "32 value is not even\032\017this % 2u == 0uR\026f" + - "ixed32EvenEdition2023:\244\001\n\031fixed64_even_e" + - "dition_2023\022\032.buf.validate.Fixed64Rules\030" + - "\212\t \001(\010BL\302HI\nG\n\031fixed64.even.edition_2023" + - "\022\031fixed64 value is not even\032\017this % 2u =" + - "= 0uR\026fixed64EvenEdition2023:\247\001\n\032sfixed3" + - "2_even_edition_2023\022\033.buf.validate.SFixe" + - "d32Rules\030\212\t \001(\010BL\302HI\nG\n\032sfixed32.even.ed" + - "ition_2023\022\032sfixed32 value is not even\032\r" + - "this % 2 == 0R\027sfixed32EvenEdition2023:\247" + - "\001\n\032sfixed64_even_edition_2023\022\033.buf.vali" + - "date.SFixed64Rules\030\212\t \001(\010BL\302HI\nG\n\032sfixed" + - "64.even.edition_2023\022\032sfixed64 value is " + - "not even\032\rthis % 2 == 0R\027sfixed64EvenEdi" + - "tion2023:\227\001\n\027bool_false_edition_2023\022\027.b" + - "uf.validate.BoolRules\030\212\t \001(\010BF\302HC\nA\n\027boo" + - "l.false.edition_2023\022\027bool value is not " + - "false\032\rthis == falseR\024boolFalseEdition20" + - "23:\217\002\n\036string_valid_path_edition_2023\022\031." + - "buf.validate.StringRules\030\212\t \001(\010B\256\001\302H\252\001\n\247" + - "\001\n\036string.valid_path.edition_2023\032\204\001!thi" + - "s.matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3" + - ",})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\'" + - ") ? \'not a valid path: `%s`\'.format([thi" + - "s]) : \'\'R\032stringValidPathEdition2023:\223\002\n" + - "\035bytes_valid_path_edition_2023\022\030.buf.val" + - "idate.BytesRules\030\212\t \001(\010B\265\001\302H\261\001\n\256\001\n\035bytes" + - ".valid_path.edition_2023\032\214\001!string(this)" + - ".matches(\'^([^/.][^/]?|[^/][^/.]|[^/]{3," + - "})(/([^/.][^/]?|[^/][^/.]|[^/]{3,}))*$\')" + - " ? \'not a valid path: `%s`\'.format([this" + - "]) : \'\'R\031bytesValidPathEdition2023:\243\001\n\032e" + - "num_non_zero_edition_2023\022\027.buf.validate" + - ".EnumRules\030\212\t \001(\010BM\302HJ\nH\n\032enum.non_zero." + - "edition_2023\022\032enum value is not non-zero" + - "\032\016int(this) != 0R\026enumNonZeroEdition2023" + - ":\335\001\n#repeated_at_least_five_edition_2023" + - "\022\033.buf.validate.RepeatedRules\030\212\t \001(\010Br\302H" + - "o\nm\n#repeated.at_least_five.edition_2023" + - "\022-repeated field must have at least five" + - " values\032\027uint(this.size()) >= 5uR\036repeat" + - "edAtLeastFiveEdition2023:\275\001\n\036map_at_leas" + - "t_five_edition_2023\022\026.buf.validate.MapRu" + - "les\030\212\t \001(\010Ba\302H^\n\\\n\036map.at_least_five.edi" + - "tion_2023\022!map must have at least five p" + - "airs\032\027uint(this.size()) >= 5uR\031mapAtLeas" + - "tFiveEdition2023:\312\001\n\036duration_too_long_e" + - "dition_2023\022\033.buf.validate.DurationRules" + - "\030\212\t \001(\010Bh\302He\nc\n\036duration.too_long.editio" + - "n_2023\022(duration can\'t be longer than 10" + - " seconds\032\027this <= duration(\'10s\')R\032durat" + - "ionTooLongEdition2023:\331\001\n\037timestamp_in_r" + - "ange_edition_2023\022\034.buf.validate.Timesta" + - "mpRules\030\212\t \001(\010Bt\302Hq\no\n!timestamp.time_ra" + - "nge.edition_2023\022\026timestamp out of range" + - "\0322int(this) >= 1049587200 && int(this) <" + - "= 1080432000R\033timestampInRangeEdition202" + - "3B\345\001\n$build.buf.validate.conformance.cas" + - "esB!PredefinedRulesProtoEditionsProtoP\001\242" + - "\002\004BVCC\252\002\036Buf.Validate.Conformance.Cases\312" + - "\002\036Buf\\Validate\\Conformance\\Cases\342\002*Buf\\V" + - "alidate\\Conformance\\Cases\\GPBMetadata\352\002!" + - "Buf::Validate::Conformance::Casesb\010editi" + - "onsp\350\007" + "oto\032\037google/protobuf/timestamp.proto\032\036go" + + "ogle/protobuf/wrappers.proto\"?\n\036Predefin" + + "edFloatRuleEdition2023\022\035\n\003val\030\001 \001(\002B\013\272H\010" + + "\n\006\325H\000\000\200?R\003val\"D\n\037PredefinedDoubleRuleEdi" + + "tion2023\022!\n\003val\030\001 \001(\001B\017\272H\014\022\n\321H\000\000\000\000\000\000\360?R\003" + + "val\"F\n\036PredefinedInt32RuleEdition2023\022$\n" + + "\003val\030\001 \001(\005B\022\272H\017\032\r\322H\n\376\377\377\377\377\377\377\377\377\001R\003val\"G\n\036P" + + "redefinedInt64RuleEdition2023\022%\n\003val\030\001 \001" + + "(\003B\023\272H\020\"\016\322H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"=\n\037Predefin" + + "edUInt32RuleEdition2023\022\032\n\003val\030\001 \001(\rB\010\272H" + + "\005*\003\320H\001R\003val\"=\n\037PredefinedUInt64RuleEditi" + + "on2023\022\032\n\003val\030\001 \001(\004B\010\272H\0052\003\320H\001R\003val\"=\n\037Pr" + + "edefinedSInt32RuleEdition2023\022\032\n\003val\030\001 \001" + + "(\021B\010\272H\005:\003\320H\001R\003val\"=\n\037PredefinedSInt64Rul" + + "eEdition2023\022\032\n\003val\030\001 \001(\022B\010\272H\005B\003\320H\001R\003val" + + "\">\n PredefinedFixed32RuleEdition2023\022\032\n\003" + + "val\030\001 \001(\007B\010\272H\005J\003\320H\001R\003val\">\n PredefinedFi" + + "xed64RuleEdition2023\022\032\n\003val\030\001 \001(\006B\010\272H\005R\003" + + "\320H\001R\003val\"?\n!PredefinedSFixed32RuleEditio" + + "n2023\022\032\n\003val\030\001 \001(\017B\010\272H\005Z\003\320H\001R\003val\"?\n!Pre" + + "definedSFixed64RuleEdition2023\022\032\n\003val\030\001 " + + "\001(\020B\010\272H\005b\003\320H\001R\003val\";\n\035PredefinedBoolRule" + + "Edition2023\022\032\n\003val\030\001 \001(\010B\010\272H\005j\003\320H\001R\003val\"" + + "=\n\037PredefinedStringRuleEdition2023\022\032\n\003va" + + "l\030\001 \001(\tB\010\272H\005r\003\320H\001R\003val\"<\n\036PredefinedByte" + + "sRuleEdition2023\022\032\n\003val\030\001 \001(\014B\010\272H\005z\003\320H\001R" + + "\003val\"\337\001\n\035PredefinedEnumRuleEdition2023\022j" + + "\n\003val\030\001 \001(\0162M.buf.validate.conformance.c" + + "ases.PredefinedEnumRuleEdition2023.EnumE" + + "dition2023B\t\272H\006\202\001\003\320H\001R\003val\"R\n\017EnumEditio" + + "n2023\022%\n!ENUM_EDITION2023_ZERO_UNSPECIFI" + + "ED\020\000\022\030\n\024ENUM_EDITION2023_ONE\020\001\"@\n!Predef" + + "inedRepeatedRuleEdition2023\022\033\n\003val\030\001 \003(\004" + + "B\t\272H\006\222\001\003\320H\001R\003val\"\272\001\n\034PredefinedMapRuleEd" + + "ition2023\022b\n\003val\030\001 \003(\0132E.buf.validate.co" + + "nformance.cases.PredefinedMapRuleEdition" + + "2023.ValEntryB\t\272H\006\232\001\003\320H\001R\003val\0326\n\010ValEntr" + + "y\022\020\n\003key\030\001 \001(\004R\003key\022\024\n\005value\030\002 \001(\004R\005valu" + + "e:\0028\001\"[\n!PredefinedDurationRuleEdition20" + + "23\0226\n\003val\030\001 \001(\0132\031.google.protobuf.Durati" + + "onB\t\272H\006\252\001\003\320H\001R\003val\"]\n\"PredefinedTimestam" + + "pRuleEdition2023\0227\n\003val\030\001 \001(\0132\032.google.p" + + "rotobuf.TimestampB\t\272H\006\262\001\003\320H\001R\003val\"c\n%Pre" + + "definedWrappedFloatRuleEdition2023\022:\n\003va" + + "l\030\001 \001(\0132\033.google.protobuf.FloatValueB\013\272H" + + "\010\n\006\325H\000\000\200?R\003val\"i\n&PredefinedWrappedDoubl" + + "eRuleEdition2023\022?\n\003val\030\001 \001(\0132\034.google.p" + + "rotobuf.DoubleValueB\017\272H\014\022\n\321H\000\000\000\000\000\000\360?R\003va" + + "l\"j\n%PredefinedWrappedInt32RuleEdition20" + + "23\022A\n\003val\030\001 \001(\0132\033.google.protobuf.Int32V" + + "alueB\022\272H\017\032\r\322H\n\376\377\377\377\377\377\377\377\377\001R\003val\"k\n%Predefi" + + "nedWrappedInt64RuleEdition2023\022B\n\003val\030\001 " + + "\001(\0132\033.google.protobuf.Int64ValueB\023\272H\020\"\016\322" + + "H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"b\n&PredefinedWrappedU" + + "Int32RuleEdition2023\0228\n\003val\030\001 \001(\0132\034.goog" + + "le.protobuf.UInt32ValueB\010\272H\005*\003\320H\001R\003val\"b" + + "\n&PredefinedWrappedUInt64RuleEdition2023" + + "\0228\n\003val\030\001 \001(\0132\034.google.protobuf.UInt64Va" + + "lueB\010\272H\0052\003\320H\001R\003val\"^\n$PredefinedWrappedB" + + "oolRuleEdition2023\0226\n\003val\030\001 \001(\0132\032.google" + + ".protobuf.BoolValueB\010\272H\005j\003\320H\001R\003val\"b\n&Pr" + + "edefinedWrappedStringRuleEdition2023\0228\n\003" + + "val\030\001 \001(\0132\034.google.protobuf.StringValueB" + + "\010\272H\005r\003\320H\001R\003val\"`\n%PredefinedWrappedBytes" + + "RuleEdition2023\0227\n\003val\030\001 \001(\0132\033.google.pr" + + "otobuf.BytesValueB\010\272H\005z\003\320H\001R\003val\"p\n-Pred" + + "efinedRepeatedWrappedFloatRuleEdition202" + + "3\022?\n\003val\030\001 \003(\0132\033.google.protobuf.FloatVa" + + "lueB\020\272H\r\222\001\n\"\010\n\006\325H\000\000\200?R\003val\"v\n.Predefined" + + "RepeatedWrappedDoubleRuleEdition2023\022D\n\003" + + "val\030\001 \003(\0132\034.google.protobuf.DoubleValueB" + + "\024\272H\021\222\001\016\"\014\022\n\321H\000\000\000\000\000\000\360?R\003val\"w\n-Predefined" + + "RepeatedWrappedInt32RuleEdition2023\022F\n\003v" + + "al\030\001 \003(\0132\033.google.protobuf.Int32ValueB\027\272" + + "H\024\222\001\021\"\017\032\r\322H\n\376\377\377\377\377\377\377\377\377\001R\003val\"x\n-Predefine" + + "dRepeatedWrappedInt64RuleEdition2023\022G\n\003" + + "val\030\001 \003(\0132\033.google.protobuf.Int64ValueB\030" + + "\272H\025\222\001\022\"\020\"\016\322H\013\010\376\377\377\377\377\377\377\377\377\001R\003val\"o\n.Predefi" + + "nedRepeatedWrappedUInt32RuleEdition2023\022" + + "=\n\003val\030\001 \003(\0132\034.google.protobuf.UInt32Val" + + "ueB\r\272H\n\222\001\007\"\005*\003\320H\001R\003val\"o\n.PredefinedRepe" + + "atedWrappedUInt64RuleEdition2023\022=\n\003val\030" + + "\001 \003(\0132\034.google.protobuf.UInt64ValueB\r\272H\n" + + "\222\001\007\"\0052\003\320H\001R\003val\"k\n,PredefinedRepeatedWra" + + "ppedBoolRuleEdition2023\022;\n\003val\030\001 \003(\0132\032.g" + + "oogle.protobuf.BoolValueB\r\272H\n\222\001\007\"\005j\003\320H\001R" + + "\003val\"o\n.PredefinedRepeatedWrappedStringR" + + "uleEdition2023\022=\n\003val\030\001 \003(\0132\034.google.pro" + + "tobuf.StringValueB\r\272H\n\222\001\007\"\005r\003\320H\001R\003val\"m\n" + + "-PredefinedRepeatedWrappedBytesRuleEditi" + + "on2023\022<\n\003val\030\001 \003(\0132\033.google.protobuf.By" + + "tesValueB\r\272H\n\222\001\007\"\005z\003\320H\001R\003val\"\332\003\n\"Predefi" + + "nedAndCustomRuleEdition2023\022w\n\001a\030\001 \001(\021Bi" + + "\272Hf:\003\320H\001\272\001^\n.predefined_and_custom_rule_" + + "scalar_edition_2023\032,this > 24 ? \'\' : \'a" + + " must be greater than 24\'R\001a\022\277\001\n\001b\030\002 \001(\013" + + "2I.buf.validate.conformance.cases.Predef" + + "inedAndCustomRuleEdition2023.NestedBf\272Hc" + + "\272\001`\n0predefined_and_custom_rule_embedded" + + "_edition_2023\022\033b.c must be a multiple of" + + " 3\032\017this.c % 3 == 0R\001b\032y\n\006Nested\022o\n\001c\030\001 " + + "\001(\021Ba\272H^:\003\320H\001\272\001V\n.predefined_and_custom_" + + "rule_nested_edition_2023\032$this > 0 ? \'\' " + + ": \'c must be positive\'R\001c\"\261\001\n*StandardPr" + + "edefinedAndCustomRuleEdition2023\022\202\001\n\001a\030\001" + + " \001(\021Bt\272Hq:\005\0208\320H\001\272\001g\n7standard_predefined" + + "_and_custom_rule_scalar_edition_2023\032,th" + + "is > 24 ? \'\' : \'a must be greater than 2" + + "4\'R\001a:\272\001\n\034float_abs_range_edition_2023\022\030" + + ".buf.validate.FloatRules\030\212\t \001(\002B_\302H\\\nZ\n\034" + + "float.abs_range.edition_2023\022\033float valu" + + "e is out of range\032\035this >= -rule && this" + + " <= ruleR\030floatAbsRangeEdition2023:\277\001\n\035d" + + "ouble_abs_range_edition_2023\022\031.buf.valid" + + "ate.DoubleRules\030\212\t \001(\001Ba\302H^\n\\\n\035double.ab" + + "s_range.edition_2023\022\034double value is ou" + + "t of range\032\035this >= -rule && this <= rul" + + "eR\031doubleAbsRangeEdition2023:\307\001\n\031int32_a" + + "bs_in_edition_2023\022\030.buf.validate.Int32R" + + "ules\030\212\t \003(\005Br\302Ho\nm\n\031int32.abs_in.edition" + + "_2023\022\'value must be in absolute value o" + + "f list\032\'this in rule || this in rule.map" + + "(n, -n)R\025int32AbsInEdition2023:\344\001\n\031int64" + + "_abs_in_edition_2023\022\030.buf.validate.Int6" + + "4Rules\030\212\t \003(\0132\033.google.protobuf.Int64Val" + + "ueBr\302Ho\nm\n\031int64.abs_in.edition_2023\022\'va" + + "lue must be in absolute value of list\032\'t" + + "his in rule || this in rule.map(n, -n)R\025" + + "int64AbsInEdition2023:\237\001\n\030uint32_even_ed" + + "ition_2023\022\031.buf.validate.UInt32Rules\030\212\t" + + " \001(\010BJ\302HG\nE\n\030uint32.even.edition_2023\022\030u" + + "int32 value is not even\032\017this % 2u == 0u" + + "R\025uint32EvenEdition2023:\237\001\n\030uint64_even_" + + "edition_2023\022\031.buf.validate.UInt64Rules\030" + + "\212\t \001(\010BJ\302HG\nE\n\030uint64.even.edition_2023\022" + + "\030uint64 value is not even\032\017this % 2u == " + + "0uR\025uint64EvenEdition2023:\235\001\n\030sint32_eve" + + "n_edition_2023\022\031.buf.validate.SInt32Rule" + + "s\030\212\t \001(\010BH\302HE\nC\n\030sint32.even.edition_202" + + "3\022\030sint32 value is not even\032\rthis % 2 ==" + + " 0R\025sint32EvenEdition2023:\235\001\n\030sint64_eve" + + "n_edition_2023\022\031.buf.validate.SInt64Rule" + + "s\030\212\t \001(\010BH\302HE\nC\n\030sint64.even.edition_202" + + "3\022\030sint64 value is not even\032\rthis % 2 ==" + + " 0R\025sint64EvenEdition2023:\244\001\n\031fixed32_ev" + + "en_edition_2023\022\032.buf.validate.Fixed32Ru" + + "les\030\212\t \001(\010BL\302HI\nG\n\031fixed32.even.edition_" + + "2023\022\031fixed32 value is not even\032\017this % " + + "2u == 0uR\026fixed32EvenEdition2023:\244\001\n\031fix" + + "ed64_even_edition_2023\022\032.buf.validate.Fi" + + "xed64Rules\030\212\t \001(\010BL\302HI\nG\n\031fixed64.even.e" + + "dition_2023\022\031fixed64 value is not even\032\017" + + "this % 2u == 0uR\026fixed64EvenEdition2023:" + + "\247\001\n\032sfixed32_even_edition_2023\022\033.buf.val" + + "idate.SFixed32Rules\030\212\t \001(\010BL\302HI\nG\n\032sfixe" + + "d32.even.edition_2023\022\032sfixed32 value is" + + " not even\032\rthis % 2 == 0R\027sfixed32EvenEd" + + "ition2023:\247\001\n\032sfixed64_even_edition_2023" + + "\022\033.buf.validate.SFixed64Rules\030\212\t \001(\010BL\302H" + + "I\nG\n\032sfixed64.even.edition_2023\022\032sfixed6" + + "4 value is not even\032\rthis % 2 == 0R\027sfix" + + "ed64EvenEdition2023:\227\001\n\027bool_false_editi" + + "on_2023\022\027.buf.validate.BoolRules\030\212\t \001(\010B" + + "F\302HC\nA\n\027bool.false.edition_2023\022\027bool va" + + "lue is not false\032\rthis == falseR\024boolFal" + + "seEdition2023:\217\002\n\036string_valid_path_edit" + + "ion_2023\022\031.buf.validate.StringRules\030\212\t \001" + + "(\010B\256\001\302H\252\001\n\247\001\n\036string.valid_path.edition_" + + "2023\032\204\001!this.matches(\'^([^/.][^/]?|[^/][" + + "^/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^" + + "/]{3,}))*$\') ? \'not a valid path: `%s`\'." + + "format([this]) : \'\'R\032stringValidPathEdit" + + "ion2023:\223\002\n\035bytes_valid_path_edition_202" + + "3\022\030.buf.validate.BytesRules\030\212\t \001(\010B\265\001\302H\261" + + "\001\n\256\001\n\035bytes.valid_path.edition_2023\032\214\001!s" + + "tring(this).matches(\'^([^/.][^/]?|[^/][^" + + "/.]|[^/]{3,})(/([^/.][^/]?|[^/][^/.]|[^/" + + "]{3,}))*$\') ? \'not a valid path: `%s`\'.f" + + "ormat([this]) : \'\'R\031bytesValidPathEditio" + + "n2023:\243\001\n\032enum_non_zero_edition_2023\022\027.b" + + "uf.validate.EnumRules\030\212\t \001(\010BM\302HJ\nH\n\032enu" + + "m.non_zero.edition_2023\022\032enum value is n" + + "ot non-zero\032\016int(this) != 0R\026enumNonZero" + + "Edition2023:\335\001\n#repeated_at_least_five_e" + + "dition_2023\022\033.buf.validate.RepeatedRules" + + "\030\212\t \001(\010Br\302Ho\nm\n#repeated.at_least_five.e" + + "dition_2023\022-repeated field must have at" + + " least five values\032\027uint(this.size()) >=" + + " 5uR\036repeatedAtLeastFiveEdition2023:\275\001\n\036" + + "map_at_least_five_edition_2023\022\026.buf.val" + + "idate.MapRules\030\212\t \001(\010Ba\302H^\n\\\n\036map.at_lea" + + "st_five.edition_2023\022!map must have at l" + + "east five pairs\032\027uint(this.size()) >= 5u" + + "R\031mapAtLeastFiveEdition2023:\312\001\n\036duration" + + "_too_long_edition_2023\022\033.buf.validate.Du" + + "rationRules\030\212\t \001(\010Bh\302He\nc\n\036duration.too_" + + "long.edition_2023\022(duration can\'t be lon" + + "ger than 10 seconds\032\027this <= duration(\'1" + + "0s\')R\032durationTooLongEdition2023:\331\001\n\037tim" + + "estamp_in_range_edition_2023\022\034.buf.valid" + + "ate.TimestampRules\030\212\t \001(\010Bt\302Hq\no\n!timest" + + "amp.time_range.edition_2023\022\026timestamp o" + + "ut of range\0322int(this) >= 1049587200 && " + + "int(this) <= 1080432000R\033timestampInRang" + + "eEdition2023B\345\001\n$build.buf.validate.conf" + + "ormance.casesB!PredefinedRulesProtoEditi" + + "onsProtoP\001\242\002\004BVCC\252\002\036Buf.Validate.Conform" + + "ance.Cases\312\002\036Buf\\Validate\\Conformance\\Ca" + + "ses\342\002*Buf\\Validate\\Conformance\\Cases\\GPB" + + "Metadata\352\002!Buf::Validate::Conformance::C" + + "asesb\010editionsp\350\007" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -563,6 +706,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), }); internal_static_buf_validate_conformance_cases_PredefinedFloatRuleEdition2023_descriptor = getDescriptor().getMessageTypes().get(0); @@ -690,8 +834,116 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedTimestampRuleEdition2023_descriptor, new java.lang.String[] { "Val", }); - internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor = + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor = getDescriptor().getMessageTypes().get(20); + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedFloatRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedDoubleRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt32RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedInt64RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt32RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedUInt64RuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBoolRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedStringRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_buf_validate_conformance_cases_PredefinedRepeatedWrappedBytesRuleEdition2023_descriptor, + new java.lang.String[] { "Val", }); + internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor = + getDescriptor().getMessageTypes().get(38); internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_descriptor, @@ -703,15 +955,15 @@ public static void registerAllExtensions( internal_static_buf_validate_conformance_cases_PredefinedAndCustomRuleEdition2023_Nested_descriptor, new java.lang.String[] { "C", }); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(39); internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_buf_validate_conformance_cases_StandardPredefinedAndCustomRuleEdition2023_descriptor, new java.lang.String[] { "A", }); floatAbsRangeEdition2023.internalInit(descriptor.getExtensions().get(0)); doubleAbsRangeEdition2023.internalInit(descriptor.getExtensions().get(1)); - int32EvenEdition2023.internalInit(descriptor.getExtensions().get(2)); - int64EvenEdition2023.internalInit(descriptor.getExtensions().get(3)); + int32AbsInEdition2023.internalInit(descriptor.getExtensions().get(2)); + int64AbsInEdition2023.internalInit(descriptor.getExtensions().get(3)); uint32EvenEdition2023.internalInit(descriptor.getExtensions().get(4)); uint64EvenEdition2023.internalInit(descriptor.getExtensions().get(5)); sint32EvenEdition2023.internalInit(descriptor.getExtensions().get(6)); @@ -732,6 +984,7 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.boolFalseEdition2023); @@ -742,8 +995,8 @@ public static void registerAllExtensions( registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.fixed32EvenEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.fixed64EvenEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.floatAbsRangeEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int32EvenEdition2023); - registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int64EvenEdition2023); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int32AbsInEdition2023); + registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.int64AbsInEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.mapAtLeastFiveEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.repeatedAtLeastFiveEdition2023); registry.add(build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.sfixed32EvenEdition2023); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023.java new file mode 100644 index 00000000..065eba1e --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023} + */ +public final class PredefinedWrappedBoolRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) + PredefinedWrappedBoolRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBoolRuleEdition2023.class.getName()); + } + // Use PredefinedWrappedBoolRuleEdition2023.newBuilder() to construct. + private PredefinedWrappedBoolRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBoolRuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue val_; + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BoolValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BoolValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBoolRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..1dd191b2 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBoolRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBoolRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BoolValue getVal(); + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2.java new file mode 100644 index 00000000..a483ad37 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2} + */ +public final class PredefinedWrappedBoolRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) + PredefinedWrappedBoolRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBoolRuleProto2.class.getName()); + } + // Use PredefinedWrappedBoolRuleProto2.newBuilder() to construct. + private PredefinedWrappedBoolRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBoolRuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue val_; + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BoolValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BoolValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBoolRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2OrBuilder.java new file mode 100644 index 00000000..ba3a34f7 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBoolRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BoolValue getVal(); + /** + * optional .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3.java new file mode 100644 index 00000000..499afaa3 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3} + */ +public final class PredefinedWrappedBoolRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) + PredefinedWrappedBoolRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBoolRuleProto3.class.getName()); + } + // Use PredefinedWrappedBoolRuleProto3.newBuilder() to construct. + private PredefinedWrappedBoolRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBoolRuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BoolValue val_; + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getVal() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBoolRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BoolValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> valBuilder_; + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BoolValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BoolValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BoolValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BoolValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BoolValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBoolRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3OrBuilder.java new file mode 100644 index 00000000..51c74f62 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBoolRuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBoolRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBoolRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BoolValue getVal(); + /** + * .google.protobuf.BoolValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BoolValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023.java new file mode 100644 index 00000000..02e8d835 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023} + */ +public final class PredefinedWrappedBytesRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) + PredefinedWrappedBytesRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBytesRuleEdition2023.class.getName()); + } + // Use PredefinedWrappedBytesRuleEdition2023.newBuilder() to construct. + private PredefinedWrappedBytesRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBytesRuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BytesValue val_; + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BytesValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BytesValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BytesValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBytesRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..5a203f6f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBytesRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBytesRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BytesValue getVal(); + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2.java new file mode 100644 index 00000000..5a199b4b --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2} + */ +public final class PredefinedWrappedBytesRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) + PredefinedWrappedBytesRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBytesRuleProto2.class.getName()); + } + // Use PredefinedWrappedBytesRuleProto2.newBuilder() to construct. + private PredefinedWrappedBytesRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBytesRuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BytesValue val_; + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BytesValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BytesValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BytesValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBytesRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2OrBuilder.java new file mode 100644 index 00000000..86966ccc --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBytesRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BytesValue getVal(); + /** + * optional .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3.java new file mode 100644 index 00000000..1db04909 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3} + */ +public final class PredefinedWrappedBytesRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) + PredefinedWrappedBytesRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedBytesRuleProto3.class.getName()); + } + // Use PredefinedWrappedBytesRuleProto3.newBuilder() to construct. + private PredefinedWrappedBytesRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedBytesRuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.BytesValue val_; + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.BytesValue getVal() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedBytesRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.BytesValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> valBuilder_; + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.BytesValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.BytesValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.BytesValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.BytesValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.BytesValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.BytesValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BytesValue, com.google.protobuf.BytesValue.Builder, com.google.protobuf.BytesValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedBytesRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3OrBuilder.java new file mode 100644 index 00000000..9d507843 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedBytesRuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedBytesRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedBytesRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.BytesValue getVal(); + /** + * .google.protobuf.BytesValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.BytesValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023.java new file mode 100644 index 00000000..e9653133 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023} + */ +public final class PredefinedWrappedDoubleRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) + PredefinedWrappedDoubleRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedDoubleRuleEdition2023.class.getName()); + } + // Use PredefinedWrappedDoubleRuleEdition2023.newBuilder() to construct. + private PredefinedWrappedDoubleRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedDoubleRuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.DoubleValue val_; + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.DoubleValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.DoubleValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedDoubleRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..32435a53 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedDoubleRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.DoubleValue getVal(); + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2.java new file mode 100644 index 00000000..2127ff58 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2} + */ +public final class PredefinedWrappedDoubleRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) + PredefinedWrappedDoubleRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedDoubleRuleProto2.class.getName()); + } + // Use PredefinedWrappedDoubleRuleProto2.newBuilder() to construct. + private PredefinedWrappedDoubleRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedDoubleRuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.DoubleValue val_; + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.DoubleValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.DoubleValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedDoubleRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2OrBuilder.java new file mode 100644 index 00000000..7d73dc1f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedDoubleRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.DoubleValue getVal(); + /** + * optional .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3.java new file mode 100644 index 00000000..cab4a666 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3} + */ +public final class PredefinedWrappedDoubleRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) + PredefinedWrappedDoubleRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedDoubleRuleProto3.class.getName()); + } + // Use PredefinedWrappedDoubleRuleProto3.newBuilder() to construct. + private PredefinedWrappedDoubleRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedDoubleRuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.DoubleValue val_; + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.DoubleValue getVal() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedDoubleRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.DoubleValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> valBuilder_; + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.DoubleValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.DoubleValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.DoubleValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.DoubleValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.DoubleValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.DoubleValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.DoubleValue, com.google.protobuf.DoubleValue.Builder, com.google.protobuf.DoubleValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedDoubleRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3OrBuilder.java new file mode 100644 index 00000000..b5e09b2f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedDoubleRuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedDoubleRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedDoubleRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.DoubleValue getVal(); + /** + * .google.protobuf.DoubleValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.DoubleValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023.java new file mode 100644 index 00000000..ad84002f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023} + */ +public final class PredefinedWrappedFloatRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) + PredefinedWrappedFloatRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedFloatRuleEdition2023.class.getName()); + } + // Use PredefinedWrappedFloatRuleEdition2023.newBuilder() to construct. + private PredefinedWrappedFloatRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedFloatRuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.FloatValue val_; + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FloatValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.FloatValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.FloatValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedFloatRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..b1308bcf --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedFloatRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedFloatRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.FloatValue getVal(); + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2.java new file mode 100644 index 00000000..7b2b1eef --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2} + */ +public final class PredefinedWrappedFloatRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) + PredefinedWrappedFloatRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedFloatRuleProto2.class.getName()); + } + // Use PredefinedWrappedFloatRuleProto2.newBuilder() to construct. + private PredefinedWrappedFloatRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedFloatRuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.FloatValue val_; + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FloatValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.FloatValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.FloatValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedFloatRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2OrBuilder.java new file mode 100644 index 00000000..8fb95321 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedFloatRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.FloatValue getVal(); + /** + * optional .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3.java new file mode 100644 index 00000000..960ea647 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3} + */ +public final class PredefinedWrappedFloatRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) + PredefinedWrappedFloatRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedFloatRuleProto3.class.getName()); + } + // Use PredefinedWrappedFloatRuleProto3.newBuilder() to construct. + private PredefinedWrappedFloatRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedFloatRuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.FloatValue val_; + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.FloatValue getVal() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedFloatRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.FloatValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> valBuilder_; + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.FloatValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.FloatValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.FloatValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.FloatValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.FloatValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.FloatValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedFloatRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3OrBuilder.java new file mode 100644 index 00000000..d0a3a96d --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedFloatRuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedFloatRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedFloatRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.FloatValue getVal(); + /** + * .google.protobuf.FloatValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.FloatValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023.java new file mode 100644 index 00000000..be3da808 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023} + */ +public final class PredefinedWrappedInt32RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) + PredefinedWrappedInt32RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt32RuleEdition2023.class.getName()); + } + // Use PredefinedWrappedInt32RuleEdition2023.newBuilder() to construct. + private PredefinedWrappedInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt32RuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value val_; + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt32RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..6d58758c --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt32RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt32RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int32Value getVal(); + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2.java new file mode 100644 index 00000000..b3bdfde5 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2} + */ +public final class PredefinedWrappedInt32RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) + PredefinedWrappedInt32RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt32RuleProto2.class.getName()); + } + // Use PredefinedWrappedInt32RuleProto2.newBuilder() to construct. + private PredefinedWrappedInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt32RuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value val_; + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt32RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2OrBuilder.java new file mode 100644 index 00000000..01311658 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt32RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int32Value getVal(); + /** + * optional .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3.java new file mode 100644 index 00000000..82de24e8 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3} + */ +public final class PredefinedWrappedInt32RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) + PredefinedWrappedInt32RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt32RuleProto3.class.getName()); + } + // Use PredefinedWrappedInt32RuleProto3.newBuilder() to construct. + private PredefinedWrappedInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt32RuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int32Value val_; + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int32Value getVal() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt32RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int32Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt32RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3OrBuilder.java new file mode 100644 index 00000000..27c942f2 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt32RuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt32RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt32RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int32Value getVal(); + /** + * .google.protobuf.Int32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023.java new file mode 100644 index 00000000..48d5334c --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023} + */ +public final class PredefinedWrappedInt64RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) + PredefinedWrappedInt64RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt64RuleEdition2023.class.getName()); + } + // Use PredefinedWrappedInt64RuleEdition2023.newBuilder() to construct. + private PredefinedWrappedInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt64RuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int64Value val_; + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt64RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..49569172 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt64RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt64RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int64Value getVal(); + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2.java new file mode 100644 index 00000000..3c34fad2 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2} + */ +public final class PredefinedWrappedInt64RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) + PredefinedWrappedInt64RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt64RuleProto2.class.getName()); + } + // Use PredefinedWrappedInt64RuleProto2.newBuilder() to construct. + private PredefinedWrappedInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt64RuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int64Value val_; + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt64RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2OrBuilder.java new file mode 100644 index 00000000..2180efa5 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt64RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int64Value getVal(); + /** + * optional .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3.java new file mode 100644 index 00000000..964d4864 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3} + */ +public final class PredefinedWrappedInt64RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) + PredefinedWrappedInt64RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedInt64RuleProto3.class.getName()); + } + // Use PredefinedWrappedInt64RuleProto3.newBuilder() to construct. + private PredefinedWrappedInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedInt64RuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.Int64Value val_; + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.Int64Value getVal() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedInt64RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Int64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.Int64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.Int64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.Int64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.Int64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.Int64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.Int64Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedInt64RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3OrBuilder.java new file mode 100644 index 00000000..7b6de355 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedInt64RuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedInt64RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedInt64RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.Int64Value getVal(); + /** + * .google.protobuf.Int64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.Int64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023.java new file mode 100644 index 00000000..31883e05 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023} + */ +public final class PredefinedWrappedStringRuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) + PredefinedWrappedStringRuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedStringRuleEdition2023.class.getName()); + } + // Use PredefinedWrappedStringRuleEdition2023.newBuilder() to construct. + private PredefinedWrappedStringRuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedStringRuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.StringValue val_; + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.StringValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.StringValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedStringRuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023OrBuilder.java new file mode 100644 index 00000000..977be4ca --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedStringRuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedStringRuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.StringValue getVal(); + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2.java new file mode 100644 index 00000000..865c3a7c --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2} + */ +public final class PredefinedWrappedStringRuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) + PredefinedWrappedStringRuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedStringRuleProto2.class.getName()); + } + // Use PredefinedWrappedStringRuleProto2.newBuilder() to construct. + private PredefinedWrappedStringRuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedStringRuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.StringValue val_; + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.StringValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.StringValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedStringRuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2OrBuilder.java new file mode 100644 index 00000000..a45e8822 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedStringRuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.StringValue getVal(); + /** + * optional .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3.java new file mode 100644 index 00000000..220af8a2 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3} + */ +public final class PredefinedWrappedStringRuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) + PredefinedWrappedStringRuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedStringRuleProto3.class.getName()); + } + // Use PredefinedWrappedStringRuleProto3.newBuilder() to construct. + private PredefinedWrappedStringRuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedStringRuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.StringValue val_; + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.StringValue getVal() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedStringRuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.StringValue val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> valBuilder_; + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.StringValue getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.StringValue.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.StringValue value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.StringValue.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValue.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.StringValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.StringValue.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedStringRuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3OrBuilder.java new file mode 100644 index 00000000..ba518583 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedStringRuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedStringRuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedStringRuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.StringValue getVal(); + /** + * .google.protobuf.StringValue val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.StringValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023.java new file mode 100644 index 00000000..222f7458 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023} + */ +public final class PredefinedWrappedUInt32RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) + PredefinedWrappedUInt32RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt32RuleEdition2023.class.getName()); + } + // Use PredefinedWrappedUInt32RuleEdition2023.newBuilder() to construct. + private PredefinedWrappedUInt32RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt32RuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt32Value val_; + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt32RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..85444aa9 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt32RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt32Value getVal(); + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2.java new file mode 100644 index 00000000..9ba8224c --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2} + */ +public final class PredefinedWrappedUInt32RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) + PredefinedWrappedUInt32RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt32RuleProto2.class.getName()); + } + // Use PredefinedWrappedUInt32RuleProto2.newBuilder() to construct. + private PredefinedWrappedUInt32RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt32RuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt32Value val_; + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt32RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2OrBuilder.java new file mode 100644 index 00000000..2cd37880 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt32RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt32Value getVal(); + /** + * optional .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3.java new file mode 100644 index 00000000..060e6a56 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3} + */ +public final class PredefinedWrappedUInt32RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) + PredefinedWrappedUInt32RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt32RuleProto3.class.getName()); + } + // Use PredefinedWrappedUInt32RuleProto3.newBuilder() to construct. + private PredefinedWrappedUInt32RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt32RuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt32Value val_; + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt32Value getVal() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt32RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt32Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt32Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt32Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt32Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt32Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt32RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3OrBuilder.java new file mode 100644 index 00000000..848cddcd --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt32RuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt32RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt32RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt32Value getVal(); + /** + * .google.protobuf.UInt32Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt32ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023.java new file mode 100644 index 00000000..b7c6df44 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023} + */ +public final class PredefinedWrappedUInt64RuleEdition2023 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) + PredefinedWrappedUInt64RuleEdition2023OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt64RuleEdition2023.class.getName()); + } + // Use PredefinedWrappedUInt64RuleEdition2023.newBuilder() to construct. + private PredefinedWrappedUInt64RuleEdition2023(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt64RuleEdition2023() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt64Value val_; + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProtoEditionsProto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleEdition2023_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt64RuleEdition2023 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023OrBuilder.java new file mode 100644 index 00000000..b6a8e451 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleEdition2023OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto_editions.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt64RuleEdition2023OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleEdition2023) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt64Value getVal(); + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2.java new file mode 100644 index 00000000..f8addaff --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2} + */ +public final class PredefinedWrappedUInt64RuleProto2 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) + PredefinedWrappedUInt64RuleProto2OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt64RuleProto2.class.getName()); + } + // Use PredefinedWrappedUInt64RuleProto2.newBuilder() to construct. + private PredefinedWrappedUInt64RuleProto2(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt64RuleProto2() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt64Value val_; + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto2Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto2_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + } + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt64RuleProto2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2OrBuilder.java new file mode 100644 index 00000000..e44b82f3 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto2OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto2.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt64RuleProto2OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto2) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt64Value getVal(); + /** + * optional .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3.java new file mode 100644 index 00000000..a2971499 --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3.java @@ -0,0 +1,558 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +/** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3} + */ +public final class PredefinedWrappedUInt64RuleProto3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) + PredefinedWrappedUInt64RuleProto3OrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 28, + /* patch= */ 1, + /* suffix= */ "", + PredefinedWrappedUInt64RuleProto3.class.getName()); + } + // Use PredefinedWrappedUInt64RuleProto3.newBuilder() to construct. + private PredefinedWrappedUInt64RuleProto3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PredefinedWrappedUInt64RuleProto3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.Builder.class); + } + + private int bitField0_; + public static final int VAL_FIELD_NUMBER = 1; + private com.google.protobuf.UInt64Value val_; + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + @java.lang.Override + public com.google.protobuf.UInt64Value getVal() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getVal()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getVal()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3)) { + return super.equals(obj); + } + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 other = (build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) obj; + + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.class, build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.Builder.class); + } + + // Construct using build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return build.buf.validate.conformance.cases.PredefinedRulesProto3Proto.internal_static_buf_validate_conformance_cases_PredefinedWrappedUInt64RuleProto3_descriptor; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 getDefaultInstanceForType() { + return build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.getDefaultInstance(); + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 build() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 buildPartial() { + build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 result = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) { + return mergeFrom((build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 other) { + if (other == build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3.getDefaultInstance()) return this; + if (other.hasVal()) { + mergeVal(other.getVal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.UInt64Value val_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> valBuilder_; + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + public com.google.protobuf.UInt64Value getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder setVal( + com.google.protobuf.UInt64Value.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder mergeVal(com.google.protobuf.UInt64Value value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + val_ != null && + val_ != com.google.protobuf.UInt64Value.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000001); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64Value.Builder getValBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getValFieldBuilder().getBuilder(); + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + public com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.google.protobuf.UInt64Value.getDefaultInstance() : val_; + } + } + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder> + getValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.UInt64Value, com.google.protobuf.UInt64Value.Builder, com.google.protobuf.UInt64ValueOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + // @@protoc_insertion_point(builder_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) + } + + // @@protoc_insertion_point(class_scope:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) + private static final build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3(); + } + + public static build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PredefinedWrappedUInt64RuleProto3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public build.buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3OrBuilder.java new file mode 100644 index 00000000..352bee7f --- /dev/null +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/PredefinedWrappedUInt64RuleProto3OrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: buf/validate/conformance/cases/predefined_rules_proto3.proto +// Protobuf Java Version: 4.28.1 + +package build.buf.validate.conformance.cases; + +public interface PredefinedWrappedUInt64RuleProto3OrBuilder extends + // @@protoc_insertion_point(interface_extends:buf.validate.conformance.cases.PredefinedWrappedUInt64RuleProto3) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + * @return The val. + */ + com.google.protobuf.UInt64Value getVal(); + /** + * .google.protobuf.UInt64Value val = 1 [json_name = "val", (.buf.validate.field) = { ... } + */ + com.google.protobuf.UInt64ValueOrBuilder getValOrBuilder(); +} diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java index af91d4c5..941bff52 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023.java @@ -46,7 +46,7 @@ private StandardPredefinedAndCustomRuleEdition2023() { public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -54,7 +54,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -77,7 +77,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } getUnknownFields().writeTo(output); } @@ -90,7 +90,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -342,7 +342,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -365,7 +365,7 @@ public Builder mergeFrom( private int a_ ; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -373,7 +373,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -381,7 +381,7 @@ public int getA() { return a_; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -393,7 +393,7 @@ public Builder setA(int value) { return this; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java index 97c6cde0..4101f001 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleEdition2023OrBuilder.java @@ -10,12 +10,12 @@ public interface StandardPredefinedAndCustomRuleEdition2023OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ boolean hasA(); /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java index 22050dd6..f8a67846 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2.java @@ -46,7 +46,7 @@ private StandardPredefinedAndCustomRuleProto2() { public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -54,7 +54,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -77,7 +77,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } getUnknownFields().writeTo(output); } @@ -90,7 +90,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -342,7 +342,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -365,7 +365,7 @@ public Builder mergeFrom( private int a_ ; /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ @java.lang.Override @@ -373,7 +373,7 @@ public boolean hasA() { return ((bitField0_ & 0x00000001) != 0); } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -381,7 +381,7 @@ public int getA() { return a_; } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -393,7 +393,7 @@ public Builder setA(int value) { return this; } /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java index 5b66d977..72326e6d 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto2OrBuilder.java @@ -10,12 +10,12 @@ public interface StandardPredefinedAndCustomRuleProto2OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return Whether the a field is set. */ boolean hasA(); /** - * optional int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * optional sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java index d77f246c..05ebee24 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3.java @@ -45,7 +45,7 @@ private StandardPredefinedAndCustomRuleProto3() { public static final int A_FIELD_NUMBER = 1; private int a_ = 0; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -68,7 +68,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (a_ != 0) { - output.writeInt32(1, a_); + output.writeSInt32(1, a_); } getUnknownFields().writeTo(output); } @@ -81,7 +81,7 @@ public int getSerializedSize() { size = 0; if (a_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, a_); + .computeSInt32Size(1, a_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -325,7 +325,7 @@ public Builder mergeFrom( done = true; break; case 8: { - a_ = input.readInt32(); + a_ = input.readSInt32(); bitField0_ |= 0x00000001; break; } // case 8 @@ -348,7 +348,7 @@ public Builder mergeFrom( private int a_ ; /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ @java.lang.Override @@ -356,7 +356,7 @@ public int getA() { return a_; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @param value The a to set. * @return This builder for chaining. */ @@ -368,7 +368,7 @@ public Builder setA(int value) { return this; } /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearA() { diff --git a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java index dc4569bc..89ba4177 100644 --- a/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java +++ b/conformance/src/main/java/build/buf/validate/conformance/cases/StandardPredefinedAndCustomRuleProto3OrBuilder.java @@ -10,7 +10,7 @@ public interface StandardPredefinedAndCustomRuleProto3OrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * int32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } + * sint32 a = 1 [json_name = "a", (.buf.validate.field) = { ... } * @return The a. */ int getA(); diff --git a/gradle.properties b/gradle.properties index 55d6e2f0..0e405393 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # Version of buf.build/bufbuild/protovalidate to use. -protovalidate.version = v0.8.1 +protovalidate.version = v0.8.2 # Arguments to the protovalidate-conformance CLI protovalidate.conformance.args = --strict_message --strict_error diff --git a/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java b/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java index 1881a882..207aed4d 100644 --- a/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java +++ b/src/main/java/build/buf/protovalidate/internal/constraints/ConstraintCache.java @@ -243,7 +243,7 @@ private Env getRuleEnv( Variable.RULES_NAME, Decls.newObjectType(constraintMessage.getDescriptorForType().getFullName())), Decls.newVar( - Variable.RULE_NAME, DescriptorMappings.getCELType(constraintFieldDesc, forItems)))); + Variable.RULE_NAME, DescriptorMappings.getCELType(constraintFieldDesc, false)))); } /** diff --git a/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java b/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java index 9866bcb6..c444d2ee 100644 --- a/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java +++ b/src/main/java/build/buf/protovalidate/internal/constraints/DescriptorMappings.java @@ -215,8 +215,21 @@ static Type getCELType(FieldDescriptor fieldDescriptor, boolean forItems) { return Decls.newWellKnownType(Type.WellKnownType.DURATION); case "google.protobuf.Timestamp": return Decls.newWellKnownType(Type.WellKnownType.TIMESTAMP); + case "google.protobuf.BytesValue": + return Decls.newWrapperType(Decls.Bytes); + case "google.protobuf.DoubleValue": + case "google.protobuf.FloatValue": + return Decls.newWrapperType(Decls.Double); + case "google.protobuf.Int32Value": + case "google.protobuf.Int64Value": + return Decls.newWrapperType(Decls.Int); + case "google.protobuf.StringValue": + return Decls.newWrapperType(Decls.String); + case "google.protobuf.UInt32Value": + case "google.protobuf.UInt64Value": + return Decls.newWrapperType(Decls.Uint); default: - return Decls.newObjectType(fieldDescriptor.getFullName()); + return Decls.newObjectType(fqn); } } return DescriptorMappings.protoKindToCELType(fieldDescriptor.getType());